diff --git a/docs/200.html b/docs/200.html index 9ff06731..093aead4 100644 --- a/docs/200.html +++ b/docs/200.html @@ -1,9 +1,9 @@ - shogi-player - shogi-player + shogi-player - shogi-player -
Loading...
- +
Loading...
+ diff --git a/docs/_nuxt/07be50e.js b/docs/_nuxt/07be50e.js deleted file mode 100644 index 8b515b16..00000000 --- a/docs/_nuxt/07be50e.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23,4,8,9,10,11,12,13,14,15,16,17,18,19,20,22,25,29,30,31,32,33,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,62,64,65,68,69,70,71],{1:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={inject:["TheSp"]}},100:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);n(12);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"none",name:"none"},{key:"wood_normal",name:"普通の木目"},{key:"wood_bright",name:"明るい木目"}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("wood_normal").key),console.log(d.fetch("wood_normal").name))}).call(this,n(179),"/index.js")},101:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);n(12);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"none",name:"none",format:""},{key:"nureyon",name:"ぬれよん",format:"SVG"},{key:"paper",name:"紙面風",format:"SVG"},{key:"zuan",name:"図案駒",format:"PNG"},{key:"portella",name:"Portella",format:"PNG"}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("a").key),console.log(d.fetch("a").name))}).call(this,n(179),"/index.js")},127:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(21),c=n(177),_=n(178),l=(n(11),n(45),n(98),n(530),n(57),n(74),n(543),n(23),n(180)),f=n(532),h=function(){function e(t){var n,o;if(Object(c.a)(this,e),"string"==typeof t){var _=this.__parse_from_string(t),l=Object(r.a)(_,2);n=l[0],o=l[1]}else{var f=Object(r.a)(t,2);n=f[0],o=f[1]}var h=[n,o];this._x=h[0],this._y=h[1]}return Object(_.a)(e,[{key:"key",get:function(){return[this._x,this._y].toString()}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"to_a",get:function(){return[this.x,this.y]}},{key:"to_h",get:function(){return{x:this.x,y:this.y}}},{key:"human_x",get:function(){return l.a.dimension-this._x}},{key:"kanji_human_x",get:function(){return e.TO_KANJI_REPLACE_TABLE_X[this.human_x]}},{key:"kanji_human_y",get:function(){return e.TO_KANJI_REPLACE_TABLE_Y[this.human_y]}},{key:"yomiage_x",get:function(){return f.a.fetch(this.human_x.toString()).yomiage}},{key:"yomiage_y",get:function(){return f.a.fetch(this.human_y.toString()).yomiage}},{key:"human_y",get:function(){return this._y+1}},{key:"flip_all",get:function(){return e.fetch([l.a.dimension-1-this._x,l.a.dimension-1-this._y])}},{key:"flop",get:function(){return e.fetch([l.a.dimension-1-this._x,this._y])}},{key:"flop_if",value:function(e){return e?this.flop:this}},{key:"sp_flip_if_white",value:function(e){return"white"===e.key?this.flip_all:this}},{key:"to_sfen",get:function(){return[l.a.dimension-this._x,e.TO_SFEN_REPLACE_TABLE_Y[this._y]].join("")}},{key:"css_place_key",get:function(){return["place",this.human_x,this.human_y].join("_")}},{key:"human_xy_ary",get:function(){return[this.human_x,this.human_y]}},{key:"kanji_human",get:function(){return[this.kanji_human_x,this.kanji_human_y].join("")}},{key:"digit_human",get:function(){return[this.human_x,this.human_y].join("")}},{key:"even_p",get:function(){return 0==(this.human_x+this.human_y&1)}},{key:"odd_p",get:function(){return!this.even_p}},{key:"tennozan_p",get:function(){return this.x===Math.trunc(l.a.dimension/2)&&this.y===Math.trunc(l.a.dimension/2)}},{key:"rotate_add",value:function(t,n){var o=this.__new_pos(this._x,t),r=this.__new_pos(this._y,n);return e.fetch([o,r])}},{key:"__new_pos",value:function(e,t){return Math.trunc((e+t+l.a.dimension)%l.a.dimension)}},{key:"__parse_from_string",value:function(s){var t=s.split("").map((function(t){var n;return Number(null!==(n=e.ANY_TO_NUMBER_REPLACE_TABLE[t])&&void 0!==n?n:t)})),n=Object(r.a)(t,2),o=n[0],c=n[1];return[l.a.dimension-o,c-1]}}],[{key:"fetch",value:function(t){return t instanceof this?t:Object.freeze(new e(t))}},{key:"xy_valid_p",value:function(e,t){return 0<=e&&e2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,r=this.hold_pieces_count(n,e)+t,o=this.hold_pieces[n.key];f.a.delete(o,e.key),r>=1&&f.a.set(o,e.key,r)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var r=this.hold_pieces_count(n,e);return t>r&&(t=r),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r=[];return t&&r.push("location_".concat(t.location.key)),r}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r="";return t&&(r=t.name),r}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return _.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return _()(e).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return _()(n).filter((function(n){var e=Object(r.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;_.a.forIn(this.hold_pieces[n.key],(function(t,r){var o=y.a.fetch(r);e.hold_pieces_add(n,o,-t),e.piece_box_add(o,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;_.a.forIn(this.piece_box,(function(t,r){var o=y.a.fetch(r);e.piece_box_add(o,-t),e.hold_pieces_add(n,o,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),w.a.fetch(n).piece_box.forEach((function(n){var t=Object(r.a)(n,2),o=t[0],c=t[1];e.piece_box_add(y.a.fetch(o),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;w.a.fetch("全部駒箱").piece_box.forEach((function(o){var c=Object(r.a)(o,2),l=c[0],_=c[1],f=y.a.fetch(l),h=_-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return O.a.values.forEach((function(t){_.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var r=t.piece;e.board.delete_at(t.place),"K"===r.key?e.piece_box_add(r):e.hold_pieces_add(O.a.fetch("white"),r)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=O.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,r=null,o=null;return"bottom_left"===n&&(e=0,t=1,r=h.a.dimension-1,o=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,r=h.a.dimension-1,o=-1),[{piece:"K",promoted:!1,location:"black",place:[e,r]},{piece:"P",promoted:!0,location:"white",place:[e,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:O.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return U}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),w=t(549),O=t(550),x=t(551),j=t(552),P=t(553),R=t(554),N=t(555),E=t(556),B=t(557),S=t(558),L=t(559),M=t(560),A=t(561),$=t(562),z=t(563),K=t(564),D=t(565),G=t(566),I=t(567),T=t(568),F=t(569);function C(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var U=function(n){Object(l.a)(t,n);var e=C(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:O.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:N.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:L.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:M.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:z.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:T.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:F.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&(console.log(U.fetch("simple").key),console.log(U.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var o=t(20),c=t(177),l=t(178),_=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(_),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(l.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var r=!1,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,r=!1,o=n.once_vectors;return o&&(r=o.some((function(r){if(r)return t.once_reach_vec(n,e,r)}))),r}},{key:"once_reach_vec",value:function(n,e,t){var r=t[0],o=t[1]*n.location.value_sign,c=n.place.x+r,l=n.place.y+o;return c===e.x&&l===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!1,c=n.repeat_vectors;return c&&(o=c.some((function(o){if(o)return t.repeat_reach_vec(n,e,o,r)}))),o}},{key:"repeat_reach_vec",value:function(n,e,t){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.place.x,c=n.place.y,l=t[0],_=t[1]*n.location.value_sign,f=o+l,h=c+_,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==r.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(o+=c,c=0),l.promoted&&(o+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),o+=_}})),c>=1&&(o+=c),t.push(o)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===r&&console.log(m.dimension)}).call(this,t(179),"/index.js")},187:function(n,e,t){"use strict";t.d(e,"a",(function(){return m}));t(517),t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(11),t(22),t(520));function d(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function y(n){for(var i=1;i\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new w.a;return this.attributes.board.split("/").forEach((function(t,r){var o=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))o+=Number(t.piece);else{var c=new P.a({place:new j.a([o,r]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),o++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var r=x.a.fetch(t.piece_char),o=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);o+=e[c.key][r.key]||0,v.a.set(e[c.key],r.key,o)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var r=N.a.parse(t);if(!r)return!1;r.location=n.location_by_offset(i),e.push(r)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(O.a);void 0!==n&&n.argv[1]===r&&(B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B),B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return v}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var v=function(n){Object(l.a)(t,n);var e=y(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return L}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),w=t(180),O=t(522),x=t(127),j=t(71),P=t(314),R=t(524),N=t(521),E=t(538);function B(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),L=function(n){Object(_.a)(t,n);var e=B(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(l.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?j.a.fetch(this.preset_info.first_location_key):j.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,S);if(t)if(t.key){var r=t.value.trim();if(n.header[t.key]=r,t.key.match(/手の持駒/))if("なし"===r);else{var s=E.a.kanji_to_number_string(r);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,r){var o=O.a.lookup_by_name(e.piece_char),c=Number(e.count||1),l=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[l][o.key]||0,n.hold_pieces[l][o.key]=c}))}}else if(t.comment){var o,c,i=n.move_infos.length;null!==(c=(o=n.comment_lines_hash)[i])&&void 0!==c||(o[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=j.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=j.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var l={};l.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(l.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(l.place=x.a.fetch(t.to),e=l.place):(m()(t.same),m()(e),l.place=e),"成"===t.motion&&(l.promoted_trigger=!0),"打"===t.motion&&(l.drop_piece=O.a.lookup_by_name(t.piece)),n.move_infos.push(l)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new w.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,r){if("・"===e.piece);else{var o="v"===e.arrow?"white":"black",c=O.a.lookup_by_name(e.piece),l=!1;c||(c=O.a.lookup_by_promoted_name(e.piece),m()(c),l=!0);var _=new N.a({place:new x.a([r,t]),piece:c,promoted:l,location:j.a.fetch(o)});n.place_on(_)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===r){var M=new L;M.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",M.parse(),console.log(M.move_infos),console.log(M.comment_lines_hash),console.log(void 0===M.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(23),t(71);var r=t(571),o={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(r.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var r=t(23),o=t.n(r),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!o.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(72),t(73),t(11),t(22);var r=t(71),o={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return r.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=r.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var r=t(523),o=(t(11),t(22),t(71)),c=t(127);function l(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return _(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){l=!0,o=n},f:function(){try{c||null==t.return||t.return()}finally{if(l)throw o}}}}function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&o){var w=!0;if(this.sp_piece_auto_promote){var O=r.piece.piece_vector.force_promote_length;null!=O&&r.top_spaces<=O&&(this.promotable_piece_moved(r,!0),w=!1)}w&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=r,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:r,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(r),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new l.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=_.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var r=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&r&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(r.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,r){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(r,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),o=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=o.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=l(l({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(o),l=t(128),_=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(r.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return _.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var r=t(128),o=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return o.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=o.a.fetch(n),this.xcontainer=new r.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return o.a.values},init_preset_sfen:function(){if(this.sp_preset)return o.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(180),o=t(521),c=t(128),l={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(r.a.dimension)},api_random_puton:function(){var n=o.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20);function o(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(523),o=(t(11),t(51),t(23)),c=t.n(o),l={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o0&&r>0){var o=this[n.attr_w],c=this[n.attr_h],l=Math.abs(o-t),_=Math.abs(c-r),f=l>n.threshold||_>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=r),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(o,"x").concat(c," -> ").concat(t,"x").concat(r," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(51),t(11),t(517),t(177)),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),o=this.lp_el_create(["PieceTexture"].concat(Object(r.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(o),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,l=d.fetch(c);if(n.place){var _=this.place_to_cell_info(n.place),f=this.vector_scale(_.radius,this.devise_info.gap*l.sign*-1),h=this.vector_add(_.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(r.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},348:function(n,e,t){"use strict";const r=["red","green","blue","alpha"],o={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"};class c extends Error{constructor(){super("ColorTypeError: type must be hex(a), rgb(a) or hsl(a)")}}class l{constructor(...n){if(n.length>0)return l.parse(...n);this.$channels=new Uint8Array(r.length),r.forEach(((n,e)=>{Object.defineProperty(this,n,{get:()=>this.$channels[e],set:n=>{Number.isNaN(n/1)||(this.$channels[e]=Math.min(255,Math.max(0,n)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((n=>{const e=n.replace(/^./,(n=>n.toUpperCase()));Object.defineProperty(this,n,{get:()=>this[`get${e}`](),set:n=>{Number.isNaN(n/1)||this[`set${e}`](n)},enumerable:!0,configurable:!0})}))}getHue(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;let l=0;if(0===c)return l;for(l=n===o?(e-t)/c%6:e===o?(t-n)/c+2:(n-e)/c+4,l*=60;l!==-1/0&&l<0;)l+=360;return Math.round(l%360)}setHue(n){const e=l.fromHSL(n,this.saturation,this.lightness,this.alpha/255);for(let i=0;in/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;return 0!==c?Math.round(c/(1-Math.abs(2*this.lightness-1))*100)/100:0}setSaturation(n){const e=l.fromHSL(this.hue,n,this.lightness,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}getLightness(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)];return Math.round((o+r)/2*100)/100}setLightness(n){const e=l.fromHSL(this.hue,this.lightness,n,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}clone(){const n=new l;return r.forEach(((e,i)=>n.$channels[i]=this.$channels[i])),n}toString(n="hex"){switch(String(n).toLowerCase()){case"hex":return"#"+r.slice(0,3).map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"hexa":return"#"+r.map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${Math.round(this.alpha/2.55)/100})`;case"hsl":return`hsl(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%)`;case"hsla":return`hsla(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%, ${Math.round(this.alpha/2.55)/100})`;default:throw new c}}get[Symbol.toString](){return this.toString("hex")}static parse(...n){if("object"==typeof n[0])return l.parseObject(n[0]);if(n.every((n=>!Number.isNaN(n/1)))){const e=new l;if(n.length>3)e.red=n[0],e.green=n[1],e.blue=n[2],n[3]&&(e.alpha=n[3]);else if(1===n.length){const e=Number(n[0]);return l.parseIndex(e,e>2**24?3:4)}}else if("string"==typeof n[0]){let e=null;if("string"==typeof o[n[0].toLowerCase()])return l.parseHex(o[n[0].toLowerCase()]);if(null!==(e=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return l.parseHex(e[2]);if(null!==(e=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){const n=[e[1],e[2],e[3],void 0!==e[5]?e[5]:1];return l.fromRGB(...n.map((n=>Number(n))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}static parseObject(object){const n=new l;return null===object||"object"!=typeof object?n:l.isColor(object)?object.clone():(r.forEach((e=>{Number.isNaN(object[e])||(n[e]=object[e])})),n)}static parseHex(n){if("string"!=typeof n)throw new Error("Hex expression must be a string");if(3!==(n=n.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==n.length||(n=n.split("").map((n=>n.repeat(2))).join("")),6!==n.length&&8!==n.length)throw new Error("Incorrect Hex expression length");const e=n.split(/(..)/).filter((n=>n)).map((n=>Number.parseInt(n,16)));return"number"==typeof e[3]&&(e[3]/=255),l.fromRGB(...e)}static parseIndex(n,e=3){const t=new l;for(let i=0;i<4;i++)t[r[i]]=n>>8*(e-i)&&255;return t}static fromRGB(n,e,t,o=1){if([n,e,t,o].some((n=>Number.isNaN(n/1))))throw new Error("Invalid arguments");o*=255;const c=new l;return[n,e,t,o].forEach(((n,e)=>{c[r[e]]=n})),c}static fromHSL(n,e,t,r=1){if([n,e,t,r].some((n=>Number.isNaN(n))))throw new Error("Invalid arguments");for(;n<0&&n!==-1/0;)n+=360;n%=360,e=Math.max(0,Math.min(1,e)),t=Math.max(0,Math.min(1,t)),r=Math.max(0,Math.min(1,r));const o=(1-Math.abs(2*t-1))*e,c=o*(1-Math.abs(n/60%2-1)),_=t-o/2,[f,g,b]=n<60?[o,c,0]:n<120?[c,o,0]:n<180?[0,o,c]:n<240?[0,c,o]:n<300?[c,0,o]:[o,0,c];return l.fromRGB(255*(f+_),255*(g+_),255*(b+_),r)}static isColor(n){return n instanceof l}}e.a=l},351:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(517);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(11),t(31),t(22),t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){var n,e;return[(n={key:"default"},Object(r.a)(n,"key","初期値"),Object(r.a)(n,"func",(function(n){n.SeVariableInfo.values.forEach((function(e){n.$data[e.key]=e.default})),n.data_init()})),n),(e={key:"paper"},Object(r.a)(e,"key","紙面風"),Object(r.a)(e,"func",(function(n){n.se_ws_color="rgb(255,255,255)",n.sp_piece_variant="paper",n.sp_board_radius=0,n.sp_board_padding=0,n.sp_board_color="rgb(255,255,255)",n.sp_board_even_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_board_odd_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_grid_inner_stroke=1,n.sp_grid_outer_stroke=2,n.sp_board_edge_stroke=0,n.sp_stand_gravity="top",n.sp_stand_flip=!1,n.sp_name_direction="vertical",n.sp_balloon=!1,n.sp_location_mark_active_size=1,n.sp_location_mark_inactive_size=1,n.sp_player_info.black.name="先手",n.sp_player_info.white.name="後手",n.sp_coordinate=!0,n.sp_coordinate_variant_v="kanji",n.sp_board_horizontal_gap=.2,n.sp_coordinate_x_push=.05,n.sp_coordinate_y_push=.01,n.user_custom_css=""})),e)]}}]),t}(t(520).a)},352:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"基本"},{key:"背景"},{key:"盤テクスチャ"},{key:"盤のセル"},{key:"盤"},{key:"盤グリッド"},{key:"駒"},{key:"駒台"},{key:"対局者名"},{key:"駒数"},{key:"駒箱"},{key:"成り不成り選択"},{key:"駒を操作中の移動元スタイル"},{key:"座標"},{key:"Transform"},{key:"コントローラー&スライダー"},{key:"その他"},{key:"棋譜"},{key:"カスタムCSS"},{key:"コンポーネント引数確認"},{key:"CSS変数確認"}]}}]),t}(t(520).a)},353:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(43),t(44);var r=t(20),o=(t(11),t(31),t(22),t(531));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(w(w({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var r=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:r,place:n,promoted:r.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===r){var x=new O({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return k}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(_.a)(t,n);var e=m(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(l.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===r&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return h}));var o=t(177),c=t(178),l=(t(11),t(22),t(23)),_=t.n(l),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(o.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return _.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var r=t(20),o=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(r)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=l.a.exec(n,l()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return y}));var o=t(177),c=t(178),l=(t(98),t(57),t(11),t(22),t(23)),_=t.n(l),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(o.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],r=f.a.values.map((function(n){var r=t[n.key]||0,o="";if(0===r)return null;r>=2&&(o+=r);var c=n.key;return o+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return _.a.compact(r).join("")})).join("");return _.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===r){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(20),o=t(523),c=t(177),l=t(178),_=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(_);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),r=Math.pow(10,t),q=Math.trunc(n/r),o=Math.trunc(n%r);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=o}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(o.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(r.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),c=t(177),l=t(178);t(98),t(12);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(l.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;it?t:n},e=n,t=function(n){n._clipped=!1,n._unclipped=n.slice(0);for(var i=0;i<=3;i++)i<3?((n[i]<0||n[i]>255)&&(n._clipped=!0),n[i]=e(n[i],0,255)):3===i&&(n[i]=e(n[i],0,1));return n},r={},o=0,c=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(n):"object"==f(n[0])&&e?e.split("").filter((function(e){return void 0!==n[0][e]})).map((function(e){return n[0][e]})):n[0]},d=_,y=function(n){if(n.length<2)return null;var e=n.length-1;return"string"==d(n[e])?n[e].toLowerCase():null},v=Math.PI,m={clip_rgb:t,limit:n,type:_,unpack:h,last:y,PI:v,TWOPI:2*v,PITHIRD:v/3,DEG2RAD:v/180,RAD2DEG:180/v},k={format:{},autodetect:[]},w=m.last,O=m.clip_rgb,x=m.type,j=k,P=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=this;if("object"===x(n[0])&&n[0].constructor&&n[0].constructor===this.constructor)return n[0];var r=w(n),o=!1;if(!r){o=!0,j.sorted||(j.autodetect=j.autodetect.sort((function(a,b){return b.p-a.p})),j.sorted=!0);for(var i=0,c=j.autodetect;i4?n[4]:1;return 1===c?[0,0,0,l]:[t>=1?0:255*(1-t)*(1-c),r>=1?0:255*(1-r)*(1-c),o>=1?0:255*(1-o)*(1-c),l]},z=$,K=E,D=R,G=k,I=m.unpack,T=m.type,F=M;D.prototype.cmyk=function(){return F(this._rgb)},K.cmyk=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(D,[null].concat(n,["cmyk"])))},G.format.cmyk=z,G.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=I(n,"cmyk"),"array"===T(n)&&4===n.length)return"cmyk"}});var C=m.unpack,U=m.last,J=function(a){return Math.round(100*a)/100},Y=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=C(n,"hsla"),r=U(n)||"lsa";return t[0]=J(t[0]||0),t[1]=J(100*t[1])+"%",t[2]=J(100*t[2])+"%","hsla"===r||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,r="hsla"):t.length=3,r+"("+t.join(",")+")"},V=Y,H=m.unpack,X=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=H(n,"rgba"))[0],g=n[1],b=n[2];t/=255,g/=255,b/=255;var s,r,o=Math.min(t,g,b),c=Math.max(t,g,b),l=(c+o)/2;return c===o?(s=0,r=Number.NaN):s=l<.5?(c-o)/(c+o):(c-o)/(2-c-o),t==c?r=(g-b)/(c-o):g==c?r=2+(b-t)/(c-o):b==c&&(r=4+(t-g)/(c-o)),(r*=60)<0&&(r+=360),n.length>3&&void 0!==n[3]?[r,s,l,n[3]]:[r,s,l]},W=X,Z=m.unpack,Q=m.last,nn=V,en=W,tn=Math.round,rn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Z(n,"rgba"),r=Q(n)||"rgb";return"hsl"==r.substr(0,3)?nn(en(t),r):(t[0]=tn(t[0]),t[1]=tn(t[1]),t[2]=tn(t[2]),("rgba"===r||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,r="rgba"),r+"("+t.slice(0,"rgb"===r?3:4).join(",")+")")},on=rn,an=m.unpack,cn=Math.round,sn=function(){for(var n,e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,g,b,o=(e=an(e,"hsl"))[0],s=e[1],c=e[2];if(0===s)r=g=b=255*c;else{var l=[0,0,0],_=[0,0,0],f=c<.5?c*(1+s):c+s-c*s,h=2*c-f,d=o/360;l[0]=d+1/3,l[1]=d,l[2]=d-1/3;for(var i=0;i<3;i++)l[i]<0&&(l[i]+=1),l[i]>1&&(l[i]-=1),6*l[i]<1?_[i]=h+6*(f-h)*l[i]:2*l[i]<1?_[i]=f:3*l[i]<2?_[i]=h+(f-h)*(2/3-l[i])*6:_[i]=h;r=(n=[cn(255*_[0]),cn(255*_[1]),cn(255*_[2])])[0],g=n[1],b=n[2]}return e.length>3?[r,g,b,e[3]]:[r,g,b,1]},un=sn,ln=un,_n=k,fn=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,hn=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,pn=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,dn=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,yn=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,vn=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,bn=Math.round,mn=function(n){var e;if(n=n.toLowerCase().trim(),_n.format.named)try{return _n.format.named(n)}catch(n){}if(e=n.match(fn)){for(var t=e.slice(1,4),i=0;i<3;i++)t[i]=+t[i];return t[3]=1,t}if(e=n.match(hn)){for(var r=e.slice(1,5),o=0;o<4;o++)r[o]=+r[o];return r}if(e=n.match(pn)){for(var c=e.slice(1,4),l=0;l<3;l++)c[l]=bn(2.55*c[l]);return c[3]=1,c}if(e=n.match(dn)){for(var _=e.slice(1,5),f=0;f<3;f++)_[f]=bn(2.55*_[f]);return _[3]=+_[3],_}if(e=n.match(yn)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=ln(h);return d[3]=1,d}if(e=n.match(vn)){var y=e.slice(1,4);y[1]*=.01,y[2]*=.01;var v=ln(y);return v[3]=+e[4],v}};mn.test=function(s){return fn.test(s)||hn.test(s)||pn.test(s)||dn.test(s)||yn.test(s)||vn.test(s)};var gn=mn,kn=E,wn=R,On=k,xn=m.type,jn=on,Pn=gn;wn.prototype.css=function(n){return jn(this._rgb,n)},kn.css=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(wn,[null].concat(n,["css"])))},On.format.css=Pn,On.autodetect.push({p:5,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===xn(n)&&Pn.test(n))return"css"}});var Rn=R,Nn=E,En=k,Bn=m.unpack;En.format.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Bn(n,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},Nn.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Rn,[null].concat(n,["gl"])))},Rn.prototype.gl=function(){var n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};var Sn=m.unpack,Ln=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=Sn(n,"rgb"),o=r[0],g=r[1],b=r[2],c=Math.min(o,g,b),l=Math.max(o,g,b),_=l-c,f=100*_/255,h=c/(255-_)*100;return 0===_?t=Number.NaN:(o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,f,h]},Mn=Ln,An=m.unpack,$n=Math.floor,zn=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=An(l,"hcg"))[0],d=l[1],y=l[2];y*=255;var v=255*d;if(0===d)f=g=b=y;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$n(h/=60),m=h-i,p=y*(1-d),q=p+v*(1-m),k=p+v*m,w=p+v;switch(i){case 0:f=(n=[w,k,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,w,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,w,k])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,w])[0],g=r[1],b=r[2];break;case 4:f=(o=[k,p,w])[0],g=o[1],b=o[2];break;case 5:f=(c=[w,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Kn=zn,Dn=m.unpack,Gn=m.type,In=E,Tn=R,Fn=k,Cn=Mn;Tn.prototype.hcg=function(){return Cn(this._rgb)},In.hcg=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Tn,[null].concat(n,["hcg"])))},Fn.format.hcg=Kn,Fn.autodetect.push({p:1,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Dn(n,"hcg"),"array"===Gn(n)&&3===n.length)return"hcg"}});var qn=m.unpack,Un=m.last,Jn=Math.round,Yn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=qn(n,"rgba"),r=t[0],g=t[1],b=t[2],a=t[3],o=Un(n)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var c="000000"+((r=Jn(r))<<16|(g=Jn(g))<<8|(b=Jn(b))).toString(16);c=c.substr(c.length-6);var l="0"+Jn(255*a).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},Vn=Yn,Hn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Xn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Wn=function(n){if(n.match(Hn)){4!==n.length&&7!==n.length||(n=n.substr(1)),3===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var u=parseInt(n,16);return[u>>16,u>>8&255,255&u,1]}if(n.match(Xn)){5!==n.length&&9!==n.length||(n=n.substr(1)),4===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);var e=parseInt(n,16);return[e>>24&255,e>>16&255,e>>8&255,Math.round((255&e)/255*100)/100]}throw new Error("unknown hex color: "+n)},Zn=E,Qn=R,ne=m.type,ee=k,te=Vn;Qn.prototype.hex=function(n){return te(this._rgb,n)},Zn.hex=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Qn,[null].concat(n,["hex"])))},ee.format.hex=Wn,ee.autodetect.push({p:4,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===ne(n)&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});var re=m.unpack,oe=m.TWOPI,ie=Math.min,ae=Math.sqrt,ce=Math.acos,se=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=re(n,"rgb"),o=r[0],g=r[1],b=r[2],c=ie(o/=255,g/=255,b/=255),i=(o+g+b)/3,s=i>0?1-c/i:0;return 0===s?t=NaN:(t=(o-g+(o-b))/2,t/=ae((o-g)*(o-g)+(o-b)*(g-b)),t=ce(t),b>g&&(t=oe-t),t/=oe),[360*t,s,i]},ue=se,le=m.unpack,_e=m.limit,fe=m.TWOPI,he=m.PITHIRD,pe=Math.cos,de=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,g,b,r=(n=le(n,"hsi"))[0],s=n[1],i=n[2];return isNaN(r)&&(r=0),isNaN(s)&&(s=0),r>360&&(r-=360),r<0&&(r+=360),(r/=360)<1/3?g=1-((b=(1-s)/3)+(t=(1+s*pe(fe*r)/pe(he-fe*r))/3)):r<2/3?b=1-((t=(1-s)/3)+(g=(1+s*pe(fe*(r-=1/3))/pe(he-fe*r))/3)):t=1-((g=(1-s)/3)+(b=(1+s*pe(fe*(r-=2/3))/pe(he-fe*r))/3)),[255*(t=_e(i*t*3)),255*(g=_e(i*g*3)),255*(b=_e(i*b*3)),n.length>3?n[3]:1]},ye=de,ve=m.unpack,be=m.type,me=E,ge=R,ke=k,we=ue;ge.prototype.hsi=function(){return we(this._rgb)},me.hsi=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(ge,[null].concat(n,["hsi"])))},ke.format.hsi=ye,ke.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ve(n,"hsi"),"array"===be(n)&&3===n.length)return"hsi"}});var Oe=m.unpack,xe=m.type,je=E,Pe=R,Re=k,Ne=W;Pe.prototype.hsl=function(){return Ne(this._rgb)},je.hsl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pe,[null].concat(n,["hsl"])))},Re.format.hsl=un,Re.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Oe(n,"hsl"),"array"===xe(n)&&3===n.length)return"hsl"}});var Ee=m.unpack,Be=Math.min,Se=Math.max,Le=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,s,r,o=(n=Ee(n,"rgb"))[0],g=n[1],b=n[2],c=Be(o,g,b),l=Se(o,g,b),_=l-c;return r=l/255,0===l?(t=Number.NaN,s=0):(s=_/l,o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,s,r]},Me=Le,Ae=m.unpack,$e=Math.floor,ze=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=Ae(l,"hsv"))[0],s=l[1],d=l[2];if(d*=255,0===s)f=g=b=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$e(h/=60),y=h-i,p=d*(1-s),q=d*(1-s*y),v=d*(1-s*(1-y));switch(i){case 0:f=(n=[d,v,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,d,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,d,v])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,d])[0],g=r[1],b=r[2];break;case 4:f=(o=[v,p,d])[0],g=o[1],b=o[2];break;case 5:f=(c=[d,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Ke=ze,De=m.unpack,Ge=m.type,Ie=E,Te=R,Fe=k,Ce=Me;Te.prototype.hsv=function(){return Ce(this._rgb)},Ie.hsv=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Te,[null].concat(n,["hsv"])))},Fe.format.hsv=Ke,Fe.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=De(n,"hsv"),"array"===Ge(n)&&3===n.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ue=qe,Je=m.unpack,Ye=Math.pow,Ve=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Je(n,"rgb"),r=t[0],g=t[1],b=t[2],o=We(r,g,b),c=o[0],l=o[1],_=116*l-16;return[_<0?0:_,500*(c-l),200*(l-o[2])]},He=function(n){return(n/=255)<=.04045?n/12.92:Ye((n+.055)/1.055,2.4)},Xe=function(n){return n>Ue.t3?Ye(n,1/3):n/Ue.t2+Ue.t0},We=function(n,g,b){return n=He(n),g=He(g),b=He(b),[Xe((.4124564*n+.3575761*g+.1804375*b)/Ue.Xn),Xe((.2126729*n+.7151522*g+.072175*b)/Ue.Yn),Xe((.0193339*n+.119192*g+.9503041*b)/Ue.Zn)]},Ze=Ve,Qe=qe,nt=m.unpack,et=Math.pow,tt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r,o,c=(n=nt(n,"lab"))[0],a=n[1],b=n[2];return r=(c+16)/116,t=isNaN(a)?r:r+a/500,o=isNaN(b)?r:r-b/200,r=Qe.Yn*it(r),t=Qe.Xn*it(t),o=Qe.Zn*it(o),[ot(3.2404542*t-1.5371385*r-.4985314*o),ot(-.969266*t+1.8760108*r+.041556*o),ot(.0556434*t-.2040259*r+1.0572252*o),n.length>3?n[3]:1]},ot=function(n){return 255*(n<=.00304?12.92*n:1.055*et(n,1/2.4)-.055)},it=function(n){return n>Qe.t1?n*n*n:Qe.t2*(n-Qe.t0)},at=tt,ct=m.unpack,st=m.type,ut=E,lt=R,_t=k,ft=Ze;lt.prototype.lab=function(){return ft(this._rgb)},ut.lab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(lt,[null].concat(n,["lab"])))},_t.format.lab=at,_t.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ct(n,"lab"),"array"===st(n)&&3===n.length)return"lab"}});var ht=m.unpack,pt=m.RAD2DEG,yt=Math.sqrt,vt=Math.atan2,bt=Math.round,mt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=ht(n,"lab"),r=t[0],a=t[1],b=t[2],o=yt(a*a+b*b),c=(vt(b,a)*pt+360)%360;return 0===bt(1e4*o)&&(c=Number.NaN),[r,o,c]},gt=mt,kt=m.unpack,wt=Ze,Ot=gt,xt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=kt(n,"rgb"),r=t[0],g=t[1],b=t[2],o=wt(r,g,b),c=o[0],a=o[1],l=o[2];return Ot(c,a,l)},jt=xt,Pt=m.unpack,Rt=m.DEG2RAD,Nt=Math.sin,Et=Math.cos,Bt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Pt(n,"lch"),r=t[0],o=t[1],c=t[2];return isNaN(c)&&(c=0),[r,Et(c*=Rt)*o,Nt(c)*o]},St=Bt,Lt=m.unpack,Mt=St,At=at,$t=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Lt(n,"lch"))[0],r=n[1],o=n[2],c=Mt(t,r,o),l=c[0],a=c[1],_=c[2],f=At(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},zt=$t,Kt=m.unpack,Dt=zt,Gt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Kt(n,"hcl").reverse();return Dt.apply(void 0,t)},It=Gt,Tt=m.unpack,Ft=m.type,Ct=E,qt=R,Ut=k,Jt=jt;qt.prototype.lch=function(){return Jt(this._rgb)},qt.prototype.hcl=function(){return Jt(this._rgb).reverse()},Ct.lch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["lch"])))},Ct.hcl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["hcl"])))},Ut.format.lch=zt,Ut.format.hcl=It,["lch","hcl"].forEach((function(n){return Ut.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Tt(e,n),"array"===Ft(e)&&3===e.length)return n}})}));var Yt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Vt=R,Ht=k,Xt=m.type,Wt=Yt,Zt=Wn,Qt=Vn;Vt.prototype.name=function(){for(var n=Qt(this._rgb,"rgb"),i=0,e=Object.keys(Wt);i0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xt(n)&&Wt[n.toLowerCase()])return"named"}});var nr=m.unpack,er=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=nr(n,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},rr=er,or=m.type,ir=function(n){if("number"==or(n)&&n>=0&&n<=16777215)return[n>>16,n>>8&255,255&n,1];throw new Error("unknown num color: "+n)},ar=E,cr=R,sr=k,ur=m.type,lr=rr;cr.prototype.num=function(){return lr(this._rgb)},ar.num=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(n,["num"])))},sr.format.num=ir,sr.autodetect.push({p:5,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(1===n.length&&"number"===ur(n[0])&&n[0]>=0&&n[0]<=16777215)return"num"}});var _r=E,fr=R,pr=k,dr=m.unpack,yr=m.type,vr=Math.round;fr.prototype.rgb=function(n){return void 0===n&&(n=!0),!1===n?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vr)},fr.prototype.rgba=function(n){return void 0===n&&(n=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===n?e:vr(e):e}))},_r.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(fr,[null].concat(n,["rgb"])))},pr.format.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=dr(n,"rgba");return void 0===t[3]&&(t[3]=1),t},pr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=dr(n,"rgba"),"array"===yr(n)&&(3===n.length||4===n.length&&"number"==yr(n[3])&&n[3]>=0&&n[3]<=1))return"rgb"}});var mr=Math.log,gr=function(n){var e,g,b,t=n/100;return t<66?(e=255,g=t<6?0:-155.25485562709179-.44596950469579133*(g=t-2)+104.49216199393888*mr(g),b=t<20?0:.8274096064007395*(b=t-10)-254.76935184120902+115.67994401066147*mr(b)):(e=351.97690566805693+.114206453784165*(e=t-55)-40.25366309332127*mr(e),g=325.4494125711974+.07943456536662342*(g=t-50)-28.0852963507957*mr(g),b=255),[e,g,b,1]},kr=gr,wr=m.unpack,Or=Math.round,xr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];for(var t,r=wr(n,"rgb"),o=r[0],b=r[2],c=1e3,l=4e4,_=.4;l-c>_;){var f=kr(t=.5*(l+c));f[2]/f[0]>=b/o?l=t:c=t}return Or(t)},jr=E,Pr=R,Rr=k,Nr=xr;Pr.prototype.temp=Pr.prototype.kelvin=Pr.prototype.temperature=function(){return Nr(this._rgb)},jr.temp=jr.kelvin=jr.temperature=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pr,[null].concat(n,["temp"])))},Rr.format.temp=Rr.format.kelvin=Rr.format.temperature=gr;var Er=m.unpack,Br=Math.cbrt,Sr=Math.pow,Lr=Math.sign,Mr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Er(n,"rgb"),r=t[0],g=t[1],b=t[2],o=[$r(r/255),$r(g/255),$r(b/255)],c=o[0],l=o[1],_=o[2],f=Br(.4122214708*c+.5363325363*l+.0514459929*_),h=Br(.2119034982*c+.6806995451*l+.1073969566*_),s=Br(.0883024619*c+.2817188376*l+.6299787005*_);return[.2104542553*f+.793617785*h-.0040720468*s,1.9779984951*f-2.428592205*h+.4505937099*s,.0259040371*f+.7827717662*h-.808675766*s]},Ar=Mr;function $r(n){var e=Math.abs(n);return e<.04045?n/12.92:(Lr(n)||1)*Sr((e+.055)/1.055,2.4)}var zr=m.unpack,Kr=Math.pow,Dr=Math.sign,Gr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=zr(n,"lab"))[0],a=n[1],b=n[2],r=Kr(t+.3963377774*a+.2158037573*b,3),o=Kr(t-.1055613458*a-.0638541728*b,3),s=Kr(t-.0894841775*a-1.291485548*b,3);return[255*Tr(4.0767416621*r-3.3077115913*o+.2309699292*s),255*Tr(-1.2684380046*r+2.6097574011*o-.3413193965*s),255*Tr(-.0041960863*r-.7034186147*o+1.707614701*s),n.length>3?n[3]:1]},Ir=Gr;function Tr(n){var e=Math.abs(n);return e>.0031308?(Dr(n)||1)*(1.055*Kr(e,1/2.4)-.055):12.92*n}var Fr=m.unpack,Cr=m.type,qr=E,Ur=R,Jr=k,Yr=Ar;Ur.prototype.oklab=function(){return Yr(this._rgb)},qr.oklab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Ur,[null].concat(n,["oklab"])))},Jr.format.oklab=Ir,Jr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Fr(n,"oklab"),"array"===Cr(n)&&3===n.length)return"oklab"}});var Vr=m.unpack,Hr=Ar,Xr=gt,Wr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Vr(n,"rgb"),r=t[0],g=t[1],b=t[2],o=Hr(r,g,b),c=o[0],a=o[1],l=o[2];return Xr(c,a,l)},Zr=Wr,Qr=m.unpack,no=St,eo=Ir,to=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Qr(n,"lch"))[0],r=n[1],o=n[2],c=no(t,r,o),l=c[0],a=c[1],_=c[2],f=eo(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},ro=to,oo=m.unpack,io=m.type,ao=E,co=R,input=k,so=Zr;co.prototype.oklch=function(){return so(this._rgb)},ao.oklch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(co,[null].concat(n,["oklch"])))},input.format.oklch=ro,input.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=oo(n,"oklch"),"array"===io(n)&&3===n.length)return"oklch"}});var uo=R,lo=m.type;uo.prototype.alpha=function(a,n){return void 0===n&&(n=!1),void 0!==a&&"number"===lo(a)?n?(this._rgb[3]=a,this):new uo([this._rgb[0],this._rgb[1],this._rgb[2],a],"rgb"):this._rgb[3]},R.prototype.clipped=function(){return this._rgb._clipped||!1};var _o=R,fo=qe;_o.prototype.darken=function(n){void 0===n&&(n=1);var e=this,t=e.lab();return t[0]-=fo.Kn*n,new _o(t,"lab").alpha(e.alpha(),!0)},_o.prototype.brighten=function(n){return void 0===n&&(n=1),this.darken(-n)},_o.prototype.darker=_o.prototype.darken,_o.prototype.brighter=_o.prototype.brighten,R.prototype.get=function(n){var e=n.split("."),t=e[0],r=e[1],o=this[t]();if(r){var i=t.indexOf(r)-("ok"===t.substr(0,2)?2:0);if(i>-1)return o[i];throw new Error("unknown channel "+r+" in mode "+t)}return o};var ho=R,po=m.type,yo=Math.pow,vo=1e-7,bo=20;ho.prototype.luminance=function(n){if(void 0!==n&&"number"===po(n)){if(0===n)return new ho([0,0,0,this._rgb[3]],"rgb");if(1===n)return new ho([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",r=bo,o=function(e,c){var l=e.interpolate(c,.5,t),_=l.luminance();return Math.abs(n-_)n?o(e,l):o(l,c)},c=(e>n?o(new ho([0,0,0]),this):o(this,new ho([255,255,255]))).rgb();return new ho(c.concat([this._rgb[3]]))}return mo.apply(void 0,this._rgb.slice(0,3))};var mo=function(n,g,b){return.2126*(n=go(n))+.7152*(g=go(g))+.0722*(b=go(b))},go=function(n){return(n/=255)<=.03928?n/12.92:yo((n+.055)/1.055,2.4)},ko={},wo=R,Oo=m.type,xo=ko,jo=function(n,e,t){void 0===t&&(t=.5);for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var c=r[0]||"lrgb";if(xo[c]||r.length||(c=Object.keys(xo)[0]),!xo[c])throw new Error("interpolation mode "+c+" is not defined");return"object"!==Oo(n)&&(n=new wo(n)),"object"!==Oo(e)&&(e=new wo(e)),xo[c](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))},Po=R,Ro=jo;Po.prototype.mix=Po.prototype.interpolate=function(n,e){void 0===e&&(e=.5);for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];return Ro.apply(void 0,[this,n,e].concat(t))};var No=R;No.prototype.premultiply=function(n){void 0===n&&(n=!1);var e=this._rgb,a=e[3];return n?(this._rgb=[e[0]*a,e[1]*a,e[2]*a,a],this):new No([e[0]*a,e[1]*a,e[2]*a,a],"rgb")};var Eo=R,Bo=qe;Eo.prototype.saturate=function(n){void 0===n&&(n=1);var e=this,t=e.lch();return t[1]+=Bo.Kn*n,t[1]<0&&(t[1]=0),new Eo(t,"lch").alpha(e.alpha(),!0)},Eo.prototype.desaturate=function(n){return void 0===n&&(n=1),this.saturate(-n)};var So=R,Lo=m.type;So.prototype.set=function(n,e,t){void 0===t&&(t=!1);var r=n.split("."),o=r[0],c=r[1],l=this[o]();if(c){var i=o.indexOf(c)-("ok"===o.substr(0,2)?2:0);if(i>-1){if("string"==Lo(e))switch(e.charAt(0)){case"+":case"-":l[i]+=+e;break;case"*":l[i]*=+e.substr(1);break;case"/":l[i]/=+e.substr(1);break;default:l[i]=+e}else{if("number"!==Lo(e))throw new Error("unsupported value for Color.set");l[i]=e}var _=new So(l,o);return t?(this._rgb=_._rgb,this):_}throw new Error("unknown channel "+c+" in mode "+o)}return l};var Mo=R,Ao=function(n,e,t){var r=n._rgb,o=e._rgb;return new Mo(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"rgb")};ko.rgb=Ao;var $o=R,zo=Math.sqrt,Ko=Math.pow,Do=function(n,e,t){var r=n._rgb,o=r[0],c=r[1],l=r[2],_=e._rgb,f=_[0],h=_[1],d=_[2];return new $o(zo(Ko(o,2)*(1-t)+Ko(f,2)*t),zo(Ko(c,2)*(1-t)+Ko(h,2)*t),zo(Ko(l,2)*(1-t)+Ko(d,2)*t),"rgb")};ko.lrgb=Do;var Go=R,Io=function(n,e,t){var r=n.lab(),o=e.lab();return new Go(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"lab")};ko.lab=Io;var To=R,Fo=function(n,e,t,r){var o,c,l,_,f,h,d,y,v,m,k,w,O;return"hsl"===r?(l=n.hsl(),_=e.hsl()):"hsv"===r?(l=n.hsv(),_=e.hsv()):"hcg"===r?(l=n.hcg(),_=e.hcg()):"hsi"===r?(l=n.hsi(),_=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",l=n.hcl(),_=e.hcl()):"oklch"===r&&(l=n.oklch().reverse(),_=e.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(f=(o=l)[0],d=o[1],v=o[2],h=(c=_)[0],y=c[1],m=c[2]),isNaN(f)||isNaN(h)?isNaN(f)?isNaN(h)?w=Number.NaN:(w=h,1!=v&&0!=v||"hsv"==r||(k=y)):(w=f,1!=m&&0!=m||"hsv"==r||(k=d)):w=f+t*(h>f&&h-f>180?h-(f+360):h180?h+360-f:h-f),void 0===k&&(k=d+t*(y-d)),O=v+t*(m-v),new To("oklch"===r?[O,k,w]:[w,k,O],r)},Co=Fo,qo=function(n,e,t){return Co(n,e,t,"lch")};ko.lch=qo,ko.hcl=qo;var Uo=R,Jo=function(n,e,t){var r=n.num(),o=e.num();return new Uo(r+t*(o-r),"num")};ko.num=Jo;var Yo=Fo,Vo=function(n,e,t){return Yo(n,e,t,"hcg")};ko.hcg=Vo;var Ho=Fo,Xo=function(n,e,t){return Ho(n,e,t,"hsi")};ko.hsi=Xo;var Wo=Fo,Zo=function(n,e,t){return Wo(n,e,t,"hsl")};ko.hsl=Zo;var Qo=Fo,ni=function(n,e,t){return Qo(n,e,t,"hsv")};ko.hsv=ni;var ei=R,ti=function(n,e,t){var r=n.oklab(),o=e.oklab();return new ei(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"oklab")};ko.oklab=ti;var ri=Fo,oi=function(n,e,t){return ri(n,e,t,"oklch")};ko.oklch=oi;var ii=R,ai=m.clip_rgb,ci=Math.pow,si=Math.sqrt,ui=Math.PI,_i=Math.cos,fi=Math.sin,hi=Math.atan2,pi=function(n,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var r=n.length;t||(t=Array.from(new Array(r)).map((function(){return 1})));var o=r/t.reduce((function(a,b){return a+b}));if(t.forEach((function(n,i){t[i]*=o})),n=n.map((function(n){return new ii(n)})),"lrgb"===e)return di(n,t);for(var c=n.shift(),l=c.get(e),_=[],f=0,h=0,i=0;i=360;)m-=360;l[v]=m}else l[v]=l[v]/_[v];return y/=r,new ii(l,e).alpha(y>.99999?1:y,!0)},di=function(n,e){for(var t=n.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new ii(ai(r))},yi=E,vi=m.type,bi=Math.pow,mi=function(n){var e="rgb",t=yi("#ccc"),r=0,o=[0,1],c=[],l=[0,0],_=!1,f=[],h=!1,d=0,y=1,v=!1,m={},k=!0,w=1,O=function(n){if((n=n||["#fff","#000"])&&"string"===vi(n)&&yi.brewer&&yi.brewer[n.toLowerCase()]&&(n=yi.brewer[n.toLowerCase()]),"array"===vi(n)){1===n.length&&(n=[n[0],n[0]]),n=n.slice(0);for(var e=0;e=_[i];)i++;return i-1}return 0},j=function(n){return n},P=function(n){return n},R=function(n,r){var col,o;if(null==r&&(r=!1),isNaN(n)||null===n)return t;o=r?n:_&&_.length>2?x(n)/(_.length-2):y!==d?(n-d)/(y-d):1,o=P(o),r||(o=j(o)),1!==w&&(o=bi(o,w)),o=l[0]+o*(1-l[0]-l[1]),o=Math.min(1,Math.max(0,o));var h=Math.floor(1e4*o);if(k&&m[h])col=m[h];else{if("array"===vi(f))for(var i=0;i=p&&i===c.length-1){col=f[i];break}if(o>p&&o2){var _=n.map((function(e,i){return i/(n.length-1)})),h=n.map((function(n){return(n-d)/(y-d)}));h.every((function(n,i){return _[i]===n}))||(P=function(n){if(n<=0||n>=1)return n;for(var i=0;n>=h[i+1];)i++;var e=(n-h[i])/(h[i+1]-h[i]);return _[i]+e*(_[i+1]-_[i])})}}return o=[d,y],E},E.mode=function(n){return arguments.length?(e=n,N(),E):e},E.range=function(n,e){return O(n),E},E.out=function(n){return h=n,E},E.spread=function(n){return arguments.length?(r=n,E):r},E.correctLightness=function(n){return null==n&&(n=!0),v=n,N(),j=v?function(n){for(var e=R(0,!0).lab()[0],t=R(1,!0).lab()[0],r=e>t,o=R(n,!0).lab()[0],c=e+(t-e)*n,l=o-c,_=0,f=1,h=20;Math.abs(l)>.01&&h-- >0;)r&&(l*=-1),l<0?(_=n,n+=.5*(f-n)):(f=n,n+=.5*(_-n)),o=R(n,!0).lab()[0],l=o-c;return n}:function(n){return n},E},E.padding=function(p){return null!=p?("number"===vi(p)&&(p=[p,p]),l=p,E):l},E.colors=function(e,t){arguments.length<2&&(t="hex");var r=[];if(0===arguments.length)r=f.slice(0);else if(1===e)r=[E(.5)];else if(e>1){var c=o[0],dd=o[1]-c;r=gi(0,e,!1).map((function(i){return E(c+i/(e-1)*dd)}))}else{n=[];var l=[];if(_&&_.length>2)for(var i=1,h=_.length,d=1<=h;d?ih;d?i++:i--)l.push(.5*(_[i-1]+_[i]));else l=o;r=l.map((function(n){return E(n)}))}return yi[t]&&(r=r.map((function(n){return n[t]()}))),r},E.cache=function(n){return null!=n?(k=n,E):k},E.gamma=function(g){return null!=g?(w=g,E):w},E.nodata=function(n){return null!=n?(t=yi(n),E):t},E};function gi(n,e,t){for(var r=[],o=nc;o?i++:i--)r.push(i);return r}var ki=R,wi=mi,Oi=function(n){for(var e=[1,1],i=1;i=5))throw new RangeError("No point in running bezier with only one color.");var h,d,y;h=n.map((function(n){return n.lab()})),y=n.length-1,d=Oi(y),o=function(n){var u=1-n,e=[0,1,2].map((function(i){return h.reduce((function(e,t,r){return e+d[r]*Math.pow(u,y-r)*Math.pow(n,r)*t[i]}),0)}));return new ki(e,"lab")}}return o},ji=function(n){var e=xi(n);return e.scale=function(){return wi(e)},e},Pi=E,Ri=function(n,e,t){if(!Ri[t])throw new Error("unknown blend mode "+t);return Ri[t](n,e)},Ni=function(n){return function(e,t){var r=Pi(t).rgb(),o=Pi(e).rgb();return Pi.rgb(n(r,o))}},Ei=function(n){return function(e,t){var r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r}},Bi=function(a){return a},Si=function(a,b){return a*b/255},Li=function(a,b){return a>b?b:a},Mi=function(a,b){return a>b?a:b},Ai=function(a,b){return 255*(1-(1-a/255)*(1-b/255))},$i=function(a,b){return b<128?2*a*b/255:255*(1-2*(1-a/255)*(1-b/255))},zi=function(a,b){return 255*(1-(1-b/255)/(a/255))},Ki=function(a,b){return 255===a||(a=b/255*255/(1-a/255))>255?255:a};Ri.normal=Ni(Ei(Bi)),Ri.multiply=Ni(Ei(Si)),Ri.screen=Ni(Ei(Ai)),Ri.overlay=Ni(Ei($i)),Ri.darken=Ni(Ei(Li)),Ri.lighten=Ni(Ei(Mi)),Ri.dodge=Ni(Ei(Ki)),Ri.burn=Ni(Ei(zi));for(var Di=Ri,Gi=m.type,Ii=m.clip_rgb,Ti=m.TWOPI,Fi=Math.pow,Ci=Math.sin,qi=Math.cos,Ui=E,Ji=function(n,e,t,r,o){void 0===n&&(n=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===r&&(r=1),void 0===o&&(o=[0,1]);var dl,c=0;"array"===Gi(o)?dl=o[1]-o[0]:(dl=0,o=[o,o]);var l=function(l){var a=Ti*((n+120)/360+e*l),_=Fi(o[0]+dl*l,r),f=(0!==c?t[0]+l*c:t)*_*(1-_)/2,h=qi(a),d=Ci(a);return Ui(Ii([255*(_+f*(-.14861*h+1.78277*d)),255*(_+f*(-.29227*h-.90649*d)),255*(_+f*(1.97294*h)),1]))};return l.start=function(s){return null==s?n:(n=s,l)},l.rotations=function(n){return null==n?e:(e=n,l)},l.gamma=function(g){return null==g?r:(r=g,l)},l.hue=function(n){return null==n?t:("array"===Gi(t=n)?0==(c=t[1]-t[0])&&(t=t[1]):c=0,l)},l.lightness=function(n){return null==n?o:("array"===Gi(n)?(o=n,dl=n[1]-n[0]):(o=[n,n],dl=0),l)},l.scale=function(){return Ui.scale(l)},l.hue(t),l},Yi=R,Vi="0123456789abcdef",Hi=Math.floor,Xi=Math.random,Wi=function(){for(var code="#",i=0;i<6;i++)code+=Vi.charAt(Hi(16*Xi()));return new Yi(code,"hex")},Zi=_,Qi=Math.log,na=Math.pow,ea=Math.floor,ta=Math.abs,ra=function(data,n){void 0===n&&(n=null);var e={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Zi(data)&&(data=Object.values(data)),data.forEach((function(t){n&&"object"===Zi(t)&&(t=t[n]),null==t||isNaN(t)||(e.values.push(t),e.sum+=t,te.max&&(e.max=t),e.count+=1)})),e.domain=[e.min,e.max],e.limits=function(n,t){return oa(e,n,t)},e},oa=function(data,n,e){void 0===n&&(n="equal"),void 0===e&&(e=7),"array"==Zi(data)&&(data=ra(data));var t=data.min,r=data.max,o=data.values.sort((function(a,b){return a-b}));if(1===e)return[t,r];var c=[];if("c"===n.substr(0,1)&&(c.push(t),c.push(r)),"e"===n.substr(0,1)){c.push(t);for(var i=1;i 0");var l=Math.LOG10E*Qi(t),_=Math.LOG10E*Qi(r);c.push(t);for(var f=1;f200&&(O=!1)}for(var G={},I=0;Ie?(n+.05)/(e+.05):(e+.05)/(n+.05)},sa=R,ua=Math.sqrt,la=Math.pow,_a=Math.min,fa=Math.max,ha=Math.atan2,pa=Math.abs,da=Math.cos,ya=Math.sin,va=Math.exp,ba=Math.PI,ma=function(a,b,n,e,t){void 0===n&&(n=1),void 0===e&&(e=1),void 0===t&&(t=1);var r=function(n){return 360*n/(2*ba)},o=function(n){return 2*ba*n/360};a=new sa(a),b=new sa(b);var c=Array.from(a.lab()),l=c[0],_=c[1],f=c[2],h=Array.from(b.lab()),d=h[0],y=h[1],v=h[2],m=(l+d)/2,k=(ua(la(_,2)+la(f,2))+ua(la(y,2)+la(v,2)))/2,w=.5*(1-ua(la(k,7)/(la(k,7)+la(25,7)))),O=_*(1+w),x=y*(1+w),j=ua(la(O,2)+la(f,2)),P=ua(la(x,2)+la(v,2)),R=(j+P)/2,N=r(ha(f,O)),E=r(ha(v,x)),B=N>=0?N:N+360,S=E>=0?E:E+360,L=pa(B-S)>180?(B+S+360)/2:(B+S)/2,M=1-.17*da(o(L-30))+.24*da(o(2*L))+.32*da(o(3*L+6))-.2*da(o(4*L-63)),A=S-B;A=pa(A)<=180?A:S<=B?A+360:A-360,A=2*ua(j*P)*ya(o(A)/2);var $=d-l,z=P-j,K=1+.015*la(m-50,2)/ua(20+la(m-50,2)),D=1+.045*R,G=1+.015*R*M,I=30*va(-la((L-275)/25,2)),T=-2*ua(la(R,7)/(la(R,7)+la(25,7)))*ya(2*o(I)),F=ua(la($/(n*K),2)+la(z/(e*D),2)+la(A/(t*G),2)+T*(z/(e*D))*(A/(t*G)));return fa(0,_a(100,F))},ga=R,ka=function(a,b,n){void 0===n&&(n="lab"),a=new ga(a),b=new ga(b);var e=a.get(n),t=b.get(n),r=0;for(var i in e){var o=(e[i]||0)-(t[i]||0);r+=o*o}return Math.sqrt(r)},wa=R,Oa=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];try{return new(Function.prototype.bind.apply(wa,[null].concat(n))),!0}catch(n){return!1}},xa=E,ja=mi,Pa={cool:function(){return ja([xa.hsl(180,1,.9),xa.hsl(250,.7,.4)])},hot:function(){return ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ra={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},i=0,Na=Object.keys(Ra);i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,d=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){d=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(d)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},canPrefetch:function(){var e=navigator.connection;return!(this.$nuxt.isOffline||e&&((e.effectiveType||"").includes("2g")||e.saveData))},getPrefetchComponents:function(){return this.$router.resolve(this.to,this.$route,this.append).resolved.matched.map((function(e){return e.components.default})).filter((function(e){return"function"==typeof e&&!e.options&&!e.__prefetched}))},prefetchLink:function(){if(this.canPrefetch()){h.unobserve(this.$el);var e,t=o(this.getPrefetchComponents());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n();r instanceof Promise&&r.catch((function(){})),n.__prefetched=!0}}catch(e){t.e(e)}finally{t.f()}}}}}},173:function(e,t,n){"use strict";t.a={}},174:function(e,t,n){"use strict";var r={name:"ClientOnly",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,l=r(),c=l.default;void 0===c&&(c=[]);var d=l.placeholder;return n._isMounted?c:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["client-only-placeholder"]},o.placeholder||d):c.length>0?c.map((function(){return e(!1)})):e(!1))}};e.exports=r},176:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){return t=Object.assign||function(e){for(var i=1;i0?n=h:t=h}while(Math.abs(d)>o&&++i=r?S(t,m,e,n):0===v?m:k(t,o,o+d,e,n)}return function(e){return 0===e?0:1===e?1:y(f(e),t,o)}},D={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},_=!1;try{var $=Object.defineProperty({},"passive",{get:function(){_=!0}});window.addEventListener("test",null,$)}catch(e){}var P={$:function(e){return"string"!=typeof e?e:document.querySelector(e)},on:function(element,e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!1};e instanceof Array||(e=[e]);for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:{};if("object"===e(T)?B=T:"number"==typeof T&&(B.duration=T),!(element=P.$(k)))return console.warn("[vue-scrollto warn]: Trying to scroll to an element that is not on the page: "+k);if(t=P.$(B.container||O.container),n=B.hasOwnProperty("duration")?B.duration:O.duration,o=B.hasOwnProperty("lazy")?B.lazy:O.lazy,r=B.easing||O.easing,l=B.hasOwnProperty("offset")?B.offset:O.offset,c=B.hasOwnProperty("force")?!1!==B.force:O.force,d=B.hasOwnProperty("cancelable")?!1!==B.cancelable:O.cancelable,h=B.onStart||O.onStart,f=B.onDone||O.onDone,m=B.onCancel||O.onCancel,v=void 0===B.x?O.x:B.x,y=void 0===B.y?O.y:B.y,"function"==typeof l&&(l=l(element,t)),w=L(t),S=V(t),H(),A=!1,!c){var N="body"===t.tagName.toLowerCase()?document.documentElement.clientHeight||window.innerHeight:t.offsetHeight,E=S,j=E+N,W=x-l,Y=W+element.offsetHeight;if(W>=E&&Y<=j)return void(f&&f(element))}if(h&&h(element),$||_)return"string"==typeof r&&(r=D[r]||D.ease),I=C.apply(C,r),P.on(t,M,R,{passive:!0}),window.requestAnimationFrame(z),function(){F=null,A=!0};f&&f(element)}return Y},B=T(),F=[];function I(e){for(var i=0;i=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:[],r=v(e.$children||[]);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.$fetch&&n.push(o),o.$children&&x(o,n)}}catch(e){r.e(e)}finally{r.f()}return n}function C(e,t){if(t||!e.options.__hasNuxtData){var n=e.options._originDataFn||e.options.data||function(){return{}};e.options._originDataFn=n,e.options.data=function(){var data=n.call(this,this);return this.$ssrContext&&(t=this.$ssrContext.asyncData[e.cid]),m(m({},data),t)},e.options.__hasNuxtData=!0,e._Ctor&&e._Ctor.options&&(e._Ctor.options.data=e.options.data)}}function D(e){return e.options&&e._Ctor===e||(e.options?(e._Ctor=e,e.extendOptions=e.options):(e=d.a.extend(e))._Ctor=e,!e.options.name&&e.options.__file&&(e.options.name=e.options.__file)),e}function _(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"components";return Array.prototype.concat.apply([],e.matched.map((function(e,r){return Object.keys(e[n]).map((function(o){return t&&t.push(r),e[n][o]}))})))}function $(e){return _(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],"instances")}function P(e,t){return Array.prototype.concat.apply([],e.matched.map((function(e,n){return Object.keys(e.components).reduce((function(r,o){return e.components[o]?r.push(t(e.components[o],e.instances[o],e,o,n)):delete e.components[o],r}),[])})))}function M(e,t){return Promise.all(P(e,function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(n,r,o,l){var c,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof n||n.options){e.next=11;break}return e.prev=1,e.next=4,n();case 4:n=e.sent,e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(1),e.t0&&"ChunkLoadError"===e.t0.name&&"undefined"!=typeof window&&window.sessionStorage&&(c=Date.now(),(!(d=parseInt(window.sessionStorage.getItem("nuxt-reload")))||d+6e40)){e.next=19;break}return e.next=19,new Promise((function(e){return setTimeout(e,r)}));case 19:this.$fetchState.error=t,this.$fetchState.pending=!1,this.$fetchState.timestamp=Date.now(),this.$nextTick((function(){return o.$nuxt.nbFetching--}));case 23:case"end":return e.stop()}}),e,this,[[6,11]])})))).apply(this,arguments)}t.a={beforeCreate:function(){Object(l.l)(this)&&(this._fetchDelay="number"==typeof this.$options.fetchDelay?this.$options.fetchDelay:200,o.a.util.defineReactive(this,"$fetchState",{pending:!1,error:null,timestamp:Date.now()}),this.$fetch=f.bind(this),Object(l.a)(this,"created",h),Object(l.a)(this,"beforeMount",d))}}},357:function(e,t,n){n(358),e.exports=n(359)},358:function(e,t,n){(function(e){e.installComponents=function(component,e){var n="function"==typeof component.exports?component.exports.extendOptions:component.options;for(var i in"function"==typeof component.exports&&(n.components=component.exports.options.components),n.components=n.components||{},e)n.components[i]=n.components[i]||e[i];n.functional&&function(component,e){if(component.exports[t])return;component.exports[t]=!0;var n=component.exports.render;component.exports.render=function(t,r){return n(t,Object.assign({},r,{_c:function(t,a,b){return r._c(e[t]||t,a,b)}}))}}(component,n.components)};var t="_functionalComponents"}).call(this,n(53))},359:function(e,t,n){"use strict";n.r(t),function(e){n(58),n(45),n(76),n(32),n(77),n(78);var t=n(28),r=n(18),o=(n(140),n(375),n(387),n(389),n(93),n(12),n(11),n(31),n(36),n(37),n(72),n(73),n(51),n(57),n(33),n(52),n(22),n(121),n(2)),l=n(299),c=n(173),d=n(3),h=n(42),f=n(302),m=n(126);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i2?t-2:0),r=2;r1&&void 0!==arguments[1]?arguments[1]:C,n=arguments.length>2?arguments[2]:void 0;return r.call(this,e,t,n)};var o=n.resolve.bind(n);return n.resolve=function(e,t,n){return"string"==typeof e&&(e=Object(w.c)(e)),o(e,t,n)},n}var $={name:"NuxtChild",functional:!0,props:{nuxtChildKey:{type:String,default:""},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0}},render:function(e,t){var n=t.parent,data=t.data,r=t.props,o=n.$createElement;data.nuxtChild=!0;for(var l=n,c=n.$nuxt.nuxt.transitions,d=n.$nuxt.nuxt.defaultTransition,h=0;n;)n.$vnode&&n.$vnode.data.nuxtChild&&h++,n=n.$parent;data.nuxtChildDepth=h;var f=c[h]||d,m={};P.forEach((function(e){void 0!==f[e]&&(m[e]=f[e])}));var v={};M.forEach((function(e){"function"==typeof f[e]&&(v[e]=f[e].bind(l))}));var y=v.beforeEnter;if(v.beforeEnter=function(e){if(window.$nuxt.$nextTick((function(){window.$nuxt.$emit("triggerScroll")})),y)return y.call(l,e)},!1===f.css){var w=v.leave;(!w||w.length<2)&&(v.leave=function(e,t){w&&w.call(l,e),l.$nextTick(t)})}var k=o("routerView",data);return r.keepAlive&&(k=o("keep-alive",{props:r.keepAliveProps},[k])),o("transition",{props:m,on:v},[k])}},P=["name","mode","appear","css","type","duration","enterClass","leaveClass","appearClass","enterActiveClass","enterActiveClass","leaveActiveClass","appearActiveClass","enterToClass","leaveToClass","appearToClass"],M=["beforeEnter","enter","afterEnter","enterCancelled","beforeLeave","leave","afterLeave","leaveCancelled","beforeAppear","appear","afterAppear","appearCancelled"],O=n(50),A=n(21),T=(n(45),{name:"Nuxt",components:{NuxtChild:$,NuxtError:O.a},props:{nuxtChildKey:{type:String,default:void 0},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0},name:{type:String,default:"default"}},errorCaptured:function(e){this.displayingNuxtError&&(this.errorFromNuxtError=e,this.$forceUpdate())},computed:{routerViewKey:function(){if(void 0!==this.nuxtChildKey||this.$route.matched.length>1)return this.nuxtChildKey||Object(k.c)(this.$route.matched[0].path)(this.$route.params);var e=Object(A.a)(this.$route.matched,1)[0];if(!e)return this.$route.path;var t=e.components.default;if(t&&t.options){var n=t.options;if(n.key)return"function"==typeof n.key?n.key(this.$route):n.key}return/\/$/.test(e.path)?this.$route.path:this.$route.path.replace(/\/$/,"")}},beforeCreate:function(){c.a.util.defineReactive(this,"nuxt",this.$root.$options.nuxt)},render:function(e){var t=this;return this.nuxt.err?this.errorFromNuxtError?(this.$nextTick((function(){return t.errorFromNuxtError=!1})),e("div",{},[e("h2","An error occurred while showing the error page"),e("p","Unfortunately an error occurred and while showing the error page another error occurred"),e("p","Error details: ".concat(this.errorFromNuxtError.toString())),e("nuxt-link",{props:{to:"/"}},"Go back to home")])):(this.displayingNuxtError=!0,this.$nextTick((function(){return t.displayingNuxtError=!1})),e(O.a,{props:{error:this.nuxt.err}})):e("NuxtChild",{key:this.routerViewKey,props:this.$props})}}),B=(n(58),n(76),n(77),n(78),n(313)),F=(n(413),n(303));function I(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},isPreview:function(){return Boolean(this.$options.previewData)}},methods:{refreshOnlineStatus:function(){void 0===window.navigator.onLine?this.isOnline=!0:this.isOnline=window.navigator.onLine},refresh:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=Object(k.h)(e.$route)).length){t.next=3;break}return t.abrupt("return");case 3:return e.$loading.start(),r=n.map(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(n){var p,r,o,component;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p=[],n.$options.fetch&&n.$options.fetch.length&&p.push(Object(k.q)(n.$options.fetch,e.context)),n.$options.asyncData&&p.push(Object(k.q)(n.$options.asyncData,e.context).then((function(e){for(var t in e)c.a.set(n.$data,t,e[t])}))),t.next=5,Promise.all(p);case 5:p=[],n.$fetch&&p.push(n.$fetch()),r=I(Object(k.e)(n.$vnode.componentInstance));try{for(r.s();!(o=r.n()).done;)component=o.value,p.push(component.$fetch())}catch(e){r.e(e)}finally{r.f()}return t.abrupt("return",Promise.all(p));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.prev=5,t.next=8,Promise.all(r);case 8:t.next=15;break;case 10:t.prev=10,t.t0=t.catch(5),e.$loading.fail(t.t0),Object(k.k)(t.t0),e.error(t.t0);case 15:e.$loading.finish();case 16:case"end":return t.stop()}}),t,null,[[5,10]])})))()},errorChanged:function(){if(this.nuxt.err){this.$loading&&(this.$loading.fail&&this.$loading.fail(this.nuxt.err),this.$loading.finish&&this.$loading.finish());var e=(O.a.options||O.a).layout;"function"==typeof e&&(e=e(this.context)),this.setLayout(e)}},setLayout:function(e){return e&&E["_"+e]||(e="default"),this.layoutName=e,this.layout=E["_"+e],this.layout},loadLayout:function(e){return e&&E["_"+e]||(e="default"),Promise.resolve(E["_"+e])}},components:{NuxtLoading:B.a}},V=(n(72),n(73),function(){return n.e(0).then(n.bind(null,157)).then((function(e){return it(e.default||e)}))}),L=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(8)]).then(n.bind(null,165)).then((function(e){return it(e.default||e)}))},H=function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,304)).then((function(e){return it(e.default||e)}))},z=function(){return n.e(0).then(n.bind(null,514)).then((function(e){return it(e.default||e)}))},j=function(){return Promise.all([n.e(0),n.e(1),n.e(4),n.e(21)]).then(n.bind(null,158)).then((function(e){return it(e.default||e)}))},W=function(){return Promise.all([n.e(0),n.e(47)]).then(n.bind(null,161)).then((function(e){return it(e.default||e)}))},Y=function(){return Promise.all([n.e(0),n.e(48)]).then(n.bind(null,94)).then((function(e){return it(e.default||e)}))},U=function(){return Promise.all([n.e(0),n.e(49)]).then(n.bind(null,159)).then((function(e){return it(e.default||e)}))},K=function(){return Promise.all([n.e(0),n.e(1),n.e(50)]).then(n.bind(null,160)).then((function(e){return it(e.default||e)}))},X=function(){return Promise.all([n.e(0),n.e(51)]).then(n.bind(null,148)).then((function(e){return it(e.default||e)}))},G=function(){return Promise.all([n.e(0),n.e(1),n.e(52)]).then(n.bind(null,30)).then((function(e){return it(e.default||e)}))},Q=function(){return Promise.all([n.e(0),n.e(1),n.e(53)]).then(n.bind(null,96)).then((function(e){return it(e.default||e)}))},J=function(){return Promise.all([n.e(0),n.e(54)]).then(n.bind(null,164)).then((function(e){return it(e.default||e)}))},Z=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(55)]).then(n.bind(null,10)).then((function(e){return it(e.default||e)}))},ee=function(){return Promise.all([n.e(0),n.e(1),n.e(4),n.e(59)]).then(n.bind(null,151)).then((function(e){return it(e.default||e)}))},te=function(){return Promise.all([n.e(0),n.e(60)]).then(n.bind(null,162)).then((function(e){return it(e.default||e)}))},ne=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(4),n.e(61)]).then(n.bind(null,149)).then((function(e){return it(e.default||e)}))},ie=function(){return Promise.all([n.e(0),n.e(62)]).then(n.bind(null,163)).then((function(e){return it(e.default||e)}))},ae=function(){return Promise.all([n.e(0),n.e(64)]).then(n.bind(null,95)).then((function(e){return it(e.default||e)}))},re=function(){return Promise.all([n.e(0),n.e(65)]).then(n.bind(null,150)).then((function(e){return it(e.default||e)}))},se=function(){return Promise.all([n.e(0),n.e(1),n.e(42)]).then(n.bind(null,152)).then((function(e){return it(e.default||e)}))},oe=function(){return Promise.all([n.e(0),n.e(43)]).then(n.bind(null,153)).then((function(e){return it(e.default||e)}))},le=function(){return Promise.all([n.e(0),n.e(44)]).then(n.bind(null,154)).then((function(e){return it(e.default||e)}))},ue=function(){return Promise.all([n.e(0),n.e(45)]).then(n.bind(null,156)).then((function(e){return it(e.default||e)}))},ce=function(){return Promise.all([n.e(0),n.e(1),n.e(46)]).then(n.bind(null,155)).then((function(e){return it(e.default||e)}))},de=function(){return Promise.all([n.e(0),n.e(9)]).then(n.bind(null,167)).then((function(e){return it(e.default||e)}))},he=function(){return Promise.all([n.e(0),n.e(10)]).then(n.bind(null,168)).then((function(e){return it(e.default||e)}))},fe=function(){return Promise.all([n.e(0),n.e(11)]).then(n.bind(null,321)).then((function(e){return it(e.default||e)}))},pe=function(){return n.e(0).then(n.bind(null,166)).then((function(e){return it(e.default||e)}))},me=function(){return Promise.all([n.e(0),n.e(13)]).then(n.bind(null,312)).then((function(e){return it(e.default||e)}))},ve=function(){return Promise.all([n.e(0),n.e(14)]).then(n.bind(null,311)).then((function(e){return it(e.default||e)}))},ge=function(){return Promise.all([n.e(0),n.e(15)]).then(n.bind(null,309)).then((function(e){return it(e.default||e)}))},be=function(){return Promise.all([n.e(0),n.e(16)]).then(n.bind(null,307)).then((function(e){return it(e.default||e)}))},ye=function(){return Promise.all([n.e(0),n.e(17)]).then(n.bind(null,305)).then((function(e){return it(e.default||e)}))},we=function(){return Promise.all([n.e(0),n.e(18)]).then(n.bind(null,310)).then((function(e){return it(e.default||e)}))},ke=function(){return Promise.all([n.e(0),n.e(19)]).then(n.bind(null,308)).then((function(e){return it(e.default||e)}))},Se=function(){return Promise.all([n.e(0),n.e(20)]).then(n.bind(null,306)).then((function(e){return it(e.default||e)}))},xe=function(){return Promise.all([n.e(0),n.e(56)]).then(n.bind(null,169)).then((function(e){return it(e.default||e)}))},Ce=function(){return Promise.all([n.e(0),n.e(57)]).then(n.bind(null,322)).then((function(e){return it(e.default||e)}))},De=function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,171)).then((function(e){return it(e.default||e)}))},_e=function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,97)).then((function(e){return it(e.default||e)}))},$e=function(){return n.e(0).then(n.bind(null,172)).then((function(e){return it(e.default||e)}))},Pe=function(){return Promise.all([n.e(0),n.e(5),n.e(58)]).then(n.bind(null,170)).then((function(e){return it(e.default||e)}))},Me=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(63)]).then(n.bind(null,480)).then((function(e){return it(e.default||e)}))},Oe=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(22)]).then(n.bind(null,508)).then((function(e){return it(e.default||e)}))},Ae=function(){return n.e(0).then(n.bind(null,502)).then((function(e){return it(e.default||e)}))},Te=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(23)]).then(n.bind(null,509)).then((function(e){return it(e.default||e)}))},Be=function(){return n.e(0).then(n.bind(null,515)).then((function(e){return it(e.default||e)}))},Fe=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(26)]).then(n.bind(null,482)).then((function(e){return it(e.default||e)}))},Ie=function(){return n.e(0).then(n.bind(null,56)).then((function(e){return it(e.default||e)}))},Ne=function(){return n.e(0).then(n.bind(null,69)).then((function(e){return it(e.default||e)}))},Ee=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(33)]).then(n.bind(null,481)).then((function(e){return it(e.default||e)}))},Re=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(34)]).then(n.bind(null,479)).then((function(e){return it(e.default||e)}))},Ve=function(){return n.e(0).then(n.bind(null,510)).then((function(e){return it(e.default||e)}))},Le=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(35)]).then(n.bind(null,483)).then((function(e){return it(e.default||e)}))},He=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(39)]).then(n.bind(null,487)).then((function(e){return it(e.default||e)}))},ze=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(24)]).then(n.bind(null,496)).then((function(e){return it(e.default||e)}))},je=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(25)]).then(n.bind(null,497)).then((function(e){return it(e.default||e)}))},We=function(){return n.e(0).then(n.bind(null,511)).then((function(e){return it(e.default||e)}))},Ye=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(27)]).then(n.bind(null,490)).then((function(e){return it(e.default||e)}))},qe=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(28)]).then(n.bind(null,491)).then((function(e){return it(e.default||e)}))},Ue=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(29)]).then(n.bind(null,492)).then((function(e){return it(e.default||e)}))},Ke=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(30)]).then(n.bind(null,493)).then((function(e){return it(e.default||e)}))},Xe=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(31)]).then(n.bind(null,494)).then((function(e){return it(e.default||e)}))},Ge=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(32)]).then(n.bind(null,495)).then((function(e){return it(e.default||e)}))},Qe=function(){return n.e(0).then(n.bind(null,512)).then((function(e){return it(e.default||e)}))},Je=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(36)]).then(n.bind(null,484)).then((function(e){return it(e.default||e)}))},Ze=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(37)]).then(n.bind(null,485)).then((function(e){return it(e.default||e)}))},et=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(38)]).then(n.bind(null,486)).then((function(e){return it(e.default||e)}))},tt=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(40)]).then(n.bind(null,488)).then((function(e){return it(e.default||e)}))},nt=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(41)]).then(n.bind(null,489)).then((function(e){return it(e.default||e)}))};function it(e){if(!e||!e.functional)return e;var t=Array.isArray(e.props)?e.props:Object.keys(e.props||{});return{render:function(n){var r={},o={};for(var l in this.$attrs)t.includes(l)?o[l]=this.$attrs[l]:r[l]=this.$attrs[l];return n(e,{on:this.$listeners,attrs:r,props:o,scopedSlots:this.$scopedSlots},this.$slots.default)}}}for(var at in r)c.a.component(at,r[at]),c.a.component("Lazy"+at,r[at]);var st=n(176),ot=n.n(st);c.a.use(ot.a,{duration:100});var lt=function(e,t){t("scrollTo",ot.a.scrollTo)};function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ht(e,t){for(var i=0;i=0||(n[t]=source[t]);return n}(source,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,t)&&(n[t]=source[t])}return n}function kt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function St(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xt(e,i){return Dt(e)||function(e,i){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var t=[],n=!0,r=!1,o=void 0;try{for(var l,c=e[Symbol.iterator]();!(n=(l=c.next()).done)&&(t.push(l.value),!i||t.length!==i);n=!0);}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}return t}(e,i)||$t()}function Ct(e){return function(e){if(Array.isArray(e)){for(var i=0,t=new Array(e.length);i0?1:0};function Mt(e,t){return(e&t)===t}function Ot(e,t){return(e%t+t)%t}function At(e,t,n){return Math.max(t,Math.min(n,e))}function Tt(e,path){return path.split(".").reduce((function(e,i){return e?e[i]:null}),e)}function Bt(e,t,n){if(!e)return-1;if(!n||"function"!=typeof n)return e.indexOf(t);for(var i=0;i2&&void 0!==arguments[2]&&arguments[2];if(n||!Object.assign){var r=Object.getOwnPropertyNames(source).map((function(r){return ft({},r,function(e){return Ft(source[e])&&null!==t&&t.hasOwnProperty(e)&&Ft(t[e])}(r)?e(t[r],source[r],n):source[r])})).reduce((function(a,b){return mt({},a,{},b)}),{});return mt({},t,{},r)}return Object.assign(t,source)},Nt={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&(window.navigator.userAgent.match(/iPhone|iPad|iPod/i)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return Nt.Android()||Nt.BlackBerry()||Nt.iOS()||Nt.Opera()||Nt.Windows()}};function Et(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}function Rt(e){var t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";var n=document.createElement("div");return t.appendChild(n),n.appendChild(e),document.body.appendChild(t),t}function Vt(e){return e&&e._isVue}function Lt(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Ht(e,t){var n;return JSON.parse(JSON.stringify(e)).sort((n=t,function(a,b){return n.map((function(e){var t=1;"-"===e[0]&&(t=-1,e=e.substring(1));var n=Tt(a,e),r=Tt(b,e);return n>r?t:n/g).map((function(e){var t=e.match(/<(.+)>/);return!t||t.length<=0?null:e.match(/<(.+)>/)[1]})).reduce((function(e,n,r,o){return t&&t.length>r?e[n]=t[r+1]:e[n]=null,e}),{})}function Wt(e){return"shadowRoot"in e.$root.$options}var Yt,qt=function(e){return void 0!==e},Ut=function(e){return null==e},Kt={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultIconPrev:"chevron-left",defaultIconNext:"chevron-right",defaultLocale:void 0,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipDelay:null,defaultTooltipCloseDelay:null,defaultSidebarDelay:null,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultTimeCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,10],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1,defaultDatepickerWeekNumberClickable:!1,defaultDatepickerMobileModal:!0,defaultTrapFocus:!0,defaultAutoFocus:!0,defaultButtonRounded:!1,defaultSwitchRounded:!0,defaultCarouselInterval:3500,defaultTabsExpanded:!1,defaultTabsAnimated:!0,defaultTabsType:null,defaultStatusIcon:!0,defaultProgrammaticPromise:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"],defaultImageWebpFallback:null,defaultImageLazy:!0,defaultImageResponsive:!0,defaultImageRatio:null,defaultImageSrcsetFormatter:null,defaultBreadcrumbTag:"a",defaultBreadcrumbAlign:"is-left",defaultBreadcrumbSeparator:"",defaultBreadcrumbSize:"is-medium",customIconPacks:null},Xt=function(e){Kt=e},Gt=function(e){Yt=e};var Qt=function(template,style,script,e,t,n,r,o,l,c){"boolean"!=typeof r&&(l=o,o=r,r=!1);var d,h="function"==typeof script?script.options:script;if(template&&template.render&&(h.render=template.render,h.staticRenderFns=template.staticRenderFns,h._compiled=!0,t&&(h.functional=!0)),e&&(h._scopeId=e),n?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),style&&style.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(n)},h._ssrRegister=d):style&&(d=r?function(){style.call(this,c(this.$root.$options.shadowRoot))}:function(e){style.call(this,o(e))}),d)if(h.functional){var f=h.render;h.render=function(e,t){return d.call(t),f(e,t)}}else{var m=h.beforeCreate;h.beforeCreate=m?[].concat(m,d):[d]}return script},use=function(e){"undefined"!=typeof window&&window.Vue&&window.Vue.use(e)},Jt=function(e,component){e.component(component.name,component)},Zt=function(e,t,component){e.prototype.$buefy||(e.prototype.$buefy={}),e.prototype.$buefy[t]=component},en={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return Kt.defaultUseHtml5Validation}},validationMessage:String,locale:{type:[String,Array],default:function(){return Kt.defaultLocale}},statusIcon:{type:Boolean,default:function(){return Kt.defaultStatusIcon}}},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||Kt.defaultIconPack}},computed:{parentField:function(){for(var e=this.$parent,i=0;i<3;i++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){var e=(this.parentField||{}).newType;if(e){if("string"==typeof e)return e;for(var t in e)if(e[t])return t}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this.getElement();void 0!==e&&this.$nextTick((function(){e&&e.focus()}))},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},getElement:function(){for(var e=this.$refs[this.$data._elementRef];Vt(e);)e=e.$refs[e.$data._elementRef];return e},setInvalid:function(){var e=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",e)},setValidity:function(e,t){var n=this;this.$nextTick((function(){n.parentField&&(n.parentField.type||(n.parentField.newType=e),n.parentField.message||(n.parentField.newMessage=t))}))},checkHtml5Validity:function(){if(this.useHtml5Validation){var e=this.getElement();if(void 0!==e)return e.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid}}}},tn={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},nn=function(){var e=Kt&&Kt.defaultIconComponent?"":"fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var an=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?n(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):n("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},undefined,{name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{iconConfig:function(){var e;return(e={mdi:tn,fa:nn(),fas:nn(),far:nn(),fad:nn(),fab:nn(),fal:nn(),"fa-solid":nn(),"fa-regular":nn(),"fa-light":nn(),"fa-thin":nn(),"fa-duotone":nn(),"fa-brands":nn()},Kt&&Kt.customIconPacks&&(e=It(e,Kt.customIconPacks,!0)),e)[this.newPack]},iconPrefix:function(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon:function(){return"".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||Kt.defaultIconPack},newType:function(){if(this.type){var e=[];if("string"==typeof this.type)e=this.type.split("-");else for(var t in this.type)if(this.type[t]){e=t.split("-");break}if(!(e.length<=1)){var n,r=(Dt(n=e)||_t(n)||$t()).slice(1);return"has-text-".concat(r.join("-"))}}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent:function(){return this.component||Kt.defaultIconComponent}},methods:{getEquivalentIconOf:function(e){return this.both&&this.iconConfig&&this.iconConfig.internalIcons&&this.iconConfig.internalIcons[e]?this.iconConfig.internalIcons[e]:e}}},undefined,!1,undefined,void 0,void 0);var rn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?n("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,change:e.onChange,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):n("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,change:e.onChange,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e.icon?n("b-icon",{staticClass:"is-left",class:{"is-clickable":e.iconClickable},attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize},nativeOn:{click:function(t){return e.iconClick("icon-click",t)}}}):e._e(),!e.loading&&e.hasIconRight?n("b-icon",{staticClass:"is-right",class:{"is-clickable":e.passwordReveal||e.iconRightClickable},attrs:{icon:e.rightIcon,pack:e.iconPack,size:e.iconSize,type:e.rightIconType,both:""},nativeOn:{click:function(t){return e.rightIconClick(t)}}}):e._e(),e.maxlength&&e.hasCounter&&"number"!==e.type?n("small",{staticClass:"help counter",class:{"is-invisible":!e.isFocused}},[e._v(" "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+" ")]):e._e()],1)},staticRenderFns:[]},undefined,{name:"BInput",components:ft({},an.name,an),mixins:[en],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:function(){return Kt.defaultInputHasCounter}},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean,iconRightType:String},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||Kt.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}},rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon:function(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType:function(){return this.passwordReveal?"is-primary":this.iconRight?this.iconRightType||null:this.statusType},iconPosition:function(){var e="";return this.icon&&(e+="has-icons-left "),this.hasIconRight&&(e+="has-icons-right"),e},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.computedValue?Array.from(this.computedValue).length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{value:function(e){this.newValue=e},type:function(e){this.newType=e}},methods:{togglePasswordVisibility:function(){var e=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick((function(){e.focus()}))},iconClick:function(e,t){var n=this;this.$emit(e,t),this.$nextTick((function(){n.focus()}))},rightIconClick:function(e){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",e)},onInput:function(e){if(!this.lazy){var t=e.target.value;this.updateValue(t)}},onChange:function(e){if(this.lazy){var t=e.target.value;this.updateValue(t)}},updateValue:function(e){this.computedValue=e,!this.isValid&&this.checkHtml5Validity()}}},undefined,!1,undefined,void 0,void 0),sn={name:"BAutocomplete",components:ft({},rn.name,rn),mixins:[en],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,selectOnClickOutside:Boolean,clearable:Boolean,maxHeight:[String,Number],dropdownPosition:{type:String,default:"auto"},groupField:String,groupOptions:String,iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean,type:{type:String,default:"text"},confirmKeys:{type:Array,default:function(){return["Tab","Enter"]}},selectableHeader:Boolean,selectableFooter:Boolean},data:function(){return{selected:null,hovered:null,headerHovered:null,footerHovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",ariaAutocomplete:this.keepFirst?"both":"list",isListInViewportVertically:!0,hasFocus:!1,style:{},_isAutocomplete:!0,_elementRef:"input",_bodyEl:void 0}},computed:{computedData:function(){var e=this;if(this.groupField){if(this.groupOptions){var t=[];return this.data.forEach((function(option){var n=Tt(option,e.groupField),r=Tt(option,e.groupOptions);t.push({group:n,items:r})})),t}var n={};this.data.forEach((function(option){var t=Tt(option,e.groupField);n[t]||(n[t]=[]),n[t].push(option)}));var r=[];return Object.keys(n).forEach((function(e){r.push({group:e,items:n[e]})})),r}return[{items:this.data}]},isEmpty:function(){return!this.computedData||!this.computedData.some((function(element){return element.items&&element.items.length}))},whiteList:function(){var e=[];if(e.push(this.$refs.input.$el.querySelector("input")),e.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var t=this.$refs.dropdown.querySelectorAll("*"),n=!0,r=!1,o=void 0;try{for(var l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var d=l.value;e.push(d)}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}if(this.$parent.$data._isTaginput){e.push(this.$parent.$el);var h=this.$parent.$el.querySelectorAll("*"),f=!0,m=!1,v=void 0;try{for(var y,w=h[Symbol.iterator]();!(f=(y=w.next()).done);f=!0){var k=y.value;e.push(k)}}catch(e){m=!0,v=e}finally{try{f||null==w.return||w.return()}finally{if(m)throw v}}}return e},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasGroupSlot:function(){return!!this.$scopedSlots.group},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer},isOpenedTop:function(){return"top"===this.dropdownPosition||"auto"===this.dropdownPosition&&!this.isListInViewportVertically},newIconRight:function(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable:function(){return!!this.clearable||this.iconRightClickable},contentStyle:function(){return{maxHeight:zt(this.maxHeight)}}},watch:{isActive:function(e){var t=this;"auto"===this.dropdownPosition&&(e?this.calcDropdownInViewportVertical():setTimeout((function(){t.calcDropdownInViewportVertical()}),100))},checkInfiniteScroll:function(e){if(!1!==(this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content"))){var t=this.$refs.dropdown.querySelector(".dropdown-content");!0!==e?t.removeEventListener("scroll",this.checkIfReachedTheEndOfScroll):t.addEventListener("scroll",this.checkIfReachedTheEndOfScroll)}},newValue:function(e){this.$emit("input",e);var t=this.getValue(this.selected);t&&t!==e&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!e||(this.isActive=!!e)},value:function(e){this.newValue=e},data:function(){var e=this;if(this.keepFirst)this.$nextTick((function(){e.isActive?e.selectFirstOption(e.computedData):e.setHovered(null)}));else if(this.hovered){var t=this.getValue(this.hovered),data=this.computedData.map((function(e){return e.items})).reduce((function(a,b){return[].concat(Ct(a),Ct(b))}),[]);data.some((function(n){return e.getValue(n)===t}))||this.setHovered(null)}}},methods:{setHovered:function(option){void 0!==option&&(this.hovered=option)},setSelected:function(option){var e=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(void 0!==option){if(this.selected=option,this.$emit("select",this.selected,n),null!==this.selected){if(this.clearOnSelect){var input=this.$refs.input;input.newValue="",input.$refs.input.value=""}else this.newValue=this.getValue(this.selected);this.setHovered(null)}t&&this.$nextTick((function(){e.isActive=!1})),this.checkValidity()}},selectFirstOption:function(e){var t=this;this.$nextTick((function(){var n=e.filter((function(element){return element.items&&element.items.length}));if(n.length){var option=n[0].items[0];t.setHovered(option)}else t.setHovered(null)}))},keydown:function(e){var t=e.key;if("Enter"===t&&e.preventDefault(),"Escape"!==t&&"Tab"!==t||(this.isActive=!1),this.confirmKeys.indexOf(t)>=0){","===t&&e.preventDefault();var n=!this.keepOpen||"Tab"===t;if(null===this.hovered)return void this.checkIfHeaderOrFooterSelected(e,null,n);this.setSelected(this.hovered,n,e)}},selectHeaderOrFoterByClick:function(e,t){this.checkIfHeaderOrFooterSelected(e,{origin:t})},checkIfHeaderOrFooterSelected:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.selectableHeader&&(this.headerHovered||t&&"header"===t.origin)&&(this.$emit("select-header",e),this.headerHovered=!1,t&&this.setHovered(null),n&&(this.isActive=!1)),this.selectableFooter&&(this.footerHovered||t&&"footer"===t.origin)&&(this.$emit("select-footer",e),this.footerHovered=!1,t&&this.setHovered(null),n&&(this.isActive=!1))},clickedOutside:function(e){var t=Wt(this)?e.composedPath()[0]:e.target;!this.hasFocus&&this.whiteList.indexOf(t)<0&&(this.keepFirst&&this.hovered&&this.selectOnClickOutside?this.setSelected(this.hovered,!0):this.isActive=!1)},getValue:function(option){if(null!==option)return void 0!==this.customFormatter?this.customFormatter(option):"object"===ut(option)?Tt(option,this.field):option},checkIfReachedTheEndOfScroll:function(){var e=this.$refs.dropdown.querySelector(".dropdown-content"),t=this.hasFooterSlot?e.querySelectorAll("div.dropdown-footer")[0].clientHeight:0;e.clientHeight!==e.scrollHeight&&e.scrollTop+e.parentElement.clientHeight+t>=e.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical:function(){var e=this;this.$nextTick((function(){if(void 0!==e.$refs.dropdown){var rect=e.$refs.dropdown.getBoundingClientRect();e.isListInViewportVertically=rect.top>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight),e.appendToBody&&e.updateAppendToBody()}}))},keyArrows:function(e){var t="down"===e?1:-1;if(this.isActive){var n,data=this.computedData.map((function(e){return e.items})).reduce((function(a,b){return[].concat(Ct(a),Ct(b))}),[]);this.hasHeaderSlot&&this.selectableHeader&&data.unshift(void 0),this.hasFooterSlot&&this.selectableFooter&&data.push(void 0),n=(n=(n=this.headerHovered?0+t:this.footerHovered?data.length-1+t:data.indexOf(this.hovered)+t)>data.length-1?data.length-1:n)<0?0:n,this.footerHovered=!1,this.headerHovered=!1,this.setHovered(void 0!==data[n]?data[n]:null),this.hasFooterSlot&&this.selectableFooter&&n===data.length-1&&(this.footerHovered=!0),this.hasHeaderSlot&&this.selectableHeader&&0===n&&(this.headerHovered=!0);var r=this.$refs.dropdown.querySelector(".dropdown-content"),o="a.dropdown-item:not(.is-disabled)";this.hasHeaderSlot&&this.selectableHeader&&(o+=",div.dropdown-header"),this.hasFooterSlot&&this.selectableFooter&&(o+=",div.dropdown-footer");var element=r.querySelectorAll(o)[n];if(!element)return;var l=r.scrollTop,c=r.scrollTop+r.clientHeight-element.clientHeight;element.offsetTop=c&&(r.scrollTop=element.offsetTop-r.clientHeight+element.clientHeight)}else this.isActive=!0},focused:function(e){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.computedData)),this.hasFocus=!0,this.$emit("focus",e)},onBlur:function(e){this.hasFocus=!1,this.$emit("blur",e)},onInput:function(){var e=this.getValue(this.selected);e&&e===this.newValue||(this.$emit("typing",this.newValue),this.checkValidity())},rightIconClick:function(e){this.clearable?(this.newValue="",this.setSelected(null,!1),this.openOnFocus&&this.$refs.input.$el.focus()):this.$emit("icon-right-click",e)},checkValidity:function(){var e=this;this.useHtml5Validation&&this.$nextTick((function(){e.checkHtml5Validity()}))},updateAppendToBody:function(){var e=this.$refs.dropdown,t=this.$refs.input.$el;if(e&&t){var n=this.$data._bodyEl;n.classList.forEach((function(e){return n.classList.remove(e)})),n.classList.add("autocomplete"),n.classList.add("control"),this.expandend&&n.classList.add("is-expandend");var rect=t.getBoundingClientRect(),r=rect.top+window.scrollY,o=rect.left+window.scrollX;this.isOpenedTop?r-=e.clientHeight:r+=t.clientHeight,this.style={position:"absolute",top:"".concat(r,"px"),left:"".concat(o,"px"),width:"".concat(t.clientWidth,"px"),maxWidth:"".concat(t.clientWidth,"px"),zIndex:"99"}}}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted:function(){this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")&&this.$refs.dropdown.querySelector(".dropdown-content").addEventListener("scroll",this.checkIfReachedTheEndOfScroll);this.appendToBody&&(this.$data._bodyEl=Rt(this.$refs.dropdown),this.updateAppendToBody())},beforeDestroy:function(){("undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content"))&&this.$refs.dropdown.querySelector(".dropdown-content").removeEventListener("scroll",this.checkIfReachedTheEndOfScroll);this.appendToBody&&Et(this.$data._bodyEl)}};var on=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"autocomplete control",class:{"is-expanded":e.expanded}},[n("b-input",e._b({ref:"input",attrs:{type:e.type,size:e.size,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-right":e.newIconRight,"icon-right-clickable":e.newIconRightClickable,"icon-pack":e.iconPack,maxlength:e.maxlength,autocomplete:e.newAutocomplete,"use-html5-validation":!1,"aria-autocomplete":e.ariaAutocomplete},on:{input:e.onInput,focus:e.focused,blur:e.onBlur,"icon-right-click":e.rightIconClick,"icon-click":function(t){return e.$emit("icon-click",t)}},nativeOn:{keydown:[function(t){return e.keydown(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.keyArrows("up"))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.keyArrows("down"))}]},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}},"b-input",e.$attrs,!1)),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive&&(!e.isEmpty||e.hasEmptySlot||e.hasHeaderSlot),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":e.isOpenedTop&&!e.appendToBody},style:e.style},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"dropdown-content",style:e.contentStyle},[e.hasHeaderSlot?n("div",{staticClass:"dropdown-item dropdown-header",class:{"is-hovered":e.headerHovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.selectHeaderOrFoterByClick(t,"header")}}},[e._t("header")],2):e._e(),e._l(e.computedData,(function(element,t){return[element.group?n("div",{key:t+"group",staticClass:"dropdown-item"},[e.hasGroupSlot?e._t("group",null,{group:element.group,index:t}):n("span",{staticClass:"has-text-weight-bold"},[e._v(" "+e._s(element.group)+" ")])],2):e._e(),e._l(element.items,(function(option,r){return n("a",{key:t+":"+r,staticClass:"dropdown-item",class:{"is-hovered":option===e.hovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return t.stopPropagation(),e.setSelected(option,!e.keepOpen,t)}}},[e.hasDefaultSlot?e._t("default",null,{option:option,index:r}):n("span",[e._v(" "+e._s(e.getValue(option,!0))+" ")])],2)}))]})),e.isEmpty&&e.hasEmptySlot?n("div",{staticClass:"dropdown-item is-disabled"},[e._t("empty")],2):e._e(),e.hasFooterSlot?n("div",{staticClass:"dropdown-item dropdown-footer",class:{"is-hovered":e.footerHovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.selectHeaderOrFoterByClick(t,"footer")}}},[e._t("footer")],2):e._e()],2)])])],1)},staticRenderFns:[]},undefined,sn,undefined,!1,undefined,void 0,void 0),ln={install:function(e){Jt(e,on)}};use(ln);var un=ln;var cn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{class:e.breadcrumbClasses},[n("ul",[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BBreadcrumb",props:{align:{type:String,default:function(){return Kt.defaultBreadcrumbAlign}},separator:{type:String,default:function(){return Kt.defaultBreadcrumbSeparator}},size:{type:String,default:function(){return Kt.defaultBreadcrumbSize}}},computed:{breadcrumbClasses:function(){return["breadcrumb",this.align,this.separator,this.size]}}},undefined,!1,undefined,void 0,void 0);var dn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{class:{"is-active":e.active}},[n(e.tag,e._g(e._b({tag:"component"},"component",e.$attrs,!1),e.$listeners),[e._t("default")],2)],1)},staticRenderFns:[]},undefined,{name:"BBreadcrumbItem",inheritAttrs:!1,props:{tag:{type:String,default:function(){return Kt.defaultBreadcrumbTag}},active:Boolean}},undefined,!1,undefined,void 0,void 0),hn={install:function(e){Jt(e,cn),Jt(e,dn)}};use(hn);var fn=hn;var pn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.computedTag,e._g(e._b({tag:"component",staticClass:"button",class:[e.size,e.type,{"is-rounded":e.rounded,"is-loading":e.loading,"is-outlined":e.outlined,"is-fullwidth":e.expanded,"is-inverted":e.inverted,"is-focused":e.focused,"is-active":e.active,"is-hovered":e.hovered,"is-selected":e.selected}],attrs:{type:"button"===e.computedTag?e.nativeType:void 0}},"component",e.$attrs,!1),e.$listeners),[e.iconLeft?n("b-icon",{attrs:{pack:e.iconPack,icon:e.iconLeft,size:e.iconSize}}):e._e(),e.label?n("span",[e._v(e._s(e.label))]):e.$slots.default?n("span",[e._t("default")],2):e._e(),e.iconRight?n("b-icon",{attrs:{pack:e.iconPack,icon:e.iconRight,size:e.iconSize}}):e._e()],1)},staticRenderFns:[]},undefined,{name:"BButton",components:ft({},an.name,an),inheritAttrs:!1,props:{type:[String,Object],size:String,label:String,iconPack:String,iconLeft:String,iconRight:String,rounded:{type:Boolean,default:function(){return Kt.defaultButtonRounded}},loading:Boolean,outlined:Boolean,expanded:Boolean,inverted:Boolean,focused:Boolean,active:Boolean,hovered:Boolean,selected:Boolean,nativeType:{type:String,default:"button",validator:function(e){return["button","submit","reset"].indexOf(e)>=0}},tag:{type:String,default:"button",validator:function(e){return Kt.defaultLinkTags.indexOf(e)>=0}}},computed:{computedTag:function(){return void 0!==this.$attrs.disabled&&!1!==this.$attrs.disabled?"button":this.tag},iconSize:function(){return this.size&&"is-medium"!==this.size?"is-large"===this.size?"is-medium":this.size:"is-small"}}},undefined,!1,undefined,void 0,void 0),mn={install:function(e){Jt(e,pn)}};use(mn);var vn=mn,gn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={provide:function(){return ft({},"b"+e,this)}};return Mt(t,1)&&(n.data=function(){return{childItems:[]}},n.methods={_registerItem:function(e){this.childItems.push(e)},_unregisterItem:function(e){this.childItems=this.childItems.filter((function(i){return i!==e}))}},Mt(t,3)&&(n.watch={childItems:function(e){if(e.length>0&&this.$scopedSlots.default){var t=e[0].$vnode.tag,n=0;!function r(o){var l=!0,c=!1,d=void 0;try{for(var h,f=function(){var o=h.value;if(o.tag===t){var l=e.find((function(i){return i.$vnode===o}));l&&(l.index=n++)}else if(o.tag){var sub=o.componentInstance?o.componentInstance.$scopedSlots.default?o.componentInstance.$scopedSlots.default():o.componentInstance.$children:o.children;Array.isArray(sub)&&sub.length>0&&r(sub.map((function(e){return e.$vnode})))}},m=o[Symbol.iterator]();!(l=(h=m.next()).done);l=!0)f()}catch(e){c=!0,d=e}finally{try{l||null==m.return||m.return()}finally{if(c)throw d}}return!1}(this.$scopedSlots.default())}}},n.computed={sortedItems:function(){return this.childItems.slice().sort((function(e,t){return e.index-t.index}))}})),n},bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={inject:{parent:{from:"b"+e,default:!1}},created:function(){if(this.parent)this.parent._registerItem&&this.parent._registerItem(this);else if(!Mt(t,2))throw this.$destroy(),new Error("You should wrap "+this.$options.name+" in a "+e)},beforeDestroy:function(){this.parent&&this.parent._unregisterItem&&this.parent._unregisterItem(this)}};return Mt(t,1)&&(n.data=function(){return{index:null}}),n},yn={name:"BImage",props:{src:String,alt:String,srcFallback:String,webpFallback:{type:String,default:function(){return Kt.defaultImageWebpFallback}},lazy:{type:Boolean,default:function(){return Kt.defaultImageLazy}},responsive:{type:Boolean,default:function(){return Kt.defaultImageResponsive}},ratio:{type:String,default:function(){return Kt.defaultImageRatio}},placeholder:String,srcset:String,srcsetSizes:Array,srcsetFormatter:{type:Function,default:function(e,t,n){return"function"==typeof Kt.defaultImageSrcsetFormatter?Kt.defaultImageSrcsetFormatter(e,t):n.formatSrcset(e,t)}},rounded:{type:Boolean,default:!1},captionFirst:{type:Boolean,default:!1},customClass:String},data:function(){return{clientWidth:0,webpSupportVerified:!1,webpSupported:!1,useNativeLazy:!1,observer:null,inViewPort:!1,bulmaKnownRatio:["square","1by1","5by4","4by3","3by2","5by3","16by9","b2y1","3by1","4by5","3by4","2by3","3by5","9by16","1by2","1by3"],loaded:!1,failed:!1}},computed:{ratioPattern:function(){return new RegExp(/([0-9]+)by([0-9]+)/)},hasRatio:function(){return this.ratio&&this.ratioPattern.test(this.ratio)},figureClasses:function(){var e={image:this.responsive};return this.hasRatio&&this.bulmaKnownRatio.indexOf(this.ratio)>=0&&(e["is-".concat(this.ratio)]=!0),e},figureStyles:function(){if(this.hasRatio&&this.bulmaKnownRatio.indexOf(this.ratio)<0){var e=this.ratioPattern.exec(this.ratio);return{paddingTop:"".concat(e[2]/e[1]*100,"%")}}},imgClasses:function(){return ft({"is-rounded":this.rounded,"has-ratio":this.hasRatio},this.customClass,!!this.customClass)},srcExt:function(){return this.getExt(this.src)},isWepb:function(){return"webp"===this.srcExt},computedSrc:function(){var e=this.src;return this.failed&&this.srcFallback&&(e=this.srcFallback),!this.webpSupported&&this.isWepb&&this.webpFallback?this.webpFallback.startsWith(".")?e.replace(/\.webp/gi,"".concat(this.webpFallback)):this.webpFallback:e},computedWidth:function(){if(this.responsive&&this.clientWidth>0)return this.clientWidth},computedNativeLazy:function(){if(this.lazy&&this.useNativeLazy)return"lazy"},isDisplayed:function(){return(this.webpSupportVerified||!this.isWepb)&&(!this.lazy||this.useNativeLazy||this.inViewPort)},placeholderExt:function(){if(this.placeholder)return this.getExt(this.placeholder)},isPlaceholderWepb:function(){if(this.placeholder)return"webp"===this.placeholderExt},computedPlaceholder:function(){return!this.webpSupported&&this.isPlaceholderWepb&&this.webpFallback&&this.webpFallback.startsWith(".")?this.placeholder.replace(/\.webp/gi,"".concat(this.webpFallback)):this.placeholder},isPlaceholderDisplayed:function(){return!this.loaded&&(this.$slots.placeholder||this.placeholder&&(this.webpSupportVerified||!this.isPlaceholderWepb))},computedSrcset:function(){var e=this;return this.srcset?!this.webpSupported&&this.isWepb&&this.webpFallback&&this.webpFallback.startsWith(".")?this.srcset.replace(/\.webp/gi,"".concat(this.webpFallback)):this.srcset:this.srcsetSizes&&Array.isArray(this.srcsetSizes)&&this.srcsetSizes.length>0?this.srcsetSizes.map((function(t){return"".concat(e.srcsetFormatter(e.computedSrc,t,e)," ").concat(t,"w")})).join(","):void 0},computedSizes:function(){if(this.computedSrcset&&this.computedWidth)return"".concat(this.computedWidth,"px")},isCaptionFirst:function(){return this.$slots.caption&&this.captionFirst},isCaptionLast:function(){return this.$slots.caption&&!this.captionFirst}},methods:{getExt:function(e){return e?(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?e.split("?")[0]:e).split(".").pop():""},setWidth:function(){this.clientWidth=this.$el.clientWidth},formatSrcset:function(e,t){var n=this.getExt(e,!1),r=e.split(".").slice(0,-1).join(".");return"".concat(r,"-").concat(t,".").concat(n)},onLoad:function(e){this.loaded=!0,this.emit("load",e)},onError:function(e){this.emit("error",e),this.failed||(this.failed=!0)},emit:function(e,t){var n=t.target;this.$emit(e,t,n.currentSrc||n.src||this.computedSrc)}},created:function(){var e=this;if(this.isWepb&&new Promise((function(e){var image=new Image;image.onerror=function(){return e(!1)},image.onload=function(){return e(1===image.width)},image.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA="})).catch((function(){return!1})).then((function(t){e.webpSupportVerified=!0,e.webpSupported=t})),this.lazy){var t="undefined"!=typeof window&&"HTMLImageElement"in window&&"loading"in HTMLImageElement.prototype,n="undefined"!=typeof window&&"IntersectionObserver"in window;!t&&n?this.observer=new IntersectionObserver((function(t){var n=t[0],r=n.target;n.isIntersecting&&!e.inViewPort&&(e.inViewPort=!0,e.observer.unobserve(r))})):this.useNativeLazy=!0}},mounted:function(){this.lazy&&this.observer&&this.observer.observe(this.$el),this.setWidth(),"undefined"!=typeof window&&window.addEventListener("resize",this.setWidth)},beforeDestroy:function(){this.observer&&this.observer.disconnect(),"undefined"!=typeof window&&window.removeEventListener("resize",this.setWidth)}};var wn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("figure",{staticClass:"b-image-wrapper",class:e.figureClasses,style:e.figureStyles},[e.isCaptionFirst?n("figcaption",[e._t("caption")],2):e._e(),n("transition",{attrs:{name:"fade"}},[e.isDisplayed?n("img",{class:e.imgClasses,attrs:{srcset:e.computedSrcset,src:e.computedSrc,alt:e.alt,width:e.computedWidth,sizes:e.computedSizes,loading:e.computedNativeLazy},on:{load:e.onLoad,error:e.onError}}):e._e()]),n("transition",{attrs:{name:"fade"}},[e.isPlaceholderDisplayed?e._t("placeholder",[n("img",{staticClass:"placeholder",class:e.imgClasses,attrs:{src:e.computedPlaceholder,alt:e.alt}})]):e._e()],2),e.isCaptionLast?n("figcaption",[e._t("caption")],2):e._e()],1)},staticRenderFns:[]},undefined,yn,undefined,!1,undefined,void 0,void 0),kn={name:"BCarousel",components:ft({},an.name,an),mixins:[gn("carousel",3)],props:{value:{type:Number,default:0},animated:{type:String,default:"slide"},interval:Number,hasDrag:{type:Boolean,default:!0},autoplay:{type:Boolean,default:!0},pauseHover:{type:Boolean,default:!0},pauseInfo:{type:Boolean,default:!0},pauseInfoType:{type:String,default:"is-white"},pauseText:{type:String,default:"Pause"},arrow:{type:Boolean,default:!0},arrowHover:{type:Boolean,default:!0},repeat:{type:Boolean,default:!0},iconPack:String,iconSize:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},indicator:{type:Boolean,default:!0},indicatorBackground:Boolean,indicatorCustom:Boolean,indicatorCustomSize:{type:String,default:"is-small"},indicatorInside:{type:Boolean,default:!0},indicatorMode:{type:String,default:"click"},indicatorPosition:{type:String,default:"is-bottom"},indicatorStyle:{type:String,default:"is-dots"},overlay:Boolean,progress:Boolean,progressType:{type:String,default:"is-primary"},withCarouselList:Boolean},data:function(){return{transition:"next",activeChild:this.value||0,isPause:!1,dragX:!1,timer:null}},computed:{indicatorClasses:function(){return[{"has-background":this.indicatorBackground,"has-custom":this.indicatorCustom,"is-inside":this.indicatorInside},this.indicatorCustom&&this.indicatorCustomSize,this.indicatorInside&&this.indicatorPosition]},hasPrev:function(){return this.repeat||0!==this.activeChild},hasNext:function(){return this.repeat||this.activeChild=e.length&&this.activeChild>0&&this.changeActive(this.activeChild-1)},autoplay:function(e){e?this.startTimer():this.pauseTimer()},repeat:function(e){e&&this.startTimer()}},methods:{startTimer:function(){var e=this;this.autoplay&&!this.timer&&(this.isPause=!1,this.timer=setInterval((function(){!e.repeat&&e.activeChild>=e.childItems.length-1?e.pauseTimer():e.next()}),this.interval||Kt.defaultCarouselInterval))},pauseTimer:function(){this.isPause=!0,this.timer&&(clearInterval(this.timer),this.timer=null)},restartTimer:function(){this.pauseTimer(),this.startTimer()},checkPause:function(){this.pauseHover&&this.autoplay&&this.pauseTimer()},changeActive:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.activeChild===e||isNaN(e)||(t=t||e-this.activeChild,e=this.repeat?Ot(e,this.childItems.length):At(e,0,this.childItems.length-1),this.transition=t>0?"prev":"next",this.activeChild=e,e!==this.value&&this.$emit("input",e),this.restartTimer(),this.$emit("change",e))},modeChange:function(e,t){if(this.indicatorMode===e)return this.changeActive(t)},prev:function(){this.changeActive(this.activeChild-1,-1)},next:function(){this.changeActive(this.activeChild+1,1)},dragStart:function(e){this.hasDrag&&e.target.draggable&&(this.dragX=e.touches?e.changedTouches[0].pageX:e.pageX,e.touches?this.pauseTimer():e.preventDefault())},dragEnd:function(e){if(!1!==this.dragX){var t=(e.touches?e.changedTouches[0].pageX:e.pageX)-this.dragX;Math.abs(t)>30?t<0?this.next():this.prev():(e.target.click(),this.sortedItems[this.activeChild].$emit("click"),this.$emit("click")),e.touches&&this.startTimer(),this.dragX=!1}}},mounted:function(){this.startTimer()},beforeDestroy:function(){this.pauseTimer()}};var Sn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"carousel",class:{"is-overlay":e.overlay},on:{mouseenter:e.checkPause,mouseleave:e.startTimer}},[e.progress?n("progress",{staticClass:"progress",class:e.progressType,attrs:{max:e.childItems.length-1},domProps:{value:e.activeChild}},[e._v(" "+e._s(e.childItems.length-1)+" ")]):e._e(),n("div",{staticClass:"carousel-items",on:{mousedown:e.dragStart,mouseup:e.dragEnd,touchstart:function(t){return t.stopPropagation(),e.dragStart(t)},touchend:function(t){return t.stopPropagation(),e.dragEnd(t)}}},[e._t("default"),e.arrow?n("div",{staticClass:"carousel-arrow",class:{"is-hovered":e.arrowHover}},[n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasPrev,expression:"hasPrev"}],staticClass:"has-icons-left",attrs:{pack:e.iconPack,icon:e.iconPrev,size:e.iconSize,both:""},nativeOn:{click:function(t){return e.prev(t)}}}),n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasNext,expression:"hasNext"}],staticClass:"has-icons-right",attrs:{pack:e.iconPack,icon:e.iconNext,size:e.iconSize,both:""},nativeOn:{click:function(t){return e.next(t)}}})],1):e._e()],2),e.autoplay&&e.pauseHover&&e.pauseInfo&&e.isPause?n("div",{staticClass:"carousel-pause"},[n("span",{staticClass:"tag",class:e.pauseInfoType},[e._v(" "+e._s(e.pauseText)+" ")])]):e._e(),e.withCarouselList&&!e.indicator?[e._t("list",null,{active:e.activeChild,switch:e.changeActive})]:e._e(),e.indicator?n("div",{staticClass:"carousel-indicator",class:e.indicatorClasses},e._l(e.sortedItems,(function(t,r){return n("a",{key:t._uid,staticClass:"indicator-item",class:{"is-active":t.isActive},on:{mouseover:function(t){return e.modeChange("hover",r)},click:function(t){return e.modeChange("click",r)}}},[e._t("indicators",[n("span",{staticClass:"indicator-style",class:e.indicatorStyle})],{i:r})],2)})),0):e._e(),e.overlay?[e._t("overlay")]:e._e()],2)},staticRenderFns:[]},undefined,kn,undefined,!1,undefined,void 0,void 0);var xn,Cn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.transition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"carousel-item"},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BCarouselItem",mixins:[bn("carousel",1)],data:function(){return{transitionName:null}},computed:{transition:function(){return"fade"===this.parent.animated?"fade":this.parent.transition?"slide-"+this.parent.transition:void 0},isActive:function(){return this.parent.activeChild===this.index}}},undefined,!1,undefined,void 0,void 0);var Dn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"carousel-list",class:{"has-shadow":e.scrollIndex>0},on:{mousedown:function(t){return t.preventDefault(),e.dragStart(t)},touchstart:e.dragStart}},[n("div",{staticClass:"carousel-slides",class:e.listClass,style:"transform:translateX("+e.translation+"px)"},e._l(e.data,(function(t,r){return n("div",{key:r,staticClass:"carousel-slide",class:{"is-active":e.asIndicator?e.activeItem===r:e.scrollIndex===r},style:e.itemStyle,on:{mouseup:function(t){return e.checkAsIndicator(r,t)},touchend:function(t){return e.checkAsIndicator(r,t)}}},[e._t("item",[n("b-image",e._b({attrs:{src:t.image}},"b-image",t,!1))],{index:r,active:e.activeItem,scroll:e.scrollIndex,list:t},t)],2)})),0),e.arrow?n("div",{staticClass:"carousel-arrow",class:{"is-hovered":e.settings.arrowHover}},[n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasPrev,expression:"hasPrev"}],staticClass:"has-icons-left",attrs:{pack:e.settings.iconPack,icon:e.settings.iconPrev,size:e.settings.iconSize,both:""},nativeOn:{click:function(t){return t.preventDefault(),e.prev(t)}}}),n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasNext,expression:"hasNext"}],staticClass:"has-icons-right",attrs:{pack:e.settings.iconPack,icon:e.settings.iconNext,size:e.settings.iconSize,both:""},nativeOn:{click:function(t){return t.preventDefault(),e.next(t)}}})],1):e._e()])},staticRenderFns:[]},undefined,{name:"BCarouselList",components:(xn={},ft(xn,an.name,an),ft(xn,wn.name,wn),xn),props:{data:{type:Array,default:function(){return[]}},value:{type:Number,default:0},scrollValue:{type:Number,default:0},hasDrag:{type:Boolean,default:!0},hasGrayscale:Boolean,hasOpacity:Boolean,repeat:Boolean,itemsToShow:{type:Number,default:4},itemsToList:{type:Number,default:1},asIndicator:Boolean,arrow:{type:Boolean,default:!0},arrowHover:{type:Boolean,default:!0},iconPack:String,iconSize:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},breakpoints:{type:Object,default:function(){return{}}}},data:function(){return{activeItem:this.value,scrollIndex:this.asIndicator?this.scrollValue:this.value,delta:0,dragX:!1,hold:0,windowWidth:0,touch:!1,observer:null,refresh_:0}},computed:{dragging:function(){return!1!==this.dragX},listClass:function(){return[{"has-grayscale":this.settings.hasGrayscale,"has-opacity":this.settings.hasOpacity,"is-dragging":this.dragging}]},itemStyle:function(){return"width: ".concat(this.itemWidth,"px;")},translation:function(){return-At(this.delta+this.scrollIndex*this.itemWidth,0,(this.data.length-this.settings.itemsToShow)*this.itemWidth)},total:function(){return this.data.length-this.settings.itemsToShow},hasPrev:function(){return this.settings.repeat||this.scrollIndex>0},hasNext:function(){return this.settings.repeat||this.scrollIndex=t)return!0}))[0];return t?mt({},this.$props,{},this.breakpoints[t]):this.$props},itemWidth:function(){return this.windowWidth?(this.refresh_,this.$el.getBoundingClientRect().width/this.settings.itemsToShow):0}},watch:{value:function(e){this.switchTo(this.asIndicator?e-(this.itemsToShow-3)/2:e),this.activeItem!==e&&(this.activeItem=At(e,0,this.data.length-1))},scrollValue:function(e){this.switchTo(e)}},methods:{resized:function(){this.windowWidth=window.innerWidth},switchTo:function(e){e===this.scrollIndex||isNaN(e)||(this.settings.repeat&&(e=Ot(e,this.total+1)),e=At(e,0,this.total),this.scrollIndex=e,this.asIndicator||this.value===e?this.scrollIndex!==e&&this.$emit("updated:scroll",e):this.$emit("input",e))},next:function(){this.switchTo(this.scrollIndex+this.settings.itemsToList)},prev:function(){this.switchTo(this.scrollIndex-this.settings.itemsToList)},checkAsIndicator:function(e,t){if(this.asIndicator){var n=t.changedTouches?t.changedTouches[0].clientX:t.clientX;this.hold-Date.now()>2e3||Math.abs(this.dragX-n)>10||(this.dragX=!1,this.hold=0,t.preventDefault(),this.activeItem=e,this.$emit("switch",e))}},dragStart:function(e){this.dragging||!this.settings.hasDrag||0!==e.button&&"touchstart"!==e.type||(this.hold=Date.now(),this.touch=!!e.touches,this.dragX=this.touch?e.touches[0].clientX:e.clientX,window.addEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.addEventListener(this.touch?"touchend":"mouseup",this.dragEnd))},dragMove:function(e){if(this.dragging){var t=e.touches?(e.changedTouches[0]||e.touches[0]).clientX:e.clientX;this.delta=this.dragX-t,e.touches||e.preventDefault()}},dragEnd:function(){if(this.dragging||this.hold){if(this.hold){var e=Pt(this.delta),t=Math.round(Math.abs(this.delta/this.itemWidth)+.15);this.switchTo(this.scrollIndex+e*t)}this.delta=0,this.dragX=!1,window.removeEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.removeEventListener(this.touch?"touchend":"mouseup",this.dragEnd)}},refresh:function(){var e=this;this.$nextTick((function(){e.refresh_++}))}},mounted:function(){if("undefined"!=typeof window&&(window.ResizeObserver&&(this.observer=new ResizeObserver(this.refresh),this.observer.observe(this.$el)),window.addEventListener("resize",this.resized),document.addEventListener("animationend",this.refresh),document.addEventListener("transitionend",this.refresh),document.addEventListener("transitionstart",this.refresh),this.resized()),this.$attrs.config)throw new Error("The config prop was removed, you need to use v-bind instead")},beforeDestroy:function(){"undefined"!=typeof window&&(window.ResizeObserver&&this.observer.disconnect(),window.removeEventListener("resize",this.resized),document.removeEventListener("animationend",this.refresh),document.removeEventListener("transitionend",this.refresh),document.removeEventListener("transitionstart",this.refresh),this.dragEnd())}},undefined,!1,undefined,void 0,void 0),_n={install:function(e){Jt(e,Sn),Jt(e,Cn),Jt(e,Dn)}};use(_n);var $n=_n,Pn={props:{value:[String,Number,Boolean,Function,Object,Array],nativeValue:[String,Number,Boolean,Function,Object,Array],type:String,disabled:Boolean,required:Boolean,name:String,size:String},data:function(){return{newValue:this.value}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}}},watch:{value:function(e){this.newValue=e}},methods:{focus:function(){this.$refs.input.focus()}}};var Mn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{ref:"label",staticClass:"b-checkbox checkbox",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.$refs.label.click())}]}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"checkbox",autocomplete:e.autocomplete,disabled:e.disabled,required:e.required,name:e.name,"true-value":e.trueValue,"false-value":e.falseValue,"aria-labelledby":e.ariaLabelledby},domProps:{indeterminate:e.indeterminate,value:e.nativeValue,checked:Array.isArray(e.computedValue)?e._i(e.computedValue,e.nativeValue)>-1:e._q(e.computedValue,e.trueValue)},on:{click:function(e){e.stopPropagation()},change:function(t){var n=e.computedValue,r=t.target,o=r.checked?e.trueValue:e.falseValue;if(Array.isArray(n)){var l=e.nativeValue,c=e._i(n,l);r.checked?c<0&&(e.computedValue=n.concat([l])):c>-1&&(e.computedValue=n.slice(0,c).concat(n.slice(c+1)))}else e.computedValue=o}}}),n("span",{staticClass:"check",class:e.type}),n("span",{staticClass:"control-label",attrs:{id:e.ariaLabelledby}},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BCheckbox",mixins:[Pn],props:{indeterminate:Boolean,ariaLabelledby:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array],default:!1},autocomplete:{type:String,default:"on"}}},undefined,!1,undefined,void 0,void 0);var On=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:{"is-expanded":e.expanded}},[n("label",{ref:"label",staticClass:"b-checkbox checkbox button",class:[e.checked?e.type:null,e.size,{"is-disabled":e.disabled,"is-focused":e.isFocused}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())}}},[e._t("default"),n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"checkbox",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:Array.isArray(e.computedValue)?e._i(e.computedValue,e.nativeValue)>-1:e.computedValue},on:{click:function(e){e.stopPropagation()},focus:function(t){e.isFocused=!0},blur:function(t){e.isFocused=!1},change:function(t){var n=e.computedValue,r=t.target,o=!!r.checked;if(Array.isArray(n)){var l=e.nativeValue,c=e._i(n,l);r.checked?c<0&&(e.computedValue=n.concat([l])):c>-1&&(e.computedValue=n.slice(0,c).concat(n.slice(c+1)))}else e.computedValue=o}}})],2)])},staticRenderFns:[]},undefined,{name:"BCheckboxButton",mixins:[Pn],props:{type:{type:String,default:"is-primary"},expanded:Boolean},data:function(){return{isFocused:!1}},computed:{checked:function(){return Array.isArray(this.newValue)?this.newValue.indexOf(this.nativeValue)>=0:this.newValue===this.nativeValue}}},undefined,!1,undefined,void 0,void 0),An={install:function(e){Jt(e,Mn),Jt(e,On)}};use(An);var Tn=An;var Bn=Qt({},undefined,{name:"BCollapse",model:{prop:"open",event:"update:open"},props:{open:{type:Boolean,default:!0},animation:{type:String,default:"fade"},ariaId:{type:String,default:""},position:{type:String,default:"is-top",validator:function(e){return["is-top","is-bottom"].indexOf(e)>-1}}},data:function(){return{isOpen:this.open}},watch:{open:function(e){this.isOpen=e}},methods:{toggle:function(){this.isOpen=!this.isOpen,this.$emit("update:open",this.isOpen),this.$emit(this.isOpen?"open":"close")}},render:function(e){var t=e("div",{staticClass:"collapse-trigger",on:{click:this.toggle}},this.$scopedSlots.trigger?[this.$scopedSlots.trigger({open:this.isOpen})]:[this.$slots.trigger]),content=e("transition",{props:{name:this.animation}},[e("div",{staticClass:"collapse-content",attrs:{id:this.ariaId},directives:[{name:"show",value:this.isOpen}]},this.$slots.default)]);return e("div",{staticClass:"collapse"},"is-top"===this.position?[t,content]:[content,t])}},undefined,undefined,undefined,void 0,void 0),Fn={install:function(e){Jt(e,Bn)}};use(Fn);var In,Nn=Fn,En="AM",Rn="PM",Vn="24",Ln="12",Hn={mixins:[en],inheritAttrs:!1,props:{value:Date,inline:Boolean,minTime:Date,maxTime:Date,placeholder:String,editable:Boolean,disabled:Boolean,hourFormat:{type:String,validator:function(e){return e===Vn||e===Ln}},incrementHours:{type:Number,default:1},incrementMinutes:{type:Number,default:1},incrementSeconds:{type:Number,default:1},timeFormatter:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultTimeFormatter?Kt.defaultTimeFormatter(e):function(e,t){return t.dtf.format(e)}(e,t)}},timeParser:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultTimeParser?Kt.defaultTimeParser(e):function(e,t){if(e){var n=null;if(t.computedValue&&!isNaN(t.computedValue)?n=new Date(t.computedValue):(n=t.timeCreator()).setMilliseconds(0),t.dtf.formatToParts&&"function"==typeof t.dtf.formatToParts){var r=jt(t.dtf.formatToParts(n).map((function(e){return"literal"===e.type?e.value.replace(/ /g,"\\s?"):"dayPeriod"===e.type?"((?!=<".concat(e.type,">)(").concat(t.amString,"|").concat(t.pmString,"|").concat(En,"|").concat(Rn,"|").concat(En.toLowerCase(),"|").concat(Rn.toLowerCase(),")?)"):"((?!=<".concat(e.type,">)\\d+)")})).join(""),e);if(r.hour=r.hour?parseInt(r.hour,10):null,r.minute=r.minute?parseInt(r.minute,10):null,r.second=r.second?parseInt(r.second,10):null,r.hour&&r.hour>=0&&r.hour<24&&r.minute&&r.minute>=0&&r.minute<59)return r.dayPeriod&&(r.dayPeriod.toLowerCase()===t.pmString.toLowerCase()||r.dayPeriod.toLowerCase()===Rn.toLowerCase())&&r.hour<12&&(r.hour+=12),n.setHours(r.hour),n.setMinutes(r.minute),n.setSeconds(r.second||0),n}var o=!1;if(t.hourFormat===Ln){var l=e.split(" ");e=l[0],o=l[1]===t.amString||l[1]===En}var time=e.split(":"),c=parseInt(time[0],10),d=parseInt(time[1],10),h=t.enableSeconds?parseInt(time[2],10):0;return isNaN(c)||c<0||c>23||t.hourFormat===Ln&&(c<1||c>12)||isNaN(d)||d<0||d>59?null:(n.setSeconds(h),n.setMinutes(d),t.hourFormat===Ln&&(o&&12===c?c=0:o||12===c||(c+=12)),n.setHours(c),new Date(n.getTime()))}return null}(e,t)}},mobileNative:{type:Boolean,default:function(){return Kt.defaultTimepickerMobileNative}},timeCreator:{type:Function,default:function(){return"function"==typeof Kt.defaultTimeCreator?Kt.defaultTimeCreator():new Date}},position:String,unselectableTimes:Array,openOnFocus:Boolean,enableSeconds:Boolean,defaultMinutes:Number,defaultSeconds:Number,focusable:{type:Boolean,default:!0},tzOffset:{type:Number,default:0},appendToBody:Boolean,resetOnMeridianChange:{type:Boolean,default:!1}},data:function(){return{dateSelected:this.value,hoursSelected:null,minutesSelected:null,secondsSelected:null,meridienSelected:null,_elementRef:"input",AM:En,PM:Rn,HOUR_FORMAT_24:Vn,HOUR_FORMAT_12:Ln}},computed:{computedValue:{get:function(){return this.dateSelected},set:function(e){this.dateSelected=e,this.$emit("input",this.dateSelected)}},localeOptions:function(){return new Intl.DateTimeFormat(this.locale,{hour:"numeric",minute:"numeric",second:this.enableSeconds?"numeric":void 0}).resolvedOptions()},dtf:function(){return new Intl.DateTimeFormat(this.locale,{hour:this.localeOptions.hour||"numeric",minute:this.localeOptions.minute||"numeric",second:this.enableSeconds?this.localeOptions.second||"numeric":void 0,hourCycle:this.isHourFormat24?"h23":"h12"})},newHourFormat:function(){return this.hourFormat||(this.localeOptions.hour12?Ln:Vn)},sampleTime:function(){var e=this.timeCreator();return e.setHours(10),e.setSeconds(0),e.setMinutes(0),e.setMilliseconds(0),e},hourLiteral:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime,t=this.dtf.formatToParts(e),n=t.find((function(e,n){return n>0&&"hour"===t[n-1].type}));if(n)return n.value}return":"},minuteLiteral:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime,t=this.dtf.formatToParts(e),n=t.find((function(e,n){return n>0&&"minute"===t[n-1].type}));if(n)return n.value}return":"},secondLiteral:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime,t=this.dtf.formatToParts(e),n=t.find((function(e,n){return n>0&&"second"===t[n-1].type}));if(n)return n.value}},amString:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime;e.setHours(10);var t=this.dtf.formatToParts(e).find((function(e){return"dayPeriod"===e.type}));if(t)return t.value}return En},pmString:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime;e.setHours(20);var t=this.dtf.formatToParts(e).find((function(e){return"dayPeriod"===e.type}));if(t)return t.value}return Rn},hours:function(){if(!this.incrementHours||this.incrementHours<1)throw new Error("Hour increment cannot be null or less than 1.");for(var e=[],t=this.isHourFormat24?24:12,i=0;i=12?this.pmString:this.amString)},locale:function(){this.value||(this.meridienSelected=this.amString)},value:{handler:function(e){this.updateInternalState(e),!this.isValid&&this.$refs.input.checkHtml5Validity()},immediate:!0}},methods:{onMeridienChange:function(e){null!==this.hoursSelected&&this.resetOnMeridianChange?(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.computedValue=null):null!==this.hoursSelected&&(e===this.pmString?this.hoursSelected+=12:e===this.amString&&(this.hoursSelected-=12)),this.updateDateSelected(this.hoursSelected,this.minutesSelected,this.enableSeconds?this.secondsSelected:0,e)},onHoursChange:function(e){this.minutesSelected||void 0===this.defaultMinutes||(this.minutesSelected=this.defaultMinutes),this.secondsSelected||void 0===this.defaultSeconds||(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(parseInt(e,10),this.minutesSelected,this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onMinutesChange:function(e){!this.secondsSelected&&this.defaultSeconds&&(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(this.hoursSelected,parseInt(e,10),this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onSecondsChange:function(e){this.updateDateSelected(this.hoursSelected,this.minutesSelected,parseInt(e,10),this.meridienSelected)},updateDateSelected:function(e,t,n,r){if(null!=e&&null!=t&&(!this.isHourFormat24&&null!==r||this.isHourFormat24)){var time=null;this.computedValue&&!isNaN(this.computedValue)?time=new Date(this.computedValue):(time=this.timeCreator()).setMilliseconds(0),time.setHours(e),time.setMinutes(t),time.setSeconds(n),isNaN(time.getTime())||(this.computedValue=new Date(time.getTime()))}},updateInternalState:function(e){e?(this.hoursSelected=e.getHours(),this.minutesSelected=e.getMinutes(),this.secondsSelected=e.getSeconds(),this.meridienSelected=e.getHours()>=12?this.pmString:this.amString):(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.meridienSelected=this.amString),this.dateSelected=e},isHourDisabled:function(e){var t=this,n=!1;if(this.minTime){var r=this.minTime.getHours(),o=this.minutes.every((function(n){return t.isMinuteDisabledForHour(e,n.value)}));n=el}this.unselectableTimes&&(n||(n=this.unselectableTimes.filter((function(time){return t.enableSeconds&&null!==t.secondsSelected?time.getHours()===e&&time.getMinutes()===t.minutesSelected&&time.getSeconds()===t.secondsSelected:null!==t.minutesSelected&&(time.getHours()===e&&time.getMinutes()===t.minutesSelected)})).length>0||this.minutes.every((function(n){return t.unselectableTimes.filter((function(time){return time.getHours()===e&&time.getMinutes()===n.value})).length>0}))));return n},isMinuteDisabledForHour:function(e,t){var n=!1;if(this.minTime){var r=this.minTime.getHours(),o=this.minTime.getMinutes();n=e===r&&tc}return n},isMinuteDisabled:function(e){var t=this,n=!1;null!==this.hoursSelected&&(n=!!this.isHourDisabled(this.hoursSelected)||this.isMinuteDisabledForHour(this.hoursSelected,e),this.unselectableTimes&&(n||(n=this.unselectableTimes.filter((function(time){return t.enableSeconds&&null!==t.secondsSelected?time.getHours()===t.hoursSelected&&time.getMinutes()===e&&time.getSeconds()===t.secondsSelected:time.getHours()===t.hoursSelected&&time.getMinutes()===e})).length>0)));return n},isSecondDisabled:function(e){var t=this,n=!1;if(null!==this.minutesSelected){if(this.isMinuteDisabled(this.minutesSelected))n=!0;else{if(this.minTime){var r=this.minTime.getHours(),o=this.minTime.getMinutes(),l=this.minTime.getSeconds();n=this.hoursSelected===r&&this.minutesSelected===o&&eh}}if(this.unselectableTimes)if(!n)n=this.unselectableTimes.filter((function(time){return time.getHours()===t.hoursSelected&&time.getMinutes()===t.minutesSelected&&time.getSeconds()===e})).length>0}return n},onChange:function(e){var t=this.timeParser(e,this);this.updateInternalState(t),t&&!isNaN(t)?this.computedValue=t:(this.computedValue=null,this.$refs.input.newValue=this.computedValue)},toggle:function(e){this.$refs.dropdown&&(this.$refs.dropdown.isActive="boolean"==typeof e?e:!this.$refs.dropdown.isActive)},close:function(){this.toggle(!1)},handleOnFocus:function(){this.onFocus(),this.openOnFocus&&this.toggle(!0)},formatHHMMSS:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getHours(),r=t.getMinutes(),o=t.getSeconds();return this.formatNumber(n,!0)+":"+this.formatNumber(r,!0)+":"+this.formatNumber(o,!0)}return""},onChangeNativePicker:function(e){var t=e.target.value;if(t){var time=null;this.computedValue&&!isNaN(this.computedValue)?time=new Date(this.computedValue):(time=new Date).setMilliseconds(0);var n=t.split(":");time.setHours(parseInt(n[0],10)),time.setMinutes(parseInt(n[1],10)),time.setSeconds(n[2]?parseInt(n[2],10):0),this.computedValue=new Date(time.getTime())}else this.computedValue=null},formatNumber:function(e,t){return this.isHourFormat24||t?this.pad(e):e},pad:function(e){return(e<10?"0":"")+e},formatValue:function(e){return e&&!isNaN(e)?this.timeFormatter(e,this):null},keyPress:function(e){var t=e.key;this.$refs.dropdown&&this.$refs.dropdown.isActive&&("Escape"===t||"Esc"===t)&&this.toggle(!1)},onActiveChange:function(e){e||this.onBlur()}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}},zn=function(element){return element?arguments.length>1&&void 0!==arguments[1]&&arguments[1]?element.querySelectorAll('*[tabindex="-1"]'):element.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null},jn={bind:function(e,t){var n=t.value;if(void 0===n||n){var r=zn(e),o=zn(e,!0);r&&r.length>0&&(In=function(t){r=zn(e),o=zn(e,!0);var n=r[0],l=r[r.length-1];t.target===n&&t.shiftKey&&"Tab"===t.key?(t.preventDefault(),l.focus()):(t.target===l||Array.from(o).indexOf(t.target)>=0)&&!t.shiftKey&&"Tab"===t.key&&(t.preventDefault(),n.focus())},e.addEventListener("keydown",In))}},unbind:function(e){e.removeEventListener("keydown",In)}},Wn=["escape","outside"];var Yn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"dropdown",staticClass:"dropdown dropdown-menu-animation",class:e.rootClasses,on:{mouseleave:function(t){e.isHoverable=!1}}},[e.inline?e._e():n("div",{ref:"trigger",staticClass:"dropdown-trigger",attrs:{tabindex:!e.disabled&&e.triggerTabindex,"aria-haspopup":"true"},on:{click:e.onClick,contextmenu:function(t){return t.preventDefault(),e.onContextMenu(t)},mouseenter:e.onHover,"!focus":function(t){return e.onFocus(t)}}},[e._t("trigger",null,{active:e.isActive})],2),n("transition",{attrs:{name:e.animation}},[e.isMobileModal?n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!e.isActive}}):e._e()]),n("transition",{attrs:{name:e.animation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.disabled&&(e.isActive||e.isHoverable)||e.inline,expression:"(!disabled && (isActive || isHoverable)) || inline"},{name:"trap-focus",rawName:"v-trap-focus",value:e.trapFocus,expression:"trapFocus"}],ref:"dropdownMenu",staticClass:"dropdown-menu",style:e.style,attrs:{"aria-hidden":!e.isActive}},[n("div",{staticClass:"dropdown-content",style:e.contentStyle,attrs:{role:e.ariaRole,"aria-modal":!e.inline}},[e._t("default")],2)])])],1)},staticRenderFns:[]},undefined,{name:"BDropdown",directives:{trapFocus:jn},mixins:[gn("dropdown")],props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:200},position:{type:String,validator:function(e){return["is-top-right","is-top-left","is-bottom-left","is-bottom-right"].indexOf(e)>-1}},triggers:{type:Array,default:function(){return["click"]}},mobileModal:{type:Boolean,default:function(){return Kt.defaultDropdownMobileModal}},ariaRole:{type:String,validator:function(e){return["menu","list","dialog"].indexOf(e)>-1},default:null},animation:{type:String,default:"fade"},multiple:Boolean,trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,appendToBody:Boolean,appendToBodyCopyParent:Boolean,triggerTabindex:{type:Number,default:0}},data:function(){return{selected:this.value,style:{},isActive:!1,isHoverable:!1,_bodyEl:void 0}},computed:{rootClasses:function(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal,"is-expanded":this.expanded}]},isMobileModal:function(){return this.mobileModal&&!this.inline},cancelOptions:function(){return"boolean"==typeof this.canClose?this.canClose?Wn:[]:this.canClose},contentStyle:function(){return{maxHeight:this.scrollable?zt(this.maxHeight):null,overflow:this.scrollable?"auto":null}},hoverable:function(){return this.triggers.indexOf("hover")>=0}},watch:{value:function(e){this.selected=e},isActive:function(e){var t=this;this.$emit("active-change",e),this.handleScroll(),this.appendToBody&&this.$nextTick((function(){t.updateAppendToBody()}))},isHoverable:function(e){this.hoverable&&this.$emit("active-change",e)}},methods:{handleScroll:function(){"undefined"!=typeof window&&this.isMobileModal&&(this.isActive?document.documentElement.classList.add("is-clipped-touch"):document.documentElement.classList.remove("is-clipped-touch"))},selectItem:function(e){this.multiple?(this.selected?-1===this.selected.indexOf(e)?this.selected=[].concat(Ct(this.selected),[e]):this.selected=this.selected.filter((function(t){return t!==e})):this.selected=[e],this.$emit("change",this.selected)):this.selected!==e&&(this.selected=e,this.$emit("change",this.selected)),this.$emit("input",this.selected),this.multiple||(this.isActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1))},isInWhiteList:function(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(void 0!==this.$refs.dropdownMenu){var t=this.$refs.dropdownMenu.querySelectorAll("*"),n=!0,r=!1,o=void 0;try{for(var l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){if(e===l.value)return!0}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}if(void 0!==this.$refs.trigger){var d=this.$refs.trigger.querySelectorAll("*"),h=!0,f=!1,m=void 0;try{for(var v,y=d[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){if(e===v.value)return!0}}catch(e){f=!0,m=e}finally{try{h||null==y.return||y.return()}finally{if(f)throw m}}}return!1},clickedOutside:function(e){if(!(this.cancelOptions.indexOf("outside")<0||this.inline)){var t=Wt(this)?e.composedPath()[0]:e.target;this.isInWhiteList(t)||(this.isActive=!1)}},keyPress:function(e){var t=e.key;if(this.isActive&&("Escape"===t||"Esc"===t)){if(this.cancelOptions.indexOf("escape")<0)return;this.isActive=!1}},onClick:function(){this.triggers.indexOf("click")<0||this.toggle()},onContextMenu:function(){this.triggers.indexOf("contextmenu")<0||this.toggle()},onHover:function(){this.triggers.indexOf("hover")<0||(this.isHoverable=!0)},onFocus:function(){this.triggers.indexOf("focus")<0||this.toggle()},toggle:function(){var e=this;this.disabled||(this.isActive?this.isActive=!this.isActive:this.$nextTick((function(){var t=!e.isActive;e.isActive=t,setTimeout((function(){return e.isActive=t}))})))},updateAppendToBody:function(){var e=this.$refs.dropdown,t=this.$refs.dropdownMenu,n=this.$refs.trigger;if(t&&n){var r=this.$data._bodyEl.children[0];if(r.classList.forEach((function(e){return r.classList.remove(e)})),r.classList.add("dropdown"),r.classList.add("dropdown-menu-animation"),this.$vnode&&this.$vnode.data&&this.$vnode.data.staticClass&&r.classList.add(this.$vnode.data.staticClass),this.rootClasses.forEach((function(e){if(e&&"object"===ut(e))for(var t in e)e[t]&&r.classList.add(t)})),this.appendToBodyCopyParent){var o=this.$refs.dropdown.parentNode,l=this.$data._bodyEl;l.classList.forEach((function(e){return l.classList.remove(e)})),o.classList.forEach((function(e){l.classList.add(e)}))}var rect=n.getBoundingClientRect(),c=rect.top+window.scrollY,d=rect.left+window.scrollX;!this.position||this.position.indexOf("bottom")>=0?c+=n.clientHeight:c-=t.clientHeight,this.position&&this.position.indexOf("left")>=0&&(d-=t.clientWidth-n.clientWidth),this.style={position:"absolute",top:"".concat(c,"px"),left:"".concat(d,"px"),zIndex:"99",width:this.expanded?"".concat(e.offsetWidth,"px"):void 0}}}},mounted:function(){this.appendToBody&&(this.$data._bodyEl=Rt(this.$refs.dropdownMenu),this.updateAppendToBody())},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),this.appendToBody&&Et(this.$data._bodyEl)}},undefined,!1,undefined,void 0,void 0);var qn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.separator?n("hr",{staticClass:"dropdown-divider"}):e.custom||e.hasLink?n("div",{class:e.itemClasses,attrs:{role:e.ariaRoleItem,tabindex:e.isFocusable?0:null},on:{click:e.selectItem}},[e._t("default")],2):n("a",{staticClass:"dropdown-item",class:e.anchorClasses,attrs:{role:e.ariaRoleItem,tabindex:e.isFocusable?0:null},on:{click:e.selectItem}},[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BDropdownItem",mixins:[bn("dropdown")],props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},computed:{anchorClasses:function(){return{"is-disabled":this.parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses:function(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem:function(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:null},isClickable:function(){return!(this.parent.disabled||this.separator||this.disabled||this.custom)},isActive:function(){return null!==this.parent.selected&&(this.parent.multiple?this.parent.selected.indexOf(this.value)>=0:this.value===this.parent.selected)},isFocusable:function(){return!this.hasLink&&this.focusable}},methods:{selectItem:function(){this.isClickable&&(this.parent.selectItem(this.value),this.$emit("click"))}}},undefined,!1,undefined,void 0,void 0),Un={name:"BFieldBody",props:{message:{type:[String,Array]},type:{type:[String,Object]}},render:function(e){var t=this,n=!0;return e("div",{attrs:{class:"field-body"}},this.$slots.default.map((function(element){return element.tag?(n&&(r=t.message,n=!1),e("b-field",{attrs:{type:t.type,message:r}},[element])):element;var r})))}};var Kn=Qt({},undefined,Un,undefined,undefined,undefined,void 0,void 0),Xn={name:"BField",components:ft({},Kn.name,Kn),provide:function(){return{BField:this}},inject:{parent:{from:"BField",default:!1}},props:{type:[String,Object],label:String,labelFor:String,message:[String,Array,Object],grouped:Boolean,groupMultiline:Boolean,position:String,expanded:Boolean,horizontal:Boolean,addons:{type:Boolean,default:!0},customClass:String,labelPosition:{type:String,default:function(){return Kt.defaultFieldLabelPosition}}},data:function(){return{newType:this.type,newMessage:this.message,fieldLabelSize:null,_isField:!0}},computed:{rootClasses:function(){return[{"is-expanded":this.expanded,"is-horizontal":this.horizontal,"is-floating-in-label":this.hasLabel&&!this.horizontal&&"inside"===this.labelPosition,"is-floating-label":this.hasLabel&&!this.horizontal&&"on-border"===this.labelPosition},this.numberInputClasses]},innerFieldClasses:function(){return[this.fieldType(),this.newPosition,{"is-grouped-multiline":this.groupMultiline}]},hasInnerField:function(){return this.grouped||this.groupMultiline||this.hasAddons()},newPosition:function(){if(void 0!==this.position){var e=this.position.split("-");if(!(e.length<1)){var t=this.grouped?"is-grouped-":"has-addons-";return this.position?t+e[1]:void 0}}},formattedMessage:function(){if(this.parent&&this.parent.hasInnerField)return"";if("string"==typeof this.newMessage)return[this.newMessage];var e=[];if(Array.isArray(this.newMessage))this.newMessage.forEach((function(t){if("string"==typeof t)e.push(t);else for(var n in t)t[n]&&e.push(n)}));else for(var t in this.newMessage)this.newMessage[t]&&e.push(t);return e.filter((function(e){if(e)return e}))},hasLabel:function(){return this.label||this.$slots.label},hasMessage:function(){return(!this.parent||!this.parent.hasInnerField)&&this.newMessage||this.$slots.message},numberInputClasses:function(){if(this.$slots.default){var e=this.$slots.default.filter((function(e){return e.tag&&e.tag.toLowerCase().indexOf("numberinput")>=0}))[0];if(e){var t=["has-numberinput"],n=e.componentOptions.propsData.controlsPosition,r=e.componentOptions.propsData.size;return n&&t.push("has-numberinput-".concat(n)),r&&t.push("has-numberinput-".concat(r)),t}}return null}},watch:{type:function(e){this.newType=e},message:function(e){this.newMessage=e},newMessage:function(e){this.parent&&this.parent.hasInnerField&&(this.parent.type||(this.parent.newType=this.newType),this.parent.message||(this.parent.newMessage=e))}},methods:{fieldType:function(){return this.grouped?"is-grouped":this.hasAddons()?"has-addons":void 0},hasAddons:function(){var e=0;return this.$slots.default&&(e=this.$slots.default.reduce((function(i,e){return e.tag?i+1:i}),0)),e>1&&this.addons&&!this.horizontal}},mounted:function(){this.horizontal&&(this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider").length>0&&(this.fieldLabelSize="is-normal"))}};var Gn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"field",class:e.rootClasses},[e.horizontal?n("div",{staticClass:"field-label",class:[e.customClass,e.fieldLabelSize]},[e.hasLabel?n("label",{staticClass:"label",class:e.customClass,attrs:{for:e.labelFor}},[e.$slots.label?e._t("label"):[e._v(e._s(e.label))]],2):e._e()]):[e.hasLabel?n("label",{staticClass:"label",class:e.customClass,attrs:{for:e.labelFor}},[e.$slots.label?e._t("label"):[e._v(e._s(e.label))]],2):e._e()],e.horizontal?n("b-field-body",{attrs:{message:e.newMessage?e.formattedMessage:"",type:e.newType}},[e._t("default")],2):e.hasInnerField?n("div",{staticClass:"field-body"},[n("b-field",{class:e.innerFieldClasses,attrs:{addons:!1,type:e.newType}},[e._t("default")],2)],1):[e._t("default")],e.hasMessage&&!e.horizontal?n("p",{staticClass:"help",class:e.newType},[e.$slots.message?e._t("message",null,{messages:e.formattedMessage}):[e._l(e.formattedMessage,(function(t,i){return[e._v(" "+e._s(t)+" "),i+1=this.countPerRing},calcHandAngle:function(e){var t=this.degreesPerUnit*(e-this.min);return this.isInnerRing(e)&&(t-=360),t},calcHandScale:function(e){return this.isInnerRing(e)?this.innerRadius/this.outerRadius:1},onMouseDown:function(e){e.preventDefault(),this.isDragging=!0,this.onDragMove(e)},onMouseUp:function(){this.isDragging=!1,this.isDisabled(this.inputValue)||this.$emit("change",this.inputValue)},onDragMove:function(e){if(e.preventDefault(),this.isDragging||"click"===e.type){var t=this.$refs.clock.getBoundingClientRect(),n=t.width,r=t.top,o=t.left,l="touches"in e?e.touches[0]:e,c={x:n/2,y:-n/2},d={x:l.clientX-o,y:r-l.clientY},h=Math.round(this.coordToAngle(c,d)+360)%360,f=this.double&&this.euclidean(c,d)<(this.outerRadius+this.innerRadius)/2-16,m=Math.round(h/this.degreesPerUnit)+this.min+(f?this.countPerRing:0);h>=360-this.degreesPerUnit/2&&(m=f?this.max:this.min),this.update(m)}},update:function(e){this.inputValue===e||this.isDisabled(e)||(this.prevAngle=this.handRotateAngle,this.inputValue=e,this.$emit("input",e))}}},undefined,!1,undefined,void 0,void 0);var Zn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-clockpicker control",class:[e.size,e.type,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline,"append-to-body":e.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(){return[e._t("trigger",[n("b-input",e._b({ref:"input",attrs:{slot:"trigger",autocomplete:"off",value:e.formatValue(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,disabled:e.disabled,readonly:!e.editable,rounded:e.rounded,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){return e.checkHtml5Validity()}},nativeOn:{click:function(t){return e.onInputClick(t)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggle(!0)},change:function(t){return e.onChange(t.target.value)}},slot:"trigger"},"b-input",e.$attrs,!1))])]},proxy:!0}],null,!0)},[n("div",{staticClass:"card",attrs:{disabled:e.disabled,custom:""}},[e.inline?n("header",{staticClass:"card-header"},[n("div",{staticClass:"b-clockpicker-header card-header-title"},[n("div",{staticClass:"b-clockpicker-time"},[n("span",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v(e._s(e.hoursDisplay))]),n("span",[e._v(e._s(e.hourLiteral))]),n("span",{staticClass:"b-clockpicker-btn",class:{active:!e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!1}}},[e._v(e._s(e.minutesDisplay))])]),e.isHourFormat24?e._e():n("div",{staticClass:"b-clockpicker-period"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.amString||e.meridienSelected===e.AM},on:{click:function(t){return e.onMeridienClick(e.amString)}}},[e._v(e._s(e.amString))]),n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.pmString||e.meridienSelected===e.PM},on:{click:function(t){return e.onMeridienClick(e.pmString)}}},[e._v(e._s(e.pmString))])])])]):e._e(),n("div",{staticClass:"card-content"},[n("div",{staticClass:"b-clockpicker-body",style:{width:e.faceSize+"px",height:e.faceSize+"px"}},[e.inline?e._e():n("div",{staticClass:"b-clockpicker-time"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v(e._s(e.hoursLabel))]),n("span",{staticClass:"b-clockpicker-btn",class:{active:!e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!1}}},[e._v(e._s(e.minutesLabel))])]),e.isHourFormat24||e.inline?e._e():n("div",{staticClass:"b-clockpicker-period"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.amString||e.meridienSelected===e.AM},on:{click:function(t){return e.onMeridienClick(e.amString)}}},[e._v(e._s(e.amString))]),n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.pmString||e.meridienSelected===e.PM},on:{click:function(t){return e.onMeridienClick(e.pmString)}}},[e._v(e._s(e.pmString))])]),n("b-clockpicker-face",{attrs:{"picker-size":e.faceSize,min:e.minFaceValue,max:e.maxFaceValue,"face-numbers":e.isSelectingHour?e.hours:e.minutes,"disabled-values":e.faceDisabledValues,double:e.isSelectingHour&&e.isHourFormat24,value:e.isSelectingHour?e.hoursSelected:e.minutesSelected},on:{input:e.onClockInput,change:e.onClockChange}})],1)]),void 0!==e.$slots.default&&e.$slots.default.length?n("footer",{staticClass:"b-clockpicker-footer card-footer"},[e._t("default")],2):e._e()])]):n("b-input",e._b({ref:"input",attrs:{type:"time",autocomplete:"off",value:e.formatHHMMSS(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,max:e.formatHHMMSS(e.maxTime),min:e.formatHHMMSS(e.minTime),disabled:e.disabled,readonly:!1,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){e.onBlur()&&e.checkHtml5Validity()}},nativeOn:{click:function(t){return t.stopPropagation(),e.toggle(!0)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggle(!0)},change:function(t){return e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]},undefined,{name:"BClockpicker",components:(Qn={},ft(Qn,Jn.name,Jn),ft(Qn,rn.name,rn),ft(Qn,Gn.name,Gn),ft(Qn,an.name,an),ft(Qn,Yn.name,Yn),ft(Qn,qn.name,qn),Qn),mixins:[Hn],props:{pickerSize:{type:Number,default:290},incrementMinutes:{type:Number,default:5},autoSwitch:{type:Boolean,default:!0},type:{type:String,default:"is-primary"},hoursLabel:{type:String,default:function(){return Kt.defaultClockpickerHoursLabel||"Hours"}},minutesLabel:{type:String,default:function(){return Kt.defaultClockpickerMinutesLabel||"Min"}}},data:function(){return{isSelectingHour:!0,isDragging:!1,_isClockpicker:!0}},computed:{hoursDisplay:function(){if(null==this.hoursSelected)return"--";if(this.isHourFormat24)return this.pad(this.hoursSelected);var e=this.hoursSelected;return this.meridienSelected===this.pmString&&(e-=12),0===e&&(e=12),e},minutesDisplay:function(){return null==this.minutesSelected?"--":this.pad(this.minutesSelected)},minFaceValue:function(){return this.isSelectingHour&&!this.isHourFormat24&&this.meridienSelected===this.pmString?12:0},maxFaceValue:function(){return this.isSelectingHour?this.isHourFormat24||this.meridienSelected!==this.amString?23:11:59},faceSize:function(){return this.pickerSize-24},faceDisabledValues:function(){return this.isSelectingHour?this.isHourDisabled:this.isMinuteDisabled}},methods:{onClockInput:function(e){this.isSelectingHour?(this.hoursSelected=e,this.onHoursChange(e)):(this.minutesSelected=e,this.onMinutesChange(e))},onClockChange:function(e){this.autoSwitch&&this.isSelectingHour&&(this.isSelectingHour=!this.isSelectingHour)},onMeridienClick:function(e){this.meridienSelected!==e&&(this.meridienSelected=e,this.onMeridienChange(e))},onInputClick:function(e){this.$refs.dropdown.isActive&&e.stopPropagation()}}},undefined,!1,undefined,void 0,void 0),ei={install:function(e){Jt(e,Zn)}};use(ei);var ti=ei;var ni=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:{"is-expanded":e.expanded,"has-icons-left":e.icon}},[n("span",{staticClass:"select",class:e.spanClasses},[n("select",e._b({directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"select",attrs:{multiple:e.multiple,size:e.nativeSize},on:{blur:function(t){e.$emit("blur",t)&&e.checkHtml5Validity()},focus:function(t){return e.$emit("focus",t)},change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.computedValue=t.target.multiple?n:n[0]}}},"select",e.$attrs,!1),[e.placeholder?[null==e.computedValue?n("option",{attrs:{disabled:"",hidden:""},domProps:{value:null}},[e._v(" "+e._s(e.placeholder)+" ")]):e._e()]:e._e(),e._t("default")],2)]),e.icon?n("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e()],1)},staticRenderFns:[]},undefined,{name:"BSelect",components:ft({},an.name,an),mixins:[en],inheritAttrs:!1,props:{value:{type:[String,Number,Boolean,Object,Array,Function,Date],default:null},placeholder:String,multiple:Boolean,nativeSize:[String,Number]},data:function(){return{selected:this.value,_elementRef:"select"}},computed:{computedValue:{get:function(){return this.selected},set:function(e){this.selected=e,this.$emit("input",e),!this.isValid&&this.checkHtml5Validity()}},spanClasses:function(){return[this.size,this.statusType,{"is-fullwidth":this.expanded,"is-loading":this.loading,"is-multiple":this.multiple,"is-rounded":this.rounded,"is-empty":null===this.selected}]}},watch:{value:function(e){this.selected=e,!this.isValid&&this.checkHtml5Validity()}}},undefined,!1,undefined,void 0,void 0);var ii=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"tooltip",class:e.rootClasses},[n("transition",{attrs:{name:e.newAnimation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.active&&(e.isActive||e.always),expression:"active && (isActive || always)"}],ref:"content",class:["tooltip-content",e.contentClass]},[e.label?[e._v(e._s(e.label))]:e.$slots.content?[e._t("content")]:e._e()],2)]),n("div",{ref:"trigger",staticClass:"tooltip-trigger",style:e.triggerStyle,on:{click:e.onClick,contextmenu:e.onContextMenu,mouseenter:e.onHover,"!focus":function(t){return e.onFocus(t)},"!blur":function(t){return e.close(t)},mouseleave:e.close}},[e._t("default")],2)],1)},staticRenderFns:[]},undefined,{name:"BTooltip",props:{active:{type:Boolean,default:!0},type:{type:String,default:function(){return Kt.defaultTooltipType}},label:String,delay:{type:Number,default:function(){return Kt.defaultTooltipDelay}},closeDelay:{type:Number,default:function(){return Kt.defaultTooltipCloseDelay}},position:{type:String,default:"is-top",validator:function(e){return["is-top","is-bottom","is-left","is-right"].indexOf(e)>-1}},triggers:{type:Array,default:function(){return["hover"]}},always:Boolean,square:Boolean,dashed:Boolean,multilined:Boolean,size:{type:String,default:"is-medium"},appendToBody:Boolean,animated:{type:Boolean,default:!0},animation:{type:String,default:"fade"},contentClass:String,autoClose:{type:[Array,Boolean],default:!0}},data:function(){return{isActive:!1,triggerStyle:{},timer:null,_bodyEl:void 0}},computed:{rootClasses:function(){return["b-tooltip",this.type,this.position,this.size,{"is-square":this.square,"is-always":this.always,"is-multiline":this.multilined,"is-dashed":this.dashed}]},newAnimation:function(){return this.animated?this.animation:void 0}},watch:{isActive:function(){this.$emit(this.isActive?"open":"close"),this.appendToBody&&this.updateAppendToBody()}},methods:{updateAppendToBody:function(){var e=this.$refs.tooltip,t=this.$refs.trigger;if(e&&t){var n=this.$data._bodyEl.children[0];n.classList.forEach((function(e){return n.classList.remove(e)})),this.$vnode&&this.$vnode.data&&this.$vnode.data.staticClass&&n.classList.add(this.$vnode.data.staticClass),this.rootClasses.forEach((function(e){if("object"===ut(e))for(var t in e)e[t]&&n.classList.add(t);else n.classList.add(e)}));var rect=t.getBoundingClientRect(),r=rect.top+window.scrollY,o=rect.left+window.scrollX,l=t.clientHeight/2/2;switch(this.position){case"is-top":n.style.width="".concat(t.clientWidth,"px"),n.style.height="0px",r-=t.clientHeight-l;break;case"is-bottom":n.style.width="".concat(t.clientWidth,"px"),n.style.height="0px",r+=l;break;case"is-left":n.style.width="0px",n.style.height="".concat(t.clientHeight,"px");break;case"is-right":n.style.width="0px",n.style.height="".concat(t.clientHeight,"px"),o+=t.clientWidth}var c=this.$data._bodyEl;c.style.position="absolute",c.style.top="".concat(r,"px"),c.style.left="".concat(o,"px"),c.style.width="0px",c.style.zIndex=this.isActive||this.always?"99":"-1",this.triggerStyle={zIndex:this.isActive||this.always?"100":void 0}}},onClick:function(){var e=this;this.triggers.indexOf("click")<0||this.$nextTick((function(){setTimeout((function(){return e.open()}))}))},onHover:function(){this.triggers.indexOf("hover")<0||this.open()},onContextMenu:function(e){this.triggers.indexOf("contextmenu")<0||(e.preventDefault(),this.open())},onFocus:function(){this.triggers.indexOf("focus")<0||this.open()},open:function(){var e=this;this.delay?this.timer=setTimeout((function(){e.isActive=!0,e.timer=null}),this.delay):this.isActive=!0},close:function(){var e=this;"boolean"==typeof this.autoClose&&(this.autoClose&&this.timer&&clearTimeout(this.timer),this.closeDelay?this.timer=setTimeout((function(){e.isActive=!e.autoClose,e.timer=null}),this.closeDelay):this.isActive=!this.autoClose)},clickedOutside:function(e){if(this.isActive&&Array.isArray(this.autoClose)){if(this.autoClose.includes("outside")&&!this.isInWhiteList(e.target))return void(this.isActive=!1);this.autoClose.includes("inside")&&this.isInWhiteList(e.target)&&(this.isActive=!1)}},keyPress:function(e){var t=e.key;!this.isActive||"Escape"!==t&&"Esc"!==t||Array.isArray(this.autoClose)&&this.autoClose.indexOf("escape")>=0&&(this.isActive=!1)},isInWhiteList:function(e){if(e===this.$refs.content)return!0;if(void 0!==this.$refs.content){var t=this.$refs.content.querySelectorAll("*"),n=!0,r=!1,o=void 0;try{for(var l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){if(e===l.value)return!0}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}return!1}},mounted:function(){this.appendToBody&&"undefined"!=typeof window&&(this.$data._bodyEl=Rt(this.$refs.content),this.updateAppendToBody())},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),this.appendToBody&&Et(this.$data._bodyEl)}},undefined,!1,undefined,void 0,void 0),ai=["red","green","blue","alpha"],ri={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"},si=function(e){function t(){return ct(this,t),kt(this,vt(t).call(this,"ColorTypeError: type must be hex(a), rgb(a) or hsl(a)"))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&>(e,t)}(t,e),t}(yt(Error)),oi=function(){function e(){var t=this;if(ct(this,e),arguments.length>0)return e.parse.apply(e,arguments);this.$channels=new Uint8Array(ai.length),ai.forEach((function(e,n){Object.defineProperty(t,e,{get:function(){return t.$channels[n]},set:function(e){Number.isNaN(e/1)||(t.$channels[n]=Math.min(255,Math.max(0,e)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((function(e){var n=e.replace(/^./,(function(e){return e.toUpperCase()}));Object.defineProperty(t,e,{get:function(){return t["get".concat(n)]()},set:function(e){Number.isNaN(e/1)||t["set".concat(n)](e)},enumerable:!0,configurable:!0})}))}var t,n,r;return t=e,n=[{key:"getHue",value:function(){var e=xt(Array.from(this.$channels).map((function(e){return e/255})),3),t=e[0],n=e[1],r=e[2],o=[Math.min(t,n,r),Math.max(t,n,r)],l=o[1],c=l-o[0],d=0;if(0===c)return d;for(d=t===l?(n-r)/c%6:n===l?(r-t)/c+2:(t-n)/c+4,d*=60;d!==-1/0&&d<0;)d+=360;return Math.round(d%360)}},{key:"setHue",value:function(t){for(var n=e.fromHSL(t,this.saturation,this.lightness,this.alpha/255),i=0;i0&&void 0!==arguments[0]?arguments[0]:"hex").toLowerCase()){case"hex":return"#"+ai.slice(0,3).map((function(t){return e[t].toString(16).padStart(2,"0")})).join("");case"hexa":return"#"+ai.map((function(t){return e[t].toString(16).padStart(2,"0")})).join("");case"rgb":return"rgb(".concat(this.red,", ").concat(this.green,", ").concat(this.blue,")");case"rgba":return"rgba(".concat(this.red,", ").concat(this.green,", ").concat(this.blue,", ").concat(Math.round(this.alpha/2.55)/100,")");case"hsl":return"hsl(".concat(Math.round(this.hue),"deg, ").concat(Math.round(100*this.saturation),"%, ").concat(Math.round(100*this.lightness),"%)");case"hsla":return"hsla(".concat(Math.round(this.hue),"deg, ").concat(Math.round(100*this.saturation),"%, ").concat(Math.round(100*this.lightness),"%, ").concat(Math.round(this.alpha/2.55)/100,")");default:throw new si}}},{key:Symbol.toString,get:function(){return this.toString("hex")}}],r=[{key:"parse",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r3)o.red=n[0],o.green=n[1],o.blue=n[2],n[3]&&(o.alpha=n[3]);else if(1===n.length){var l=Number(n[0]);return e.parseIndex(l,l>Math.pow(2,24)?3:4)}}else if("string"==typeof n[0]){var c=null;if("string"==typeof ri[n[0].toLowerCase()])return e.parseHex(ri[n[0].toLowerCase()]);if(null!==(c=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return e.parseHex(c[2]);if(null!==(c=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){var d=[c[1],c[2],c[3],void 0!==c[5]?c[5]:1];return e.fromRGB.apply(e,Ct(d.map((function(e){return Number(e)}))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}},{key:"parseObject",value:function(object){var t=new e;return null===object||"object"!==ut(object)?t:e.isColor(object)?object.clone():(ai.forEach((function(e){Number.isNaN(object[e])||(t[e]=object[e])})),t)}},{key:"parseHex",value:function(t){if("string"!=typeof t)throw new Error("Hex expression must be a string");if(3!==(t=t.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==t.length||(t=t.split("").map((function(e){return e.repeat(2)})).join("")),6!==t.length&&8!==t.length)throw new Error("Incorrect Hex expression length");var n=t.split(/(..)/).filter((function(e){return e})).map((function(e){return Number.parseInt(e,16)}));return"number"==typeof n[3]&&(n[3]/=255),e.fromRGB.apply(e,Ct(n))}},{key:"parseIndex",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=new e,i=0;i<4;i++)r[ai[i]]=t>>8*(n-i)&&255;return r}},{key:"fromRGB",value:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if([t,n,r,o].some((function(e){return Number.isNaN(e/1)})))throw new Error("Invalid arguments");o*=255;var l=new e;return[t,n,r,o].forEach((function(e,t){l[ai[t]]=e})),l}},{key:"fromHSL",value:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if([t,n,r,o].some((function(e){return Number.isNaN(e)})))throw new Error("Invalid arguments");for(;t<0&&t!==-1/0;)t+=360;t%=360,n=Math.max(0,Math.min(1,n)),r=Math.max(0,Math.min(1,r)),o=Math.max(0,Math.min(1,o));var l=(1-Math.abs(2*r-1))*n,c=l*(1-Math.abs(t/60%2-1)),d=r-l/2,h=xt(t<60?[l,c,0]:t<120?[c,l,0]:t<180?[0,l,c]:t<240?[0,c,l]:t<300?[c,0,l]:[l,0,c],3),f=h[0],g=h[1],b=h[2];return e.fromRGB(255*(f+d),255*(g+d),255*(b+d),o)}},{key:"isColor",value:function(t){return t instanceof e}}],n&&ht(t.prototype,n),r&&ht(t,r),e}(),ui=.86602540378,ci=.5,di=0,hi={name:"BColorpickerHSLRepresentationTriangle",props:{value:{type:Object,required:!0,validator:function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness}},size:{type:Number,default:200},thickness:{type:Number,default:20}},data:function(){return{id:di++,hue:this.value.hue,saturation:this.value.saturation,lightness:this.value.lightness,captureMouse:!1,captureType:"hue",clientOffset:{cx:-1,cy:-1,width:0,height:0},cos30:ui,sin30:ci,debounce:0}},computed:{viewBox:function(){var e=this.size;return"0 0 ".concat(e," ").concat(e)},internalRadius:function(){return this.size/2-this.thickness},haloPath:function(){var e=this.size,t=this.thickness,n=e/2-2,r=n-t,o=e/2;return"M".concat(o-n," ").concat(o,"a").concat(n," ").concat(n," 0 1 1 ").concat(2*n," 0")+"h".concat(-t)+"a".concat(-r," ").concat(r," 0 1 0 ").concat(-2*r," 0")+"a".concat(r," ").concat(r," 0 1 0 ").concat(2*r," 0")+"h".concat(t)+"a".concat(n," ").concat(n," 0 1 1 ").concat(-2*n," 0z")},trianglePath:function(){var e=(this.size-4-2*this.thickness)/2;return"M0 ".concat(-e)+"L".concat(ui*e," ").concat(ci*e)+"H".concat(-ui*e,"z")}},watch:{captureMouse:function(e,t){if(!1===t&&!1!==e){var rect=this.$el.getBoundingClientRect();this.clientOffset.cx=rect.x+rect.width/2,this.clientOffset.cy=rect.y+rect.height/2,this.clientOffset.width=rect.width,this.clientOffset.height=rect.height}},value:{deep:!0,handler:function(e){var t=this,n=e.hue,r=e.saturation,o=e.lightness;window.clearTimeout(this.debounce),this.debounce=window.setTimeout((function(){o>=.03&&o<=.97&&r>0&&(t.hue=n),t.saturation=r,t.lightness=o}),200)}}},methods:{increaseHue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(this.hue+e)%360},decreaseHue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(360+this.hue-e)%360},increaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation+e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},decreaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation-e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},increaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness+e))},decreaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness-e))},hueKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":case"ArrowUp":this.increaseHue(),t=!0;break;case"ArrowLeft":case"ArrowDown":this.decreaseHue(),t=!0;break;case"Home":this.increaseHue(360-this.hue),t=!0;break;case"End":this.decreaseHue(this.hue),t=!0;break;case"PageUp":this.increaseHue(60-this.hue%60),t=!0;break;case"PageDown":this.decreaseHue(60+this.hue%60),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},slKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":this.decreaseLightness(),t=!0;break;case"ArrowUp":this.increaseSaturation(),t=!0;break;case"ArrowLeft":this.increaseLightness(),t=!0;break;case"ArrowDown":this.decreaseSaturation(),t=!0;break;case"Home":this.increaseLightness(1-this.lightness),t=!0;break;case"End":this.decreaseLightness(this.lightness),t=!0;break;case"PageUp":this.increaseSaturation(1-this.saturation),t=!0;break;case"PageDown":this.decreaseSaturation(this.saturation),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},clickHue:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.hueCursor.focus()},clickSL:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.slCursor.focus()},trackMouse:function(e){if(!1!==this.captureMouse){e.preventDefault(),e.stopPropagation();var t=0,n=0;if(void 0!==e.touches&&e.touches.length){var r=[e.touches[0].clientX,e.touches[0].clientY];t=r[0],n=r[1]}else{var o=[e.clientX,e.clientY];t=o[0],n=o[1]}var l=Math.atan2(n-this.clientOffset.cy,t-this.clientOffset.cx);if("sl"===this.captureType){var c=Math.sqrt(Math.pow(t-this.clientOffset.cx,2)+Math.pow(n-this.clientOffset.cy,2)),d=this.size/this.clientOffset.width,h=c*Math.cos(l-this.hue/180*Math.PI)*d,f=c*Math.sin(l-this.hue/180*Math.PI)*d,m=this.internalRadius,v=1-(Math.min(m*ci,Math.max(-m,f))+m)/(m+m*ci),y=(Math.min(m*ui*(1-v),Math.max(-m*ui*(1-v),h))+m*ui)/(2*m*ui);this.saturation=Math.round(1e3*v)/1e3,this.lightness=1-Math.round(1e3*y)/1e3}else this.hue=Math.round(l/Math.PI*180+90)%360;this.emitColor()}},startMouseCapture:function(e){e.stopPropagation(),this.captureMouse=!0,null!==e.target.closest(".colorpicker-triangle-slider-sl")?this.captureType="sl":this.captureType="hue"},stopMouseCapture:function(e){!1!==this.captureMouse&&(e.preventDefault(),e.stopPropagation(),this.$refs["sl"===this.captureType?"slCursor":"hueCursor"].focus()),this.captureMouse=!1},emitColor:function(){var e=this.hue,t=this.saturation,n=this.lightness;this.$emit("input",oi.fromHSL(e,t,n)),window.clearTimeout(this.debounce)}},mounted:function(){window.addEventListener("mousemove",this.trackMouse),window.addEventListener("touchmove",this.trackMouse,{passive:!1}),window.addEventListener("mouseup",this.stopMouseCapture),window.addEventListener("touchend",this.stopMouseCapture)},beforeDestroy:function(){window.removeEventListener("mousemove",this.trackMouse),window.removeEventListener("touchmove",this.trackMouse),window.removeEventListener("mouseup",this.stopMouseCapture),window.removeEventListener("touchend",this.stopMouseCapture)}};var fi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{staticClass:"b-colorpicker-triangle",attrs:{viewBox:e.viewBox}},[n("defs",[n("linearGradient",{attrs:{id:"cp-triangle-gradient-ligthness-"+e.id,x1:"0",y1:"0",x2:"1",y2:"0"}},[n("stop",{attrs:{offset:"0%","stop-color":"#fff"}}),n("stop",{attrs:{offset:"100%","stop-color":"#000"}})],1),n("linearGradient",{attrs:{id:"cp-triangle-gradient-saturation-"+e.id,x1:"0",y1:"0",x2:"0",y2:"1"}},[n("stop",{attrs:{offset:"0%","stop-color":"hsl("+e.hue+"deg, 100%, 50%)","stop-opacity":"1"}}),n("stop",{attrs:{offset:"100%","stop-color":"hsl("+e.hue+"deg, 100%, 50%)","stop-opacity":"0"}})],1),n("clipPath",{attrs:{id:"cp-triangle-clip-"+e.id}},[n("path",{attrs:{d:e.haloPath}})])],1),n("g",{staticClass:"colorpicker-triangle-slider-hue"},[n("foreignObject",{attrs:{x:0,y:0,width:e.size,height:e.size,"clip-path":"url(#cp-triangle-clip-"+e.id+")"}},[n("div",{staticClass:"colorpicker-triangle-hue",on:{click:e.clickHue,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})]),n("g",{style:"transform: rotate("+e.hue+"deg)"},[n("foreignObject",{attrs:{x:e.size/2-4,y:0,width:"8",height:e.thickness+4}},[n("div",{ref:"hueCursor",staticClass:"hue-range-thumb",style:"background-color: hsl("+e.hue+"deg, 100%, 50%)",attrs:{role:"slider",tabindex:"0","aria-label":"Hue","aria-valuemin":"0","aria-valuenow":e.hue,"aria-valuemax":"360"},on:{click:e.clickHue,keydown:e.hueKeyPress,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})])],1)],1),n("g",{staticClass:"colorpicker-triangle-slider-sl",style:"transform: rotate("+e.hue+"deg) translate(50%, 50%)",attrs:{role:"graphics-datagroup","aria-datascales":"lightness, saturation"}},[n("path",{attrs:{d:e.trianglePath,fill:"url(#cp-triangle-gradient-ligthness-"+e.id+")"}}),n("path",{staticStyle:{"mix-blend-mode":"overlay"},attrs:{d:e.trianglePath,fill:"url(#cp-triangle-gradient-saturation-"+e.id+")"},on:{click:e.clickSL,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}}),n("foreignObject",{attrs:{x:(e.internalRadius-3)*e.cos30*(.5-e.lightness)*2-6,y:-e.internalRadius+(1-e.saturation)*(e.internalRadius-3)*1.5-3,width:"12",height:"12"}},[n("div",{ref:"slCursor",staticClass:"sl-range-thumb",style:{backgroundColor:"hsl("+e.hue+"deg, "+100*e.saturation+"%, "+100*e.lightness+"%)"},attrs:{tabindex:"0","aria-datavalues":100*e.saturation+"%, "+100*e.lightness+"%"},on:{click:e.clickSL,keydown:e.slKeyPress,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})])],1)])},staticRenderFns:[]},undefined,hi,undefined,!1,undefined,void 0,void 0);function pi(){var data=St(["","px"]);return pi=function(){return data},data}function mi(){var data=St(["","px"]);return mi=function(){return data},data}function vi(){var data=St(["","px"]);return vi=function(){return data},data}var gi=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(this.hue+e)%360},decreaseHue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(360+this.hue-e)%360},increaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation+e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},decreaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation-e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},increaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness+e))},decreaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness-e))},hueKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":case"ArrowUp":this.increaseHue(),t=!0;break;case"ArrowLeft":case"ArrowDown":this.decreaseHue(),t=!0;break;case"Home":this.increaseHue(360-this.hue),t=!0;break;case"End":this.decreaseHue(this.hue),t=!0;break;case"PageUp":this.increaseHue(60-this.hue%60),t=!0;break;case"PageDown":this.decreaseHue(60+this.hue%60),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},slKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":this.increaseSaturation(),t=!0;break;case"ArrowUp":this.increaseLightness(),t=!0;break;case"ArrowLeft":this.decreaseSaturation(),t=!0;break;case"ArrowDown":this.decreaseLightness(),t=!0;break;case"Home":this.increaseLightness(1-this.lightness),t=!0;break;case"End":this.decreaseLightness(this.lightness),t=!0;break;case"PageUp":this.increaseSaturation(1-this.saturation),t=!0;break;case"PageDown":this.decreaseSaturation(this.saturation),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},startMouseCapture:function(e){e.stopPropagation(),this.captureMouse=!0,null!==e.target.closest(".colorpicker-square-slider-sl")?this.captureType="sl":this.captureType="hue"},stopMouseCapture:function(e){!1!==this.captureMouse&&(e.preventDefault(),e.stopPropagation(),this.$refs["sl"===this.captureType?"slCursor":"hueCursor"].focus()),this.captureMouse=!1},clickHue:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.hueCursor.focus()},clickSL:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.slCursor.focus()},trackMouse:function(e){if(!1!==this.captureMouse){e.preventDefault(),e.stopPropagation();var t=0,n=0;if(void 0!==e.touches&&e.touches.length){var r=[e.touches[0].clientX,e.touches[0].clientY];t=r[0],n=r[1]}else{var o=[e.clientX,e.clientY];t=o[0],n=o[1]}var l=Math.atan2(n-this.clientOffset.cy,t-this.clientOffset.cx);if("sl"===this.captureType){var c=(t-this.clientOffset.cx)/(this.clientOffset.width-2*this.thickness)+.5,d=(n-this.clientOffset.cy)/(this.clientOffset.height-2*this.thickness)+.5;this.saturation=Math.round(1e3*Math.min(1,Math.max(0,c)))/1e3,this.lightness=1-Math.round(1e3*Math.min(1,Math.max(0,d)))/1e3}else this.hue=Math.round(l/Math.PI*180+90)%360;this.emitColor()}},emitColor:function(){var e=this.hue,t=this.saturation,n=this.lightness;this.$emit("input",oi.fromHSL(e,t,n)),window.clearTimeout(this.debounce)}},mounted:function(){window.addEventListener("mousemove",this.trackMouse),window.addEventListener("touchmove",this.trackMouse,{passive:!1}),window.addEventListener("mouseup",this.stopMouseCapture),window.addEventListener("touchend",this.stopMouseCapture)},beforeDestroy:function(){window.removeEventListener("mousemove",this.trackMouse),window.removeEventListener("touchmove",this.trackMouse),window.removeEventListener("mouseup",this.stopMouseCapture),window.removeEventListener("touchend",this.stopMouseCapture)}};var yi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-colorpicker-square",style:{width:e.size+"px"}},[n("div",{staticClass:"colorpicker-square-slider-hue",on:{click:e.clickHue,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}},[n("div",{ref:"hueCursor",staticClass:"hue-range-thumb",style:e.hueThumbStyle,attrs:{role:"slider",tabindex:"0","aria-label":"Hue","aria-valuemin":"0","aria-valuemax":"359"}})]),n("div",{staticClass:"colorpicker-square-slider-sl",style:{background:e.SLBackground,margin:e.thickness+"px"},attrs:{"aria-datascales":"lightness, saturation"},on:{click:e.clickSL,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}},[n("div",{ref:"slCursor",staticClass:"sl-range-thumb",style:e.slThumbStyle,attrs:{role:"slider",tabindex:"0","aria-datavalues":100*e.saturation+"%, "+100*e.lightness+"%"},on:{click:e.clickSL,keydown:e.slKeyPress,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})])])},staticRenderFns:[]},undefined,bi,undefined,!1,undefined,void 0,void 0),wi={name:"BColorpickerAlphaSlider",components:ft({},ii.name,ii),props:{value:{type:Number,validator:function(e){return e>=0&&e<256}},color:[String,Object]},data:function(){var e=oi.parse(this.color);return e.alpha=0,{startColor:e.toString("hex"),endColor:e.toString("hexa"),percent:Math.round(100*(1-this.value/255)),captureMouse:!1,clientOffset:{cx:-1,cy:-1,width:0,height:0}}},computed:{style:function(){return{backgroundImage:"linear-gradient(90deg, ".concat(this.startColor," 0%, ").concat(this.endColor," 100%),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7)"),backgroundSize:"100% 100%, 1em 1em, 1em 1em",backgroundPosition:"0 0, .5em .5em, 0 0"}}},watch:{value:function(e,t){e!==t&&(this.percent=Math.round(100*(1-e/255)))},color:function(e){var t=oi.parse(e);t.alpha=0,this.startColor=t.toString("hex"),this.endColor=t.toString("hexa")},captureMouse:function(e,t){if(!1===t&&!1!==e){var rect=this.$el.getBoundingClientRect();this.clientOffset.cx=rect.x+rect.width/2,this.clientOffset.cy=rect.y+rect.height/2,this.clientOffset.width=rect.width,this.clientOffset.height=rect.height}}},methods:{increaseAlpha:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.percent=Math.max(0,Math.min(100,this.percent+e))},decreaseAlpha:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.increaseAlpha(-e)},alphaKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":case"ArrowUp":this.increaseAlpha(),t=!0;break;case"ArrowLeft":case"ArrowDown":this.decreaseAlpha(),t=!0;break;case"Home":this.decreaseAlpha(this.percent),t=!0;break;case"End":this.increaseAlpha(100-this.percent),t=!0;break;case"PageUp":this.increaseAlpha(10-this.percent%10),t=!0;break;case"PageDown":this.decreaseAlpha(this.percent%10),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitAlpha())},clickAlpha:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.alphaCursor.focus()},startMouseCapture:function(e){e.stopPropagation(),this.captureMouse=!0},trackMouse:function(e){if(!1!==this.captureMouse){e.preventDefault(),e.stopPropagation();var t=0;if(void 0!==e.touches&&e.touches.length)t=[e.touches[0].clientX][0];else t=[e.clientX][0];var n=.5+(this.clientOffset.cx-t)/this.clientOffset.width;this.percent=Math.round(100-100*Math.max(0,Math.min(1,n))),this.emitAlpha()}},stopMouseCapture:function(e){!1!==this.captureMouse&&(e.preventDefault(),e.stopPropagation(),this.$refs.alphaCursor.focus()),this.captureMouse=!1},emitAlpha:function(){this.$emit("input",255*(1-this.percent/100))}},mounted:function(){window.addEventListener("mousemove",this.trackMouse),window.addEventListener("touchmove",this.trackMouse,{passive:!1}),window.addEventListener("mouseup",this.stopMouseCapture),window.addEventListener("touchend",this.stopMouseCapture)},beforeDestroy:function(){window.removeEventListener("mousemove",this.trackMouse),window.removeEventListener("touchmove",this.trackMouse),window.removeEventListener("mouseup",this.stopMouseCapture),window.removeEventListener("touchend",this.stopMouseCapture)}};var ki,Si=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-colorpicker-alpha-slider",style:e.style,on:{click:e.clickAlpha,keydown:e.alphaKeyPress,mousedown:e.startMouseCapture,touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}},[n("div",{ref:"alphaCursor",staticClass:"alpha-range-thumb",style:{left:e.percent+"%"},attrs:{role:"slider",tabindex:"0","aria-label":"Tranparency","aria-valuemin":"0","aria-valuenow":e.percent,"aria-valuemax":"100"}},[n("b-tooltip",{attrs:{label:e.percent+"%",always:e.captureMouse}})],1)])},staticRenderFns:[]},undefined,wi,undefined,!1,undefined,void 0,void 0);var xi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"colorpicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,expanded:e.expanded,disabled:e.disabled,inline:e.inline,"mobile-modal":e.mobileModal,"trap-focus":e.trapFocus,"aria-role":e.ariaRole,"append-to-body":e.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(){return[e._t("trigger",[n("b-button",{style:e.triggerStyle,attrs:{expanded:e.expanded,disabled:e.disabled}},[n("span",{staticClass:"color-name"},[e._v(e._s(e.colorFormatter(e.computedValue)))])])])]},proxy:!0}],null,!0)},[n("b-dropdown-item",{class:{"dropdown-horizontal-colorpicker":e.horizontalColorPicker},attrs:{disabled:e.disabled,focusable:e.focusable,custom:""}},[n("div",[n("header",{staticClass:"colorpicker-header"},[void 0!==e.$slots.header&&e.$slots.header.length?[e._t("header")]:e._e()],2),n("div",{staticClass:"colorpicker-content"},["square"===e.representation?n("b-colorpicker-h-s-l-representation-square",{attrs:{value:e.computedValue},on:{input:e.updateColor}}):n("b-colorpicker-h-s-l-representation-triangle",{attrs:{value:e.computedValue},on:{input:e.updateColor}})],1)]),n("footer",{staticClass:"colorpicker-footer"},[e.alpha?n("b-colorpicker-alpha-slider",{attrs:{value:e.computedValue.alpha,color:e.computedValue},on:{input:e.updateAlpha}}):e._e(),e._t("footer",[n("b-field",{staticClass:"colorpicker-fields",attrs:{grouped:""}},[n("b-field",{attrs:{horizontal:"",label:"R"}},[n("b-input",{attrs:{type:"number",size:"is-small","aria-label":"Red"},on:{input:e.updateRGB},model:{value:e.computedValue.red,callback:function(t){e.$set(e.computedValue,"red",e._n(t))},expression:"computedValue.red"}})],1),n("b-field",{attrs:{horizontal:"",label:"G"}},[n("b-input",{attrs:{type:"number",size:"is-small","aria-label":"Green"},on:{input:e.updateRGB},model:{value:e.computedValue.green,callback:function(t){e.$set(e.computedValue,"green",e._n(t))},expression:"computedValue.green"}})],1),n("b-field",{attrs:{horizontal:"",label:"B"}},[n("b-input",{attrs:{type:"number",size:"is-small","aria-label":"Blue"},on:{input:e.updateRGB},model:{value:e.computedValue.blue,callback:function(t){e.$set(e.computedValue,"blue",e._n(t))},expression:"computedValue.blue"}})],1)],1)],{color:e.computedValue})],2)])],1):e._e()],1)},staticRenderFns:[]},undefined,{name:"BColorpicker",components:(ki={},ft(ki,fi.name,fi),ft(ki,yi.name,yi),ft(ki,Si.name,Si),ft(ki,rn.name,rn),ft(ki,Gn.name,Gn),ft(ki,ni.name,ni),ft(ki,an.name,an),ft(ki,Yn.name,Yn),ft(ki,qn.name,qn),ki),mixins:[en],inheritAttrs:!1,provide:function(){return{$colorpicker:this}},props:{value:{type:[String,Object],validator:function(e){return"string"==typeof e||"object"===ut(e)&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue}},representation:{type:String,default:"triangle",value:function(e){return["triangle","square"].some((function(t){return t===e}))}},inline:Boolean,disabled:Boolean,horizontalColorPicker:{type:Boolean,default:!1},colorFormatter:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultColorFormatter?Kt.defaultColorFormatter(e):function(e,t){return e.alpha<1?e.toString("hexa"):e.toString("hex")}(e)}},colorParser:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultColorParser?Kt.defaultColorParser(e):function(e,t){return oi.parse(e)}(e)}},alpha:{type:Boolean,default:!1},expanded:Boolean,position:String,mobileModal:{type:Boolean,default:function(){return Kt.defaultDatepickerMobileModal}},focusable:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},appendToBody:Boolean},data:function(){return{color:this.parseColor(this.value)}},computed:{computedValue:{set:function(e){this.color=this.parseColor(e)},get:function(){return this.color}},background:function(){if(this.alpha)return"linear-gradient(\n 45deg,\n ".concat(this.computedValue.toString("hex")," 50%,\n ").concat(this.computedValue.toString("hexa")," 50%\n )");var e=this.computedValue.toString("hex");return"linear-gradient(\n 45deg,\n ".concat(e," 50%,\n ").concat(e," 50%\n )")},triggerStyle:function(){var e=this.computedValue,t=.299*e.red+.587*e.green+.114*e.blue>186;return{backgroundColor:"#ffffff",backgroundImage:"\n ".concat(this.background,",\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7)\n "),backgroundSize:"100% 100%, 16px 16px, 16px 16px",backgroundPosition:"0 0, 8px 8px, 0 0",color:t?"#000000":"#FFFFFF",textShadow:"0 0 2px ".concat(t?"#FFFFFFAA":"#000000AA")}},isMobile:function(){return this.mobileNative&&Nt.any()},ariaRole:function(){if(!this.inline)return"dialog"}},watch:{value:function(e){this.computedValue=new oi(e)}},methods:{parseColor:function(e){try{return this.colorParser(e)}catch(e){return new oi}},updateColor:function(e){e.alpha=this.computedValue.alpha,this.computedValue=e,this.$emit("input",e)},updateAlpha:function(e){this.computedValue.alpha=e,this.$emit("input",this.computedValue)},updateRGB:function(){this.$emit("input",this.computedValue)},formatValue:function(e){return e?this.colorFormatter(e,this):null},togglePicker:function(e){if(this.$refs.dropdown){var t="boolean"==typeof e?e:!this.$refs.dropdown.isActive;(t||this.closeOnClick)&&(this.$refs.dropdown.isActive=t)}},handleOnFocus:function(e){this.onFocus(e),this.openOnFocus&&this.togglePicker(!0)},toggle:function(){if(this.mobileNative&&this.isMobile){var input=this.$refs.input.$refs.input;return input.focus(),void input.click()}this.$refs.dropdown.toggle()},onInputClick:function(e){this.$refs.dropdown.isActive&&e.stopPropagation()},keyPress:function(e){var t=e.key;this.$refs.dropdown&&this.$refs.dropdown.isActive&&("Escape"===t||"Esc"===t)&&this.togglePicker(!1)},onActiveChange:function(e){e||this.onBlur(),this.$emit("active-change",e)}}},undefined,!1,undefined,void 0,void 0),Ci={install:function(e){Jt(e,xi)}};use(Ci);var Di=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"datepicker-row"},[e.showWeekNumber?n("a",{staticClass:"datepicker-cell is-week-number",class:{"is-clickable":e.weekNumberClickable},on:{click:function(t){t.preventDefault(),e.clickWeekNumber(e.getWeekNumber(e.week[6]))}}},[n("span",[e._v(e._s(e.getWeekNumber(e.week[6]).week))])]):e._e(),e._l(e.week,(function(t,r){return[e.selectableDate(t)&&!e.disabled?n("a",{key:r,ref:"day-"+t.getMonth()+"-"+t.getDate(),refInFor:!0,staticClass:"datepicker-cell",class:e.classObject(t),attrs:{role:"button",href:"#",disabled:e.disabled,tabindex:e.day===t.getDate()&&e.month===t.getMonth()?null:-1},on:{click:function(n){return n.preventDefault(),e.emitChosenDate(t)},mouseenter:function(n){return e.setRangeHoverEndDate(t)},keydown:function(n){return e.manageKeydown(n,t)}}},[n("span",[e._v(e._s(t.getDate()))]),e.eventsDateMatch(t)?n("div",{staticClass:"events"},e._l(e.eventsDateMatch(t),(function(e,t){return n("div",{key:t,staticClass:"event",class:e.type})})),0):e._e()]):n("div",{key:r,staticClass:"datepicker-cell",class:e.classObject(t)},[n("span",[e._v(e._s(t.getDate()))]),e.eventsDateMatch(t)?n("div",{staticClass:"events"},e._l(e.eventsDateMatch(t),(function(e,t){return n("div",{key:t,staticClass:"event",class:e.type})})),0):e._e()])]}))],2)},staticRenderFns:[]},undefined,{name:"BDatepickerTableRow",inject:{$datepicker:{name:"$datepicker",default:!1}},props:{selectedDate:{type:[Date,Array]},hoveredDateRange:Array,day:{type:Number},week:{type:Array,required:!0},month:{type:Number,required:!0},minDate:Date,maxDate:Date,disabled:Boolean,unselectableDates:[Array,Function],unselectableDaysOfWeek:Array,selectableDates:[Array,Function],events:Array,indicators:String,dateCreator:Function,nearbyMonthDays:Boolean,nearbySelectableMonthDays:Boolean,showWeekNumber:Boolean,weekNumberClickable:Boolean,range:Boolean,multiple:Boolean,rulesForFirstWeek:Number,firstDayOfWeek:Number},watch:{day:function(e){var t=this,n="day-".concat(this.month,"-").concat(e);this.$nextTick((function(){t.$refs[n]&&t.$refs[n].length>0&&t.$refs[n][0]&&t.$refs[n][0].focus()}))}},methods:{firstWeekOffset:function(e,t,n){var r=7+t-n;return-((7+new Date(e,0,r).getDay()-t)%7)+r-1},daysInYear:function(e){return this.isLeapYear(e)?366:365},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},getSetDayOfYear:function(input){return Math.round((input-new Date(input.getFullYear(),0,1))/864e5)+1},weeksInYear:function(e,t,n){var r=this.firstWeekOffset(e,t,n),o=this.firstWeekOffset(e+1,t,n);return(this.daysInYear(e)-r+o)/7},getWeekNumber:function(e){var t,n,r=this.firstDayOfWeek,o=this.rulesForFirstWeek,l=this.firstWeekOffset(e.getFullYear(),r,o),c=Math.floor((this.getSetDayOfYear(e)-l-1)/7)+1;return c<1?(n=e.getFullYear()-1,t=c+this.weeksInYear(n,r,o)):c>this.weeksInYear(e.getFullYear(),r,o)?(t=c-this.weeksInYear(e.getFullYear(),r,o),n=e.getFullYear()+1):(n=e.getFullYear(),t=c),{week:t,year:n}},clickWeekNumber:function(e){this.weekNumberClickable&&this.$datepicker.$emit("week-number-click",e.week,e.year)},selectableDate:function(e){var t=[];if(this.minDate&&t.push(e>=this.minDate),this.maxDate&&t.push(e<=this.maxDate),this.nearbyMonthDays&&!this.nearbySelectableMonthDays&&t.push(e.getMonth()===this.month),this.selectableDates)if("function"==typeof this.selectableDates){if(this.selectableDates(e))return!0;t.push(!1)}else for(var i=0;it[0]&&ethis.minDate)&&(!this.maxDate||ne?(this.selectedEndDate=this.selectedBeginDate,this.selectedBeginDate=e):this.selectedEndDate=e,this.$emit("range-end",e),this.$emit("input",[this.selectedBeginDate,this.selectedEndDate])):(this.selectedBeginDate=e,this.$emit("range-start",e))},handleSelectMultipleDates:function(e){this.multipleSelectedDates.filter((function(t){return t.getDate()===e.getDate()&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()})).length?this.multipleSelectedDates=this.multipleSelectedDates.filter((function(t){return t.getDate()!==e.getDate()||t.getFullYear()!==e.getFullYear()||t.getMonth()!==e.getMonth()})):this.multipleSelectedDates=[].concat(Ct(this.multipleSelectedDates),[e])},weekBuilder:function(e,t,n){for(var r=new Date(n,t),o=[],l=new Date(n,t,e).getDay(),c=l>=this.firstDayOfWeek?l-this.firstDayOfWeek:7-this.firstDayOfWeek+l,d=1,i=0;i=this.minDate),this.maxDate&&t.push(e<=this.maxDate),this.nearbyMonthDays&&!this.nearbySelectableMonthDays&&t.push(e.getMonth()===this.focused.month),this.selectableDates)if("function"==typeof this.selectableDates){if(this.selectableDates(e))return!0;t.push(!1)}else for(var i=0;i0&&this.$nextTick((function(){t.$refs[n][0]&&t.$refs[n][0].focus()}))}},methods:{selectMultipleDates:function(e){this.multipleSelectedDates.filter((function(t){return t.getDate()===e.getDate()&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()})).length?this.multipleSelectedDates=this.multipleSelectedDates.filter((function(t){return t.getDate()!==e.getDate()||t.getFullYear()!==e.getFullYear()||t.getMonth()!==e.getMonth()})):this.multipleSelectedDates.push(e),this.$emit("input",this.multipleSelectedDates)},selectableDate:function(e){var t=[];if(this.minDate&&t.push(e>=this.minDate),this.maxDate&&t.push(e<=this.maxDate),t.push(e.getFullYear()===this.focused.year),this.selectableDates)if("function"==typeof this.selectableDates){if(this.selectableDates(e))return!0;t.push(!1)}else for(var i=0;it[0]&&ee?(this.selectedEndDate=this.selectedBeginDate,this.selectedBeginDate=e):this.selectedEndDate=e,this.$emit("range-end",e),this.$emit("input",[this.selectedBeginDate,this.selectedEndDate])):(this.selectedBeginDate=e,this.$emit("range-start",e)))},setRangeHoverEndDate:function(e){this.range&&(this.hoveredEndDate=e)},changeFocus:function(e,t){var n=e;n.setMonth(e.getMonth()+t),this.$emit("change-focus",n)}}},undefined,!1,undefined,void 0,void 0),Mi={name:"BDatepicker",components:($i={},ft($i,_i.name,_i),ft($i,Pi.name,Pi),ft($i,rn.name,rn),ft($i,Gn.name,Gn),ft($i,ni.name,ni),ft($i,an.name,an),ft($i,Yn.name,Yn),ft($i,qn.name,qn),$i),mixins:[en],inheritAttrs:!1,provide:function(){return{$datepicker:this}},props:{value:{type:[Date,Array]},dayNames:{type:Array,default:function(){if(Array.isArray(Kt.defaultDayNames))return Kt.defaultDayNames}},monthNames:{type:Array,default:function(){if(Array.isArray(Kt.defaultMonthNames))return Kt.defaultMonthNames}},firstDayOfWeek:{type:Number,default:function(){return"number"==typeof Kt.defaultFirstDayOfWeek?Kt.defaultFirstDayOfWeek:0}},inline:Boolean,minDate:Date,maxDate:Date,focusedDate:Date,placeholder:String,editable:Boolean,disabled:Boolean,horizontalTimePicker:Boolean,unselectableDates:[Array,Function],unselectableDaysOfWeek:{type:Array,default:function(){return Kt.defaultUnselectableDaysOfWeek}},selectableDates:[Array,Function],dateFormatter:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultDateFormatter?Kt.defaultDateFormatter(e):function(e,t){var n=(Array.isArray(e)?e:[e]).map((function(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),12);return t.isTypeMonth?t.dtfMonth.format(n):t.dtf.format(n)}));return t.multiple?n.join(", "):n.join(" - ")}(e,t)}},dateParser:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultDateParser?Kt.defaultDateParser(e):function(e,t){if(t.dtf.formatToParts&&"function"==typeof t.dtf.formatToParts){var n=jt((t.isTypeMonth?t.dtfMonth:t.dtf).formatToParts(new Date(2e3,11,25)).map((function(e){return"literal"===e.type?e.value:"((?!=<".concat(e.type,">)\\d+)")})).join(""),e);if(n.year&&4===n.year.length&&n.month&&n.month<=12){if(t.isTypeMonth)return new Date(n.year,n.month-1);if(n.day&&n.day<=31)return new Date(n.year,n.month-1,n.day,12)}}if(!t.isTypeMonth)return new Date(Date.parse(e));if(e){var s=e.split("/"),r=4===s[0].length?s[0]:s[1],o=2===s[0].length?s[0]:s[1];if(r&&o)return new Date(parseInt(r,10),parseInt(o-1,10),1,0,0,0,0)}return null}(e,t)}},dateCreator:{type:Function,default:function(){return"function"==typeof Kt.defaultDateCreator?Kt.defaultDateCreator():new Date}},mobileNative:{type:Boolean,default:function(){return Kt.defaultDatepickerMobileNative}},position:String,iconRight:String,iconRightClickable:Boolean,events:Array,indicators:{type:String,default:"dots"},openOnFocus:Boolean,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},yearsRange:{type:Array,default:function(){return Kt.defaultDatepickerYearsRange}},type:{type:String,validator:function(e){return["month"].indexOf(e)>=0}},nearbyMonthDays:{type:Boolean,default:function(){return Kt.defaultDatepickerNearbyMonthDays}},nearbySelectableMonthDays:{type:Boolean,default:function(){return Kt.defaultDatepickerNearbySelectableMonthDays}},showWeekNumber:{type:Boolean,default:function(){return Kt.defaultDatepickerShowWeekNumber}},weekNumberClickable:{type:Boolean,default:function(){return Kt.defaultDatepickerWeekNumberClickable}},rulesForFirstWeek:{type:Number,default:function(){return 4}},range:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},mobileModal:{type:Boolean,default:function(){return Kt.defaultDatepickerMobileModal}},focusable:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},appendToBody:Boolean,ariaNextLabel:String,ariaPreviousLabel:String},data:function(){var e=(Array.isArray(this.value)?this.value[0]:this.value)||this.focusedDate||this.dateCreator();return!this.value&&this.maxDate&&this.maxDate.getFullYear()0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",n=[],i=0;i<12;i++)n.push(new Date(2e3,i,15));var r=new Intl.DateTimeFormat(e,{month:t});return n.map((function(e){return r.format(e)}))}(this.locale)},newDayNames:function(){return Array.isArray(this.dayNames)?this.dayNames:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow",n=[],i=0;i<7;i++){var dt=new Date(2e3,0,i+1);n[dt.getDay()]=dt}var r=new Intl.DateTimeFormat(e,{weekday:t});return n.map((function(e){return r.format(e)}))}(this.locale)},listOfMonths:function(){var e=0,t=12;return this.minDate&&this.focusedDateData.year===this.minDate.getFullYear()&&(e=this.minDate.getMonth()),this.maxDate&&this.focusedDateData.year===this.maxDate.getFullYear()&&(t=this.maxDate.getMonth()),this.newMonthNames.map((function(n,r){return{name:n,index:r,disabled:rt}}))},listOfYears:function(){var e=this.focusedDateData.year+this.yearsRange[1];this.maxDate&&this.maxDate.getFullYear()t&&(t=Math.min(this.minDate.getFullYear(),this.focusedDateData.year));for(var n=[],i=t;i<=e;i++)n.push(i);return n.reverse()},showPrev:function(){return!!this.minDate&&(this.isTypeMonth?this.focusedDateData.year<=this.minDate.getFullYear():new Date(this.focusedDateData.year,this.focusedDateData.month)<=new Date(this.minDate.getFullYear(),this.minDate.getMonth()))},showNext:function(){return!!this.maxDate&&(this.isTypeMonth?this.focusedDateData.year>=this.maxDate.getFullYear():new Date(this.focusedDateData.year,this.focusedDateData.month)>=new Date(this.maxDate.getFullYear(),this.maxDate.getMonth()))},isMobile:function(){return this.mobileNative&&Nt.any()},isTypeMonth:function(){return"month"===this.type},ariaRole:function(){if(!this.inline)return"dialog"}},watch:{value:function(e){this.updateInternalState(e),this.multiple||this.togglePicker(!1)},focusedDate:function(e){e&&(this.focusedDateData={day:e.getDate(),month:e.getMonth(),year:e.getFullYear()})},"focusedDateData.month":function(e){this.$emit("change-month",e)},"focusedDateData.year":function(e){this.$emit("change-year",e)}},methods:{onChange:function(e){var t=this.dateParser(e,this);!t||isNaN(t)&&(!Array.isArray(t)||2!==t.length||isNaN(t[0])||isNaN(t[1]))?(this.computedValue=null,this.$refs.input&&(this.$refs.input.newValue=this.computedValue)):this.computedValue=t},formatValue:function(e){return Array.isArray(e)?Array.isArray(e)&&e.every((function(e){return!isNaN(e)}))?this.dateFormatter(Ct(e),this):null:e&&!isNaN(e)?this.dateFormatter(e,this):null},prev:function(){this.disabled||(this.isTypeMonth?this.focusedDateData.year-=1:this.focusedDateData.month>0?this.focusedDateData.month-=1:(this.focusedDateData.month=11,this.focusedDateData.year-=1))},next:function(){this.disabled||(this.isTypeMonth?this.focusedDateData.year+=1:this.focusedDateData.month<11?this.focusedDateData.month+=1:(this.focusedDateData.month=0,this.focusedDateData.year+=1))},formatNative:function(e){return this.isTypeMonth?this.formatYYYYMM(e):this.formatYYYYMMDD(e)},formatYYYYMMDD:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getFullYear(),r=t.getMonth()+1,o=t.getDate();return n+"-"+(r<10?"0":"")+r+"-"+(o<10?"0":"")+o}return""},formatYYYYMM:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getFullYear(),r=t.getMonth()+1;return n+"-"+(r<10?"0":"")+r}return""},onChangeNativePicker:function(e){var t=e.target.value,s=t?t.split("-"):[];if(3===s.length){var n=parseInt(s[0],10),r=parseInt(s[1])-1,o=parseInt(s[2]);this.computedValue=new Date(n,r,o)}else this.computedValue=null},updateInternalState:function(e){if(this.dateSelected!==e){var t=Array.isArray(e),n=t?e.length?e[e.length-1]:this.dateCreator():e||this.dateCreator();(!t||t&&this.dateSelected&&e.length>this.dateSelected.length)&&(this.focusedDateData={day:n.getDate(),month:n.getMonth(),year:n.getFullYear()}),this.dateSelected=e}},togglePicker:function(e){if(this.$refs.dropdown){var t="boolean"==typeof e?e:!this.$refs.dropdown.isActive;(t||this.closeOnClick)&&(this.$refs.dropdown.isActive=t)}},handleOnFocus:function(e){this.onFocus(e),this.openOnFocus&&this.togglePicker(!0)},toggle:function(){if(this.mobileNative&&this.isMobile){var input=this.$refs.input.$refs.input;return input.focus(),void input.click()}this.$refs.dropdown.toggle()},onInputClick:function(e){this.$refs.dropdown.isActive&&e.stopPropagation()},keyPress:function(e){var t=e.key;this.$refs.dropdown&&this.$refs.dropdown.isActive&&("Escape"===t||"Esc"===t)&&this.togglePicker(!1)},onActiveChange:function(e){e||this.onBlur(),this.$emit("active-change",e)},changeFocus:function(e){this.focusedDateData={day:e.getDate(),month:e.getMonth(),year:e.getFullYear()}}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}};var Oi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"datepicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline,"mobile-modal":e.mobileModal,"trap-focus":e.trapFocus,"aria-role":e.ariaRole,"append-to-body":e.appendToBody,"append-to-body-copy-parent":"","trigger-tabindex":-1},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(t){return[e._t("trigger",[n("b-input",e._b({ref:"input",attrs:{autocomplete:"off",value:e.formattedValue,placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-right":e.iconRight,"icon-right-clickable":e.iconRightClickable,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,disabled:e.disabled,readonly:!e.editable,"use-html5-validation":!1},on:{"icon-right-click":function(t){return e.$emit("icon-right-click",t)},focus:e.handleOnFocus},nativeOn:{click:function(t){return e.onInputClick(t)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.togglePicker(!0)},change:function(t){return e.onChange(t.target.value)}}},"b-input",e.$attrs,!1))],null,t)]}}],null,!0)},[n("b-dropdown-item",{class:{"dropdown-horizontal-timepicker":e.horizontalTimePicker},attrs:{disabled:e.disabled,focusable:e.focusable,custom:""}},[n("div",[n("header",{staticClass:"datepicker-header"},[void 0!==e.$slots.header&&e.$slots.header.length?[e._t("header")]:n("div",{staticClass:"pagination field is-centered",class:e.size},[n("a",{directives:[{name:"show",rawName:"v-show",value:!e.showPrev&&!e.disabled,expression:"!showPrev && !disabled"}],staticClass:"pagination-previous",attrs:{role:"button",href:"#",disabled:e.disabled,"aria-label":e.ariaPreviousLabel},on:{click:function(t){return t.preventDefault(),e.prev(t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.prev(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.prev(t))}]}},[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"",type:"is-primary is-clickable"}})],1),n("a",{directives:[{name:"show",rawName:"v-show",value:!e.showNext&&!e.disabled,expression:"!showNext && !disabled"}],staticClass:"pagination-next",attrs:{role:"button",href:"#",disabled:e.disabled,"aria-label":e.ariaNextLabel},on:{click:function(t){return t.preventDefault(),e.next(t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.next(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.next(t))}]}},[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"",type:"is-primary is-clickable"}})],1),n("div",{staticClass:"pagination-list"},[n("b-field",[e.isTypeMonth?e._e():n("b-select",{attrs:{disabled:e.disabled,size:e.size},model:{value:e.focusedDateData.month,callback:function(t){e.$set(e.focusedDateData,"month",t)},expression:"focusedDateData.month"}},e._l(e.listOfMonths,(function(t){return n("option",{key:t.name,attrs:{disabled:t.disabled},domProps:{value:t.index}},[e._v(" "+e._s(t.name)+" ")])})),0),n("b-select",{attrs:{disabled:e.disabled,size:e.size},model:{value:e.focusedDateData.year,callback:function(t){e.$set(e.focusedDateData,"year",t)},expression:"focusedDateData.year"}},e._l(e.listOfYears,(function(t){return n("option",{key:t,domProps:{value:t}},[e._v(" "+e._s(t)+" ")])})),0)],1)],1)])],2),e.isTypeMonth?n("div",[n("b-datepicker-month",{attrs:{"month-names":e.newMonthNames,"min-date":e.minDate,"max-date":e.maxDate,focused:e.focusedDateData,disabled:e.disabled,"unselectable-dates":e.unselectableDates,"unselectable-days-of-week":e.unselectableDaysOfWeek,"selectable-dates":e.selectableDates,events:e.events,indicators:e.indicators,"date-creator":e.dateCreator,range:e.range,multiple:e.multiple},on:{"range-start":function(t){return e.$emit("range-start",t)},"range-end":function(t){return e.$emit("range-end",t)},close:function(t){return e.togglePicker(!1)},"change-focus":e.changeFocus,"update:focused":function(t){e.focusedDateData=t}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}})],1):n("div",{staticClass:"datepicker-content",class:{"content-horizontal-timepicker":e.horizontalTimePicker}},[n("b-datepicker-table",{attrs:{"day-names":e.newDayNames,"month-names":e.newMonthNames,"first-day-of-week":e.firstDayOfWeek,"rules-for-first-week":e.rulesForFirstWeek,"min-date":e.minDate,"max-date":e.maxDate,focused:e.focusedDateData,disabled:e.disabled,"unselectable-dates":e.unselectableDates,"unselectable-days-of-week":e.unselectableDaysOfWeek,"selectable-dates":e.selectableDates,events:e.events,indicators:e.indicators,"date-creator":e.dateCreator,"type-month":e.isTypeMonth,"nearby-month-days":e.nearbyMonthDays,"nearby-selectable-month-days":e.nearbySelectableMonthDays,"show-week-number":e.showWeekNumber,"week-number-clickable":e.weekNumberClickable,range:e.range,multiple:e.multiple},on:{"range-start":function(t){return e.$emit("range-start",t)},"range-end":function(t){return e.$emit("range-end",t)},close:function(t){return e.togglePicker(!1)},"update:focused":function(t){e.focusedDateData=t}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}})],1)]),void 0!==e.$slots.default&&e.$slots.default.length?n("footer",{staticClass:"datepicker-footer",class:{"footer-horizontal-timepicker":e.horizontalTimePicker}},[e._t("default")],2):e._e()])],1):n("b-input",e._b({ref:"input",attrs:{type:e.isTypeMonth?"month":"date",autocomplete:"off",value:e.formatNative(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,max:e.formatNative(e.maxDate),min:e.formatNative(e.minDate),disabled:e.disabled,readonly:!1,"use-html5-validation":!1},on:{focus:e.onFocus,blur:e.onBlur},nativeOn:{change:function(t){return e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]},undefined,Mi,undefined,!1,undefined,void 0,void 0),Ai={install:function(e){Jt(e,Oi)}};use(Ai);var Ti,Bi=Ai;var Fi,Ii=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"timepicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline,"append-to-body":e.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(){return[e._t("trigger",[n("b-input",e._b({ref:"input",attrs:{autocomplete:"off",value:e.formatValue(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,disabled:e.disabled,readonly:!e.editable,rounded:e.rounded,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggle(!0)},change:function(t){return e.onChange(t.target.value)}}},"b-input",e.$attrs,!1))])]},proxy:!0}],null,!0)},[n("b-dropdown-item",{attrs:{disabled:e.disabled,focusable:e.focusable,custom:""}},[n("b-field",{attrs:{grouped:"",position:"is-centered"}},[n("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){return e.onHoursChange(t.target.value)}},model:{value:e.hoursSelected,callback:function(t){e.hoursSelected=t},expression:"hoursSelected"}},e._l(e.hours,(function(t){return n("option",{key:t.value,attrs:{disabled:e.isHourDisabled(t.value)},domProps:{value:t.value}},[e._v(" "+e._s(t.label)+" ")])})),0),n("span",{staticClass:"control is-colon"},[e._v(e._s(e.hourLiteral))]),n("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){return e.onMinutesChange(t.target.value)}},model:{value:e.minutesSelected,callback:function(t){e.minutesSelected=t},expression:"minutesSelected"}},e._l(e.minutes,(function(t){return n("option",{key:t.value,attrs:{disabled:e.isMinuteDisabled(t.value)},domProps:{value:t.value}},[e._v(" "+e._s(t.label)+" ")])})),0),e.enableSeconds?[n("span",{staticClass:"control is-colon"},[e._v(e._s(e.minuteLiteral))]),n("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){return e.onSecondsChange(t.target.value)}},model:{value:e.secondsSelected,callback:function(t){e.secondsSelected=t},expression:"secondsSelected"}},e._l(e.seconds,(function(t){return n("option",{key:t.value,attrs:{disabled:e.isSecondDisabled(t.value)},domProps:{value:t.value}},[e._v(" "+e._s(t.label)+" ")])})),0),n("span",{staticClass:"control is-colon"},[e._v(e._s(e.secondLiteral))])]:e._e(),e.isHourFormat24?e._e():n("b-select",{attrs:{disabled:e.disabled},nativeOn:{change:function(t){return e.onMeridienChange(t.target.value)}},model:{value:e.meridienSelected,callback:function(t){e.meridienSelected=t},expression:"meridienSelected"}},e._l(e.meridiens,(function(t){return n("option",{key:t,domProps:{value:t}},[e._v(" "+e._s(t)+" ")])})),0)],2),void 0!==e.$slots.default&&e.$slots.default.length?n("footer",{staticClass:"timepicker-footer"},[e._t("default")],2):e._e()],1)],1):n("b-input",e._b({ref:"input",attrs:{type:"time",step:e.nativeStep,autocomplete:"off",value:e.formatHHMMSS(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,max:e.formatHHMMSS(e.maxTime),min:e.formatHHMMSS(e.minTime),disabled:e.disabled,readonly:!1,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){e.onBlur()&&e.checkHtml5Validity()}},nativeOn:{change:function(t){return e.onChange(t.target.value)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]},undefined,{name:"BTimepicker",components:(Ti={},ft(Ti,rn.name,rn),ft(Ti,Gn.name,Gn),ft(Ti,ni.name,ni),ft(Ti,an.name,an),ft(Ti,Yn.name,Yn),ft(Ti,qn.name,qn),Ti),mixins:[Hn],inheritAttrs:!1,data:function(){return{_isTimepicker:!0}},computed:{nativeStep:function(){if(this.enableSeconds)return"1"}}},undefined,!1,undefined,void 0,void 0),Ni={name:"BDatetimepicker",components:(Fi={},ft(Fi,Oi.name,Oi),ft(Fi,Ii.name,Ii),Fi),mixins:[en],inheritAttrs:!1,props:{value:{type:Date},editable:{type:Boolean,default:!1},placeholder:String,horizontalTimePicker:Boolean,disabled:Boolean,firstDayOfWeek:{type:Number,default:function(){return"number"==typeof Kt.defaultFirstDayOfWeek?Kt.defaultFirstDayOfWeek:0}},rulesForFirstWeek:{type:Number,default:function(){return 4}},icon:String,iconRight:String,iconRightClickable:Boolean,iconPack:String,inline:Boolean,openOnFocus:Boolean,position:String,mobileNative:{type:Boolean,default:!0},minDatetime:Date,maxDatetime:Date,datetimeFormatter:{type:Function},datetimeParser:{type:Function},datetimeCreator:{type:Function,default:function(e){return"function"==typeof Kt.defaultDatetimeCreator?Kt.defaultDatetimeCreator(e):e}},datepicker:Object,timepicker:Object,tzOffset:{type:Number,default:0},focusable:{type:Boolean,default:!0},appendToBody:Boolean},data:function(){return{newValue:this.adjustValue(this.value)}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){if(e){var t=new Date(e.getTime());this.newValue?e.getDate()===this.newValue.getDate()&&e.getMonth()===this.newValue.getMonth()&&e.getFullYear()===this.newValue.getFullYear()||0!==e.getHours()||0!==e.getMinutes()||0!==e.getSeconds()||t.setHours(this.newValue.getHours(),this.newValue.getMinutes(),this.newValue.getSeconds(),0):t=this.datetimeCreator(e),this.minDatetime&&tthis.adjustValue(this.maxDatetime)&&(t=this.adjustValue(this.maxDatetime)),this.newValue=new Date(t.getTime())}else this.newValue=this.adjustValue(e);var n=this.adjustValue(this.newValue,!0);this.$emit("input",n)}},localeOptions:function(){return new Intl.DateTimeFormat(this.locale,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:this.enableSeconds()?"numeric":void 0}).resolvedOptions()},dtf:function(){return new Intl.DateTimeFormat(this.locale,{year:this.localeOptions.year||"numeric",month:this.localeOptions.month||"numeric",day:this.localeOptions.day||"numeric",hour:this.localeOptions.hour||"numeric",minute:this.localeOptions.minute||"numeric",second:this.enableSeconds()?this.localeOptions.second||"numeric":void 0,hourCycle:this.isHourFormat24()?"h23":"h12"})},isMobileNative:function(){return this.mobileNative&&0===this.tzOffset},isMobile:function(){return this.isMobileNative&&Nt.any()},minDate:function(){if(!this.minDatetime)return this.datepicker?this.adjustValue(this.datepicker.minDate):null;var e=this.adjustValue(this.minDatetime);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)},maxDate:function(){if(!this.maxDatetime)return this.datepicker?this.adjustValue(this.datepicker.maxDate):null;var e=this.adjustValue(this.maxDatetime);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)},minTime:function(){if(!this.minDatetime||null===this.newValue||void 0===this.newValue)return this.timepicker?this.adjustValue(this.timepicker.minTime):null;var e=this.adjustValue(this.minDatetime);return e.getFullYear()===this.newValue.getFullYear()&&e.getMonth()===this.newValue.getMonth()&&e.getDate()===this.newValue.getDate()?e:void 0},maxTime:function(){if(!this.maxDatetime||null===this.newValue||void 0===this.newValue)return this.timepicker?this.adjustValue(this.timepicker.maxTime):null;var e=this.adjustValue(this.maxDatetime);return e.getFullYear()===this.newValue.getFullYear()&&e.getMonth()===this.newValue.getMonth()&&e.getDate()===this.newValue.getDate()?e:void 0},datepickerSize:function(){return this.datepicker&&this.datepicker.size?this.datepicker.size:this.size},timepickerSize:function(){return this.timepicker&&this.timepicker.size?this.timepicker.size:this.size},timepickerDisabled:function(){return this.timepicker&&this.timepicker.disabled?this.timepicker.disabled:this.disabled}},watch:{value:function(){this.newValue=this.adjustValue(this.value)},tzOffset:function(){this.newValue=this.adjustValue(this.value)}},methods:{enableSeconds:function(){return!!this.$refs.timepicker&&this.$refs.timepicker.enableSeconds},isHourFormat24:function(){return this.$refs.timepicker?this.$refs.timepicker.isHourFormat24:!this.localeOptions.hour12},adjustValue:function(e){return e?arguments.length>1&&void 0!==arguments[1]&&arguments[1]?new Date(e.getTime()-6e4*this.tzOffset):new Date(e.getTime()+6e4*this.tzOffset):e},defaultDatetimeParser:function(e){if("function"==typeof this.datetimeParser)return this.datetimeParser(e);if("function"==typeof Kt.defaultDatetimeParser)return Kt.defaultDatetimeParser(e);if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var t=["AM","PM","AM".toLowerCase(),"PM".toLowerCase()];this.$refs.timepicker&&(t.push(this.$refs.timepicker.amString),t.push(this.$refs.timepicker.pmString));var n=this.dtf.formatToParts(new Date),r=jt(n.map((function(e,r){return"literal"===e.type?r+1)(").concat(t.join("|"),")?)"):"((?!=<".concat(e.type,">)\\d+)")})).join(""),e);if(r.year&&4===r.year.length&&r.month&&r.month<=12&&r.day&&r.day<=31&&r.hour&&r.hour>=0&&r.hour<24&&r.minute&&r.minute>=0&&r.minute<=59)return new Date(r.year,r.month-1,r.day,r.hour,r.minute,r.second||0)}return new Date(Date.parse(e))},defaultDatetimeFormatter:function(e){return"function"==typeof this.datetimeFormatter?this.datetimeFormatter(e):"function"==typeof Kt.defaultDatetimeFormatter?Kt.defaultDatetimeFormatter(e):this.dtf.format(e)},onChangeNativePicker:function(e){var t=e.target.value,s=t?t.split(/\D/):[];if(s.length>=5){var n=parseInt(s[0],10),r=parseInt(s[1],10)-1,o=parseInt(s[2],10),l=parseInt(s[3],10),c=parseInt(s[4],10);this.computedValue=new Date(n,r,o,l,c)}else this.computedValue=null},onActiveChange:function(e){this.$emit("active-change",e)},formatNative:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getFullYear(),r=t.getMonth()+1,o=t.getDate(),l=t.getHours(),c=t.getMinutes(),d=t.getSeconds();return n+"-"+(r<10?"0":"")+r+"-"+(o<10?"0":"")+o+"T"+(l<10?"0":"")+l+":"+(c<10?"0":"")+c+":"+(d<10?"0":"")+d}return""},toggle:function(){this.$refs.datepicker.toggle()}},mounted:function(){this.isMobile&&!this.inline||this.newValue&&this.$refs.datepicker.$forceUpdate()}};var Ei=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return!e.isMobile||e.inline?n("b-datepicker",e._b({ref:"datepicker",attrs:{rounded:e.rounded,"open-on-focus":e.openOnFocus,position:e.position,loading:e.loading,inline:e.inline,editable:e.editable,expanded:e.expanded,"close-on-click":!1,"first-day-of-week":e.firstDayOfWeek,"rules-for-first-week":e.rulesForFirstWeek,"date-formatter":e.defaultDatetimeFormatter,"date-parser":e.defaultDatetimeParser,"min-date":e.minDate,"max-date":e.maxDate,icon:e.icon,"icon-right":e.iconRight,"icon-right-clickable":e.iconRightClickable,"icon-pack":e.iconPack,size:e.datepickerSize,placeholder:e.placeholder,"horizontal-time-picker":e.horizontalTimePicker,range:!1,disabled:e.disabled,"mobile-native":e.isMobileNative,locale:e.locale,focusable:e.focusable,"append-to-body":e.appendToBody},on:{focus:e.onFocus,blur:e.onBlur,"active-change":e.onActiveChange,"icon-right-click":function(t){return e.$emit("icon-right-click")},"change-month":function(t){return e.$emit("change-month",t)},"change-year":function(t){return e.$emit("change-year",t)}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},"b-datepicker",e.datepicker,!1),[n("nav",{staticClass:"level is-mobile"},[void 0!==e.$slots.left?n("div",{staticClass:"level-item has-text-centered"},[e._t("left")],2):e._e(),n("div",{staticClass:"level-item has-text-centered"},[n("b-timepicker",e._b({ref:"timepicker",attrs:{inline:"",editable:e.editable,"min-time":e.minTime,"max-time":e.maxTime,size:e.timepickerSize,disabled:e.timepickerDisabled,focusable:e.focusable,"mobile-native":e.isMobileNative,locale:e.locale},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},"b-timepicker",e.timepicker,!1))],1),void 0!==e.$slots.right?n("div",{staticClass:"level-item has-text-centered"},[e._t("right")],2):e._e()])]):n("b-input",e._b({ref:"input",attrs:{type:"datetime-local",autocomplete:"off",value:e.formatNative(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,max:e.formatNative(e.maxDate),min:e.formatNative(e.minDate),disabled:e.disabled,readonly:!1,"use-html5-validation":e.useHtml5Validation},on:{focus:e.onFocus,blur:e.onBlur},nativeOn:{change:function(t){return e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))},staticRenderFns:[]},undefined,Ni,undefined,!1,undefined,void 0,void 0),Ri={install:function(e){Jt(e,Ei)}};use(Ri);var Vi=Ri,Li={name:"BModal",directives:{trapFocus:jn},model:{prop:"active",event:"update:active"},props:{active:Boolean,component:[Object,Function,String],content:[String,Array],programmatic:Boolean,props:Object,events:Object,width:{type:[String,Number],default:960},hasModalCard:Boolean,animation:{type:String,default:"zoom-out"},canCancel:{type:[Array,Boolean],default:function(){return Kt.defaultModalCanCancel}},onCancel:{type:Function,default:function(){}},scroll:{type:String,default:function(){return Kt.defaultModalScroll?Kt.defaultModalScroll:"clip"},validator:function(e){return["clip","keep"].indexOf(e)>=0}},fullScreen:Boolean,trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},autoFocus:{type:Boolean,default:function(){return Kt.defaultAutoFocus}},customClass:String,customContentClass:[String,Array,Object],ariaRole:{type:String,validator:function(e){return["dialog","alertdialog"].indexOf(e)>=0}},ariaModal:Boolean,ariaLabel:{type:String,validator:function(e){return Boolean(e)}},closeButtonAriaLabel:String,destroyOnHide:{type:Boolean,default:!0}},data:function(){return{isActive:this.active||!1,savedScrollTop:null,newWidth:"number"==typeof this.width?this.width+"px":this.width,animating:!this.active,destroyed:!this.active}},computed:{cancelOptions:function(){return"boolean"==typeof this.canCancel?this.canCancel?Kt.defaultModalCanCancel:[]:this.canCancel},showX:function(){return this.cancelOptions.indexOf("x")>=0},customStyle:function(){return this.fullScreen?null:{maxWidth:this.newWidth}}},watch:{active:function(e){this.isActive=e},isActive:function(e){var t=this;e&&(this.destroyed=!1),this.handleScroll(),this.$nextTick((function(){e&&t.$el&&t.$el.focus&&t.autoFocus&&t.$el.focus()}))}},methods:{handleScroll:function(){"undefined"!=typeof window&&("clip"!==this.scroll?(this.savedScrollTop=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop,this.isActive?document.body.classList.add("is-noscroll"):document.body.classList.remove("is-noscroll"),this.isActive?document.body.style.top="-".concat(this.savedScrollTop,"px"):(document.documentElement.scrollTop=this.savedScrollTop,document.body.style.top=null,this.savedScrollTop=null)):this.isActive?document.documentElement.classList.add("is-clipped"):document.documentElement.classList.remove("is-clipped"))},cancel:function(e){this.cancelOptions.indexOf(e)<0||(this.$emit("cancel",arguments),this.onCancel.apply(null,arguments),this.close())},close:function(){var e=this;this.$emit("close"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout((function(){e.$destroy(),Et(e.$el)}),150))},keyPress:function(e){var t=e.key;!this.isActive||"Escape"!==t&&"Esc"!==t||this.cancel("escape")},afterEnter:function(){this.animating=!1,this.$emit("after-enter")},beforeLeave:function(){this.animating=!0},afterLeave:function(){this.destroyOnHide&&(this.destroyed=!0),this.$emit("after-leave")}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeMount:function(){this.programmatic&&document.body.appendChild(this.$el)},mounted:function(){this.programmatic?this.isActive=!0:this.isActive&&this.handleScroll()},beforeDestroy:function(){if("undefined"!=typeof window){document.removeEventListener("keyup",this.keyPress),document.documentElement.classList.remove("is-clipped");var e=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop;document.body.classList.remove("is-noscroll"),document.documentElement.scrollTop=e,document.body.style.top=null}}};var Hi,zi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation},on:{"after-enter":e.afterEnter,"before-leave":e.beforeLeave,"after-leave":e.afterLeave}},[e.destroyed?e._e():n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"},{name:"trap-focus",rawName:"v-trap-focus",value:e.trapFocus,expression:"trapFocus"}],staticClass:"modal is-active",class:[{"is-full-screen":e.fullScreen},e.customClass],attrs:{tabindex:"-1",role:e.ariaRole,"aria-label":e.ariaLabel,"aria-modal":e.ariaModal}},[n("div",{staticClass:"modal-background",on:{click:function(t){return e.cancel("outside")}}}),n("div",{staticClass:"animation-content",class:[{"modal-content":!e.hasModalCard},e.customContentClass],style:e.customStyle},[e.component?n(e.component,e._g(e._b({tag:"component",attrs:{"can-cancel":e.canCancel},on:{close:e.close}},"component",e.props,!1),e.events)):e.content?[n("div",{domProps:{innerHTML:e._s(e.content)}})]:e._t("default",null,{canCancel:e.canCancel,close:e.close}),e.showX?n("button",{directives:[{name:"show",rawName:"v-show",value:!e.animating,expression:"!animating"}],staticClass:"modal-close is-large",attrs:{type:"button","aria-label":e.closeButtonAriaLabel},on:{click:function(t){return e.cancel("x")}}}):e._e()],2)])])},staticRenderFns:[]},undefined,Li,undefined,!1,undefined,void 0,void 0);var ji,Wi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation}},[e.isActive?n("div",{directives:[{name:"trap-focus",rawName:"v-trap-focus",value:e.trapFocus,expression:"trapFocus"}],staticClass:"dialog modal is-active",class:e.dialogClass,attrs:{role:e.ariaRole,"aria-modal":e.ariaModal}},[n("div",{staticClass:"modal-background",on:{click:function(t){return e.cancel("outside")}}}),n("div",{staticClass:"modal-card animation-content"},[e.title?n("header",{staticClass:"modal-card-head"},[n("p",{staticClass:"modal-card-title"},[e._v(e._s(e.title))])]):e._e(),n("section",{staticClass:"modal-card-body",class:{"is-titleless":!e.title,"is-flex":e.hasIcon}},[n("div",{staticClass:"media"},[e.hasIcon&&(e.icon||e.iconByType)?n("div",{staticClass:"media-left"},[n("b-icon",{attrs:{icon:e.icon?e.icon:e.iconByType,pack:e.iconPack,type:e.type,both:!e.icon,size:"is-large"}})],1):e._e(),n("div",{staticClass:"media-content"},[n("p",[e.$slots.default?[e._t("default")]:[n("div",{domProps:{innerHTML:e._s(e.message)}})]],2),e.hasInput?n("div",{staticClass:"field"},[n("div",{staticClass:"control"},["checkbox"===e.inputAttrs.type?n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.prompt,expression:"prompt"}],ref:"input",staticClass:"input",class:{"is-danger":e.validationMessage},attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.prompt)?e._i(e.prompt,null)>-1:e.prompt},on:{compositionstart:function(t){e.isCompositing=!0},compositionend:function(t){e.isCompositing=!1},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.confirm(t)},change:function(t){var n=e.prompt,r=t.target,o=!!r.checked;if(Array.isArray(n)){var l=e._i(n,null);r.checked?l<0&&(e.prompt=n.concat([null])):l>-1&&(e.prompt=n.slice(0,l).concat(n.slice(l+1)))}else e.prompt=o}}},"input",e.inputAttrs,!1)):"radio"===e.inputAttrs.type?n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.prompt,expression:"prompt"}],ref:"input",staticClass:"input",class:{"is-danger":e.validationMessage},attrs:{type:"radio"},domProps:{checked:e._q(e.prompt,null)},on:{compositionstart:function(t){e.isCompositing=!0},compositionend:function(t){e.isCompositing=!1},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.confirm(t)},change:function(t){e.prompt=null}}},"input",e.inputAttrs,!1)):n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.prompt,expression:"prompt"}],ref:"input",staticClass:"input",class:{"is-danger":e.validationMessage},attrs:{type:e.inputAttrs.type},domProps:{value:e.prompt},on:{compositionstart:function(t){e.isCompositing=!0},compositionend:function(t){e.isCompositing=!1},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.confirm(t)},input:function(t){t.target.composing||(e.prompt=t.target.value)}}},"input",e.inputAttrs,!1))]),n("p",{staticClass:"help is-danger"},[e._v(e._s(e.validationMessage))])]):e._e()])])]),n("footer",{staticClass:"modal-card-foot"},[e.showCancel?n("b-button",{ref:"cancelButton",on:{click:function(t){return e.cancel("button")}}},[e._v(e._s(e.cancelText))]):e._e(),n("b-button",{ref:"confirmButton",attrs:{type:e.type},on:{click:e.confirm}},[e._v(e._s(e.confirmText))])],1)])]):e._e()])},staticRenderFns:[]},undefined,{name:"BDialog",components:(Hi={},ft(Hi,an.name,an),ft(Hi,pn.name,pn),Hi),directives:{trapFocus:jn},extends:zi,props:{title:String,message:[String,Array],icon:String,iconPack:String,hasIcon:Boolean,type:{type:String,default:"is-primary"},size:String,confirmText:{type:String,default:function(){return Kt.defaultDialogConfirmText?Kt.defaultDialogConfirmText:"OK"}},cancelText:{type:String,default:function(){return Kt.defaultDialogCancelText?Kt.defaultDialogCancelText:"Cancel"}},hasInput:Boolean,inputAttrs:{type:Object,default:function(){return{}}},onConfirm:{type:Function,default:function(){}},closeOnConfirm:{type:Boolean,default:!0},container:{type:String,default:function(){return Kt.defaultContainerElement}},focusOn:{type:String,default:"confirm"},trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},ariaRole:{type:String,validator:function(e){return["dialog","alertdialog"].indexOf(e)>=0}},ariaModal:Boolean},data:function(){return{prompt:this.hasInput&&this.inputAttrs.value||"",isActive:!1,validationMessage:"",isCompositing:!1}},computed:{dialogClass:function(){return[this.size,{"has-custom-container":null!==this.container}]},iconByType:function(){switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}},showCancel:function(){return this.cancelOptions.indexOf("button")>=0}},methods:{confirm:function(){var e=this;if(void 0!==this.$refs.input){if(this.isCompositing)return;if(!this.$refs.input.checkValidity())return this.validationMessage=this.$refs.input.validationMessage,void this.$nextTick((function(){return e.$refs.input.select()}))}this.$emit("confirm",this.prompt),this.onConfirm(this.prompt,this),this.closeOnConfirm&&this.close()},close:function(){var e=this;this.isActive=!1,setTimeout((function(){e.$destroy(),Et(e.$el)}),150)}},beforeMount:function(){var e=this;"undefined"!=typeof window&&this.$nextTick((function(){(document.querySelector(e.container)||document.body).appendChild(e.$el)}))},mounted:function(){var e=this;this.isActive=!0,void 0===this.inputAttrs.required&&this.$set(this.inputAttrs,"required",!0),this.$nextTick((function(){e.hasInput?e.$refs.input.focus():"cancel"===e.focusOn&&e.showCancel?e.$refs.cancelButton.$el.focus():e.$refs.confirmButton.$el.focus()}))}},undefined,!1,undefined,void 0,void 0);function Yi(e){var slot;Array.isArray(e.message)&&(slot=e.message,delete e.message);var component=new(("undefined"!=typeof window&&window.Vue?window.Vue:ji||Yt).extend(Wi))({el:document.createElement("div"),propsData:e});return slot&&(component.$slots.default=slot,component.$forceUpdate()),Kt.defaultProgrammaticPromise?new Promise((function(e){component.$on("confirm",(function(t){return e({result:t||!0,dialog:component})})),component.$on("cancel",(function(){return e({result:!1,dialog:component})}))})):component}var qi={alert:function(e){"string"==typeof e&&(e={message:e});return Yi(It({canCancel:!1},e))},confirm:function(e){return Yi(It({},e))},prompt:function(e){return Yi(It({hasInput:!0},e))}},Ui={install:function(e){ji=e,Jt(e,Wi),Zt(e,"dialog",qi)}};use(Ui);var dialog=Ui,Ki={install:function(e){Jt(e,Yn),Jt(e,qn)}};use(Ki);var Xi=Ki,Gi={install:function(e){Jt(e,Gn)}};use(Gi);var Qi=Gi,Ji={install:function(e){Jt(e,an)}};use(Ji);var Zi=Ji,ea={install:function(e){Jt(e,wn)}};use(ea);var ta=ea,na={install:function(e){Jt(e,rn)}};use(na);var ia=na,aa="undefined"==typeof window,ra=aa?Object:window.HTMLElement,sa=aa?Object:window.File,oa={name:"BLoading",model:{prop:"active",event:"update:active"},props:{active:Boolean,programmatic:Boolean,container:[Object,Function,ra],isFullPage:{type:Boolean,default:!0},animation:{type:String,default:"fade"},canCancel:{type:Boolean,default:!1},onCancel:{type:Function,default:function(){}}},data:function(){return{isActive:this.active||!1,displayInFullPage:this.isFullPage}},watch:{active:function(e){this.isActive=e},isFullPage:function(e){this.displayInFullPage=e}},methods:{cancel:function(){this.canCancel&&this.isActive&&this.close()},close:function(){var e=this;this.onCancel.apply(null,arguments),this.$emit("close"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout((function(){e.$destroy(),Et(e.$el)}),150))},keyPress:function(e){var t=e.key;"Escape"!==t&&"Esc"!==t||this.cancel()}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeMount:function(){this.programmatic&&(this.container?(this.displayInFullPage=!1,this.$emit("update:is-full-page",!1),this.container.appendChild(this.$el)):document.body.appendChild(this.$el))},mounted:function(){this.programmatic&&(this.isActive=!0)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}};var la,ua=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"loading-overlay is-active",class:{"is-full-page":e.displayInFullPage}},[n("div",{staticClass:"loading-background",on:{click:e.cancel}}),e._t("default",[n("div",{staticClass:"loading-icon"})])],2)])},staticRenderFns:[]},undefined,oa,undefined,!1,undefined,void 0,void 0),ca={open:function(e){var t=It({programmatic:!0},e);return new(("undefined"!=typeof window&&window.Vue?window.Vue:la||Yt).extend(ua))({el:document.createElement("div"),propsData:t})}},da={install:function(e){la=e,Jt(e,ua),Zt(e,"loading",ca)}};use(da);var ha=da;var fa=Qt({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"menu"},[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BMenu",props:{accordion:{type:Boolean,default:!0},activable:{type:Boolean,default:!0}},data:function(){return{_isMenu:!0}}},undefined,!1,undefined,void 0,void 0);var pa=Qt({},undefined,{name:"BMenuList",functional:!0,props:{label:String,icon:String,iconPack:String,ariaRole:{type:String,default:""},size:{type:String,default:"is-small"}},render:function(e,t){var n=null,r=t.slots();(t.props.label||r.label)&&(n=e("p",{attrs:{class:"menu-label"}},t.props.label?t.props.icon?[e("b-icon",{props:{icon:t.props.icon,pack:t.props.iconPack,size:t.props.size}}),e("span",{},t.props.label)]:t.props.label:r.label));var o=e("ul",{attrs:{class:"menu-list",role:"menu"===t.props.ariaRole?t.props.ariaRole:null}},r.default);return n?[n,o]:o}},undefined,undefined,undefined,void 0,void 0),ma={name:"BMenuItem",components:ft({},an.name,an),inheritAttrs:!1,model:{prop:"active",event:"update:active"},props:{label:String,active:Boolean,expanded:Boolean,disabled:Boolean,iconPack:String,icon:String,animation:{type:String,default:"slide"},tag:{type:String,default:"a",validator:function(e){return Kt.defaultLinkTags.indexOf(e)>=0}},ariaRole:{type:String,default:""},size:{type:String,default:"is-small"}},data:function(){return{newActive:this.active,newExpanded:this.expanded}},computed:{ariaRoleMenu:function(){return"menuitem"===this.ariaRole?this.ariaRole:null}},watch:{active:function(e){this.newActive=e},expanded:function(e){this.newExpanded=e}},methods:{onClick:function(e){if(!this.disabled){var menu=this.getMenu();this.reset(this.$parent,menu),this.newExpanded=this.$props.expanded||!this.newExpanded,this.$emit("update:expanded",this.newExpanded),menu&&menu.activable&&(this.newActive=!0,this.$emit("update:active",this.newActive))}},reset:function(e,menu){var t=this;e.$children.filter((function(e){return e.name===t.name})).forEach((function(n){n!==t&&(t.reset(n,menu),(!e.$data._isMenu||e.$data._isMenu&&e.accordion)&&(n.newExpanded=!1,n.$emit("update:expanded",n.newActive)),menu&&menu.activable&&(n.newActive=!1,n.$emit("update:active",n.newActive)))}))},getMenu:function(){for(var e=this.$parent;e&&!e.$data._isMenu;)e=e.$parent;return e}}};var va=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{attrs:{role:e.ariaRoleMenu}},[n(e.tag,e._g(e._b({tag:"component",class:{"is-active":e.newActive,"is-expanded":e.newExpanded,"is-disabled":e.disabled,"icon-text":e.icon},on:{click:function(t){return e.onClick(t)}}},"component",e.$attrs,!1),e.$listeners),[e.icon?n("b-icon",{attrs:{icon:e.icon,pack:e.iconPack,size:e.size}}):e._e(),e.label?n("span",[e._v(" "+e._s(e.label)+" ")]):e._t("label",null,{expanded:e.newExpanded,active:e.newActive})],2),e.$slots.default?[n("transition",{attrs:{name:e.animation}},[n("ul",{directives:[{name:"show",rawName:"v-show",value:e.newExpanded,expression:"newExpanded"}]},[e._t("default")],2)])]:e._e()],2)},staticRenderFns:[]},undefined,ma,undefined,!1,undefined,void 0,void 0),ga={install:function(e){Jt(e,fa),Jt(e,pa),Jt(e,va)}};use(ga);var menu=ga,ba={components:ft({},an.name,an),model:{prop:"active",event:"update:active"},props:{active:{type:Boolean,default:!0},title:String,closable:{type:Boolean,default:!0},message:String,type:String,hasIcon:Boolean,size:String,icon:String,iconPack:String,iconSize:String,autoClose:{type:Boolean,default:!1},duration:{type:Number,default:2e3},progressBar:{type:Boolean,default:!1}},data:function(){return{isActive:this.active,remainingTime:this.duration/1e3,newIconSize:this.iconSize||this.size||"is-large"}},watch:{active:function(e){this.isActive=e},isActive:function(e){e?(this.setAutoClose(),this.setDurationProgress()):this.timer&&clearTimeout(this.timer)}},computed:{computedIcon:function(){if(this.icon)return this.icon;switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}}},methods:{close:function(){this.isActive=!1,this.resetDurationProgress(),this.$emit("close"),this.$emit("update:active",!1)},click:function(){this.$emit("click")},setAutoClose:function(){var e=this;this.autoClose&&(this.timer=setTimeout((function(){e.isActive&&e.close()}),this.duration))},setDurationProgress:function(){var e=this;this.progressBar&&(this.$buefy.globalNoticeInterval=setInterval((function(){0!==e.remainingTime?e.remainingTime-=1:e.resetDurationProgress()}),1e3))},resetDurationProgress:function(){var e=this;setTimeout((function(){e.remainingTime=e.duration/1e3,clearInterval(e.$buefy.globalNoticeInterval)}),100)}},mounted:function(){this.setAutoClose()}};var ya=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"fade"}},[n("article",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"message",class:[e.type,e.size]},[e.$slots.header||e.title?n("header",{staticClass:"message-header"},[e.$slots.header?n("div",[e._t("header")],2):e.title?n("p",[e._v(e._s(e.title))]):e._e(),e.closable?n("button",{staticClass:"delete",attrs:{type:"button","aria-label":e.ariaCloseLabel},on:{click:e.close}}):e._e()]):e._e(),e.$slots.default?n("section",{staticClass:"message-body"},[n("div",{staticClass:"media"},[e.computedIcon&&e.hasIcon?n("div",{staticClass:"media-left"},[n("b-icon",{class:e.type,attrs:{icon:e.computedIcon,pack:e.iconPack,both:"",size:e.newIconSize}})],1):e._e(),n("div",{staticClass:"media-content"},[e._t("default")],2)])]):e._e(),e.autoClose&&e.progressBar?n("b-progress",{staticClass:"auto-close-progress",attrs:{value:e.remainingTime-1,max:e.duration/1e3-1,type:e.type,rounded:!1}}):e._e()],1)])},staticRenderFns:[]},undefined,{name:"BMessage",mixins:[ba],props:{ariaCloseLabel:String}},undefined,!1,undefined,void 0,void 0),wa={install:function(e){Jt(e,ya)}};use(wa);var ka,Sa=wa,xa={open:function(e){var t;"string"==typeof e&&(e={content:e});var slot;e.parent&&(t=e.parent,delete e.parent),Array.isArray(e.content)&&(slot=e.content,delete e.content);var n=It({programmatic:!0},e),component=new(("undefined"!=typeof window&&window.Vue?window.Vue:ka||Yt).extend(zi))({parent:t,el:document.createElement("div"),propsData:n});return slot&&(component.$slots.default=slot,component.$forceUpdate()),component}},Ca={install:function(e){ka=e,Jt(e,zi),Zt(e,"modal",xa)}};use(Ca);var Da=Ca,_a={props:{type:{type:String,default:"is-dark"},message:[String,Array],duration:Number,queue:{type:Boolean,default:void 0},indefinite:{type:Boolean,default:!1},pauseOnHover:{type:Boolean,default:!1},position:{type:String,default:"is-top",validator:function(e){return["is-top-right","is-top","is-top-left","is-bottom-right","is-bottom","is-bottom-left"].indexOf(e)>-1}},container:String},data:function(){return{isActive:!1,isPaused:!1,parentTop:null,parentBottom:null,newContainer:this.container||Kt.defaultContainerElement}},computed:{correctParent:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return this.parentTop;case"is-bottom-right":case"is-bottom":case"is-bottom-left":return this.parentBottom}},transition:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return{enter:"fadeInDown",leave:"fadeOut"};case"is-bottom-right":case"is-bottom":case"is-bottom-left":return{enter:"fadeInUp",leave:"fadeOut"}}}},methods:{pause:function(){this.pauseOnHover&&!this.indefinite&&(this.isPaused=!0,clearInterval(this.$buefy.globalNoticeInterval))},removePause:function(){this.pauseOnHover&&!this.indefinite&&(this.isPaused=!1,this.close())},shouldQueue:function(){return!!(void 0!==this.queue?this.queue:Kt.defaultNoticeQueue)&&(this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},click:function(){this.$emit("click")},close:function(){var e=this;this.isPaused||(clearTimeout(this.timer),this.isActive=!1,this.$emit("close"),setTimeout((function(){e.$destroy(),Et(e.$el)}),150))},timeoutCallback:function(){return this.close()},showNotice:function(){var e=this;this.shouldQueue()&&(this.correctParent.innerHTML=""),this.correctParent.insertAdjacentElement("afterbegin",this.$el),this.isActive=!0,this.indefinite||(this.timer=setTimeout((function(){return e.timeoutCallback()}),this.newDuration))},setupContainer:function(){if(this.parentTop=document.querySelector((this.newContainer?this.newContainer:"body")+">.notices.is-top"),this.parentBottom=document.querySelector((this.newContainer?this.newContainer:"body")+">.notices.is-bottom"),!this.parentTop||!this.parentBottom){this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="notices is-top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="notices is-bottom");var e=document.querySelector(this.newContainer)||document.body;e.appendChild(this.parentTop),e.appendChild(this.parentBottom),this.newContainer&&(this.parentTop.classList.add("has-custom-container"),this.parentBottom.classList.add("has-custom-container"))}}},beforeMount:function(){this.setupContainer()},mounted:function(){this.showNotice()}};var $a=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation}},[n("article",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"notification",class:[e.type,e.position],on:{click:e.click}},[e.closable?n("button",{staticClass:"delete",attrs:{type:"button","aria-label":e.ariaCloseLabel},on:{click:e.close}}):e._e(),e.$slots.default||e.message?n("div",{staticClass:"media"},[e.computedIcon&&e.hasIcon?n("div",{staticClass:"media-left"},[n("b-icon",{attrs:{icon:e.computedIcon,pack:e.iconPack,size:e.newIconSize,both:"","aria-hidden":""}})],1):e._e(),n("div",{staticClass:"media-content"},[e.$slots.default?[e._t("default")]:[n("p",{staticClass:"text",domProps:{innerHTML:e._s(e.message)}})]],2)]):e._e(),e.autoClose&&e.progressBar?n("b-progress",{staticClass:"auto-close-progress",attrs:{value:e.remainingTime-1,max:e.duration/1e3-1,type:e.type,rounded:!1}}):e._e()],1)])},staticRenderFns:[]},undefined,{name:"BNotification",mixins:[ba],props:{position:String,ariaCloseLabel:String,animation:{type:String,default:"fade"}}},undefined,!1,undefined,void 0,void 0);var Pa,Ma=Qt({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("b-notification",e._b({ref:"notification",on:{click:e.click,close:e.close},nativeOn:{mouseenter:function(t){return e.pause(t)},mouseleave:function(t){return e.removePause(t)}}},"b-notification",e.$options.propsData,!1),[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BNotificationNotice",mixins:[_a],data:function(){return{newDuration:this.duration||Kt.defaultNotificationDuration}},methods:{close:function(){var e=this;this.isPaused||(clearTimeout(this.timer),this.$refs.notification.isActive=!1,this.$emit("close"),setTimeout((function(){e.$destroy(),Et(e.$el)}),150))}}},undefined,!1,undefined,void 0,void 0),Oa={open:function(e){var t;"string"==typeof e&&(e={message:e});var slot,n={position:Kt.defaultNotificationPosition||"is-top-right"};e.parent&&(t=e.parent,delete e.parent),Array.isArray(e.message)&&(slot=e.message,delete e.message),e.active=!1;var r=It(n,e),component=new(("undefined"!=typeof window&&window.Vue?window.Vue:Pa||Yt).extend(Ma))({parent:t,el:document.createElement("div"),propsData:r});return slot&&(component.$slots.default=slot,component.$forceUpdate()),component.$children[0].isActive=!0,component}},Aa={install:function(e){Pa=e,Jt(e,$a),Zt(e,"notification",Oa)}};use(Aa);var Ta=Aa;var Ba=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",e._g({staticClass:"navbar-burger burger",class:{"is-active":e.isOpened},attrs:{role:"button","aria-label":"menu","aria-expanded":e.isOpened,tabindex:"0"}},e.$listeners),[n("span",{attrs:{"aria-hidden":"true"}}),n("span",{attrs:{"aria-hidden":"true"}}),n("span",{attrs:{"aria-hidden":"true"}})])},staticRenderFns:[]},undefined,{name:"NavbarBurger",props:{isOpened:{type:Boolean,default:!1}}},undefined,!1,undefined,void 0,void 0),Fa="undefined"!=typeof window&&("ontouchstart"in window||navigator.msMaxTouchPoints>0)?["touchstart","click"]:["click"],Ia=[];function Na(e){var t="function"==typeof e;if(!t&&"object"!==ut(e))throw new Error("v-click-outside: Binding value should be a function or an object, ".concat(ut(e)," given"));return{handler:t?e:e.handler,middleware:e.middleware||function(e){return e},events:e.events||Fa}}function Ea(e){var t=e.el,n=e.event,r=e.handler,o=e.middleware;n.target!==t&&!t.contains(n.target)&&o(n,t)&&r(n,t)}function Ra(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).eventHandlers,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"add";e.forEach((function(e){var n=e.event,r=e.handler;document["".concat(t,"EventListener")](n,r)}))}var Va={bind:function(e,t){var n=Na(t.value),r=n.handler,o=n.middleware,l=n.events,c={el:e,eventHandlers:l.map((function(t){return{event:t,handler:function(t){return Ea({event:t,el:e,handler:r,middleware:o})}}}))};Ra(c,"add"),Ia.push(c)},update:function(e,t){var n=Na(t.value),r=n.handler,o=n.middleware,l=n.events,c=Ia.filter((function(t){return t.el===e}))[0];Ra(c,"remove"),c.eventHandlers=l.map((function(t){return{event:t,handler:function(t){return Ea({event:t,el:e,handler:r,middleware:o})}}})),Ra(c,"add")},unbind:function(e){Ra(Ia.filter((function(t){return t.el===e}))[0],"remove")},instances:Ia},La="has-navbar-fixed-top",Ha="has-spaced-navbar-fixed-top",za="has-navbar-fixed-bottom",ja="has-spaced-navbar-fixed-bottom";var Wa=Qt({},undefined,{name:"BNavbar",components:{NavbarBurger:Ba},directives:{clickOutside:Va},model:{prop:"active",event:"update:active"},props:{type:[String,Object],transparent:{type:Boolean,default:!1},fixedTop:{type:Boolean,default:!1},fixedBottom:{type:Boolean,default:!1},active:{type:Boolean,default:!1},centered:{type:Boolean,default:!1},wrapperClass:{type:[String,Array,Object]},closeOnClick:{type:Boolean,default:!0},mobileBurger:{type:Boolean,default:!0},spaced:Boolean,shadow:Boolean},data:function(){return{internalIsActive:this.active,_isNavBar:!0}},computed:{isOpened:function(){return this.internalIsActive},computedClasses:function(){var e;return[this.type,(e={},ft(e,"is-fixed-top",this.fixedTop),ft(e,"is-fixed-bottom",this.fixedBottom),ft(e,"has-navbar-centered",this.centered),ft(e,"is-spaced",this.spaced),ft(e,"has-shadow",this.shadow),ft(e,"is-transparent",this.transparent),e)]}},watch:{active:{handler:function(e){this.internalIsActive=e},immediate:!0},fixedTop:function(e){this.setBodyFixedTopClass(e)},bottomTop:function(e){this.setBodyFixedBottomClass(e)}},methods:{toggleActive:function(){this.internalIsActive=!this.internalIsActive,this.emitUpdateParentEvent()},closeMenu:function(){this.closeOnClick&&this.internalIsActive&&(this.internalIsActive=!1,this.emitUpdateParentEvent())},emitUpdateParentEvent:function(){this.$emit("update:active",this.internalIsActive)},setBodyClass:function(e){"undefined"!=typeof window&&document.body.classList.add(e)},removeBodyClass:function(e){"undefined"!=typeof window&&document.body.classList.remove(e)},checkIfFixedPropertiesAreColliding:function(){if(this.fixedTop&&this.fixedBottom)throw new Error("You should choose if the BNavbar is fixed bottom or fixed top, but not both")},genNavbar:function(e){var t=[this.genNavbarBrandNode(e),this.genNavbarSlotsNode(e)];if(!this.wrapperClass)return this.genNavbarSlots(e,t);var n=e("div",{class:this.wrapperClass},t);return this.genNavbarSlots(e,[n])},genNavbarSlots:function(e,t){return e("nav",{staticClass:"navbar",class:this.computedClasses,attrs:{role:"navigation","aria-label":"main navigation"},directives:[{name:"click-outside",value:this.closeMenu}]},t)},genNavbarBrandNode:function(e){return e("div",{class:"navbar-brand"},[this.$slots.brand,this.genBurgerNode(e)])},genBurgerNode:function(e){var t=this;if(this.mobileBurger){var n=e("navbar-burger",{props:{isOpened:this.isOpened},on:{click:this.toggleActive,keyup:function(e){13===e.keyCode&&t.toggleActive()}}});return!!this.$scopedSlots.burger?this.$scopedSlots.burger({isOpened:this.isOpened,toggleActive:this.toggleActive}):n}},genNavbarSlotsNode:function(e){return e("div",{staticClass:"navbar-menu",class:{"is-active":this.isOpened}},[this.genMenuPosition(e,"start"),this.genMenuPosition(e,"end")])},genMenuPosition:function(e,t){return e("div",{staticClass:"navbar-".concat(t)},this.$slots[t])},setBodyFixedTopClass:function(e){this.checkIfFixedPropertiesAreColliding(),e?(this.setBodyClass(La),this.spaced&&this.setBodyClass(Ha)):(this.removeBodyClass(La),this.removeBodyClass(Ha))},setBodyFixedBottomClass:function(e){this.checkIfFixedPropertiesAreColliding(),e?(this.setBodyClass(za),this.spaced&&this.setBodyClass(ja)):(this.removeBodyClass(za),this.removeBodyClass(ja))}},beforeMount:function(){this.fixedTop&&this.setBodyFixedTopClass(!0),this.fixedBottom&&this.setBodyFixedBottomClass(!0)},beforeDestroy:function(){if(this.fixedTop){var e=this.spaced?Ha:La;this.removeBodyClass(e)}else if(this.fixedBottom){var t=this.spaced?ja:za;this.removeBodyClass(t)}},render:function(e,t){return this.genNavbar(e)}},undefined,undefined,undefined,void 0,void 0),Ya=["div","span","input"];var qa=Qt({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.tag,e._g(e._b({tag:"component",staticClass:"navbar-item",class:{"is-active":e.active}},"component",e.$attrs,!1),e.$listeners),[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BNavbarItem",inheritAttrs:!1,props:{tag:{type:String,default:"a"},active:Boolean},methods:{keyPress:function(e){var t=e.key;"Escape"!==t&&"Esc"!==t||this.closeMenuRecursive(this,["NavBar"])},handleClickEvent:function(e){if(!Ya.some((function(t){return t===e.target.localName}))){var t=this.closeMenuRecursive(this,["NavbarDropdown","NavBar"]);t&&t.$data._isNavbarDropdown&&this.closeMenuRecursive(t,["NavBar"])}},closeMenuRecursive:function(e,t){return e.$parent?t.reduce((function(t,n){return e.$parent.$data["_is".concat(n)]?(e.$parent.closeMenu(),e.$parent):t}),null)||this.closeMenuRecursive(e.$parent,t):null}},mounted:function(){"undefined"!=typeof window&&(this.$el.addEventListener("click",this.handleClickEvent),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){"undefined"!=typeof window&&(this.$el.removeEventListener("click",this.handleClickEvent),document.removeEventListener("keyup",this.keyPress))}},undefined,!1,undefined,void 0,void 0);var Ua=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeMenu,expression:"closeMenu"}],staticClass:"navbar-item has-dropdown",class:{"is-hoverable":e.isHoverable,"is-active":e.newActive},on:{mouseenter:e.checkHoverable}},[n(e.tag,e._g(e._b({tag:"component",staticClass:"navbar-link",class:{"is-arrowless":e.arrowless,"is-active":e.newActive&&e.collapsible},attrs:{"aria-haspopup":"true",tabindex:"0"},on:{click:function(t){return t.preventDefault(),e.toggleMenu(t)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggleMenu(t)}}},"component",e.$attrs,!1),e.$listeners),[e.label?[e._v(e._s(e.label))]:e._t("label")],2),n("div",{staticClass:"navbar-dropdown is-hidden-touch",class:{"is-right":e.right,"is-boxed":e.boxed}},[e._t("default")],2),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsible||e.collapsible&&e.newActive,expression:"!collapsible || (collapsible && newActive)"}],staticClass:"navbar-dropdown is-hidden-desktop",class:{"is-right":e.right,"is-boxed":e.boxed}},[e._t("default")],2)],1)},staticRenderFns:[]},undefined,{name:"BNavbarDropdown",directives:{clickOutside:Va},inheritAttrs:!1,props:{label:String,hoverable:Boolean,active:Boolean,right:Boolean,arrowless:Boolean,boxed:Boolean,closeOnClick:{type:Boolean,default:!0},collapsible:Boolean,tag:{type:String,default:"a"}},data:function(){return{newActive:this.active,isHoverable:this.hoverable,_isNavbarDropdown:!0}},watch:{active:function(e){this.newActive=e},newActive:function(e){this.$emit("active-change",e)}},methods:{toggleMenu:function(){this.newActive=!this.newActive},showMenu:function(){this.newActive=!0},closeMenu:function(){this.newActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1)},checkHoverable:function(){this.hoverable&&(this.isHoverable=!0)}}},undefined,!1,undefined,void 0,void 0),Ka={install:function(e){Jt(e,Wa),Jt(e,qa),Jt(e,Ua)}};use(Ka);var Xa,Ga=Ka;var Qa=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-numberinput field",class:e.fieldClasses},[e._l(e.controlsLeft,(function(t){return n("p",{key:t,class:["control",t],on:{mouseup:e.onStopLongPress,mouseleave:e.onStopLongPress,touchend:e.onStopLongPress,touchcancel:e.onStopLongPress}},[n("button",{staticClass:"button",class:e.buttonClasses,attrs:{type:"button",disabled:e.isDisabled(t),"aria-label":"plus"===t?e.ariaPlusLabel:e.ariaMinusLabel},on:{mousedown:function(n){!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},touchstart:function(n){n.preventDefault(),!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},click:function(n){!e.isDisabled(t)&&e.onControlClick(n,"plus"===t)}}},[n("b-icon",{attrs:{both:"",icon:t,pack:e.iconPack,size:e.iconSize}})],1)])})),n("b-input",e._b({ref:"input",attrs:{type:"number",step:e.minStepNumber,max:e.max,min:e.min,size:e.size,disabled:e.disabled,readonly:!e.editable,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-pack":e.iconPack,autocomplete:e.autocomplete,expanded:e.expanded,placeholder:e.placeholder,"use-html5-validation":e.useHtml5Validation},on:{focus:function(t){return e.$emit("focus",t)},blur:function(t){return e.$emit("blur",t)}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},"b-input",e.$attrs,!1)),e._l(e.controlsRight,(function(t){return n("p",{key:t,class:["control",t],on:{mouseup:e.onStopLongPress,mouseleave:e.onStopLongPress,touchend:e.onStopLongPress,touchcancel:e.onStopLongPress}},[n("button",{staticClass:"button",class:e.buttonClasses,attrs:{type:"button",disabled:e.isDisabled(t),"aria-label":"plus"===t?e.ariaPlusLabel:e.ariaMinusLabel},on:{mousedown:function(n){!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},touchstart:function(n){n.preventDefault(),!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},click:function(n){!e.isDisabled(t)&&e.onControlClick(n,"plus"===t)}}},[n("b-icon",{attrs:{both:"",icon:t,pack:e.iconPack,size:e.iconSize}})],1)])}))],2)},staticRenderFns:[]},undefined,{name:"BNumberinput",components:(Xa={},ft(Xa,an.name,an),ft(Xa,rn.name,rn),Xa),mixins:[en],inheritAttrs:!1,props:{value:Number,min:{type:[Number,String]},max:[Number,String],step:[Number,String],minStep:[Number,String],exponential:[Boolean,Number],disabled:Boolean,type:{type:String,default:"is-primary"},editable:{type:Boolean,default:!0},controls:{type:Boolean,default:!0},controlsAlignment:{type:String,default:"center",validator:function(e){return["left","right","center"].indexOf(e)>=0}},controlsRounded:{type:Boolean,default:!1},controlsPosition:String,placeholder:[Number,String],ariaMinusLabel:String,ariaPlusLabel:String,longPress:{type:Boolean,default:!0}},data:function(){return{newValue:this.value,newStep:this.step||1,newMinStep:this.minStep,timesPressed:1,_elementRef:"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){var t=this,n=0===Number(e)?0:Number(e)||null;""!==e&&null!=e||(n=void 0!==this.minNumber?this.minNumber:null),this.newValue=n,null===n?this.$emit("input",n):isNaN(n)||"-0"===n||this.$emit("input",Number(n)),this.$nextTick((function(){t.$refs.input&&t.$refs.input.checkHtml5Validity()}))}},controlsLeft:function(){return this.controls&&"right"!==this.controlsAlignment?"left"===this.controlsAlignment?["minus","plus"]:["minus"]:[]},controlsRight:function(){return this.controls&&"left"!==this.controlsAlignment?"right"===this.controlsAlignment?["minus","plus"]:["plus"]:[]},fieldClasses:function(){return[{"has-addons":"compact"===this.controlsPosition},{"is-grouped":"compact"!==this.controlsPosition},{"is-expanded":this.expanded}]},buttonClasses:function(){return[this.type,this.size,{"is-rounded":this.controlsRounded}]},minNumber:function(){return"string"==typeof this.min?parseFloat(this.min):this.min},maxNumber:function(){return"string"==typeof this.max?parseFloat(this.max):this.max},stepNumber:function(){return"any"===this.newStep?1:"string"==typeof this.newStep?parseFloat(this.newStep):this.newStep},minStepNumber:function(){if("any"===this.newStep&&void 0===this.newMinStep)return"any";var e=void 0!==this.newMinStep?this.newMinStep:this.newStep;return"string"==typeof e?parseFloat(e):e},disabledMin:function(){return this.computedValue-this.stepNumberthis.maxNumber},stepDecimals:function(){var e=this.minStepNumber.toString(),t=e.indexOf(".");return t>=0?e.substring(t+1).length:0}},watch:{value:{immediate:!0,handler:function(e){this.newValue=e}},step:function(e){this.newStep=e},minStep:function(e){this.newMinStep=e}},methods:{isDisabled:function(e){return this.disabled||("plus"===e?this.disabledMax:this.disabledMin)},decrement:function(){if(null===this.computedValue||void 0===this.computedValue){if(null!==this.maxNumber&&void 0!==this.maxNumber)return void(this.computedValue=this.maxNumber);this.computedValue=0}if(void 0===this.minNumber||this.computedValue-this.stepNumber>=this.minNumber){var e=this.computedValue-this.stepNumber;this.computedValue=parseFloat(e.toFixed(this.stepDecimals))}},increment:function(){if(null===this.computedValue||void 0===this.computedValue){if(null!==this.minNumber&&void 0!==this.minNumber)return void(this.computedValue=this.minNumber);this.computedValue=0}if(void 0===this.maxNumber||this.computedValue+this.stepNumber<=this.maxNumber){var e=this.computedValue+this.stepNumber;this.computedValue=parseFloat(e.toFixed(this.stepDecimals))}},onControlClick:function(e,t){0===e.detail&&"click"===e.type&&(t?this.increment():this.decrement())},longPressTick:function(e){var t=this;e?this.increment():this.decrement(),this._$intervalRef=setTimeout((function(){t.longPressTick(e)}),this.exponential?250/(this.exponential*this.timesPressed++):250)},onStartLongPress:function(e,t){this.longPress&&(0!==e.button&&"touchstart"!==e.type||(clearTimeout(this._$intervalRef),this.longPressTick(t)))},onStopLongPress:function(){this._$intervalRef&&(this.timesPressed=1,clearTimeout(this._$intervalRef),this._$intervalRef=null)}}},undefined,!1,undefined,void 0,void 0),Ja={install:function(e){Jt(e,Qa)}};use(Ja);var Za=Ja;var er,nr=Qt({render:function(){var e,t=this,n=t.$createElement;return(t._self._c||n)(t.tag,t._b({tag:"component",staticClass:"pagination-link",class:(e={"is-current":t.page.isCurrent},e[t.page.class]=!0,e),attrs:{role:"button",href:t.href,disabled:t.isDisabled,"aria-label":t.page["aria-label"],"aria-current":t.page.isCurrent},on:{click:function(e){return e.preventDefault(),t.page.click(e)}}},"component",t.$attrs,!1),[t._t("default",[t._v(t._s(t.page.number))])],2)},staticRenderFns:[]},undefined,{name:"BPaginationButton",props:{page:{type:Object,required:!0},tag:{type:String,default:"a",validator:function(e){return Kt.defaultLinkTags.indexOf(e)>=0}},disabled:{type:Boolean,default:!1}},computed:{href:function(){if("a"===this.tag)return"#"},isDisabled:function(){return this.disabled||this.page.disabled}}},undefined,!1,undefined,void 0,void 0);function ir(e,t,n){var r;return function(){var o=this,l=arguments,c=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(o,l)}),t),c&&e.apply(o,l)}}var ar={name:"BPagination",components:(er={},ft(er,an.name,an),ft(er,nr.name,nr),er),model:{prop:"current",event:"update:current"},props:{total:[Number,String],perPage:{type:[Number,String],default:20},current:{type:[Number,String],default:1},rangeBefore:{type:[Number,String],default:1},rangeAfter:{type:[Number,String],default:1},size:String,simple:Boolean,rounded:Boolean,order:String,iconPack:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,pageInput:{type:Boolean,default:!1},pageInputPosition:String,debouncePageInput:[Number,String]},data:function(){return{inputValue:this.current}},computed:{rootClasses:function(){return[this.order,this.size,this.pageInputPosition,{"is-simple":this.simple,"is-rounded":this.rounded,"has-input":this.pageInput}]},beforeCurrent:function(){return parseInt(this.rangeBefore)},afterCurrent:function(){return parseInt(this.rangeAfter)},pageCount:function(){return Math.ceil(this.total/this.perPage)},firstItem:function(){var e=this.current*this.perPage-this.perPage+1;return e>=0?e:0},hasPrev:function(){return this.current>1},hasFirst:function(){return this.current>=2+this.beforeCurrent},hasFirstEllipsis:function(){return this.current>=this.beforeCurrent+4},hasLast:function(){return this.current<=this.pageCount-(1+this.afterCurrent)},hasLastEllipsis:function(){return this.currente&&this.last()},current:function(e){this.inputValue=e},debouncePageInput:{handler:function(e){this.debounceHandlePageInput=ir(this.handleOnInputPageChange,e)},immediate:!0}},methods:{prev:function(e){this.changePage(this.current-1,e)},next:function(e){this.changePage(this.current+1,e)},first:function(e){this.changePage(1,e)},last:function(e){this.changePage(this.pageCount,e)},changePage:function(e,t){this.current===e||e<1||e>this.pageCount||(this.$emit("update:current",e),this.$emit("change",e),t&&t.target&&this.$nextTick((function(){return t.target.focus()})))},getPage:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{number:e,isCurrent:this.current===e,click:function(n){return t.changePage(e,n)},input:function(e,n){return t.changePage(+n,e)},disabled:n.disabled||!1,class:n.class||"","aria-label":n["aria-label"]||this.getAriaPageLabel(e,this.current===e)}},getAriaPageLabel:function(e,t){return!this.ariaPageLabel||t&&this.ariaCurrentLabel?this.ariaPageLabel&&t&&this.ariaCurrentLabel?this.ariaCurrentLabel+", "+this.ariaPageLabel+" "+e+".":null:this.ariaPageLabel+" "+e+"."},handleOnInputPageChange:function(e){this.getPage(this.inputValue).input(e,this.inputValue)},handleOnInputDebounce:function(e){this.debouncePageInput?this.debounceHandlePageInput(e):this.handleOnInputPageChange(e)},handleOnKeyPress:function(e){var t=e.which||e.keyCode;return t>=48&&t<=57||e.preventDefault()},handleAllowableInputPageRange:function(e){+e.target.value>0&&+e.target.value<=this.pageCount?this.handleOnInputValue(e):(this.inputValue=1,this.inputValue="")},handleOnInputValue:function(e){var t=+e.target.value;this.inputValue=t,Number.isInteger(this.inputValue)?this.handleOnInputDebounce(e):this.inputValue=this.current}}};var rr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{staticClass:"pagination",class:e.rootClasses},[e.$scopedSlots.previous?e._t("previous",[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"}})],{page:e.getPage(e.current-1,{disabled:!e.hasPrev,class:"pagination-previous","aria-label":e.ariaPreviousLabel})}):n("BPaginationButton",{staticClass:"pagination-previous",attrs:{disabled:!e.hasPrev,page:e.getPage(e.current-1),"aria-label":e.ariaPreviousLabel}},[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"}})],1),e.$scopedSlots.next?e._t("next",[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"}})],{page:e.getPage(e.current+1,{disabled:!e.hasNext,class:"pagination-next","aria-label":e.ariaNextLabel})}):n("BPaginationButton",{staticClass:"pagination-next",attrs:{disabled:!e.hasNext,page:e.getPage(e.current+1),"aria-label":e.ariaNextLabel}},[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"}})],1),n("div",{staticClass:"control pagination-input"},[e.pageInput?n("input",{staticClass:"input",attrs:{size:e.pageCount.toString().length,maxlength:e.pageCount.toString().length},domProps:{value:e.inputValue},on:{input:e.handleAllowableInputPageRange,keypress:e.handleOnKeyPress}}):e._e()]),e.simple?n("small",{staticClass:"info"},[1==e.perPage?[e._v(" "+e._s(e.firstItem)+" / "+e._s(e.total)+" ")]:[e._v(" "+e._s(e.firstItem)+"-"+e._s(Math.min(e.current*e.perPage,e.total))+" / "+e._s(e.total)+" ")]],2):n("ul",{staticClass:"pagination-list"},[e.hasFirst?n("li",[e.$scopedSlots.default?e._t("default",null,{page:e.getPage(1)}):n("BPaginationButton",{attrs:{page:e.getPage(1)}})],2):e._e(),e.hasFirstEllipsis?n("li",[n("span",{staticClass:"pagination-ellipsis"},[e._v("…")])]):e._e(),e._l(e.pagesInRange,(function(t){return n("li",{key:t.number},[e.$scopedSlots.default?e._t("default",null,{page:t}):n("BPaginationButton",{attrs:{page:t}})],2)})),e.hasLastEllipsis?n("li",[n("span",{staticClass:"pagination-ellipsis"},[e._v("…")])]):e._e(),e.hasLast?n("li",[e.$scopedSlots.default?e._t("default",null,{page:e.getPage(e.pageCount)}):n("BPaginationButton",{attrs:{page:e.getPage(e.pageCount)}})],2):e._e()],2)],2)},staticRenderFns:[]},undefined,ar,undefined,!1,undefined,void 0,void 0),sr={install:function(e){Jt(e,rr),Jt(e,nr)}};use(sr);var or=sr;var lr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"progress-wrapper",class:[e.wrapperClasses,{"is-squared":!e.rounded}]},[e.isNative?n("progress",{ref:"progress",staticClass:"progress",class:[e.newType,{"is-squared":!e.rounded}],attrs:{max:e.max},domProps:{value:e.value}},[e._v(e._s(e.newValue))]):e._t("bar"),e.isNative&&e.showValue?n("p",{staticClass:"progress-value"},[e._t("default",[e._v(e._s(e.newValue))])],2):e._e()],2)},staticRenderFns:[]},undefined,{name:"BProgress",mixins:[gn("progress")],props:{type:{type:[String,Object],default:"is-darkgrey"},size:String,rounded:{type:Boolean,default:!0},value:{type:Number,default:void 0},max:{type:Number,default:100},showValue:{type:Boolean,default:!1},format:{type:String,default:"raw",validator:function(e){return["raw","percent"].indexOf(e)>=0}},precision:{type:Number,default:2},keepTrailingZeroes:{type:Boolean,default:!1},locale:{type:[String,Array],default:function(){return Kt.defaultLocale}}},computed:{isIndeterminate:function(){return void 0===this.value||null===this.value},newType:function(){return[this.size,this.type,{"is-more-than-half":this.value&&this.value>this.max/2}]},newValue:function(){return this.calculateValue(this.value)},isNative:function(){return void 0===this.$slots.bar},wrapperClasses:function(){return ft({"is-not-native":!this.isNative},this.size,"string"==typeof this.size&&!this.isNative)}},watch:{isIndeterminate:function(e){var t=this;this.$nextTick((function(){t.$refs.progress&&(e?t.$refs.progress.removeAttribute("value"):t.$refs.progress.setAttribute("value",t.value))}))}},methods:{calculateValue:function(e){if(null!=e&&!isNaN(e)){var t=this.keepTrailingZeroes?this.precision:0,n=this.precision;return"percent"===this.format?new Intl.NumberFormat(this.locale,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:n}).format(e/this.max):new Intl.NumberFormat(this.locale,{minimumFractionDigits:t,maximumFractionDigits:n}).format(e)}}}},undefined,!1,undefined,void 0,void 0);var ur=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"progress-bar",class:e.newType,style:{width:e.barWidth},attrs:{role:"progressbar","aria-valuenow":e.value,"aria-valuemax":e.parent.max,"aria-valuemin":"0"}},[e.newShowValue?n("p",{staticClass:"progress-value"},[e._t("default",[e._v(e._s(e.newValue))])],2):e._e()])},staticRenderFns:[]},undefined,{name:"BProgressBar",mixins:[bn("progress")],props:{type:{type:[String,Object],default:void 0},value:{type:Number,default:void 0},showValue:{type:Boolean,default:!1}},computed:{newType:function(){return[this.parent.size,this.type||this.parent.type]},newShowValue:function(){return this.showValue||this.parent.showValue},newValue:function(){return this.parent.calculateValue(this.value)},barWidth:function(){return"".concat(100*this.value/this.parent.max,"%")}}},undefined,!1,undefined,void 0,void 0),cr={install:function(e){Jt(e,lr),Jt(e,ur)}};use(cr);var progress=cr;var dr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{ref:"label",staticClass:"b-radio radio",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())}}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"radio",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:e._q(e.computedValue,e.nativeValue)},on:{click:function(e){e.stopPropagation()},change:function(t){e.computedValue=e.nativeValue}}}),n("span",{staticClass:"check",class:e.type}),n("span",{staticClass:"control-label"},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BRadio",mixins:[Pn]},undefined,!1,undefined,void 0,void 0);var fr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:{"is-expanded":e.expanded}},[n("label",{ref:"label",staticClass:"b-radio radio button",class:e.labelClass,attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())}}},[e._t("default"),n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"radio",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:e._q(e.computedValue,e.nativeValue)},on:{click:function(e){e.stopPropagation()},focus:function(t){e.isFocused=!0},blur:function(t){e.isFocused=!1},change:function(t){e.computedValue=e.nativeValue}}})],2)])},staticRenderFns:[]},undefined,{name:"BRadioButton",mixins:[Pn],props:{type:{type:String,default:"is-primary"},expanded:Boolean},data:function(){return{isFocused:!1}},computed:{isSelected:function(){return this.newValue===this.nativeValue},labelClass:function(){return[this.isSelected?this.type:null,this.size,{"is-selected":this.isSelected,"is-disabled":this.disabled,"is-focused":this.isFocused}]}}},undefined,!1,undefined,void 0,void 0),pr={install:function(e){Jt(e,dr),Jt(e,fr)}};use(pr);var mr=pr;var vr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rate",class:{"is-disabled":e.disabled,"is-spaced":e.spaced,"is-rtl":e.rtl}},[e._l(e.max,(function(t,r){return n("div",{key:r,staticClass:"rate-item",class:e.rateClass(t),on:{mousemove:function(n){return e.previewRate(t,n)},mouseleave:e.resetNewValue,click:function(n){return n.preventDefault(),e.confirmValue(t)}}},[n("b-icon",{attrs:{pack:e.iconPack,icon:e.icon,size:e.size}}),e.checkHalf(t)?n("b-icon",{staticClass:"is-half",style:e.halfStyle,attrs:{pack:e.iconPack,icon:e.icon,size:e.size}}):e._e()],1)})),e.showText||e.showScore||e.customText?n("div",{staticClass:"rate-text",class:e.size},[n("span",[e._v(e._s(e.showMe))]),e.customText&&!e.showText?n("span",[e._v(e._s(e.customText))]):e._e()]):e._e()],2)},staticRenderFns:[]},undefined,{name:"BRate",components:ft({},an.name,an),props:{value:{type:Number,default:0},max:{type:Number,default:5},icon:{type:String,default:"star"},iconPack:String,size:String,spaced:Boolean,rtl:Boolean,disabled:Boolean,showScore:Boolean,showText:Boolean,customText:String,texts:Array,locale:{type:[String,Array],default:function(){return Kt.defaultLocale}}},data:function(){return{newValue:this.value,hoverValue:0}},computed:{halfStyle:function(){return"width:".concat(this.valueDecimal,"%")},showMe:function(){var e="";return this.showScore?e=0===(e=this.disabled?this.value:this.newValue)?"":new Intl.NumberFormat(this.locale).format(this.value):this.showText&&(e=this.texts[Math.ceil(this.newValue)-1]),e},valueDecimal:function(){return 100*this.value-100*Math.floor(this.value)}},watch:{value:function(e){this.newValue=e}},methods:{resetNewValue:function(){this.disabled||(this.hoverValue=0)},previewRate:function(e,t){this.disabled||(this.hoverValue=e,t.stopPropagation())},confirmValue:function(e){this.disabled||(this.newValue=e,this.$emit("change",this.newValue),this.$emit("input",this.newValue))},checkHalf:function(e){return this.disabled&&this.valueDecimal>0&&e-1this.value},rateClass:function(e){var output="";return e<=(0!==this.hoverValue?this.hoverValue:this.newValue)?output="set-on":this.disabled&&Math.ceil(this.value)===e&&(output="set-half"),output}}},undefined,!1,undefined,void 0,void 0),gr={install:function(e){Jt(e,vr)}};use(gr);var yr=gr,wr={install:function(e){Jt(e,ni)}};use(wr);var kr=wr;var Sr=Qt({},undefined,{name:"BSkeleton",functional:!0,props:{active:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:[Number,String],height:[Number,String],circle:Boolean,rounded:{type:Boolean,default:!0},count:{type:Number,default:1},position:{type:String,default:"",validator:function(e){return["","is-centered","is-right"].indexOf(e)>-1}},size:String},render:function(e,t){if(t.props.active){for(var n=[],r=t.props.width,o=t.props.height,i=0;i=0}},fullheight:Boolean,fullwidth:Boolean,right:Boolean,mobile:{type:String},reduce:Boolean,expandOnHover:Boolean,expandOnHoverFixed:Boolean,delay:{type:Number,default:function(){return Kt.defaultSidebarDelay}},canCancel:{type:[Array,Boolean],default:function(){return["escape","outside"]}},onCancel:{type:Function,default:function(){}},scroll:{type:String,default:function(){return Kt.defaultModalScroll?Kt.defaultModalScroll:"clip"},validator:function(e){return["clip","keep"].indexOf(e)>=0}}},data:function(){return{isOpen:this.open,isDelayOver:!1,transitionName:null,animating:!0,savedScrollTop:null,hasLeaved:!1}},computed:{rootClasses:function(){return[this.type,{"is-fixed":this.isFixed,"is-static":this.isStatic,"is-absolute":this.isAbsolute,"is-fullheight":this.fullheight,"is-fullwidth":this.fullwidth,"is-right":this.right,"is-mini":this.reduce&&!this.isDelayOver,"is-mini-expand":this.expandOnHover||this.isDelayOver,"is-mini-expand-fixed":this.expandOnHover&&this.expandOnHoverFixed||this.isDelayOver,"is-mini-delayed":null!==this.delay,"is-mini-mobile":"reduce"===this.mobile,"is-hidden-mobile":"hide"===this.mobile,"is-fullwidth-mobile":"fullwidth"===this.mobile}]},cancelOptions:function(){return"boolean"==typeof this.canCancel?this.canCancel?["escape","outside"]:[]:this.canCancel},isStatic:function(){return"static"===this.position},isFixed:function(){return"fixed"===this.position},isAbsolute:function(){return"absolute"===this.position}},watch:{open:{handler:function(e){this.isOpen=e,this.overlay&&this.handleScroll();var t=this.right?!e:e;this.transitionName=t?"slide-next":"slide-prev"},immediate:!0}},methods:{keyPress:function(e){var t=e.key;this.isFixed&&(!this.isOpen||"Escape"!==t&&"Esc"!==t||this.cancel("escape"))},cancel:function(e){this.cancelOptions.indexOf(e)<0||this.isStatic||(this.onCancel.apply(null,arguments),this.close())},close:function(){this.isOpen=!1,this.$emit("close"),this.$emit("update:open",!1)},clickedOutside:function(e){this.isFixed&&this.isOpen&&!this.animating&&(e.composedPath().includes(this.$refs.sidebarContent)||this.cancel("outside"))},beforeEnter:function(){this.animating=!0},afterEnter:function(){this.animating=!1},handleScroll:function(){"undefined"!=typeof window&&("clip"!==this.scroll?(this.savedScrollTop=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop,this.open?document.body.classList.add("is-noscroll"):document.body.classList.remove("is-noscroll"),this.open?document.body.style.top="-".concat(this.savedScrollTop,"px"):(document.documentElement.scrollTop=this.savedScrollTop,document.body.style.top=null,this.savedScrollTop=null)):this.open?document.documentElement.classList.add("is-clipped"):document.documentElement.classList.remove("is-clipped"))},onHover:function(){var e=this;this.delay?(this.hasLeaved=!1,this.timer=setTimeout((function(){e.hasLeaved||(e.isDelayOver=!0),e.timer=null}),this.delay)):this.isDelayOver=!1},onHoverLeave:function(){this.hasLeaved=!0,this.timer=null,this.isDelayOver=!1}},created:function(){"undefined"!=typeof window&&(document.addEventListener("keyup",this.keyPress),document.addEventListener("click",this.clickedOutside))},mounted:function(){"undefined"!=typeof window&&this.isFixed&&document.body.appendChild(this.$el),this.overlay&&this.open&&this.handleScroll()},beforeDestroy:function(){if("undefined"!=typeof window&&(document.removeEventListener("keyup",this.keyPress),document.removeEventListener("click",this.clickedOutside),this.overlay)){document.documentElement.classList.remove("is-clipped");var e=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop;document.body.classList.remove("is-noscroll"),document.documentElement.scrollTop=e,document.body.style.top=null}this.isFixed&&Et(this.$el)}};var _r=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-sidebar"},[e.overlay&&e.isOpen?n("div",{staticClass:"sidebar-background"}):e._e(),n("transition",{attrs:{name:e.transitionName},on:{"before-enter":e.beforeEnter,"after-enter":e.afterEnter}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],ref:"sidebarContent",staticClass:"sidebar-content",class:e.rootClasses,on:{mouseenter:e.onHover,mouseleave:e.onHoverLeave}},[e._t("default")],2)])],1)},staticRenderFns:[]},undefined,Dr,undefined,!1,undefined,void 0,void 0),$r={install:function(e){Jt(e,_r)}};use($r);var Pr=$r;var Mr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-slider-thumb-wrapper",class:{"is-dragging":e.dragging,"has-indicator":e.indicator},style:e.wrapperStyle},[n("b-tooltip",{attrs:{label:e.formattedValue,type:e.type,always:e.dragging||e.isFocused||e.tooltipAlways,active:!e.disabled&&e.tooltip}},[n("div",e._b({staticClass:"b-slider-thumb",attrs:{tabindex:!e.disabled&&0},on:{mousedown:e.onButtonDown,touchstart:e.onButtonDown,focus:e.onFocus,blur:e.onBlur,keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&0!==t.button?null:(t.preventDefault(),e.onLeftKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])||"button"in t&&2!==t.button?null:(t.preventDefault(),e.onRightKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.onLeftKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.onRightKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"home",void 0,t.key,void 0)?null:(t.preventDefault(),e.onHomeKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"end",void 0,t.key,void 0)?null:(t.preventDefault(),e.onEndKeyDown(t))}]}},"div",e.$attrs,!1),[e.indicator?n("span",[e._v(e._s(e.formattedValue))]):e._e()])])],1)},staticRenderFns:[]},undefined,{name:"BSliderThumb",components:ft({},ii.name,ii),inheritAttrs:!1,props:{value:{type:Number,default:0},type:{type:String,default:""},tooltip:{type:Boolean,default:!0},indicator:{type:Boolean,default:!1},customFormatter:Function,format:{type:String,default:"raw",validator:function(e){return["raw","percent"].indexOf(e)>=0}},locale:{type:[String,Array],default:function(){return Kt.defaultLocale}},tooltipAlways:{type:Boolean,default:!1}},data:function(){return{isFocused:!1,dragging:!1,startX:0,startPosition:0,newPosition:null,oldValue:this.value}},computed:{disabled:function(){return this.$parent.disabled},max:function(){return this.$parent.max},min:function(){return this.$parent.min},step:function(){return this.$parent.step},precision:function(){return this.$parent.precision},currentPosition:function(){return"".concat((this.value-this.min)/(this.max-this.min)*100,"%")},wrapperStyle:function(){return{left:this.currentPosition}},formattedValue:function(){return void 0!==this.customFormatter?this.customFormatter(this.value):"percent"===this.format?new Intl.NumberFormat(this.locale,{style:"percent"}).format((this.value-this.min)/(this.max-this.min)):new Intl.NumberFormat(this.locale).format(this.value)}},methods:{onFocus:function(){this.isFocused=!0},onBlur:function(){this.isFocused=!1},onButtonDown:function(e){this.disabled||(e.preventDefault(),this.onDragStart(e),"undefined"!=typeof window&&(document.addEventListener("mousemove",this.onDragging),document.addEventListener("touchmove",this.onDragging),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchend",this.onDragEnd),document.addEventListener("contextmenu",this.onDragEnd)))},onLeftKeyDown:function(){this.disabled||this.value===this.min||(this.newPosition=parseFloat(this.currentPosition)-this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onRightKeyDown:function(){this.disabled||this.value===this.max||(this.newPosition=parseFloat(this.currentPosition)+this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onHomeKeyDown:function(){this.disabled||this.value===this.min||(this.newPosition=0,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onEndKeyDown:function(){this.disabled||this.value===this.max||(this.newPosition=100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onDragStart:function(e){this.dragging=!0,this.$emit("dragstart"),"touchstart"===e.type&&(e.clientX=e.touches[0].clientX),this.startX=e.clientX,this.startPosition=parseFloat(this.currentPosition),this.newPosition=this.startPosition},onDragging:function(e){if(this.dragging){"touchmove"===e.type&&(e.clientX=e.touches[0].clientX);var t=(e.clientX-this.startX)/this.$parent.sliderSize()*100;this.newPosition=this.startPosition+t,this.setPosition(this.newPosition)}},onDragEnd:function(){this.dragging=!1,this.$emit("dragend"),this.value!==this.oldValue&&this.$parent.emitValue("change"),this.setPosition(this.newPosition),"undefined"!=typeof window&&(document.removeEventListener("mousemove",this.onDragging),document.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd),document.removeEventListener("contextmenu",this.onDragEnd))},setPosition:function(e){if(null!==e&&!isNaN(e)){e<0?e=0:e>100&&(e=100);var t=100/((this.max-this.min)/this.step),n=Math.round(e/t)*t/100*(this.max-this.min)+this.min;n=parseFloat(n.toFixed(this.precision)),this.$emit("input",n),this.dragging||n===this.oldValue||(this.oldValue=n)}}}},undefined,!1,undefined,void 0,void 0);var Or,Ar=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-slider-tick",class:{"is-tick-hidden":e.hidden},style:e.getTickStyle(e.position)},[e.$slots.default?n("span",{staticClass:"b-slider-tick-label"},[e._t("default")],2):e._e()])},staticRenderFns:[]},undefined,{name:"BSliderTick",props:{value:{type:Number,default:0}},computed:{position:function(){var e=(this.value-this.$parent.min)/(this.$parent.max-this.$parent.min)*100;return e>=0&&e<=100?e:0},hidden:function(){return this.value===this.$parent.min||this.value===this.$parent.max}},methods:{getTickStyle:function(e){return{left:e+"%"}}},created:function(){if(!this.$parent.$data._isSlider)throw this.$destroy(),new Error("You should wrap bSliderTick on a bSlider")}},undefined,!1,undefined,void 0,void 0);var Tr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-slider",class:[e.size,e.type,e.rootClasses],on:{click:e.onSliderClick}},[n("div",{ref:"slider",staticClass:"b-slider-track"},[n("div",{staticClass:"b-slider-fill",style:e.barStyle}),e.ticks?e._l(e.tickValues,(function(e,t){return n("b-slider-tick",{key:t,attrs:{value:e}})})):e._e(),e._t("default"),n("b-slider-thumb",{ref:"button1",attrs:{"tooltip-always":e.tooltipAlways,type:e.newTooltipType,tooltip:e.tooltip,"custom-formatter":e.customFormatter,indicator:e.indicator,format:e.format,locale:e.locale,role:"slider","aria-valuenow":e.value1,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-orientation":"horizontal","aria-label":Array.isArray(e.ariaLabel)?e.ariaLabel[0]:e.ariaLabel,"aria-disabled":e.disabled},on:{dragstart:e.onDragStart,dragend:e.onDragEnd},model:{value:e.value1,callback:function(t){e.value1=t},expression:"value1"}}),e.isRange?n("b-slider-thumb",{ref:"button2",attrs:{"tooltip-always":e.tooltipAlways,type:e.newTooltipType,tooltip:e.tooltip,"custom-formatter":e.customFormatter,indicator:e.indicator,format:e.format,locale:e.locale,role:"slider","aria-valuenow":e.value2,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-orientation":"horizontal","aria-label":Array.isArray(e.ariaLabel)?e.ariaLabel[1]:"","aria-disabled":e.disabled},on:{dragstart:e.onDragStart,dragend:e.onDragEnd},model:{value:e.value2,callback:function(t){e.value2=t},expression:"value2"}}):e._e()],2)])},staticRenderFns:[]},undefined,{name:"BSlider",components:(Or={},ft(Or,Mr.name,Mr),ft(Or,Ar.name,Ar),Or),props:{value:{type:[Number,Array],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},type:{type:String,default:"is-primary"},size:String,ticks:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!0},tooltipType:String,rounded:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},customFormatter:Function,ariaLabel:[String,Array],biggerSliderFocus:{type:Boolean,default:!1},indicator:{type:Boolean,default:!1},format:{type:String,default:"raw",validator:function(e){return["raw","percent"].indexOf(e)>=0}},locale:{type:[String,Array],default:function(){return Kt.defaultLocale}},tooltipAlways:{type:Boolean,default:!1}},data:function(){return{value1:null,value2:null,dragging:!1,isRange:!1,_isSlider:!0}},computed:{newTooltipType:function(){return this.tooltipType?this.tooltipType:this.type},tickValues:function(){if(!this.ticks||this.min>this.max||0===this.step)return[];for(var e=[],i=this.min+this.step;ithis.max))if(Array.isArray(e)){this.isRange=!0;var t="number"!=typeof e[0]||isNaN(e[0])?this.min:At(e[0],this.min,this.max),n="number"!=typeof e[1]||isNaN(e[1])?this.max:At(e[1],this.min,this.max);this.value1=this.isThumbReversed?n:t,this.value2=this.isThumbReversed?t:n}else this.isRange=!1,this.value1=isNaN(e)?this.min:At(e,this.min,this.max),this.value2=null},onInternalValueUpdate:function(){this.isRange&&(this.isThumbReversed=this.value1>this.value2),this.lazy&&this.dragging||this.emitValue("input"),this.dragging&&this.emitValue("dragging")},sliderSize:function(){return this.$refs.slider.getBoundingClientRect().width},onSliderClick:function(e){if(!this.disabled&&!this.isTrackClickDisabled){var t=this.$refs.slider.getBoundingClientRect().left,n=(e.clientX-t)/this.sliderSize()*100,r=this.min+n*(this.max-this.min)/100,o=Math.abs(r-this.value1);if(this.isRange){var l=Math.abs(r-this.value2);if(o<=l){if(o1&&void 0!==arguments[1]&&arguments[1],n=null,r=e+1;r1&&void 0!==arguments[1]&&arguments[1],n=null,r=e-1;r>=0;r--){var o=this.items[r];if(o.visible&&(!t||t&&!o.disabled)){n=r;break}}return n}}}},zr=function(e){return{mixins:[bn(e,1)],props:{label:String,icon:String,iconPack:String,visible:{type:Boolean,default:!0},value:{type:String,default:function(){return this._uid.toString()}},headerClass:{type:[String,Array,Object],default:null}},data:function(){return{transitionName:null,elementClass:"item",elementRole:null}},computed:{isActive:function(){return this.parent.activeItem===this}},methods:{activate:function(e){this.transitionName=this.indext.index}]},[n("a",{staticClass:"step-link",class:{"is-clickable":e.isItemClickable(t)},on:{click:function(n){e.isItemClickable(t)&&e.childClick(t)}}},[n("div",{staticClass:"step-marker"},[t.icon?n("b-icon",{attrs:{icon:t.icon,pack:t.iconPack,size:e.size}}):t.step?n("span",[e._v(e._s(t.step))]):e._e()],1),n("div",{staticClass:"step-details"},[n("span",{staticClass:"step-title"},[e._v(e._s(t.label))])])])])})),0)]),n("section",{staticClass:"step-content",class:{"is-transitioning":e.isTransitioning}},[e._t("default")],2),e._t("navigation",[e.hasNavigation?n("nav",{staticClass:"step-navigation"},[n("a",{staticClass:"pagination-previous",attrs:{role:"button",disabled:e.navigationProps.previous.disabled,"aria-label":e.ariaPreviousLabel},on:{click:function(t){return t.preventDefault(),e.navigationProps.previous.action(t)}}},[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"}})],1),n("a",{staticClass:"pagination-next",attrs:{role:"button",disabled:e.navigationProps.next.disabled,"aria-label":e.ariaNextLabel},on:{click:function(t){return t.preventDefault(),e.navigationProps.next.action(t)}}},[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"}})],1)]):e._e()],{previous:e.navigationProps.previous,next:e.navigationProps.next})],2)},staticRenderFns:[]},undefined,{name:"BSteps",components:ft({},an.name,an),mixins:[Hr("step")],props:{type:[String,Object],iconPack:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},hasNavigation:{type:Boolean,default:!0},labelPosition:{type:String,validator:function(e){return["bottom","right","left"].indexOf(e)>-1},default:"bottom"},rounded:{type:Boolean,default:!0},mobileMode:{type:String,validator:function(e){return["minimalist","compact"].indexOf(e)>-1},default:"minimalist"},ariaNextLabel:String,ariaPreviousLabel:String},computed:{activeItem:function(){var e=this;return this.childItems.filter((function(i){return i.value===e.activeId}))[0]||this.items[0]},wrapperClasses:function(){return[this.size,ft({"is-vertical":this.vertical},this.position,this.position&&this.vertical)]},mainClasses:function(){return[this.type,ft({"has-label-right":"right"===this.labelPosition,"has-label-left":"left"===this.labelPosition,"is-animated":this.animated,"is-rounded":this.rounded},"mobile-".concat(this.mobileMode),null!==this.mobileMode)]},hasPrev:function(){return null!==this.prevItemIdx},nextItemIdx:function(){var e=this.activeItem?this.items.indexOf(this.activeItem):0;return this.getNextItemIdx(e)},nextItem:function(){var e=null;return null!==this.nextItemIdx&&(e=this.items[this.nextItemIdx]),e},prevItemIdx:function(){if(!this.activeItem)return null;var e=this.items.indexOf(this.activeItem);return this.getPrevItemIdx(e)},prevItem:function(){if(!this.activeItem)return null;var e=null;return null!==this.prevItemIdx&&(e=this.items[this.prevItemIdx]),e},hasNext:function(){return null!==this.nextItemIdx},navigationProps:function(){return{previous:{disabled:!this.hasPrev,action:this.prev},next:{disabled:!this.hasNext,action:this.next}}}},methods:{isItemClickable:function(e){return void 0===e.clickable?e.index-1:e._q(e.computedValue,e.trueValue)},on:{click:function(e){e.stopPropagation()},change:function(t){var n=e.computedValue,r=t.target,o=r.checked?e.trueValue:e.falseValue;if(Array.isArray(n)){var l=e.nativeValue,c=e._i(n,l);r.checked?c<0&&(e.computedValue=n.concat([l])):c>-1&&(e.computedValue=n.slice(0,c).concat(n.slice(c+1)))}else e.computedValue=o}}}),n("span",{staticClass:"check",class:e.checkClasses}),e.showControlLabel?n("span",{staticClass:"control-label",attrs:{id:e.ariaLabelledby}},[e._t("default")],2):e._e()])},staticRenderFns:[]},undefined,{name:"BSwitch",props:{value:[String,Number,Boolean,Function,Object,Array,Date],nativeValue:[String,Number,Boolean,Function,Object,Array,Date],disabled:Boolean,type:String,passiveType:String,name:String,required:Boolean,size:String,ariaLabelledby:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!1},rounded:{type:Boolean,default:function(){return Kt.defaultSwitchRounded}},outlined:{type:Boolean,default:!1},leftLabel:{type:Boolean,default:!1}},data:function(){return{newValue:this.value,isMouseDown:!1}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}},newClass:function(){return[this.size,{"is-disabled":this.disabled,"is-rounded":this.rounded,"is-outlined":this.outlined,"has-left-label":this.leftLabel}]},checkClasses:function(){return[{"is-elastic":this.isMouseDown&&!this.disabled},this.passiveType&&"".concat(this.passiveType,"-passive"),this.type]},showControlLabel:function(){return!!this.$slots.default}},watch:{value:function(e){this.newValue=e}},methods:{focus:function(){this.$refs.input.focus()}}},undefined,!1,undefined,void 0,void 0),Kr={install:function(e){Jt(e,Ur)}};use(Kr);var Xr,Gr=Kr;var Qr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"field table-mobile-sort"},[n("div",{staticClass:"field has-addons"},[e.sortMultiple?n("b-select",{attrs:{expanded:""},model:{value:e.sortMultipleSelect,callback:function(t){e.sortMultipleSelect=t},expression:"sortMultipleSelect"}},e._l(e.columns,(function(t,r){return t.sortable?n("option",{key:r,domProps:{value:t}},[e._v(" "+e._s(e.getLabel(t))+" "),e.getSortingObjectOfColumn(t)?[e.columnIsDesc(t)?[e._v(" ↓ ")]:[e._v(" ↑ ")]]:e._e()],2):e._e()})),0):n("b-select",{attrs:{expanded:""},model:{value:e.mobileSort,callback:function(t){e.mobileSort=t},expression:"mobileSort"}},[e.placeholder?[n("option",{directives:[{name:"show",rawName:"v-show",value:e.showPlaceholder,expression:"showPlaceholder"}],attrs:{selected:"",disabled:"",hidden:""},domProps:{value:{}}},[e._v(" "+e._s(e.placeholder)+" ")])]:e._e(),e._l(e.columns,(function(t,r){return t.sortable?n("option",{key:r,domProps:{value:t}},[e._v(" "+e._s(t.label)+" ")]):e._e()}))],2),n("div",{staticClass:"control"},[e.sortMultiple&&e.sortMultipleData.length>0?[n("button",{staticClass:"button is-primary",on:{click:e.sort}},[n("b-icon",{class:{"is-desc":e.columnIsDesc(e.sortMultipleSelect)},attrs:{icon:e.sortIcon,pack:e.iconPack,size:e.sortIconSize,both:""}})],1),n("button",{staticClass:"button is-primary",on:{click:e.removePriority}},[n("b-icon",{attrs:{icon:"delete",size:e.sortIconSize,both:""}})],1)]:e.sortMultiple?e._e():n("button",{staticClass:"button is-primary",on:{click:e.sort}},[n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.currentSortColumn===e.mobileSort,expression:"currentSortColumn === mobileSort"}],class:{"is-desc":!e.isAsc},attrs:{icon:e.sortIcon,pack:e.iconPack,size:e.sortIconSize,both:""}})],1)],2)],1)])},staticRenderFns:[]},undefined,{name:"BTableMobileSort",components:(Xr={},ft(Xr,ni.name,ni),ft(Xr,an.name,an),Xr),props:{currentSortColumn:Object,sortMultipleData:Array,isAsc:Boolean,columns:Array,placeholder:String,iconPack:String,sortIcon:{type:String,default:"arrow-up"},sortIconSize:{type:String,default:"is-small"},sortMultiple:{type:Boolean,default:!1}},data:function(){return{sortMultipleSelect:"",mobileSort:this.currentSortColumn,defaultEvent:{shiftKey:!0,altKey:!0,ctrlKey:!0},ignoreSort:!1}},computed:{showPlaceholder:function(){var e=this;return!this.columns||!this.columns.some((function(t){return t===e.mobileSort}))}},watch:{sortMultipleSelect:function(e){this.ignoreSort?this.ignoreSort=!1:this.$emit("sort",e,this.defaultEvent)},mobileSort:function(e){this.currentSortColumn!==e&&this.$emit("sort",e,this.defaultEvent)},currentSortColumn:function(e){this.mobileSort=e}},methods:{removePriority:function(){var e=this;this.$emit("removePriority",this.sortMultipleSelect),this.ignoreSort=!0;var t=this.sortMultipleData.filter((function(data){return data.field!==e.sortMultipleSelect.field})).map((function(data){return data.field}));this.sortMultipleSelect=this.columns.filter((function(e){return t.includes(e.field)}))[0]},getSortingObjectOfColumn:function(e){return this.sortMultipleData.filter((function(i){return i.field===e.field}))[0]},columnIsDesc:function(e){var t=this.getSortingObjectOfColumn(e);return!t||!(!t.order||"desc"!==t.order)},getLabel:function(e){var t=this.getSortingObjectOfColumn(e);return t?e.label+"("+(this.sortMultipleData.indexOf(t)+1)+")":e.label},sort:function(){this.$emit("sort",this.sortMultiple?this.sortMultipleSelect:this.mobileSort,this.defaultEvent)}}},undefined,!1,undefined,void 0,void 0);var Jr=Qt({},undefined,{name:"BTableColumn",inject:{$table:{name:"$table",default:!1}},props:{label:String,customKey:[String,Number],field:String,meta:[String,Number,Boolean,Function,Object,Array],width:[Number,String],numeric:Boolean,centered:Boolean,searchable:Boolean,sortable:Boolean,visible:{type:Boolean,default:!0},subheading:[String,Number],customSort:Function,customSearch:Function,sticky:Boolean,headerSelectable:Boolean,headerClass:String,cellClass:String,thAttrs:{type:Function,default:function(){return{}}},tdAttrs:{type:Function,default:function(){return{}}}},data:function(){return{newKey:this.customKey||this.label,_isTableColumn:!0}},computed:{thClasses:function(){var e=this.thAttrs(this),t=[this.headerClass,{"is-sortable":this.sortable,"is-sticky":this.sticky,"is-unselectable":this.isHeaderUnSelectable}];return e&&e.class&&t.push(e.class),t},thStyle:function(){var e=this.thAttrs(this),style=[this.style];return e&&e.style&&style.push(e.style),style},rootClasses:function(){return[this.cellClass,{"has-text-right":this.numeric&&!this.centered,"has-text-centered":this.centered,"is-sticky":this.sticky}]},style:function(){return{width:zt(this.width)}},hasDefaultSlot:function(){return!!this.$scopedSlots.default},isHeaderUnSelectable:function(){return!this.headerSelectable&&this.sortable}},methods:{getRootClasses:function(e){var t=this.tdAttrs(e,this),n=[this.rootClasses];return t&&t.class&&n.push(t.class),n},getRootStyle:function(e){var t=this.tdAttrs(e,this),style=[];return t&&t.style&&style.push(t.style),style}},created:function(){if(!this.$table)throw this.$destroy(),new Error("You should wrap bTableColumn on a bTable");this.$table.refreshSlots()},beforeDestroy:function(){this.$table.refreshSlots()},render:function(e){return null}},undefined,undefined,undefined,void 0,void 0);var Zr,es=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"top level"},[n("div",{staticClass:"level-left"},[e._t("default")],2),n("div",{staticClass:"level-right"},[e.paginated?n("div",{staticClass:"level-item"},[n("b-pagination",{attrs:{"icon-pack":e.iconPack,total:e.total,"per-page":e.perPage,simple:e.paginationSimple,size:e.paginationSize,current:e.newCurrentPage,rounded:e.rounded,"aria-next-label":e.ariaNextLabel,"aria-previous-label":e.ariaPreviousLabel,"aria-page-label":e.ariaPageLabel,"aria-current-label":e.ariaCurrentLabel,"page-input":e.pageInput,order:e.paginationOrder,"page-input-position":e.pageInputPosition,"debounce-page-input":e.debouncePageInput},on:{change:e.pageChanged}})],1):e._e()])])},staticRenderFns:[]},undefined,{name:"BTablePagination",components:ft({},rr.name,rr),props:{paginated:Boolean,total:[Number,String],perPage:[Number,String],currentPage:[Number,String],paginationSimple:Boolean,paginationSize:String,rounded:Boolean,iconPack:String,ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,pageInput:Boolean,paginationOrder:String,pageInputPosition:String,debouncePageInput:[Number,String]},data:function(){return{newCurrentPage:this.currentPage}},watch:{currentPage:function(e){this.newCurrentPage=e}},methods:{pageChanged:function(e){this.newCurrentPage=e>0?e:1,this.$emit("update:currentPage",this.newCurrentPage),this.$emit("page-change",this.newCurrentPage)}}},undefined,!1,undefined,void 0,void 0),ts={name:"BTable",components:(Zr={},ft(Zr,Mn.name,Mn),ft(Zr,an.name,an),ft(Zr,rn.name,rn),ft(Zr,ua.name,ua),ft(Zr,Lr.name,Lr),ft(Zr,Qr.name,Qr),ft(Zr,Jr.name,Jr),ft(Zr,es.name,es),Zr),inheritAttrs:!1,provide:function(){return{$table:this}},props:{data:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},bordered:Boolean,striped:Boolean,narrowed:Boolean,hoverable:Boolean,loading:Boolean,detailed:Boolean,checkable:Boolean,headerCheckable:{type:Boolean,default:!0},checkboxType:{type:String,default:"is-primary"},checkboxPosition:{type:String,default:"left",validator:function(e){return["left","right"].indexOf(e)>=0}},stickyCheckbox:{type:Boolean,default:!1},selected:Object,isRowSelectable:{type:Function,default:function(){return!0}},focusable:Boolean,customIsChecked:Function,isRowCheckable:{type:Function,default:function(){return!0}},checkedRows:{type:Array,default:function(){return[]}},mobileCards:{type:Boolean,default:!0},defaultSort:[String,Array],defaultSortDirection:{type:String,default:"asc"},sortIcon:{type:String,default:"arrow-up"},sortIconSize:{type:String,default:"is-small"},sortMultiple:{type:Boolean,default:!1},sortMultipleData:{type:Array,default:function(){return[]}},sortMultipleKey:{type:String,default:null},paginated:Boolean,currentPage:{type:Number,default:1},perPage:{type:[Number,String],default:20},showDetailIcon:{type:Boolean,default:!0},detailIcon:{type:String,default:"chevron-right"},paginationPosition:{type:String,default:"bottom",validator:function(e){return["bottom","top","both"].indexOf(e)>=0}},paginationRounded:Boolean,backendSorting:Boolean,backendFiltering:Boolean,rowClass:{type:Function,default:function(){return""}},openedDetailed:{type:Array,default:function(){return[]}},hasDetailedVisible:{type:Function,default:function(){return!0}},detailKey:{type:String,default:""},detailTransition:{type:String,default:""},customDetailRow:{type:Boolean,default:!1},backendPagination:Boolean,total:{type:[Number,String],default:0},iconPack:String,mobileSortPlaceholder:String,customRowKey:String,draggable:{type:Boolean,default:!1},draggableColumn:{type:Boolean,default:!1},scrollable:Boolean,ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,stickyHeader:Boolean,height:[Number,String],filtersEvent:{type:String,default:""},cardLayout:Boolean,showHeader:{type:Boolean,default:!0},debounceSearch:Number,caption:String,showCaption:{type:Boolean,default:!0},pageInput:{type:Boolean,default:!1},paginationOrder:String,pageInputPosition:String,debouncePageInput:[Number,String]},data:function(){return{sortMultipleDataLocal:[],getValueByPath:Tt,visibleDetailRows:this.openedDetailed,newData:this.data,newDataTotal:this.backendPagination?this.total:this.data.length,newCheckedRows:Ct(this.checkedRows),lastCheckedRowIndex:null,newCurrentPage:this.currentPage,currentSortColumn:{},isAsc:!0,filters:{},defaultSlots:[],firstTimeSort:!0,_isTable:!0,isDraggingRow:!1,isDraggingColumn:!1}},computed:{sortMultipleDataComputed:function(){return this.backendSorting?this.sortMultipleData:this.sortMultipleDataLocal},tableClasses:function(){return{"is-bordered":this.bordered,"is-striped":this.striped,"is-narrow":this.narrowed,"is-hoverable":(this.hoverable||this.focusable)&&this.visibleData.length}},tableWrapperClasses:function(){return{"has-mobile-cards":this.mobileCards,"has-sticky-header":this.stickyHeader,"is-card-list":this.cardLayout,"table-container":this.isScrollable}},tableStyle:function(){return{height:zt(this.height)}},visibleData:function(){if(!this.paginated)return this.newData;var e=this.newCurrentPage,t=this.perPage;if(this.newData.length<=t)return this.newData;var n=(e-1)*t,r=parseInt(n,10)+parseInt(t,10);return this.newData.slice(n,r)},visibleColumns:function(){return this.newColumns?this.newColumns.filter((function(e){return e.visible||void 0===e.visible})):this.newColumns},isAllChecked:function(){var e=this,t=this.visibleData.filter((function(t){return e.isRowCheckable(t)}));if(0===t.length)return!1;var n=t.some((function(t){return Bt(e.newCheckedRows,t,e.customIsChecked)<0}));return!n},isAllUncheckable:function(){var e=this;return 0===this.visibleData.filter((function(t){return e.isRowCheckable(t)})).length},hasSortablenewColumns:function(){return this.newColumns.some((function(e){return e.sortable}))},hasSearchablenewColumns:function(){return this.newColumns.some((function(e){return e.searchable}))},hasCustomSubheadings:function(){return!(!this.$scopedSlots||!this.$scopedSlots.subheading)||this.newColumns.some((function(e){return e.subheading||e.$scopedSlots&&e.$scopedSlots.subheading}))},columnCount:function(){var e=this.visibleColumns.length;return e+=this.checkable?1:0,e+=this.detailed&&this.showDetailIcon?1:0},showDetailRowIcon:function(){return this.detailed&&this.showDetailIcon},isScrollable:function(){return!!this.scrollable||!!this.newColumns&&this.newColumns.some((function(e){return e.sticky}))},newColumns:function(){var e=this;return this.columns&&this.columns.length?this.columns.map((function(t){var component=new(Yt.extend(Jr))({parent:e,propsData:t});return component.$scopedSlots={default:function(e){return[component.$createElement("span",{domProps:{innerHTML:Tt(e.row,t.field)}})]}},component})):this.defaultSlots.filter((function(e){return e.componentInstance&&e.componentInstance.$data&&e.componentInstance.$data._isTableColumn})).map((function(e){return e.componentInstance}))},canDragRow:function(){return this.draggable&&!this.isDraggingColumn},canDragColumn:function(){return this.draggableColumn&&!this.isDraggingRow}},watch:{data:function(e){var t=this;this.newData=e,this.backendFiltering||(this.newData=e.filter((function(e){return t.isRowFiltered(e)}))),this.backendSorting||this.sort(this.currentSortColumn,!0),this.backendPagination||(this.newDataTotal=this.newData.length)},total:function(e){this.backendPagination&&(this.newDataTotal=e)},currentPage:function(e){this.newCurrentPage=e},newCurrentPage:function(e){this.$emit("update:currentPage",e)},checkedRows:function(e){this.newCheckedRows=Ct(e)},debounceSearch:{handler:function(e){this.debouncedHandleFiltersChange=ir(this.handleFiltersChange,e)},immediate:!0},filters:{handler:function(e){this.debounceSearch?this.debouncedHandleFiltersChange(e):this.handleFiltersChange(e)},deep:!0},openedDetailed:function(e){this.visibleDetailRows=e}},methods:{onFiltersEvent:function(e){this.$emit("filters-event-".concat(this.filtersEvent),{event:e,filters:this.filters})},handleFiltersChange:function(e){var t=this;this.backendFiltering?this.$emit("filters-change",e):(this.newData=this.data.filter((function(e){return t.isRowFiltered(e)})),this.backendPagination||(this.newDataTotal=this.newData.length),this.backendSorting||(this.sortMultiple&&this.sortMultipleDataLocal&&this.sortMultipleDataLocal.length>0?this.doSortMultiColumn():Object.keys(this.currentSortColumn).length>0&&this.doSortSingleColumn(this.currentSortColumn)))},findIndexOfSortData:function(e){var t=this.sortMultipleDataComputed.filter((function(i){return i.field===e.field}))[0];return this.sortMultipleDataComputed.indexOf(t)+1},removeSortingPriority:function(e){if(this.backendSorting)this.$emit("sorting-priority-removed",e.field);else{this.sortMultipleDataLocal=this.sortMultipleDataLocal.filter((function(t){return t.field!==e.field}));var t=this.sortMultipleDataLocal.map((function(i){return(i.order&&"desc"===i.order?"-":"")+i.field}));0===t.length?this.resetMultiSorting():this.newData=Ht(this.newData,t)}},resetMultiSorting:function(){this.sortMultipleDataLocal=[],this.currentSortColumn={},this.newData=this.data},sortBy:function(e,t,n,r){return n&&"function"==typeof n?Ct(e).sort((function(a,b){return n(a,b,r)})):Ct(e).sort((function(a,b){var e=Tt(a,t),n=Tt(b,t);return"boolean"==typeof e&&"boolean"==typeof n?r?e-n:n-e:!Ut(n)&&Ut(e)?r?1:-1:!Ut(e)&&Ut(n)?r?-1:1:e===n?0:(e="string"==typeof e?e.toUpperCase():e,n="string"==typeof n?n.toUpperCase():n,r?e>n?1:-1:e>n?-1:1)}))},sortMultiColumn:function(e){if(this.currentSortColumn={},!this.backendSorting){var t=this.sortMultipleDataLocal.filter((function(i){return i.field===e.field}))[0];t?t.order="desc"===t.order?"asc":"desc":this.sortMultipleDataLocal.push({field:e.field,order:e.isAsc}),this.doSortMultiColumn()}},doSortMultiColumn:function(){var e=this.sortMultipleDataLocal.map((function(i){return(i.order&&"desc"===i.order?"-":"")+i.field}));this.newData=Ht(this.newData,e)},sort:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e&&e.sortable&&(!this.backendSorting&&this.sortMultiple&&(this.sortMultipleKey&&n[this.sortMultipleKey]||!this.sortMultipleKey)?t?this.doSortMultiColumn():this.sortMultiColumn(e):(this.sortMultiple&&(this.sortMultipleDataLocal=[]),t||(this.isAsc=e===this.currentSortColumn?!this.isAsc:"desc"!==this.defaultSortDirection.toLowerCase()),this.firstTimeSort||this.$emit("sort",e.field,this.isAsc?"asc":"desc",n),this.backendSorting||this.doSortSingleColumn(e),this.currentSortColumn=e))},doSortSingleColumn:function(e){this.newData=this.sortBy(this.newData,e.field,e.customSort,this.isAsc)},isRowSelected:function(e,t){return!!t&&(this.customRowKey?e[this.customRowKey]===t[this.customRowKey]:e===t)},isRowChecked:function(e){return Bt(this.newCheckedRows,e,this.customIsChecked)>=0},removeCheckedRow:function(e){var t=Bt(this.newCheckedRows,e,this.customIsChecked);t>=0&&this.newCheckedRows.splice(t,1)},checkAll:function(){var e=this,t=this.isAllChecked;this.visibleData.forEach((function(n){e.isRowCheckable(n)&&e.removeCheckedRow(n),t||e.isRowCheckable(n)&&e.newCheckedRows.push(n)})),this.$emit("check",this.newCheckedRows),this.$emit("check-all",this.newCheckedRows),this.$emit("update:checkedRows",this.newCheckedRows)},checkRow:function(e,t,n){if(this.isRowCheckable(e)){var r=this.lastCheckedRowIndex;this.lastCheckedRowIndex=t,n.shiftKey&&null!==r&&t!==r?this.shiftCheckRow(e,t,r):this.isRowChecked(e)?this.removeCheckedRow(e):this.newCheckedRows.push(e),this.$emit("check",this.newCheckedRows,e),this.$emit("update:checkedRows",this.newCheckedRows)}},shiftCheckRow:function(e,t,n){var r=this,o=this.visibleData.slice(Math.min(t,n),Math.max(t,n)+1),l=!this.isRowChecked(e);o.forEach((function(e){r.removeCheckedRow(e),l&&r.isRowCheckable(e)&&r.newCheckedRows.push(e)}))},selectRow:function(e,t){this.$emit("click",e),this.selected!==e&&this.isRowSelectable(e)&&(this.$emit("select",e,this.selected),this.$emit("update:selected",e))},toggleDetails:function(e){this.isVisibleDetailRow(e)?(this.closeDetailRow(e),this.$emit("details-close",e)):(this.openDetailRow(e),this.$emit("details-open",e)),this.$emit("update:openedDetailed",this.visibleDetailRows)},openDetailRow:function(e){var t=this.handleDetailKey(e);this.visibleDetailRows.push(t)},closeDetailRow:function(e){var t=this.handleDetailKey(e),i=this.visibleDetailRows.indexOf(t);i>=0&&this.visibleDetailRows.splice(i,1)},isVisibleDetailRow:function(e){var t=this.handleDetailKey(e);return this.visibleDetailRows.indexOf(t)>=0},isActiveDetailRow:function(e){return this.detailed&&!this.customDetailRow&&this.isVisibleDetailRow(e)},isActiveCustomDetailRow:function(e){return this.detailed&&this.customDetailRow&&this.isVisibleDetailRow(e)},isRowFiltered:function(e){var t=this,n=function(n){if(!t.filters[n])return"continue";var input=t.filters[n],r=t.newColumns.filter((function(e){return e.field===n}))[0];if(r&&r.customSearch&&"function"==typeof r.customSearch){if(!r.customSearch(e,input))return{v:!1}}else{var o=t.getValueByPath(e,n);if(null==o)return{v:!1};if(Number.isInteger(o)){if(o!==Number(input))return{v:!1}}else{var l=new RegExp(function(e){return e?e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):e}(input),"i");if(Array.isArray(o)){if(!o.some((function(e){return l.test(Lt(e))||l.test(e)})))return{v:!1}}else if(!l.test(Lt(o))&&!l.test(o))return{v:!1}}}};for(var r in this.filters){var o=n(r);if("continue"!==o&&"object"===ut(o))return o.v}return!0},handleDetailKey:function(e){var t=this.detailKey;return t.length&&e?e[t]:e},checkPredefinedDetailedRows:function(){if(this.openedDetailed.length>0&&!this.detailKey.length)throw new Error('If you set a predefined opened-detailed, you must provide a unique key using the prop "detail-key"')},checkSort:function(){if(this.newColumns.length&&this.firstTimeSort)this.initSort(),this.firstTimeSort=!1;else if(this.newColumns.length&&Object.keys(this.currentSortColumn).length>0)for(var i=0;i1)return!0;var e=this.$slots.footer[0].tag;return"th"===e||"td"===e},hasBottomLeftSlot:function(){return void 0!==this.$slots["bottom-left"]},pressedArrow:function(e){if(this.visibleData.length){var t=this.visibleData.indexOf(this.selected)+e;t=t<0?0:t>this.visibleData.length-1?this.visibleData.length-1:t;var n=this.visibleData[t];if(this.isRowSelectable(n))this.selectRow(n);else{var r=null;if(e>0)for(var i=t;i=0&&null===r;o--)this.isRowSelectable(this.visibleData[o])&&(r=o);r>=0&&this.selectRow(this.visibleData[r])}}},focus:function(){this.focusable&&this.$el.querySelector("table").focus()},initSort:function(){var e=this;if(this.sortMultiple&&this.sortMultipleData)this.sortMultipleData.forEach((function(t){e.sortMultiColumn(t)}));else{if(!this.defaultSort)return;var t="",n=this.defaultSortDirection;Array.isArray(this.defaultSort)?(t=this.defaultSort[0],this.defaultSort[1]&&(n=this.defaultSort[1])):t=this.defaultSort;var r=this.newColumns.filter((function(e){return e.field===t}))[0];r&&(this.isAsc="desc"!==n.toLowerCase(),this.sort(r,!0))}},handleDragStart:function(e,t,n){this.canDragRow&&(this.isDraggingRow=!0,this.$emit("dragstart",{event:e,row:t,index:n}))},handleDragEnd:function(e,t,n){this.canDragRow&&(this.isDraggingRow=!1,this.$emit("dragend",{event:e,row:t,index:n}))},handleDrop:function(e,t,n){this.canDragRow&&this.$emit("drop",{event:e,row:t,index:n})},handleDragOver:function(e,t,n){this.canDragRow&&this.$emit("dragover",{event:e,row:t,index:n})},handleDragLeave:function(e,t,n){this.canDragRow&&this.$emit("dragleave",{event:e,row:t,index:n})},emitEventForRow:function(e,t,n){return this.$listeners[e]?this.$emit(e,n,t):null},handleColumnDragStart:function(e,t,n){this.canDragColumn&&(this.isDraggingColumn=!0,this.$emit("columndragstart",{event:e,column:t,index:n}))},handleColumnDragEnd:function(e,t,n){this.canDragColumn&&(this.isDraggingColumn=!1,this.$emit("columndragend",{event:e,column:t,index:n}))},handleColumnDrop:function(e,t,n){this.canDragColumn&&this.$emit("columndrop",{event:e,column:t,index:n})},handleColumnDragOver:function(e,t,n){this.canDragColumn&&this.$emit("columndragover",{event:e,column:t,index:n})},handleColumnDragLeave:function(e,t,n){this.canDragColumn&&this.$emit("columndragleave",{event:e,column:t,index:n})},refreshSlots:function(){this.defaultSlots=this.$slots.default||[]}},mounted:function(){this.refreshSlots(),this.checkPredefinedDetailedRows(),this.checkSort()}};var ns=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-table"},[e._t("default"),e.mobileCards&&e.hasSortablenewColumns?n("b-table-mobile-sort",{attrs:{"current-sort-column":e.currentSortColumn,"sort-multiple":e.sortMultiple,"sort-multiple-data":e.sortMultipleDataComputed,"is-asc":e.isAsc,columns:e.newColumns,placeholder:e.mobileSortPlaceholder,"icon-pack":e.iconPack,"sort-icon":e.sortIcon,"sort-icon-size":e.sortIconSize},on:{sort:function(t,n){return e.sort(t,null,n)},removePriority:function(t){return e.removeSortingPriority(t)}}}):e._e(),!e.paginated||"top"!==e.paginationPosition&&"both"!==e.paginationPosition?e._e():[e._t("pagination",[n("b-table-pagination",e._b({attrs:{"per-page":e.perPage,paginated:e.paginated,rounded:e.paginationRounded,"icon-pack":e.iconPack,total:e.newDataTotal,"current-page":e.newCurrentPage,"aria-next-label":e.ariaNextLabel,"aria-previous-label":e.ariaPreviousLabel,"aria-page-label":e.ariaPageLabel,"aria-current-label":e.ariaCurrentLabel,"page-input":e.pageInput,"pagination-order":e.paginationOrder,"page-input-position":e.pageInputPosition,"debounce-page-input":e.debouncePageInput},on:{"update:currentPage":function(t){e.newCurrentPage=t},"update:current-page":function(t){e.newCurrentPage=t},"page-change":function(t){return e.$emit("page-change",t)}}},"b-table-pagination",e.$attrs,!1),[e._t("top-left")],2)])],n("div",{staticClass:"table-wrapper",class:e.tableWrapperClasses,style:e.tableStyle},[n("table",{staticClass:"table",class:e.tableClasses,attrs:{tabindex:!!e.focusable&&0},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])||t.target!==t.currentTarget?null:(t.preventDefault(),e.pressedArrow(-1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])||t.target!==t.currentTarget?null:(t.preventDefault(),e.pressedArrow(1))}]}},[e.caption?n("caption",{directives:[{name:"show",rawName:"v-show",value:e.showCaption,expression:"showCaption"}]},[e._v(e._s(e.caption))]):e._e(),e.newColumns.length&&e.showHeader?n("thead",[n("tr",[e.showDetailRowIcon?n("th",{attrs:{width:"40px"}}):e._e(),e.checkable&&"left"===e.checkboxPosition?n("th",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[e.headerCheckable?[e._t("check-all",[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isAllChecked,type:e.checkboxType,disabled:e.isAllUncheckable},nativeOn:{change:function(t){return e.checkAll(t)}}})],{isAllChecked:e.isAllChecked,isAllUncheckable:e.isAllUncheckable,checkAll:e.checkAll})]:e._e()],2):e._e(),e._l(e.visibleColumns,(function(t,r){return n("th",e._b({key:t.newKey+":"+r+"header",class:[t.thClasses,{"is-current-sort":!e.sortMultiple&&e.currentSortColumn===t}],style:t.thStyle,attrs:{draggable:e.canDragColumn},on:{click:function(n){return n.stopPropagation(),e.sort(t,null,n)},dragstart:function(n){return e.handleColumnDragStart(n,t,r)},dragend:function(n){return e.handleColumnDragEnd(n,t,r)},drop:function(n){return e.handleColumnDrop(n,t,r)},dragover:function(n){return e.handleColumnDragOver(n,t,r)},dragleave:function(n){return e.handleColumnDragLeave(n,t,r)}}},"th",t.thAttrs(t),!1),[n("div",{staticClass:"th-wrap",class:{"is-numeric":t.numeric,"is-centered":t.centered}},[t.$scopedSlots&&t.$scopedSlots.header?[n("b-slot-component",{attrs:{component:t,scoped:"",name:"header",tag:"span",props:{column:t,index:r}}})]:[n("span",{staticClass:"is-relative"},[e._v(" "+e._s(t.label)+" "),e.sortMultiple&&e.sortMultipleDataComputed&&e.sortMultipleDataComputed.length>0&&e.sortMultipleDataComputed.filter((function(i){return i.field===t.field})).length>0?[n("b-icon",{class:{"is-desc":"desc"===e.sortMultipleDataComputed.filter((function(i){return i.field===t.field}))[0].order},attrs:{icon:e.sortIcon,pack:e.iconPack,both:"",size:e.sortIconSize}}),e._v(" "+e._s(e.findIndexOfSortData(t))+" "),n("button",{staticClass:"delete is-small multi-sort-cancel-icon",attrs:{type:"button"},on:{click:function(n){return n.stopPropagation(),e.removeSortingPriority(t)}}})]:n("b-icon",{staticClass:"sort-icon",class:{"is-desc":!e.isAsc,"is-invisible":e.currentSortColumn!==t},attrs:{icon:e.sortIcon,pack:e.iconPack,both:"",size:e.sortIconSize}})],2)]],2)])})),e.checkable&&"right"===e.checkboxPosition?n("th",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[e.headerCheckable?[e._t("check-all",[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isAllChecked,type:e.checkboxType,disabled:e.isAllUncheckable},nativeOn:{change:function(t){return e.checkAll(t)}}})],{isAllChecked:e.isAllChecked,isAllUncheckable:e.isAllUncheckable,checkAll:e.checkAll})]:e._e()],2):e._e()],2),e.hasCustomSubheadings?n("tr",{staticClass:"is-subheading"},[e.showDetailRowIcon?n("th",{attrs:{width:"40px"}}):e._e(),e.checkable&&"left"===e.checkboxPosition?n("th"):e._e(),e._l(e.visibleColumns,(function(t,r){return n("th",{key:t.newKey+":"+r+"subheading",style:t.style},[n("div",{staticClass:"th-wrap",class:{"is-numeric":t.numeric,"is-centered":t.centered}},[t.$scopedSlots&&t.$scopedSlots.subheading?[n("b-slot-component",{attrs:{component:t,scoped:"",name:"subheading",tag:"span",props:{column:t,index:r}}})]:[e._v(e._s(t.subheading))]],2)])})),e.checkable&&"right"===e.checkboxPosition?n("th"):e._e()],2):e._e(),e.hasSearchablenewColumns?n("tr",[e.showDetailRowIcon?n("th",{attrs:{width:"40px"}}):e._e(),e.checkable&&"left"===e.checkboxPosition?n("th"):e._e(),e._l(e.visibleColumns,(function(t,r){return n("th",e._b({key:t.newKey+":"+r+"searchable",class:{"is-sticky":t.sticky},style:t.thStyle},"th",t.thAttrs(t),!1),[n("div",{staticClass:"th-wrap"},[t.searchable?[t.$scopedSlots&&t.$scopedSlots.searchable?[n("b-slot-component",{attrs:{component:t,scoped:!0,name:"searchable",tag:"span",props:{column:t,filters:e.filters}}})]:n("b-input",{attrs:{type:t.numeric?"number":"text"},nativeOn:e._d({},[e.filtersEvent,function(t){return e.onFiltersEvent(t)}]),model:{value:e.filters[t.field],callback:function(n){e.$set(e.filters,t.field,n)},expression:"filters[column.field]"}})]:e._e()],2)])})),e.checkable&&"right"===e.checkboxPosition?n("th"):e._e()],2):e._e()]):e._e(),n("tbody",[e._l(e.visibleData,(function(t,r){return[n("tr",{key:e.customRowKey?t[e.customRowKey]:r,class:[e.rowClass(t,r),{"is-selected":e.isRowSelected(t,e.selected),"is-checked":e.isRowChecked(t)}],attrs:{draggable:e.canDragRow},on:{click:function(n){return e.selectRow(t)},dblclick:function(n){return e.$emit("dblclick",t)},mouseenter:function(n){return e.emitEventForRow("mouseenter",n,t)},mouseleave:function(n){return e.emitEventForRow("mouseleave",n,t)},contextmenu:function(n){return e.$emit("contextmenu",t,n)},dragstart:function(n){return e.handleDragStart(n,t,r)},dragend:function(n){return e.handleDragEnd(n,t,r)},drop:function(n){return e.handleDrop(n,t,r)},dragover:function(n){return e.handleDragOver(n,t,r)},dragleave:function(n){return e.handleDragLeave(n,t,r)}}},[e.showDetailRowIcon?n("td",{staticClass:"chevron-cell"},[e.hasDetailedVisible(t)?n("a",{attrs:{role:"button"},on:{click:function(n){return n.stopPropagation(),e.toggleDetails(t)}}},[n("b-icon",{class:{"is-expanded":e.isVisibleDetailRow(t)},attrs:{icon:e.detailIcon,pack:e.iconPack,both:""}})],1):e._e()]):e._e(),e.checkable&&"left"===e.checkboxPosition?n("td",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isRowChecked(t),type:e.checkboxType,disabled:!e.isRowCheckable(t)},nativeOn:{click:function(n){return n.preventDefault(),n.stopPropagation(),e.checkRow(t,r,n)}}})],1):e._e(),e._l(e.visibleColumns,(function(o,l){return[o.$scopedSlots&&o.$scopedSlots.default?[n("b-slot-component",e._b({key:o.newKey+":"+r+":"+l,class:o.getRootClasses(t),style:o.getRootStyle(t),attrs:{component:o,scoped:"",name:"default",tag:"td","data-label":o.label,props:{row:t,column:o,index:r,colindex:l,toggleDetails:e.toggleDetails}},nativeOn:{click:function(n){return e.$emit("cellclick",t,o,r,l)}}},"b-slot-component",o.tdAttrs(t,o),!1))]:e._e()]})),e.checkable&&"right"===e.checkboxPosition?n("td",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isRowChecked(t),type:e.checkboxType,disabled:!e.isRowCheckable(t)},nativeOn:{click:function(n){return n.preventDefault(),n.stopPropagation(),e.checkRow(t,r,n)}}})],1):e._e()],2),n("transition",{key:(e.customRowKey?t[e.customRowKey]:r)+"detail",attrs:{name:e.detailTransition}},[e.isActiveDetailRow(t)?n("tr",{staticClass:"detail"},[n("td",{attrs:{colspan:e.columnCount}},[n("div",{staticClass:"detail-container"},[e._t("detail",null,{row:t,index:r})],2)])]):e._e()]),e.isActiveCustomDetailRow(t)?e._t("detail",null,{row:t,index:r}):e._e()]})),e.visibleData.length?e._e():n("tr",{staticClass:"is-empty"},[n("td",{attrs:{colspan:e.columnCount}},[e._t("empty")],2)])],2),void 0!==e.$slots.footer?n("tfoot",[n("tr",{staticClass:"table-footer"},[e.hasCustomFooterSlot()?e._t("footer"):n("th",{attrs:{colspan:e.columnCount}},[e._t("footer")],2)],2)]):e._e()]),e.loading?[e._t("loading",[n("b-loading",{attrs:{"is-full-page":!1,active:e.loading},on:{"update:active":function(t){e.loading=t}}})])]:e._e()],2),e.checkable&&e.hasBottomLeftSlot()||e.paginated&&("bottom"===e.paginationPosition||"both"===e.paginationPosition)?[e._t("pagination",[n("b-table-pagination",e._b({attrs:{"per-page":e.perPage,paginated:e.paginated,rounded:e.paginationRounded,"icon-pack":e.iconPack,total:e.newDataTotal,"current-page":e.newCurrentPage,"aria-next-label":e.ariaNextLabel,"aria-previous-label":e.ariaPreviousLabel,"aria-page-label":e.ariaPageLabel,"aria-current-label":e.ariaCurrentLabel,"page-input":e.pageInput,"pagination-order":e.paginationOrder,"page-input-position":e.pageInputPosition,"debounce-page-input":e.debouncePageInput},on:{"update:currentPage":function(t){e.newCurrentPage=t},"update:current-page":function(t){e.newCurrentPage=t},"page-change":function(t){return e.$emit("page-change",t)}}},"b-table-pagination",e.$attrs,!1),[e._t("bottom-left")],2)])]:e._e()],2)},staticRenderFns:[]},undefined,ts,undefined,!1,undefined,void 0,void 0),is={install:function(e){void 0===Yt&&Gt(e),Jt(e,ns),Jt(e,Jr)}};use(is);var table=is;var as=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-tabs",class:e.mainClasses},[n("nav",{staticClass:"tabs",class:e.navClasses,on:{keydown:e.manageTablistKeydown}},[e._t("start"),n("ul",{attrs:{"aria-orientation":e.vertical?"vertical":"horizontal",role:"tablist"}},e._l(e.items,(function(t,r){return n("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"childItem.visible"}],key:t.value,class:[t.headerClass,{"is-active":t.isActive,"is-disabled":t.disabled}],attrs:{role:"tab","aria-controls":t.value+"-content","aria-selected":""+t.isActive}},[t.$scopedSlots.header?n("b-slot-component",{ref:"tabLink",refInFor:!0,attrs:{component:t,name:"header",tag:"a",id:t.value+"-label",tabindex:t.isActive?0:-1},on:{keydown:function(n){return e.manageTabKeydown(n,t)}},nativeOn:{focus:function(t){e.currentFocus=r},click:function(n){return e.childClick(t)}}}):n("a",{ref:"tabLink",refInFor:!0,attrs:{id:t.value+"-label",tabindex:t.isActive?0:-1},on:{focus:function(t){e.currentFocus=r},click:function(n){return e.childClick(t)},keydown:function(n){return e.manageTabKeydown(n,t)}}},[t.icon?n("b-icon",{attrs:{icon:t.icon,pack:t.iconPack,size:e.size}}):e._e(),n("span",[e._v(e._s(t.label))])],1)],1)})),0),e._t("end")],2),n("section",{staticClass:"tab-content",class:{"is-transitioning":e.isTransitioning}},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BTabs",mixins:[Hr("tab")],props:{expanded:{type:Boolean,default:function(){return Kt.defaultTabsExpanded}},type:{type:[String,Object],default:function(){return Kt.defaultTabsType}},animated:{type:Boolean,default:function(){return Kt.defaultTabsAnimated}},multiline:Boolean},data:function(){return{currentFocus:this.value}},computed:{mainClasses:function(){return ft({"is-fullwidth":this.expanded,"is-vertical":this.vertical,"is-multiline":this.multiline},this.position,this.position&&this.vertical)},navClasses:function(){var e;return[this.type,this.size,(e={},ft(e,this.position,this.position&&!this.vertical),ft(e,"is-fullwidth",this.expanded),ft(e,"is-toggle","is-toggle-rounded"===this.type),e)]}},methods:{giveFocusToTab:function(e){e.$el&&e.$el.focus?e.$el.focus():e.focus&&e.focus()},manageTablistKeydown:function(e){switch(e.key){case this.vertical?"ArrowUp":"ArrowLeft":case this.vertical?"Up":"Left":var t=this.getPrevItemIdx(this.currentFocus,!0);null===t&&(t=this.getPrevItemIdx(this.items.length,!0)),null!==t&&this.$refs.tabLink&&t0?[e._v(" "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+" ")]:e.maxtags?[e._v(" "+e._s(e.tagsLength)+" / "+e._s(e.maxtags)+" ")]:e._e()],2):e._e()])},staticRenderFns:[]},undefined,{name:"BTaginput",components:(ds={},ft(ds,on.name,on),ft(ds,ls.name,ls),ds),mixins:[en],inheritAttrs:!1,props:{value:{type:Array,default:function(){return[]}},data:{type:Array,default:function(){return[]}},type:String,closeType:String,rounded:{type:Boolean,default:!1},attached:{type:Boolean,default:!1},maxtags:{type:[Number,String],required:!1},hasCounter:{type:Boolean,default:function(){return Kt.defaultTaginputHasCounter}},field:{type:String,default:"value"},autocomplete:Boolean,groupField:String,groupOptions:String,nativeAutocomplete:String,openOnFocus:Boolean,keepOpen:{type:Boolean,default:!0},keepFirst:Boolean,disabled:Boolean,ellipsis:Boolean,closable:{type:Boolean,default:!0},ariaCloseLabel:String,confirmKeys:{type:Array,default:function(){return[",","Tab","Enter"]}},removeOnKeys:{type:Array,default:function(){return["Backspace"]}},allowNew:Boolean,onPasteSeparators:{type:Array,default:function(){return[","]}},beforeAdding:{type:Function,default:function(){return!0}},allowDuplicates:{type:Boolean,default:!1},checkInfiniteScroll:{type:Boolean,default:!1},createTag:{type:Function,default:function(e){return e}},appendToBody:Boolean},data:function(){return{tags:Array.isArray(this.value)?this.value.slice(0):this.value||[],newTag:"",isComposing:!1,_elementRef:"autocomplete",_isTaginput:!0}},computed:{listeners:function(){var e=this.$listeners,t=(e.input,wt(e,["input"]));return t},rootClasses:function(){return{"is-expanded":this.expanded}},containerClasses:function(){return{"is-focused":this.isFocused,"is-focusable":this.hasInput}},valueLength:function(){return this.newTag.trim().length},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer},hasInput:function(){return null==this.maxtags||1===this.maxtags||this.tagsLength0&&this.removeTag(this.tagsLength-1)},keydown:function(e){var t=e.key;if(-1===this.removeOnKeys.indexOf(t)||this.newTag.length||this.removeLastTag(),(!this.autocomplete||this.allowNew)&&this.confirmKeys.indexOf(t)>=0){if("Tab"!==t&&e.preventDefault(),"Enter"===t&&this.isComposing)return;this.addTag()}},onTyping:function(e){this.$emit("typing",e.trim())},emitInfiniteScroll:function(){this.$emit("infinite-scroll")}}},undefined,!1,undefined,void 0,void 0),ps={install:function(e){Jt(e,fs)}};use(ps);var ms=ps,vs={install:function(e){Jt(e,Ii)}};use(vs);var gs=vs;var bs,ys=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{"enter-active-class":e.transition.enter,"leave-active-class":e.transition.leave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"toast",class:[e.type,e.position],attrs:{"aria-hidden":!e.isActive,role:"alert"},on:{mouseenter:e.pause,mouseleave:e.removePause}},[e.$slots.default?[e._t("default")]:[n("div",{domProps:{innerHTML:e._s(e.message)}})]],2)])},staticRenderFns:[]},undefined,{name:"BToast",mixins:[_a],data:function(){return{newDuration:this.duration||Kt.defaultToastDuration}}},undefined,!1,undefined,void 0,void 0),ws={open:function(e){var t;"string"==typeof e&&(e={message:e});var slot,n={position:Kt.defaultToastPosition||"is-top"};e.parent&&(t=e.parent,delete e.parent),Array.isArray(e.message)&&(slot=e.message,delete e.message);var r=It(n,e),component=new(("undefined"!=typeof window&&window.Vue?window.Vue:bs||Yt).extend(ys))({parent:t,el:document.createElement("div"),propsData:r});return slot&&(component.$slots.default=slot,component.$forceUpdate()),component}},ks={install:function(e){bs=e,Zt(e,"toast",ws)}};use(ks);var Ss=ks,xs={install:function(e){Jt(e,ii)}};use(xs);var Cs=xs;var Ds=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{staticClass:"upload control",class:{"is-expanded":e.expanded,"is-rounded":e.rounded}},[e.dragDrop?n("div",{staticClass:"upload-draggable",class:[e.type,{"is-loading":e.loading,"is-disabled":e.disabled,"is-hovered":e.dragDropFocus,"is-expanded":e.expanded}],on:{dragover:function(t){return t.preventDefault(),e.updateDragDropFocus(!0)},dragleave:function(t){return t.preventDefault(),e.updateDragDropFocus(!1)},dragenter:function(t){return t.preventDefault(),e.updateDragDropFocus(!0)},drop:function(t){return t.preventDefault(),e.onFileChange(t)}}},[e._t("default")],2):[e._t("default")],n("input",e._b({ref:"input",attrs:{type:"file",multiple:e.multiple,accept:e.accept,disabled:e.disabled},on:{change:e.onFileChange}},"input",e.$attrs,!1))],2)},staticRenderFns:[]},undefined,{name:"BUpload",mixins:[en],inheritAttrs:!1,props:{value:{type:[Object,Function,sa,Array]},multiple:Boolean,disabled:Boolean,accept:String,dragDrop:Boolean,type:{type:String,default:"is-primary"},native:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1}},data:function(){return{newValue:this.value,dragDropFocus:!1,_elementRef:"input"}},watch:{value:function(e){this.newValue=e,(!e||Array.isArray(e)&&0===e.length)&&(this.$refs.input.value=null),!this.isValid&&!this.dragDrop&&this.checkHtml5Validity()}},methods:{onFileChange:function(e){if(!this.disabled&&!this.loading){this.dragDrop&&this.updateDragDropFocus(!1);var t=e.target.files||e.dataTransfer.files;if(0===t.length){if(!this.newValue)return;this.native&&(this.newValue=null)}else if(this.multiple){var n=!1;!this.native&&this.newValue||(this.newValue=[],n=!0);for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};for(var n in Gt(e),Xt(It(Kt,t,!0)),Ms)e.use(Ms[n]);Zt(e,"config",Ps),e.prototype.$buefy.globalNoticeInterval=null}};use(Os);var As=Os;c.a.use(As,{css:!1,materialDesignIcons:!0,materialDesignIconsHRef:"https://cdn.jsdelivr.net/npm/@mdi/font/css/materialdesignicons.min.css",async:!1,defaultTooltipType:"is-dark",defaultTooltipDelay:20});function Ts(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function Bs(e){for(var i=1;i has been deprecated and will be removed in Nuxt 3, please use instead")),v.a.render(e,t)}})),c.a.component($.name,$),c.a.component("NChild",$),c.a.component(T.name,T),Object.defineProperty(c.a.prototype,"$nuxt",{get:function(){var e=this.$root?this.$root.$options.$nuxt:null;return e||"undefined"==typeof window?e:window.$nuxt},configurable:!0}),c.a.use(d.a,{keyName:"head",attribute:"data-n-head",ssrAttribute:"data-n-head-ssr",tagIDKeyName:"hid"});var Fs={name:"page",mode:"out-in",appear:!0,appearClass:"appear",appearActiveClass:"appear-active",appearToClass:"appear-to"};function Is(e){return Ns.apply(this,arguments)}function Ns(){return Ns=Object(o.a)(regeneratorRuntime.mark((function e(t){var n,r,l,d,h,path,f,m=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f=function(e,t){if(!e)throw new Error("inject(key, value) has no key provided");if(void 0===t)throw new Error("inject('".concat(e,"', value) has no value provided"));l[e="$"+e]=t,l.context[e]||(l.context[e]=t);var n="__nuxt_"+e+"_installed__";c.a[n]||(c.a[n]=!0,c.a.use((function(){Object.prototype.hasOwnProperty.call(c.a.prototype,e)||Object.defineProperty(c.a.prototype,e,{get:function(){return this.$root.$options[e]}})})))},n=m.length>1&&void 0!==m[1]?m[1]:{},null,e.next=5,_(0,n);case 5:return r=e.sent,l=Bs({head:{title:"shogi-player",titleTemplate:"%s - shogi-player",htmlAttrs:{lang:"ja",prefix:"og: http://ogp.me/ns#",class:"NODE_ENV-production STAGE-production"},meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{hid:"description",name:"description",content:"将棋の棋譜再生・対局・盤面編集等が可能なVue.js用将棋盤コンポーネント"},{hid:"og:site_name",property:"og:site_name",content:"shogi-player"},{hid:"og:type",property:"og:type",content:"website"},{hid:"og:url",property:"og:url",content:"https://akicho8.github.io/shogi-player"},{hid:"og:title",property:"og:title",content:"shogi-player"},{hid:"og:description",property:"og:description",content:"将棋の棋譜再生・対局・盤面編集等が可能なVue.js用将棋盤コンポーネント"},{hid:"og:image",property:"og:image",content:"https://akicho8.github.io/shogi-player/ogp/application.png"},{hid:"twitter:card",property:"twitter:card",content:"summary_large_image"},{hid:"twitter:site",property:"twitter:site",content:"@sgkinakomochi"},{hid:"twitter:creator",property:"twitter:creator",content:"@sgkinakomochi"}],link:[{hid:"icon",rel:"icon",type:"image/x-icon",href:"/favicon.ico"},{hid:"apple-touch-icon",rel:"apple-touch-icon",href:"/apple-touch-icon.png"},{type:"text/css",href:"https://cdn.jsdelivr.net/npm/@mdi/font/css/materialdesignicons.min.css",rel:"stylesheet"}],style:[],script:[]},router:r,nuxt:{defaultTransition:Fs,transitions:[Fs],setTransitions:function(e){return Array.isArray(e)||(e=[e]),e=e.map((function(e){return e=e?"string"==typeof e?Object.assign({},Fs,{name:e}):Object.assign({},Fs,e):Fs})),this.$options.nuxt.transitions=e,e},err:null,dateErr:null,error:function(e){e=e||null,l.context._errored=Boolean(e),e=e?Object(k.p)(e):null;var n=l.nuxt;return this&&(n=this.nuxt||this.$options.nuxt),n.dateErr=Date.now(),n.err=e,t&&(t.nuxt.error=e),e}}},R),d=t?t.next:function(e){return l.router.push(e)},t?h=r.resolve(t.url).route:(path=Object(k.f)(r.options.base,r.options.mode),h=r.resolve(path).route),e.next=11,Object(k.t)(l,{route:h,next:d,error:l.nuxt.error.bind(l),payload:t?t.payload:void 0,req:t?t.req:void 0,res:t?t.res:void 0,beforeRenderFns:t?t.beforeRenderFns:void 0,beforeSerializeFns:t?t.beforeSerializeFns:void 0,ssrContext:t});case 11:f("config",n),l.context.enablePreview=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.previewData=Object.assign({},e),f("preview",e)},e.next=16;break;case 16:if("function"!=typeof lt){e.next=19;break}return e.next=19,lt(l.context,f);case 19:e.next=22;break;case 22:e.next=25;break;case 25:e.next=28;break;case 28:return l.context.enablePreview=function(){console.warn("You cannot call enablePreview() outside a plugin.")},e.next=31,new Promise((function(e,t){if(!r.resolve(l.context.route.fullPath).route.matched.length)return e();r.replace(l.context.route.fullPath,e,(function(n){if(!n._isRouter)return t(n);if(2!==n.type)return e();var c=r.afterEach(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Object(k.j)(n);case 3:l.context.route=t.sent,l.context.params=n.params||{},l.context.query=n.query||{},c(),e();case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())}))}));case 31:return e.abrupt("return",{app:l,router:r});case 32:case"end":return e.stop()}}),e)}))),Ns.apply(this,arguments)}},70:function(e,t,n){"use strict";var r={name:"NoSsr",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,l=r(),c=l.default;void 0===c&&(c=[]);var d=l.placeholder;return n._isMounted?c:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["no-ssr-placeholder"]},o.placeholder||d):c.length>0?c.map((function(){return e(!1)})):e(!1))}};e.exports=r}},[[357,72,7,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{126:function(e,t,n){"use strict";n(121),n(11),n(31),n(72),n(73),n(57),n(36),n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78),n(22);var r=n(2);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,d=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){d=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(d)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},canPrefetch:function(){var e=navigator.connection;return!(this.$nuxt.isOffline||e&&((e.effectiveType||"").includes("2g")||e.saveData))},getPrefetchComponents:function(){return this.$router.resolve(this.to,this.$route,this.append).resolved.matched.map((function(e){return e.components.default})).filter((function(e){return"function"==typeof e&&!e.options&&!e.__prefetched}))},prefetchLink:function(){if(this.canPrefetch()){h.unobserve(this.$el);var e,t=o(this.getPrefetchComponents());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n();r instanceof Promise&&r.catch((function(){})),n.__prefetched=!0}}catch(e){t.e(e)}finally{t.f()}}}}}},173:function(e,t,n){"use strict";t.a={}},174:function(e,t,n){"use strict";var r={name:"ClientOnly",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,l=r(),c=l.default;void 0===c&&(c=[]);var d=l.placeholder;return n._isMounted?c:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["client-only-placeholder"]},o.placeholder||d):c.length>0?c.map((function(){return e(!1)})):e(!1))}};e.exports=r},176:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){return t=Object.assign||function(e){for(var i=1;i0?n=h:t=h}while(Math.abs(d)>o&&++i=r?S(t,m,e,n):0===v?m:k(t,o,o+d,e,n)}return function(e){return 0===e?0:1===e?1:y(f(e),t,o)}},D={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},_=!1;try{var $=Object.defineProperty({},"passive",{get:function(){_=!0}});window.addEventListener("test",null,$)}catch(e){}var P={$:function(e){return"string"!=typeof e?e:document.querySelector(e)},on:function(element,e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!1};e instanceof Array||(e=[e]);for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:{};if("object"===e(T)?B=T:"number"==typeof T&&(B.duration=T),!(element=P.$(k)))return console.warn("[vue-scrollto warn]: Trying to scroll to an element that is not on the page: "+k);if(t=P.$(B.container||O.container),n=B.hasOwnProperty("duration")?B.duration:O.duration,o=B.hasOwnProperty("lazy")?B.lazy:O.lazy,r=B.easing||O.easing,l=B.hasOwnProperty("offset")?B.offset:O.offset,c=B.hasOwnProperty("force")?!1!==B.force:O.force,d=B.hasOwnProperty("cancelable")?!1!==B.cancelable:O.cancelable,h=B.onStart||O.onStart,f=B.onDone||O.onDone,m=B.onCancel||O.onCancel,v=void 0===B.x?O.x:B.x,y=void 0===B.y?O.y:B.y,"function"==typeof l&&(l=l(element,t)),w=L(t),S=V(t),H(),A=!1,!c){var N="body"===t.tagName.toLowerCase()?document.documentElement.clientHeight||window.innerHeight:t.offsetHeight,E=S,j=E+N,W=x-l,Y=W+element.offsetHeight;if(W>=E&&Y<=j)return void(f&&f(element))}if(h&&h(element),$||_)return"string"==typeof r&&(r=D[r]||D.ease),I=C.apply(C,r),P.on(t,M,R,{passive:!0}),window.requestAnimationFrame(z),function(){F=null,A=!0};f&&f(element)}return Y},B=T(),F=[];function I(e){for(var i=0;i=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:[],r=v(e.$children||[]);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.$fetch&&n.push(o),o.$children&&x(o,n)}}catch(e){r.e(e)}finally{r.f()}return n}function C(e,t){if(t||!e.options.__hasNuxtData){var n=e.options._originDataFn||e.options.data||function(){return{}};e.options._originDataFn=n,e.options.data=function(){var data=n.call(this,this);return this.$ssrContext&&(t=this.$ssrContext.asyncData[e.cid]),m(m({},data),t)},e.options.__hasNuxtData=!0,e._Ctor&&e._Ctor.options&&(e._Ctor.options.data=e.options.data)}}function D(e){return e.options&&e._Ctor===e||(e.options?(e._Ctor=e,e.extendOptions=e.options):(e=d.a.extend(e))._Ctor=e,!e.options.name&&e.options.__file&&(e.options.name=e.options.__file)),e}function _(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"components";return Array.prototype.concat.apply([],e.matched.map((function(e,r){return Object.keys(e[n]).map((function(o){return t&&t.push(r),e[n][o]}))})))}function $(e){return _(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],"instances")}function P(e,t){return Array.prototype.concat.apply([],e.matched.map((function(e,n){return Object.keys(e.components).reduce((function(r,o){return e.components[o]?r.push(t(e.components[o],e.instances[o],e,o,n)):delete e.components[o],r}),[])})))}function M(e,t){return Promise.all(P(e,function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(n,r,o,l){var c,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof n||n.options){e.next=11;break}return e.prev=1,e.next=4,n();case 4:n=e.sent,e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(1),e.t0&&"ChunkLoadError"===e.t0.name&&"undefined"!=typeof window&&window.sessionStorage&&(c=Date.now(),(!(d=parseInt(window.sessionStorage.getItem("nuxt-reload")))||d+6e40)){e.next=19;break}return e.next=19,new Promise((function(e){return setTimeout(e,r)}));case 19:this.$fetchState.error=t,this.$fetchState.pending=!1,this.$fetchState.timestamp=Date.now(),this.$nextTick((function(){return o.$nuxt.nbFetching--}));case 23:case"end":return e.stop()}}),e,this,[[6,11]])})))).apply(this,arguments)}t.a={beforeCreate:function(){Object(l.l)(this)&&(this._fetchDelay="number"==typeof this.$options.fetchDelay?this.$options.fetchDelay:200,o.a.util.defineReactive(this,"$fetchState",{pending:!1,error:null,timestamp:Date.now()}),this.$fetch=f.bind(this),Object(l.a)(this,"created",h),Object(l.a)(this,"beforeMount",d))}}},357:function(e,t,n){n(358),e.exports=n(359)},358:function(e,t,n){(function(e){e.installComponents=function(component,e){var n="function"==typeof component.exports?component.exports.extendOptions:component.options;for(var i in"function"==typeof component.exports&&(n.components=component.exports.options.components),n.components=n.components||{},e)n.components[i]=n.components[i]||e[i];n.functional&&function(component,e){if(component.exports[t])return;component.exports[t]=!0;var n=component.exports.render;component.exports.render=function(t,r){return n(t,Object.assign({},r,{_c:function(t,a,b){return r._c(e[t]||t,a,b)}}))}}(component,n.components)};var t="_functionalComponents"}).call(this,n(53))},359:function(e,t,n){"use strict";n.r(t),function(e){n(58),n(45),n(76),n(32),n(77),n(78);var t=n(28),r=n(18),o=(n(140),n(375),n(387),n(389),n(93),n(12),n(11),n(31),n(36),n(37),n(72),n(73),n(51),n(57),n(33),n(52),n(22),n(121),n(2)),l=n(299),c=n(173),d=n(3),h=n(42),f=n(302),m=n(126);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i2?t-2:0),r=2;r1&&void 0!==arguments[1]?arguments[1]:C,n=arguments.length>2?arguments[2]:void 0;return r.call(this,e,t,n)};var o=n.resolve.bind(n);return n.resolve=function(e,t,n){return"string"==typeof e&&(e=Object(w.c)(e)),o(e,t,n)},n}var $={name:"NuxtChild",functional:!0,props:{nuxtChildKey:{type:String,default:""},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0}},render:function(e,t){var n=t.parent,data=t.data,r=t.props,o=n.$createElement;data.nuxtChild=!0;for(var l=n,c=n.$nuxt.nuxt.transitions,d=n.$nuxt.nuxt.defaultTransition,h=0;n;)n.$vnode&&n.$vnode.data.nuxtChild&&h++,n=n.$parent;data.nuxtChildDepth=h;var f=c[h]||d,m={};P.forEach((function(e){void 0!==f[e]&&(m[e]=f[e])}));var v={};M.forEach((function(e){"function"==typeof f[e]&&(v[e]=f[e].bind(l))}));var y=v.beforeEnter;if(v.beforeEnter=function(e){if(window.$nuxt.$nextTick((function(){window.$nuxt.$emit("triggerScroll")})),y)return y.call(l,e)},!1===f.css){var w=v.leave;(!w||w.length<2)&&(v.leave=function(e,t){w&&w.call(l,e),l.$nextTick(t)})}var k=o("routerView",data);return r.keepAlive&&(k=o("keep-alive",{props:r.keepAliveProps},[k])),o("transition",{props:m,on:v},[k])}},P=["name","mode","appear","css","type","duration","enterClass","leaveClass","appearClass","enterActiveClass","enterActiveClass","leaveActiveClass","appearActiveClass","enterToClass","leaveToClass","appearToClass"],M=["beforeEnter","enter","afterEnter","enterCancelled","beforeLeave","leave","afterLeave","leaveCancelled","beforeAppear","appear","afterAppear","appearCancelled"],O=n(50),A=n(21),T=(n(45),{name:"Nuxt",components:{NuxtChild:$,NuxtError:O.a},props:{nuxtChildKey:{type:String,default:void 0},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0},name:{type:String,default:"default"}},errorCaptured:function(e){this.displayingNuxtError&&(this.errorFromNuxtError=e,this.$forceUpdate())},computed:{routerViewKey:function(){if(void 0!==this.nuxtChildKey||this.$route.matched.length>1)return this.nuxtChildKey||Object(k.c)(this.$route.matched[0].path)(this.$route.params);var e=Object(A.a)(this.$route.matched,1)[0];if(!e)return this.$route.path;var t=e.components.default;if(t&&t.options){var n=t.options;if(n.key)return"function"==typeof n.key?n.key(this.$route):n.key}return/\/$/.test(e.path)?this.$route.path:this.$route.path.replace(/\/$/,"")}},beforeCreate:function(){c.a.util.defineReactive(this,"nuxt",this.$root.$options.nuxt)},render:function(e){var t=this;return this.nuxt.err?this.errorFromNuxtError?(this.$nextTick((function(){return t.errorFromNuxtError=!1})),e("div",{},[e("h2","An error occurred while showing the error page"),e("p","Unfortunately an error occurred and while showing the error page another error occurred"),e("p","Error details: ".concat(this.errorFromNuxtError.toString())),e("nuxt-link",{props:{to:"/"}},"Go back to home")])):(this.displayingNuxtError=!0,this.$nextTick((function(){return t.displayingNuxtError=!1})),e(O.a,{props:{error:this.nuxt.err}})):e("NuxtChild",{key:this.routerViewKey,props:this.$props})}}),B=(n(58),n(76),n(77),n(78),n(313)),F=(n(413),n(303));function I(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},isPreview:function(){return Boolean(this.$options.previewData)}},methods:{refreshOnlineStatus:function(){void 0===window.navigator.onLine?this.isOnline=!0:this.isOnline=window.navigator.onLine},refresh:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=Object(k.h)(e.$route)).length){t.next=3;break}return t.abrupt("return");case 3:return e.$loading.start(),r=n.map(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(n){var p,r,o,component;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p=[],n.$options.fetch&&n.$options.fetch.length&&p.push(Object(k.q)(n.$options.fetch,e.context)),n.$options.asyncData&&p.push(Object(k.q)(n.$options.asyncData,e.context).then((function(e){for(var t in e)c.a.set(n.$data,t,e[t])}))),t.next=5,Promise.all(p);case 5:p=[],n.$fetch&&p.push(n.$fetch()),r=I(Object(k.e)(n.$vnode.componentInstance));try{for(r.s();!(o=r.n()).done;)component=o.value,p.push(component.$fetch())}catch(e){r.e(e)}finally{r.f()}return t.abrupt("return",Promise.all(p));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.prev=5,t.next=8,Promise.all(r);case 8:t.next=15;break;case 10:t.prev=10,t.t0=t.catch(5),e.$loading.fail(t.t0),Object(k.k)(t.t0),e.error(t.t0);case 15:e.$loading.finish();case 16:case"end":return t.stop()}}),t,null,[[5,10]])})))()},errorChanged:function(){if(this.nuxt.err){this.$loading&&(this.$loading.fail&&this.$loading.fail(this.nuxt.err),this.$loading.finish&&this.$loading.finish());var e=(O.a.options||O.a).layout;"function"==typeof e&&(e=e(this.context)),this.setLayout(e)}},setLayout:function(e){return e&&E["_"+e]||(e="default"),this.layoutName=e,this.layout=E["_"+e],this.layout},loadLayout:function(e){return e&&E["_"+e]||(e="default"),Promise.resolve(E["_"+e])}},components:{NuxtLoading:B.a}},V=(n(72),n(73),function(){return n.e(0).then(n.bind(null,157)).then((function(e){return it(e.default||e)}))}),L=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(8)]).then(n.bind(null,165)).then((function(e){return it(e.default||e)}))},H=function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,304)).then((function(e){return it(e.default||e)}))},z=function(){return n.e(0).then(n.bind(null,514)).then((function(e){return it(e.default||e)}))},j=function(){return Promise.all([n.e(0),n.e(1),n.e(4),n.e(21)]).then(n.bind(null,158)).then((function(e){return it(e.default||e)}))},W=function(){return Promise.all([n.e(0),n.e(47)]).then(n.bind(null,161)).then((function(e){return it(e.default||e)}))},Y=function(){return Promise.all([n.e(0),n.e(48)]).then(n.bind(null,94)).then((function(e){return it(e.default||e)}))},U=function(){return Promise.all([n.e(0),n.e(49)]).then(n.bind(null,159)).then((function(e){return it(e.default||e)}))},K=function(){return Promise.all([n.e(0),n.e(1),n.e(50)]).then(n.bind(null,160)).then((function(e){return it(e.default||e)}))},X=function(){return Promise.all([n.e(0),n.e(51)]).then(n.bind(null,148)).then((function(e){return it(e.default||e)}))},G=function(){return Promise.all([n.e(0),n.e(1),n.e(52)]).then(n.bind(null,30)).then((function(e){return it(e.default||e)}))},Q=function(){return Promise.all([n.e(0),n.e(1),n.e(53)]).then(n.bind(null,96)).then((function(e){return it(e.default||e)}))},J=function(){return Promise.all([n.e(0),n.e(54)]).then(n.bind(null,164)).then((function(e){return it(e.default||e)}))},Z=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(55)]).then(n.bind(null,10)).then((function(e){return it(e.default||e)}))},ee=function(){return Promise.all([n.e(0),n.e(1),n.e(4),n.e(59)]).then(n.bind(null,151)).then((function(e){return it(e.default||e)}))},te=function(){return Promise.all([n.e(0),n.e(60)]).then(n.bind(null,162)).then((function(e){return it(e.default||e)}))},ne=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(4),n.e(61)]).then(n.bind(null,149)).then((function(e){return it(e.default||e)}))},ie=function(){return Promise.all([n.e(0),n.e(62)]).then(n.bind(null,163)).then((function(e){return it(e.default||e)}))},ae=function(){return Promise.all([n.e(0),n.e(64)]).then(n.bind(null,95)).then((function(e){return it(e.default||e)}))},re=function(){return Promise.all([n.e(0),n.e(65)]).then(n.bind(null,150)).then((function(e){return it(e.default||e)}))},se=function(){return Promise.all([n.e(0),n.e(1),n.e(42)]).then(n.bind(null,152)).then((function(e){return it(e.default||e)}))},oe=function(){return Promise.all([n.e(0),n.e(43)]).then(n.bind(null,153)).then((function(e){return it(e.default||e)}))},le=function(){return Promise.all([n.e(0),n.e(44)]).then(n.bind(null,154)).then((function(e){return it(e.default||e)}))},ue=function(){return Promise.all([n.e(0),n.e(45)]).then(n.bind(null,156)).then((function(e){return it(e.default||e)}))},ce=function(){return Promise.all([n.e(0),n.e(1),n.e(46)]).then(n.bind(null,155)).then((function(e){return it(e.default||e)}))},de=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(22)]).then(n.bind(null,508)).then((function(e){return it(e.default||e)}))},he=function(){return n.e(0).then(n.bind(null,502)).then((function(e){return it(e.default||e)}))},fe=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(23)]).then(n.bind(null,509)).then((function(e){return it(e.default||e)}))},pe=function(){return n.e(0).then(n.bind(null,515)).then((function(e){return it(e.default||e)}))},me=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(26)]).then(n.bind(null,482)).then((function(e){return it(e.default||e)}))},ve=function(){return n.e(0).then(n.bind(null,56)).then((function(e){return it(e.default||e)}))},ge=function(){return n.e(0).then(n.bind(null,69)).then((function(e){return it(e.default||e)}))},be=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(33)]).then(n.bind(null,481)).then((function(e){return it(e.default||e)}))},ye=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(34)]).then(n.bind(null,479)).then((function(e){return it(e.default||e)}))},we=function(){return n.e(0).then(n.bind(null,510)).then((function(e){return it(e.default||e)}))},ke=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(35)]).then(n.bind(null,483)).then((function(e){return it(e.default||e)}))},Se=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(39)]).then(n.bind(null,487)).then((function(e){return it(e.default||e)}))},xe=function(){return Promise.all([n.e(0),n.e(56)]).then(n.bind(null,169)).then((function(e){return it(e.default||e)}))},Ce=function(){return Promise.all([n.e(0),n.e(57)]).then(n.bind(null,322)).then((function(e){return it(e.default||e)}))},De=function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,171)).then((function(e){return it(e.default||e)}))},_e=function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,97)).then((function(e){return it(e.default||e)}))},$e=function(){return n.e(0).then(n.bind(null,172)).then((function(e){return it(e.default||e)}))},Pe=function(){return Promise.all([n.e(0),n.e(5),n.e(58)]).then(n.bind(null,170)).then((function(e){return it(e.default||e)}))},Me=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(63)]).then(n.bind(null,480)).then((function(e){return it(e.default||e)}))},Oe=function(){return Promise.all([n.e(0),n.e(9)]).then(n.bind(null,167)).then((function(e){return it(e.default||e)}))},Ae=function(){return Promise.all([n.e(0),n.e(10)]).then(n.bind(null,168)).then((function(e){return it(e.default||e)}))},Te=function(){return Promise.all([n.e(0),n.e(11)]).then(n.bind(null,321)).then((function(e){return it(e.default||e)}))},Be=function(){return n.e(0).then(n.bind(null,166)).then((function(e){return it(e.default||e)}))},Fe=function(){return Promise.all([n.e(0),n.e(13)]).then(n.bind(null,312)).then((function(e){return it(e.default||e)}))},Ie=function(){return Promise.all([n.e(0),n.e(14)]).then(n.bind(null,311)).then((function(e){return it(e.default||e)}))},Ne=function(){return Promise.all([n.e(0),n.e(15)]).then(n.bind(null,309)).then((function(e){return it(e.default||e)}))},Ee=function(){return Promise.all([n.e(0),n.e(16)]).then(n.bind(null,307)).then((function(e){return it(e.default||e)}))},Re=function(){return Promise.all([n.e(0),n.e(17)]).then(n.bind(null,305)).then((function(e){return it(e.default||e)}))},Ve=function(){return Promise.all([n.e(0),n.e(18)]).then(n.bind(null,310)).then((function(e){return it(e.default||e)}))},Le=function(){return Promise.all([n.e(0),n.e(19)]).then(n.bind(null,308)).then((function(e){return it(e.default||e)}))},He=function(){return Promise.all([n.e(0),n.e(20)]).then(n.bind(null,306)).then((function(e){return it(e.default||e)}))},ze=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(27)]).then(n.bind(null,490)).then((function(e){return it(e.default||e)}))},je=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(28)]).then(n.bind(null,491)).then((function(e){return it(e.default||e)}))},We=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(29)]).then(n.bind(null,492)).then((function(e){return it(e.default||e)}))},Ye=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(30)]).then(n.bind(null,493)).then((function(e){return it(e.default||e)}))},qe=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(31)]).then(n.bind(null,494)).then((function(e){return it(e.default||e)}))},Ue=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(32)]).then(n.bind(null,495)).then((function(e){return it(e.default||e)}))},Ke=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(24)]).then(n.bind(null,496)).then((function(e){return it(e.default||e)}))},Xe=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(25)]).then(n.bind(null,497)).then((function(e){return it(e.default||e)}))},Ge=function(){return n.e(0).then(n.bind(null,511)).then((function(e){return it(e.default||e)}))},Qe=function(){return n.e(0).then(n.bind(null,512)).then((function(e){return it(e.default||e)}))},Je=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(36)]).then(n.bind(null,484)).then((function(e){return it(e.default||e)}))},Ze=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(37)]).then(n.bind(null,485)).then((function(e){return it(e.default||e)}))},et=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(38)]).then(n.bind(null,486)).then((function(e){return it(e.default||e)}))},tt=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(40)]).then(n.bind(null,488)).then((function(e){return it(e.default||e)}))},nt=function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(41)]).then(n.bind(null,489)).then((function(e){return it(e.default||e)}))};function it(e){if(!e||!e.functional)return e;var t=Array.isArray(e.props)?e.props:Object.keys(e.props||{});return{render:function(n){var r={},o={};for(var l in this.$attrs)t.includes(l)?o[l]=this.$attrs[l]:r[l]=this.$attrs[l];return n(e,{on:this.$listeners,attrs:r,props:o,scopedSlots:this.$scopedSlots},this.$slots.default)}}}for(var at in r)c.a.component(at,r[at]),c.a.component("Lazy"+at,r[at]);var st=n(176),ot=n.n(st);c.a.use(ot.a,{duration:100});var lt=function(e,t){t("scrollTo",ot.a.scrollTo)};function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ht(e,t){for(var i=0;i=0||(n[t]=source[t]);return n}(source,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,t)&&(n[t]=source[t])}return n}function kt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function St(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xt(e,i){return Dt(e)||function(e,i){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var t=[],n=!0,r=!1,o=void 0;try{for(var l,c=e[Symbol.iterator]();!(n=(l=c.next()).done)&&(t.push(l.value),!i||t.length!==i);n=!0);}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}return t}(e,i)||$t()}function Ct(e){return function(e){if(Array.isArray(e)){for(var i=0,t=new Array(e.length);i0?1:0};function Mt(e,t){return(e&t)===t}function Ot(e,t){return(e%t+t)%t}function At(e,t,n){return Math.max(t,Math.min(n,e))}function Tt(e,path){return path.split(".").reduce((function(e,i){return e?e[i]:null}),e)}function Bt(e,t,n){if(!e)return-1;if(!n||"function"!=typeof n)return e.indexOf(t);for(var i=0;i2&&void 0!==arguments[2]&&arguments[2];if(n||!Object.assign){var r=Object.getOwnPropertyNames(source).map((function(r){return ft({},r,function(e){return Ft(source[e])&&null!==t&&t.hasOwnProperty(e)&&Ft(t[e])}(r)?e(t[r],source[r],n):source[r])})).reduce((function(a,b){return mt({},a,{},b)}),{});return mt({},t,{},r)}return Object.assign(t,source)},Nt={Android:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Android/i)},BlackBerry:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return"undefined"!=typeof window&&(window.navigator.userAgent.match(/iPhone|iPad|iPod/i)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1)},Opera:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return"undefined"!=typeof window&&window.navigator.userAgent.match(/IEMobile/i)},any:function(){return Nt.Android()||Nt.BlackBerry()||Nt.iOS()||Nt.Opera()||Nt.Windows()}};function Et(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}function Rt(e){var t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";var n=document.createElement("div");return t.appendChild(n),n.appendChild(e),document.body.appendChild(t),t}function Vt(e){return e&&e._isVue}function Lt(e){return e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Ht(e,t){var n;return JSON.parse(JSON.stringify(e)).sort((n=t,function(a,b){return n.map((function(e){var t=1;"-"===e[0]&&(t=-1,e=e.substring(1));var n=Tt(a,e),r=Tt(b,e);return n>r?t:n/g).map((function(e){var t=e.match(/<(.+)>/);return!t||t.length<=0?null:e.match(/<(.+)>/)[1]})).reduce((function(e,n,r,o){return t&&t.length>r?e[n]=t[r+1]:e[n]=null,e}),{})}function Wt(e){return"shadowRoot"in e.$root.$options}var Yt,qt=function(e){return void 0!==e},Ut=function(e){return null==e},Kt={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultIconPrev:"chevron-left",defaultIconNext:"chevron-right",defaultLocale:void 0,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,defaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipDelay:null,defaultTooltipCloseDelay:null,defaultSidebarDelay:null,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultTimeCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:["escape","x","outside","button"],defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultTaginputHasCounter:!0,defaultUseHtml5Validation:!0,defaultDropdownMobileModal:!0,defaultFieldLabelPosition:null,defaultDatepickerYearsRange:[-100,10],defaultDatepickerNearbyMonthDays:!0,defaultDatepickerNearbySelectableMonthDays:!1,defaultDatepickerShowWeekNumber:!1,defaultDatepickerWeekNumberClickable:!1,defaultDatepickerMobileModal:!0,defaultTrapFocus:!0,defaultAutoFocus:!0,defaultButtonRounded:!1,defaultSwitchRounded:!0,defaultCarouselInterval:3500,defaultTabsExpanded:!1,defaultTabsAnimated:!0,defaultTabsType:null,defaultStatusIcon:!0,defaultProgrammaticPromise:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"],defaultImageWebpFallback:null,defaultImageLazy:!0,defaultImageResponsive:!0,defaultImageRatio:null,defaultImageSrcsetFormatter:null,defaultBreadcrumbTag:"a",defaultBreadcrumbAlign:"is-left",defaultBreadcrumbSeparator:"",defaultBreadcrumbSize:"is-medium",customIconPacks:null},Xt=function(e){Kt=e},Gt=function(e){Yt=e};var Qt=function(template,style,script,e,t,n,r,o,l,c){"boolean"!=typeof r&&(l=o,o=r,r=!1);var d,h="function"==typeof script?script.options:script;if(template&&template.render&&(h.render=template.render,h.staticRenderFns=template.staticRenderFns,h._compiled=!0,t&&(h.functional=!0)),e&&(h._scopeId=e),n?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),style&&style.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(n)},h._ssrRegister=d):style&&(d=r?function(){style.call(this,c(this.$root.$options.shadowRoot))}:function(e){style.call(this,o(e))}),d)if(h.functional){var f=h.render;h.render=function(e,t){return d.call(t),f(e,t)}}else{var m=h.beforeCreate;h.beforeCreate=m?[].concat(m,d):[d]}return script},use=function(e){"undefined"!=typeof window&&window.Vue&&window.Vue.use(e)},Jt=function(e,component){e.component(component.name,component)},Zt=function(e,t,component){e.prototype.$buefy||(e.prototype.$buefy={}),e.prototype.$buefy[t]=component},en={props:{size:String,expanded:Boolean,loading:Boolean,rounded:Boolean,icon:String,iconPack:String,autocomplete:String,maxlength:[Number,String],useHtml5Validation:{type:Boolean,default:function(){return Kt.defaultUseHtml5Validation}},validationMessage:String,locale:{type:[String,Array],default:function(){return Kt.defaultLocale}},statusIcon:{type:Boolean,default:function(){return Kt.defaultStatusIcon}}},data:function(){return{isValid:!0,isFocused:!1,newIconPack:this.iconPack||Kt.defaultIconPack}},computed:{parentField:function(){for(var e=this.$parent,i=0;i<3;i++)e&&!e.$data._isField&&(e=e.$parent);return e},statusType:function(){var e=(this.parentField||{}).newType;if(e){if("string"==typeof e)return e;for(var t in e)if(e[t])return t}},statusMessage:function(){if(this.parentField)return this.parentField.newMessage||this.parentField.$slots.message},iconSize:function(){switch(this.size){case"is-small":return this.size;case"is-medium":return;case"is-large":return"mdi"===this.newIconPack?"is-medium":""}}},methods:{focus:function(){var e=this.getElement();void 0!==e&&this.$nextTick((function(){e&&e.focus()}))},onBlur:function(e){this.isFocused=!1,this.$emit("blur",e),this.checkHtml5Validity()},onFocus:function(e){this.isFocused=!0,this.$emit("focus",e)},getElement:function(){for(var e=this.$refs[this.$data._elementRef];Vt(e);)e=e.$refs[e.$data._elementRef];return e},setInvalid:function(){var e=this.validationMessage||this.getElement().validationMessage;this.setValidity("is-danger",e)},setValidity:function(e,t){var n=this;this.$nextTick((function(){n.parentField&&(n.parentField.type||(n.parentField.newType=e),n.parentField.message||(n.parentField.newMessage=t))}))},checkHtml5Validity:function(){if(this.useHtml5Validation){var e=this.getElement();if(void 0!==e)return e.checkValidity()?(this.setValidity(null,null),this.isValid=!0):(this.setInvalid(),this.isValid=!1),this.isValid}}}},tn={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},nn=function(){var e=Kt&&Kt.defaultIconComponent?"":"fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var an=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"icon",class:[e.newType,e.size]},[e.useIconComponent?n(e.useIconComponent,{tag:"component",class:[e.customClass],attrs:{icon:[e.newPack,e.newIcon],size:e.newCustomSize}}):n("i",{class:[e.newPack,e.newIcon,e.newCustomSize,e.customClass]})],1)},staticRenderFns:[]},undefined,{name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{iconConfig:function(){var e;return(e={mdi:tn,fa:nn(),fas:nn(),far:nn(),fad:nn(),fab:nn(),fal:nn(),"fa-solid":nn(),"fa-regular":nn(),"fa-light":nn(),"fa-thin":nn(),"fa-duotone":nn(),"fa-brands":nn()},Kt&&Kt.customIconPacks&&(e=It(e,Kt.customIconPacks,!0)),e)[this.newPack]},iconPrefix:function(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon:function(){return"".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon))},newPack:function(){return this.pack||Kt.defaultIconPack},newType:function(){if(this.type){var e=[];if("string"==typeof this.type)e=this.type.split("-");else for(var t in this.type)if(this.type[t]){e=t.split("-");break}if(!(e.length<=1)){var n,r=(Dt(n=e)||_t(n)||$t()).slice(1);return"has-text-".concat(r.join("-"))}}},newCustomSize:function(){return this.customSize||this.customSizeByPack},customSizeByPack:function(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent:function(){return this.component||Kt.defaultIconComponent}},methods:{getEquivalentIconOf:function(e){return this.both&&this.iconConfig&&this.iconConfig.internalIcons&&this.iconConfig.internalIcons[e]?this.iconConfig.internalIcons[e]:e}}},undefined,!1,undefined,void 0,void 0);var rn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:e.rootClasses},["textarea"!==e.type?n("input",e._b({ref:"input",staticClass:"input",class:[e.inputClasses,e.customClass],attrs:{type:e.newType,autocomplete:e.newAutocomplete,maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,change:e.onChange,blur:e.onBlur,focus:e.onFocus}},"input",e.$attrs,!1)):n("textarea",e._b({ref:"textarea",staticClass:"textarea",class:[e.inputClasses,e.customClass],attrs:{maxlength:e.maxlength},domProps:{value:e.computedValue},on:{input:e.onInput,change:e.onChange,blur:e.onBlur,focus:e.onFocus}},"textarea",e.$attrs,!1)),e.icon?n("b-icon",{staticClass:"is-left",class:{"is-clickable":e.iconClickable},attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize},nativeOn:{click:function(t){return e.iconClick("icon-click",t)}}}):e._e(),!e.loading&&e.hasIconRight?n("b-icon",{staticClass:"is-right",class:{"is-clickable":e.passwordReveal||e.iconRightClickable},attrs:{icon:e.rightIcon,pack:e.iconPack,size:e.iconSize,type:e.rightIconType,both:""},nativeOn:{click:function(t){return e.rightIconClick(t)}}}):e._e(),e.maxlength&&e.hasCounter&&"number"!==e.type?n("small",{staticClass:"help counter",class:{"is-invisible":!e.isFocused}},[e._v(" "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+" ")]):e._e()],1)},staticRenderFns:[]},undefined,{name:"BInput",components:ft({},an.name,an),mixins:[en],inheritAttrs:!1,props:{value:[Number,String],type:{type:String,default:"text"},lazy:{type:Boolean,default:!1},passwordReveal:Boolean,iconClickable:Boolean,hasCounter:{type:Boolean,default:function(){return Kt.defaultInputHasCounter}},customClass:{type:String,default:""},iconRight:String,iconRightClickable:Boolean,iconRightType:String},data:function(){return{newValue:this.value,newType:this.type,newAutocomplete:this.autocomplete||Kt.defaultInputAutocomplete,isPasswordVisible:!1,_elementRef:"textarea"===this.type?"textarea":"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}},rootClasses:function(){return[this.iconPosition,this.size,{"is-expanded":this.expanded,"is-loading":this.loading,"is-clearfix":!this.hasMessage}]},inputClasses:function(){return[this.statusType,this.size,{"is-rounded":this.rounded}]},hasIconRight:function(){return this.passwordReveal||this.loading||this.statusIcon&&this.statusTypeIcon||this.iconRight},rightIcon:function(){return this.passwordReveal?this.passwordVisibleIcon:this.iconRight?this.iconRight:this.statusTypeIcon},rightIconType:function(){return this.passwordReveal?"is-primary":this.iconRight?this.iconRightType||null:this.statusType},iconPosition:function(){var e="";return this.icon&&(e+="has-icons-left "),this.hasIconRight&&(e+="has-icons-right"),e},statusTypeIcon:function(){switch(this.statusType){case"is-success":return"check";case"is-danger":return"alert-circle";case"is-info":return"information";case"is-warning":return"alert"}},hasMessage:function(){return!!this.statusMessage},passwordVisibleIcon:function(){return this.isPasswordVisible?"eye-off":"eye"},valueLength:function(){return"string"==typeof this.computedValue?Array.from(this.computedValue).length:"number"==typeof this.computedValue?this.computedValue.toString().length:0}},watch:{value:function(e){this.newValue=e},type:function(e){this.newType=e}},methods:{togglePasswordVisibility:function(){var e=this;this.isPasswordVisible=!this.isPasswordVisible,this.newType=this.isPasswordVisible?"text":"password",this.$nextTick((function(){e.focus()}))},iconClick:function(e,t){var n=this;this.$emit(e,t),this.$nextTick((function(){n.focus()}))},rightIconClick:function(e){this.passwordReveal?this.togglePasswordVisibility():this.iconRightClickable&&this.iconClick("icon-right-click",e)},onInput:function(e){if(!this.lazy){var t=e.target.value;this.updateValue(t)}},onChange:function(e){if(this.lazy){var t=e.target.value;this.updateValue(t)}},updateValue:function(e){this.computedValue=e,!this.isValid&&this.checkHtml5Validity()}}},undefined,!1,undefined,void 0,void 0),sn={name:"BAutocomplete",components:ft({},rn.name,rn),mixins:[en],inheritAttrs:!1,props:{value:[Number,String],data:{type:Array,default:function(){return[]}},field:{type:String,default:"value"},keepFirst:Boolean,clearOnSelect:Boolean,openOnFocus:Boolean,customFormatter:Function,checkInfiniteScroll:Boolean,keepOpen:Boolean,selectOnClickOutside:Boolean,clearable:Boolean,maxHeight:[String,Number],dropdownPosition:{type:String,default:"auto"},groupField:String,groupOptions:String,iconRight:String,iconRightClickable:Boolean,appendToBody:Boolean,type:{type:String,default:"text"},confirmKeys:{type:Array,default:function(){return["Tab","Enter"]}},selectableHeader:Boolean,selectableFooter:Boolean},data:function(){return{selected:null,hovered:null,headerHovered:null,footerHovered:null,isActive:!1,newValue:this.value,newAutocomplete:this.autocomplete||"off",ariaAutocomplete:this.keepFirst?"both":"list",isListInViewportVertically:!0,hasFocus:!1,style:{},_isAutocomplete:!0,_elementRef:"input",_bodyEl:void 0}},computed:{computedData:function(){var e=this;if(this.groupField){if(this.groupOptions){var t=[];return this.data.forEach((function(option){var n=Tt(option,e.groupField),r=Tt(option,e.groupOptions);t.push({group:n,items:r})})),t}var n={};this.data.forEach((function(option){var t=Tt(option,e.groupField);n[t]||(n[t]=[]),n[t].push(option)}));var r=[];return Object.keys(n).forEach((function(e){r.push({group:e,items:n[e]})})),r}return[{items:this.data}]},isEmpty:function(){return!this.computedData||!this.computedData.some((function(element){return element.items&&element.items.length}))},whiteList:function(){var e=[];if(e.push(this.$refs.input.$el.querySelector("input")),e.push(this.$refs.dropdown),void 0!==this.$refs.dropdown){var t=this.$refs.dropdown.querySelectorAll("*"),n=!0,r=!1,o=void 0;try{for(var l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var d=l.value;e.push(d)}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}if(this.$parent.$data._isTaginput){e.push(this.$parent.$el);var h=this.$parent.$el.querySelectorAll("*"),f=!0,m=!1,v=void 0;try{for(var y,w=h[Symbol.iterator]();!(f=(y=w.next()).done);f=!0){var k=y.value;e.push(k)}}catch(e){m=!0,v=e}finally{try{f||null==w.return||w.return()}finally{if(m)throw v}}}return e},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasGroupSlot:function(){return!!this.$scopedSlots.group},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer},isOpenedTop:function(){return"top"===this.dropdownPosition||"auto"===this.dropdownPosition&&!this.isListInViewportVertically},newIconRight:function(){return this.clearable&&this.newValue?"close-circle":this.iconRight},newIconRightClickable:function(){return!!this.clearable||this.iconRightClickable},contentStyle:function(){return{maxHeight:zt(this.maxHeight)}}},watch:{isActive:function(e){var t=this;"auto"===this.dropdownPosition&&(e?this.calcDropdownInViewportVertical():setTimeout((function(){t.calcDropdownInViewportVertical()}),100))},checkInfiniteScroll:function(e){if(!1!==(this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content"))){var t=this.$refs.dropdown.querySelector(".dropdown-content");!0!==e?t.removeEventListener("scroll",this.checkIfReachedTheEndOfScroll):t.addEventListener("scroll",this.checkIfReachedTheEndOfScroll)}},newValue:function(e){this.$emit("input",e);var t=this.getValue(this.selected);t&&t!==e&&this.setSelected(null,!1),!this.hasFocus||this.openOnFocus&&!e||(this.isActive=!!e)},value:function(e){this.newValue=e},data:function(){var e=this;if(this.keepFirst)this.$nextTick((function(){e.isActive?e.selectFirstOption(e.computedData):e.setHovered(null)}));else if(this.hovered){var t=this.getValue(this.hovered),data=this.computedData.map((function(e){return e.items})).reduce((function(a,b){return[].concat(Ct(a),Ct(b))}),[]);data.some((function(n){return e.getValue(n)===t}))||this.setHovered(null)}}},methods:{setHovered:function(option){void 0!==option&&(this.hovered=option)},setSelected:function(option){var e=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(void 0!==option){if(this.selected=option,this.$emit("select",this.selected,n),null!==this.selected){if(this.clearOnSelect){var input=this.$refs.input;input.newValue="",input.$refs.input.value=""}else this.newValue=this.getValue(this.selected);this.setHovered(null)}t&&this.$nextTick((function(){e.isActive=!1})),this.checkValidity()}},selectFirstOption:function(e){var t=this;this.$nextTick((function(){var n=e.filter((function(element){return element.items&&element.items.length}));if(n.length){var option=n[0].items[0];t.setHovered(option)}else t.setHovered(null)}))},keydown:function(e){var t=e.key;if("Enter"===t&&e.preventDefault(),"Escape"!==t&&"Tab"!==t||(this.isActive=!1),this.confirmKeys.indexOf(t)>=0){","===t&&e.preventDefault();var n=!this.keepOpen||"Tab"===t;if(null===this.hovered)return void this.checkIfHeaderOrFooterSelected(e,null,n);this.setSelected(this.hovered,n,e)}},selectHeaderOrFoterByClick:function(e,t){this.checkIfHeaderOrFooterSelected(e,{origin:t})},checkIfHeaderOrFooterSelected:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.selectableHeader&&(this.headerHovered||t&&"header"===t.origin)&&(this.$emit("select-header",e),this.headerHovered=!1,t&&this.setHovered(null),n&&(this.isActive=!1)),this.selectableFooter&&(this.footerHovered||t&&"footer"===t.origin)&&(this.$emit("select-footer",e),this.footerHovered=!1,t&&this.setHovered(null),n&&(this.isActive=!1))},clickedOutside:function(e){var t=Wt(this)?e.composedPath()[0]:e.target;!this.hasFocus&&this.whiteList.indexOf(t)<0&&(this.keepFirst&&this.hovered&&this.selectOnClickOutside?this.setSelected(this.hovered,!0):this.isActive=!1)},getValue:function(option){if(null!==option)return void 0!==this.customFormatter?this.customFormatter(option):"object"===ut(option)?Tt(option,this.field):option},checkIfReachedTheEndOfScroll:function(){var e=this.$refs.dropdown.querySelector(".dropdown-content"),t=this.hasFooterSlot?e.querySelectorAll("div.dropdown-footer")[0].clientHeight:0;e.clientHeight!==e.scrollHeight&&e.scrollTop+e.parentElement.clientHeight+t>=e.scrollHeight&&this.$emit("infinite-scroll")},calcDropdownInViewportVertical:function(){var e=this;this.$nextTick((function(){if(void 0!==e.$refs.dropdown){var rect=e.$refs.dropdown.getBoundingClientRect();e.isListInViewportVertically=rect.top>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight),e.appendToBody&&e.updateAppendToBody()}}))},keyArrows:function(e){var t="down"===e?1:-1;if(this.isActive){var n,data=this.computedData.map((function(e){return e.items})).reduce((function(a,b){return[].concat(Ct(a),Ct(b))}),[]);this.hasHeaderSlot&&this.selectableHeader&&data.unshift(void 0),this.hasFooterSlot&&this.selectableFooter&&data.push(void 0),n=(n=(n=this.headerHovered?0+t:this.footerHovered?data.length-1+t:data.indexOf(this.hovered)+t)>data.length-1?data.length-1:n)<0?0:n,this.footerHovered=!1,this.headerHovered=!1,this.setHovered(void 0!==data[n]?data[n]:null),this.hasFooterSlot&&this.selectableFooter&&n===data.length-1&&(this.footerHovered=!0),this.hasHeaderSlot&&this.selectableHeader&&0===n&&(this.headerHovered=!0);var r=this.$refs.dropdown.querySelector(".dropdown-content"),o="a.dropdown-item:not(.is-disabled)";this.hasHeaderSlot&&this.selectableHeader&&(o+=",div.dropdown-header"),this.hasFooterSlot&&this.selectableFooter&&(o+=",div.dropdown-footer");var element=r.querySelectorAll(o)[n];if(!element)return;var l=r.scrollTop,c=r.scrollTop+r.clientHeight-element.clientHeight;element.offsetTop=c&&(r.scrollTop=element.offsetTop-r.clientHeight+element.clientHeight)}else this.isActive=!0},focused:function(e){this.getValue(this.selected)===this.newValue&&this.$el.querySelector("input").select(),this.openOnFocus&&(this.isActive=!0,this.keepFirst&&this.selectFirstOption(this.computedData)),this.hasFocus=!0,this.$emit("focus",e)},onBlur:function(e){this.hasFocus=!1,this.$emit("blur",e)},onInput:function(){var e=this.getValue(this.selected);e&&e===this.newValue||(this.$emit("typing",this.newValue),this.checkValidity())},rightIconClick:function(e){this.clearable?(this.newValue="",this.setSelected(null,!1),this.openOnFocus&&this.$refs.input.$el.focus()):this.$emit("icon-right-click",e)},checkValidity:function(){var e=this;this.useHtml5Validation&&this.$nextTick((function(){e.checkHtml5Validity()}))},updateAppendToBody:function(){var e=this.$refs.dropdown,t=this.$refs.input.$el;if(e&&t){var n=this.$data._bodyEl;n.classList.forEach((function(e){return n.classList.remove(e)})),n.classList.add("autocomplete"),n.classList.add("control"),this.expandend&&n.classList.add("is-expandend");var rect=t.getBoundingClientRect(),r=rect.top+window.scrollY,o=rect.left+window.scrollX;this.isOpenedTop?r-=e.clientHeight:r+=t.clientHeight,this.style={position:"absolute",top:"".concat(r,"px"),left:"".concat(o,"px"),width:"".concat(t.clientWidth,"px"),maxWidth:"".concat(t.clientWidth,"px"),zIndex:"99"}}}},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.addEventListener("resize",this.calcDropdownInViewportVertical))},mounted:function(){this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content")&&this.$refs.dropdown.querySelector(".dropdown-content").addEventListener("scroll",this.checkIfReachedTheEndOfScroll);this.appendToBody&&(this.$data._bodyEl=Rt(this.$refs.dropdown),this.updateAppendToBody())},beforeDestroy:function(){("undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),"auto"===this.dropdownPosition&&window.removeEventListener("resize",this.calcDropdownInViewportVertical)),this.checkInfiniteScroll&&this.$refs.dropdown&&this.$refs.dropdown.querySelector(".dropdown-content"))&&this.$refs.dropdown.querySelector(".dropdown-content").removeEventListener("scroll",this.checkIfReachedTheEndOfScroll);this.appendToBody&&Et(this.$data._bodyEl)}};var on=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"autocomplete control",class:{"is-expanded":e.expanded}},[n("b-input",e._b({ref:"input",attrs:{type:e.type,size:e.size,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-right":e.newIconRight,"icon-right-clickable":e.newIconRightClickable,"icon-pack":e.iconPack,maxlength:e.maxlength,autocomplete:e.newAutocomplete,"use-html5-validation":!1,"aria-autocomplete":e.ariaAutocomplete},on:{input:e.onInput,focus:e.focused,blur:e.onBlur,"icon-right-click":e.rightIconClick,"icon-click":function(t){return e.$emit("icon-click",t)}},nativeOn:{keydown:[function(t){return e.keydown(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.keyArrows("up"))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.keyArrows("down"))}]},model:{value:e.newValue,callback:function(t){e.newValue=t},expression:"newValue"}},"b-input",e.$attrs,!1)),n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive&&(!e.isEmpty||e.hasEmptySlot||e.hasHeaderSlot),expression:"isActive && (!isEmpty || hasEmptySlot || hasHeaderSlot)"}],ref:"dropdown",staticClass:"dropdown-menu",class:{"is-opened-top":e.isOpenedTop&&!e.appendToBody},style:e.style},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"dropdown-content",style:e.contentStyle},[e.hasHeaderSlot?n("div",{staticClass:"dropdown-item dropdown-header",class:{"is-hovered":e.headerHovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.selectHeaderOrFoterByClick(t,"header")}}},[e._t("header")],2):e._e(),e._l(e.computedData,(function(element,t){return[element.group?n("div",{key:t+"group",staticClass:"dropdown-item"},[e.hasGroupSlot?e._t("group",null,{group:element.group,index:t}):n("span",{staticClass:"has-text-weight-bold"},[e._v(" "+e._s(element.group)+" ")])],2):e._e(),e._l(element.items,(function(option,r){return n("a",{key:t+":"+r,staticClass:"dropdown-item",class:{"is-hovered":option===e.hovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return t.stopPropagation(),e.setSelected(option,!e.keepOpen,t)}}},[e.hasDefaultSlot?e._t("default",null,{option:option,index:r}):n("span",[e._v(" "+e._s(e.getValue(option,!0))+" ")])],2)}))]})),e.isEmpty&&e.hasEmptySlot?n("div",{staticClass:"dropdown-item is-disabled"},[e._t("empty")],2):e._e(),e.hasFooterSlot?n("div",{staticClass:"dropdown-item dropdown-footer",class:{"is-hovered":e.footerHovered},attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.selectHeaderOrFoterByClick(t,"footer")}}},[e._t("footer")],2):e._e()],2)])])],1)},staticRenderFns:[]},undefined,sn,undefined,!1,undefined,void 0,void 0),ln={install:function(e){Jt(e,on)}};use(ln);var un=ln;var cn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{class:e.breadcrumbClasses},[n("ul",[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BBreadcrumb",props:{align:{type:String,default:function(){return Kt.defaultBreadcrumbAlign}},separator:{type:String,default:function(){return Kt.defaultBreadcrumbSeparator}},size:{type:String,default:function(){return Kt.defaultBreadcrumbSize}}},computed:{breadcrumbClasses:function(){return["breadcrumb",this.align,this.separator,this.size]}}},undefined,!1,undefined,void 0,void 0);var dn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{class:{"is-active":e.active}},[n(e.tag,e._g(e._b({tag:"component"},"component",e.$attrs,!1),e.$listeners),[e._t("default")],2)],1)},staticRenderFns:[]},undefined,{name:"BBreadcrumbItem",inheritAttrs:!1,props:{tag:{type:String,default:function(){return Kt.defaultBreadcrumbTag}},active:Boolean}},undefined,!1,undefined,void 0,void 0),hn={install:function(e){Jt(e,cn),Jt(e,dn)}};use(hn);var fn=hn;var pn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.computedTag,e._g(e._b({tag:"component",staticClass:"button",class:[e.size,e.type,{"is-rounded":e.rounded,"is-loading":e.loading,"is-outlined":e.outlined,"is-fullwidth":e.expanded,"is-inverted":e.inverted,"is-focused":e.focused,"is-active":e.active,"is-hovered":e.hovered,"is-selected":e.selected}],attrs:{type:"button"===e.computedTag?e.nativeType:void 0}},"component",e.$attrs,!1),e.$listeners),[e.iconLeft?n("b-icon",{attrs:{pack:e.iconPack,icon:e.iconLeft,size:e.iconSize}}):e._e(),e.label?n("span",[e._v(e._s(e.label))]):e.$slots.default?n("span",[e._t("default")],2):e._e(),e.iconRight?n("b-icon",{attrs:{pack:e.iconPack,icon:e.iconRight,size:e.iconSize}}):e._e()],1)},staticRenderFns:[]},undefined,{name:"BButton",components:ft({},an.name,an),inheritAttrs:!1,props:{type:[String,Object],size:String,label:String,iconPack:String,iconLeft:String,iconRight:String,rounded:{type:Boolean,default:function(){return Kt.defaultButtonRounded}},loading:Boolean,outlined:Boolean,expanded:Boolean,inverted:Boolean,focused:Boolean,active:Boolean,hovered:Boolean,selected:Boolean,nativeType:{type:String,default:"button",validator:function(e){return["button","submit","reset"].indexOf(e)>=0}},tag:{type:String,default:"button",validator:function(e){return Kt.defaultLinkTags.indexOf(e)>=0}}},computed:{computedTag:function(){return void 0!==this.$attrs.disabled&&!1!==this.$attrs.disabled?"button":this.tag},iconSize:function(){return this.size&&"is-medium"!==this.size?"is-large"===this.size?"is-medium":this.size:"is-small"}}},undefined,!1,undefined,void 0,void 0),mn={install:function(e){Jt(e,pn)}};use(mn);var vn=mn,gn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={provide:function(){return ft({},"b"+e,this)}};return Mt(t,1)&&(n.data=function(){return{childItems:[]}},n.methods={_registerItem:function(e){this.childItems.push(e)},_unregisterItem:function(e){this.childItems=this.childItems.filter((function(i){return i!==e}))}},Mt(t,3)&&(n.watch={childItems:function(e){if(e.length>0&&this.$scopedSlots.default){var t=e[0].$vnode.tag,n=0;!function r(o){var l=!0,c=!1,d=void 0;try{for(var h,f=function(){var o=h.value;if(o.tag===t){var l=e.find((function(i){return i.$vnode===o}));l&&(l.index=n++)}else if(o.tag){var sub=o.componentInstance?o.componentInstance.$scopedSlots.default?o.componentInstance.$scopedSlots.default():o.componentInstance.$children:o.children;Array.isArray(sub)&&sub.length>0&&r(sub.map((function(e){return e.$vnode})))}},m=o[Symbol.iterator]();!(l=(h=m.next()).done);l=!0)f()}catch(e){c=!0,d=e}finally{try{l||null==m.return||m.return()}finally{if(c)throw d}}return!1}(this.$scopedSlots.default())}}},n.computed={sortedItems:function(){return this.childItems.slice().sort((function(e,t){return e.index-t.index}))}})),n},bn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n={inject:{parent:{from:"b"+e,default:!1}},created:function(){if(this.parent)this.parent._registerItem&&this.parent._registerItem(this);else if(!Mt(t,2))throw this.$destroy(),new Error("You should wrap "+this.$options.name+" in a "+e)},beforeDestroy:function(){this.parent&&this.parent._unregisterItem&&this.parent._unregisterItem(this)}};return Mt(t,1)&&(n.data=function(){return{index:null}}),n},yn={name:"BImage",props:{src:String,alt:String,srcFallback:String,webpFallback:{type:String,default:function(){return Kt.defaultImageWebpFallback}},lazy:{type:Boolean,default:function(){return Kt.defaultImageLazy}},responsive:{type:Boolean,default:function(){return Kt.defaultImageResponsive}},ratio:{type:String,default:function(){return Kt.defaultImageRatio}},placeholder:String,srcset:String,srcsetSizes:Array,srcsetFormatter:{type:Function,default:function(e,t,n){return"function"==typeof Kt.defaultImageSrcsetFormatter?Kt.defaultImageSrcsetFormatter(e,t):n.formatSrcset(e,t)}},rounded:{type:Boolean,default:!1},captionFirst:{type:Boolean,default:!1},customClass:String},data:function(){return{clientWidth:0,webpSupportVerified:!1,webpSupported:!1,useNativeLazy:!1,observer:null,inViewPort:!1,bulmaKnownRatio:["square","1by1","5by4","4by3","3by2","5by3","16by9","b2y1","3by1","4by5","3by4","2by3","3by5","9by16","1by2","1by3"],loaded:!1,failed:!1}},computed:{ratioPattern:function(){return new RegExp(/([0-9]+)by([0-9]+)/)},hasRatio:function(){return this.ratio&&this.ratioPattern.test(this.ratio)},figureClasses:function(){var e={image:this.responsive};return this.hasRatio&&this.bulmaKnownRatio.indexOf(this.ratio)>=0&&(e["is-".concat(this.ratio)]=!0),e},figureStyles:function(){if(this.hasRatio&&this.bulmaKnownRatio.indexOf(this.ratio)<0){var e=this.ratioPattern.exec(this.ratio);return{paddingTop:"".concat(e[2]/e[1]*100,"%")}}},imgClasses:function(){return ft({"is-rounded":this.rounded,"has-ratio":this.hasRatio},this.customClass,!!this.customClass)},srcExt:function(){return this.getExt(this.src)},isWepb:function(){return"webp"===this.srcExt},computedSrc:function(){var e=this.src;return this.failed&&this.srcFallback&&(e=this.srcFallback),!this.webpSupported&&this.isWepb&&this.webpFallback?this.webpFallback.startsWith(".")?e.replace(/\.webp/gi,"".concat(this.webpFallback)):this.webpFallback:e},computedWidth:function(){if(this.responsive&&this.clientWidth>0)return this.clientWidth},computedNativeLazy:function(){if(this.lazy&&this.useNativeLazy)return"lazy"},isDisplayed:function(){return(this.webpSupportVerified||!this.isWepb)&&(!this.lazy||this.useNativeLazy||this.inViewPort)},placeholderExt:function(){if(this.placeholder)return this.getExt(this.placeholder)},isPlaceholderWepb:function(){if(this.placeholder)return"webp"===this.placeholderExt},computedPlaceholder:function(){return!this.webpSupported&&this.isPlaceholderWepb&&this.webpFallback&&this.webpFallback.startsWith(".")?this.placeholder.replace(/\.webp/gi,"".concat(this.webpFallback)):this.placeholder},isPlaceholderDisplayed:function(){return!this.loaded&&(this.$slots.placeholder||this.placeholder&&(this.webpSupportVerified||!this.isPlaceholderWepb))},computedSrcset:function(){var e=this;return this.srcset?!this.webpSupported&&this.isWepb&&this.webpFallback&&this.webpFallback.startsWith(".")?this.srcset.replace(/\.webp/gi,"".concat(this.webpFallback)):this.srcset:this.srcsetSizes&&Array.isArray(this.srcsetSizes)&&this.srcsetSizes.length>0?this.srcsetSizes.map((function(t){return"".concat(e.srcsetFormatter(e.computedSrc,t,e)," ").concat(t,"w")})).join(","):void 0},computedSizes:function(){if(this.computedSrcset&&this.computedWidth)return"".concat(this.computedWidth,"px")},isCaptionFirst:function(){return this.$slots.caption&&this.captionFirst},isCaptionLast:function(){return this.$slots.caption&&!this.captionFirst}},methods:{getExt:function(e){return e?(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?e.split("?")[0]:e).split(".").pop():""},setWidth:function(){this.clientWidth=this.$el.clientWidth},formatSrcset:function(e,t){var n=this.getExt(e,!1),r=e.split(".").slice(0,-1).join(".");return"".concat(r,"-").concat(t,".").concat(n)},onLoad:function(e){this.loaded=!0,this.emit("load",e)},onError:function(e){this.emit("error",e),this.failed||(this.failed=!0)},emit:function(e,t){var n=t.target;this.$emit(e,t,n.currentSrc||n.src||this.computedSrc)}},created:function(){var e=this;if(this.isWepb&&new Promise((function(e){var image=new Image;image.onerror=function(){return e(!1)},image.onload=function(){return e(1===image.width)},image.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA="})).catch((function(){return!1})).then((function(t){e.webpSupportVerified=!0,e.webpSupported=t})),this.lazy){var t="undefined"!=typeof window&&"HTMLImageElement"in window&&"loading"in HTMLImageElement.prototype,n="undefined"!=typeof window&&"IntersectionObserver"in window;!t&&n?this.observer=new IntersectionObserver((function(t){var n=t[0],r=n.target;n.isIntersecting&&!e.inViewPort&&(e.inViewPort=!0,e.observer.unobserve(r))})):this.useNativeLazy=!0}},mounted:function(){this.lazy&&this.observer&&this.observer.observe(this.$el),this.setWidth(),"undefined"!=typeof window&&window.addEventListener("resize",this.setWidth)},beforeDestroy:function(){this.observer&&this.observer.disconnect(),"undefined"!=typeof window&&window.removeEventListener("resize",this.setWidth)}};var wn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("figure",{staticClass:"b-image-wrapper",class:e.figureClasses,style:e.figureStyles},[e.isCaptionFirst?n("figcaption",[e._t("caption")],2):e._e(),n("transition",{attrs:{name:"fade"}},[e.isDisplayed?n("img",{class:e.imgClasses,attrs:{srcset:e.computedSrcset,src:e.computedSrc,alt:e.alt,width:e.computedWidth,sizes:e.computedSizes,loading:e.computedNativeLazy},on:{load:e.onLoad,error:e.onError}}):e._e()]),n("transition",{attrs:{name:"fade"}},[e.isPlaceholderDisplayed?e._t("placeholder",[n("img",{staticClass:"placeholder",class:e.imgClasses,attrs:{src:e.computedPlaceholder,alt:e.alt}})]):e._e()],2),e.isCaptionLast?n("figcaption",[e._t("caption")],2):e._e()],1)},staticRenderFns:[]},undefined,yn,undefined,!1,undefined,void 0,void 0),kn={name:"BCarousel",components:ft({},an.name,an),mixins:[gn("carousel",3)],props:{value:{type:Number,default:0},animated:{type:String,default:"slide"},interval:Number,hasDrag:{type:Boolean,default:!0},autoplay:{type:Boolean,default:!0},pauseHover:{type:Boolean,default:!0},pauseInfo:{type:Boolean,default:!0},pauseInfoType:{type:String,default:"is-white"},pauseText:{type:String,default:"Pause"},arrow:{type:Boolean,default:!0},arrowHover:{type:Boolean,default:!0},repeat:{type:Boolean,default:!0},iconPack:String,iconSize:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},indicator:{type:Boolean,default:!0},indicatorBackground:Boolean,indicatorCustom:Boolean,indicatorCustomSize:{type:String,default:"is-small"},indicatorInside:{type:Boolean,default:!0},indicatorMode:{type:String,default:"click"},indicatorPosition:{type:String,default:"is-bottom"},indicatorStyle:{type:String,default:"is-dots"},overlay:Boolean,progress:Boolean,progressType:{type:String,default:"is-primary"},withCarouselList:Boolean},data:function(){return{transition:"next",activeChild:this.value||0,isPause:!1,dragX:!1,timer:null}},computed:{indicatorClasses:function(){return[{"has-background":this.indicatorBackground,"has-custom":this.indicatorCustom,"is-inside":this.indicatorInside},this.indicatorCustom&&this.indicatorCustomSize,this.indicatorInside&&this.indicatorPosition]},hasPrev:function(){return this.repeat||0!==this.activeChild},hasNext:function(){return this.repeat||this.activeChild=e.length&&this.activeChild>0&&this.changeActive(this.activeChild-1)},autoplay:function(e){e?this.startTimer():this.pauseTimer()},repeat:function(e){e&&this.startTimer()}},methods:{startTimer:function(){var e=this;this.autoplay&&!this.timer&&(this.isPause=!1,this.timer=setInterval((function(){!e.repeat&&e.activeChild>=e.childItems.length-1?e.pauseTimer():e.next()}),this.interval||Kt.defaultCarouselInterval))},pauseTimer:function(){this.isPause=!0,this.timer&&(clearInterval(this.timer),this.timer=null)},restartTimer:function(){this.pauseTimer(),this.startTimer()},checkPause:function(){this.pauseHover&&this.autoplay&&this.pauseTimer()},changeActive:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.activeChild===e||isNaN(e)||(t=t||e-this.activeChild,e=this.repeat?Ot(e,this.childItems.length):At(e,0,this.childItems.length-1),this.transition=t>0?"prev":"next",this.activeChild=e,e!==this.value&&this.$emit("input",e),this.restartTimer(),this.$emit("change",e))},modeChange:function(e,t){if(this.indicatorMode===e)return this.changeActive(t)},prev:function(){this.changeActive(this.activeChild-1,-1)},next:function(){this.changeActive(this.activeChild+1,1)},dragStart:function(e){this.hasDrag&&e.target.draggable&&(this.dragX=e.touches?e.changedTouches[0].pageX:e.pageX,e.touches?this.pauseTimer():e.preventDefault())},dragEnd:function(e){if(!1!==this.dragX){var t=(e.touches?e.changedTouches[0].pageX:e.pageX)-this.dragX;Math.abs(t)>30?t<0?this.next():this.prev():(e.target.click(),this.sortedItems[this.activeChild].$emit("click"),this.$emit("click")),e.touches&&this.startTimer(),this.dragX=!1}}},mounted:function(){this.startTimer()},beforeDestroy:function(){this.pauseTimer()}};var Sn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"carousel",class:{"is-overlay":e.overlay},on:{mouseenter:e.checkPause,mouseleave:e.startTimer}},[e.progress?n("progress",{staticClass:"progress",class:e.progressType,attrs:{max:e.childItems.length-1},domProps:{value:e.activeChild}},[e._v(" "+e._s(e.childItems.length-1)+" ")]):e._e(),n("div",{staticClass:"carousel-items",on:{mousedown:e.dragStart,mouseup:e.dragEnd,touchstart:function(t){return t.stopPropagation(),e.dragStart(t)},touchend:function(t){return t.stopPropagation(),e.dragEnd(t)}}},[e._t("default"),e.arrow?n("div",{staticClass:"carousel-arrow",class:{"is-hovered":e.arrowHover}},[n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasPrev,expression:"hasPrev"}],staticClass:"has-icons-left",attrs:{pack:e.iconPack,icon:e.iconPrev,size:e.iconSize,both:""},nativeOn:{click:function(t){return e.prev(t)}}}),n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasNext,expression:"hasNext"}],staticClass:"has-icons-right",attrs:{pack:e.iconPack,icon:e.iconNext,size:e.iconSize,both:""},nativeOn:{click:function(t){return e.next(t)}}})],1):e._e()],2),e.autoplay&&e.pauseHover&&e.pauseInfo&&e.isPause?n("div",{staticClass:"carousel-pause"},[n("span",{staticClass:"tag",class:e.pauseInfoType},[e._v(" "+e._s(e.pauseText)+" ")])]):e._e(),e.withCarouselList&&!e.indicator?[e._t("list",null,{active:e.activeChild,switch:e.changeActive})]:e._e(),e.indicator?n("div",{staticClass:"carousel-indicator",class:e.indicatorClasses},e._l(e.sortedItems,(function(t,r){return n("a",{key:t._uid,staticClass:"indicator-item",class:{"is-active":t.isActive},on:{mouseover:function(t){return e.modeChange("hover",r)},click:function(t){return e.modeChange("click",r)}}},[e._t("indicators",[n("span",{staticClass:"indicator-style",class:e.indicatorStyle})],{i:r})],2)})),0):e._e(),e.overlay?[e._t("overlay")]:e._e()],2)},staticRenderFns:[]},undefined,kn,undefined,!1,undefined,void 0,void 0);var xn,Cn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.transition}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"carousel-item"},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BCarouselItem",mixins:[bn("carousel",1)],data:function(){return{transitionName:null}},computed:{transition:function(){return"fade"===this.parent.animated?"fade":this.parent.transition?"slide-"+this.parent.transition:void 0},isActive:function(){return this.parent.activeChild===this.index}}},undefined,!1,undefined,void 0,void 0);var Dn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"carousel-list",class:{"has-shadow":e.scrollIndex>0},on:{mousedown:function(t){return t.preventDefault(),e.dragStart(t)},touchstart:e.dragStart}},[n("div",{staticClass:"carousel-slides",class:e.listClass,style:"transform:translateX("+e.translation+"px)"},e._l(e.data,(function(t,r){return n("div",{key:r,staticClass:"carousel-slide",class:{"is-active":e.asIndicator?e.activeItem===r:e.scrollIndex===r},style:e.itemStyle,on:{mouseup:function(t){return e.checkAsIndicator(r,t)},touchend:function(t){return e.checkAsIndicator(r,t)}}},[e._t("item",[n("b-image",e._b({attrs:{src:t.image}},"b-image",t,!1))],{index:r,active:e.activeItem,scroll:e.scrollIndex,list:t},t)],2)})),0),e.arrow?n("div",{staticClass:"carousel-arrow",class:{"is-hovered":e.settings.arrowHover}},[n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasPrev,expression:"hasPrev"}],staticClass:"has-icons-left",attrs:{pack:e.settings.iconPack,icon:e.settings.iconPrev,size:e.settings.iconSize,both:""},nativeOn:{click:function(t){return t.preventDefault(),e.prev(t)}}}),n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.hasNext,expression:"hasNext"}],staticClass:"has-icons-right",attrs:{pack:e.settings.iconPack,icon:e.settings.iconNext,size:e.settings.iconSize,both:""},nativeOn:{click:function(t){return t.preventDefault(),e.next(t)}}})],1):e._e()])},staticRenderFns:[]},undefined,{name:"BCarouselList",components:(xn={},ft(xn,an.name,an),ft(xn,wn.name,wn),xn),props:{data:{type:Array,default:function(){return[]}},value:{type:Number,default:0},scrollValue:{type:Number,default:0},hasDrag:{type:Boolean,default:!0},hasGrayscale:Boolean,hasOpacity:Boolean,repeat:Boolean,itemsToShow:{type:Number,default:4},itemsToList:{type:Number,default:1},asIndicator:Boolean,arrow:{type:Boolean,default:!0},arrowHover:{type:Boolean,default:!0},iconPack:String,iconSize:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},breakpoints:{type:Object,default:function(){return{}}}},data:function(){return{activeItem:this.value,scrollIndex:this.asIndicator?this.scrollValue:this.value,delta:0,dragX:!1,hold:0,windowWidth:0,touch:!1,observer:null,refresh_:0}},computed:{dragging:function(){return!1!==this.dragX},listClass:function(){return[{"has-grayscale":this.settings.hasGrayscale,"has-opacity":this.settings.hasOpacity,"is-dragging":this.dragging}]},itemStyle:function(){return"width: ".concat(this.itemWidth,"px;")},translation:function(){return-At(this.delta+this.scrollIndex*this.itemWidth,0,(this.data.length-this.settings.itemsToShow)*this.itemWidth)},total:function(){return this.data.length-this.settings.itemsToShow},hasPrev:function(){return this.settings.repeat||this.scrollIndex>0},hasNext:function(){return this.settings.repeat||this.scrollIndex=t)return!0}))[0];return t?mt({},this.$props,{},this.breakpoints[t]):this.$props},itemWidth:function(){return this.windowWidth?(this.refresh_,this.$el.getBoundingClientRect().width/this.settings.itemsToShow):0}},watch:{value:function(e){this.switchTo(this.asIndicator?e-(this.itemsToShow-3)/2:e),this.activeItem!==e&&(this.activeItem=At(e,0,this.data.length-1))},scrollValue:function(e){this.switchTo(e)}},methods:{resized:function(){this.windowWidth=window.innerWidth},switchTo:function(e){e===this.scrollIndex||isNaN(e)||(this.settings.repeat&&(e=Ot(e,this.total+1)),e=At(e,0,this.total),this.scrollIndex=e,this.asIndicator||this.value===e?this.scrollIndex!==e&&this.$emit("updated:scroll",e):this.$emit("input",e))},next:function(){this.switchTo(this.scrollIndex+this.settings.itemsToList)},prev:function(){this.switchTo(this.scrollIndex-this.settings.itemsToList)},checkAsIndicator:function(e,t){if(this.asIndicator){var n=t.changedTouches?t.changedTouches[0].clientX:t.clientX;this.hold-Date.now()>2e3||Math.abs(this.dragX-n)>10||(this.dragX=!1,this.hold=0,t.preventDefault(),this.activeItem=e,this.$emit("switch",e))}},dragStart:function(e){this.dragging||!this.settings.hasDrag||0!==e.button&&"touchstart"!==e.type||(this.hold=Date.now(),this.touch=!!e.touches,this.dragX=this.touch?e.touches[0].clientX:e.clientX,window.addEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.addEventListener(this.touch?"touchend":"mouseup",this.dragEnd))},dragMove:function(e){if(this.dragging){var t=e.touches?(e.changedTouches[0]||e.touches[0]).clientX:e.clientX;this.delta=this.dragX-t,e.touches||e.preventDefault()}},dragEnd:function(){if(this.dragging||this.hold){if(this.hold){var e=Pt(this.delta),t=Math.round(Math.abs(this.delta/this.itemWidth)+.15);this.switchTo(this.scrollIndex+e*t)}this.delta=0,this.dragX=!1,window.removeEventListener(this.touch?"touchmove":"mousemove",this.dragMove),window.removeEventListener(this.touch?"touchend":"mouseup",this.dragEnd)}},refresh:function(){var e=this;this.$nextTick((function(){e.refresh_++}))}},mounted:function(){if("undefined"!=typeof window&&(window.ResizeObserver&&(this.observer=new ResizeObserver(this.refresh),this.observer.observe(this.$el)),window.addEventListener("resize",this.resized),document.addEventListener("animationend",this.refresh),document.addEventListener("transitionend",this.refresh),document.addEventListener("transitionstart",this.refresh),this.resized()),this.$attrs.config)throw new Error("The config prop was removed, you need to use v-bind instead")},beforeDestroy:function(){"undefined"!=typeof window&&(window.ResizeObserver&&this.observer.disconnect(),window.removeEventListener("resize",this.resized),document.removeEventListener("animationend",this.refresh),document.removeEventListener("transitionend",this.refresh),document.removeEventListener("transitionstart",this.refresh),this.dragEnd())}},undefined,!1,undefined,void 0,void 0),_n={install:function(e){Jt(e,Sn),Jt(e,Cn),Jt(e,Dn)}};use(_n);var $n=_n,Pn={props:{value:[String,Number,Boolean,Function,Object,Array],nativeValue:[String,Number,Boolean,Function,Object,Array],type:String,disabled:Boolean,required:Boolean,name:String,size:String},data:function(){return{newValue:this.value}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}}},watch:{value:function(e){this.newValue=e}},methods:{focus:function(){this.$refs.input.focus()}}};var Mn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{ref:"label",staticClass:"b-checkbox checkbox",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.$refs.label.click())}]}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"checkbox",autocomplete:e.autocomplete,disabled:e.disabled,required:e.required,name:e.name,"true-value":e.trueValue,"false-value":e.falseValue,"aria-labelledby":e.ariaLabelledby},domProps:{indeterminate:e.indeterminate,value:e.nativeValue,checked:Array.isArray(e.computedValue)?e._i(e.computedValue,e.nativeValue)>-1:e._q(e.computedValue,e.trueValue)},on:{click:function(e){e.stopPropagation()},change:function(t){var n=e.computedValue,r=t.target,o=r.checked?e.trueValue:e.falseValue;if(Array.isArray(n)){var l=e.nativeValue,c=e._i(n,l);r.checked?c<0&&(e.computedValue=n.concat([l])):c>-1&&(e.computedValue=n.slice(0,c).concat(n.slice(c+1)))}else e.computedValue=o}}}),n("span",{staticClass:"check",class:e.type}),n("span",{staticClass:"control-label",attrs:{id:e.ariaLabelledby}},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BCheckbox",mixins:[Pn],props:{indeterminate:Boolean,ariaLabelledby:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array],default:!1},autocomplete:{type:String,default:"on"}}},undefined,!1,undefined,void 0,void 0);var On=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:{"is-expanded":e.expanded}},[n("label",{ref:"label",staticClass:"b-checkbox checkbox button",class:[e.checked?e.type:null,e.size,{"is-disabled":e.disabled,"is-focused":e.isFocused}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())}}},[e._t("default"),n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"checkbox",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:Array.isArray(e.computedValue)?e._i(e.computedValue,e.nativeValue)>-1:e.computedValue},on:{click:function(e){e.stopPropagation()},focus:function(t){e.isFocused=!0},blur:function(t){e.isFocused=!1},change:function(t){var n=e.computedValue,r=t.target,o=!!r.checked;if(Array.isArray(n)){var l=e.nativeValue,c=e._i(n,l);r.checked?c<0&&(e.computedValue=n.concat([l])):c>-1&&(e.computedValue=n.slice(0,c).concat(n.slice(c+1)))}else e.computedValue=o}}})],2)])},staticRenderFns:[]},undefined,{name:"BCheckboxButton",mixins:[Pn],props:{type:{type:String,default:"is-primary"},expanded:Boolean},data:function(){return{isFocused:!1}},computed:{checked:function(){return Array.isArray(this.newValue)?this.newValue.indexOf(this.nativeValue)>=0:this.newValue===this.nativeValue}}},undefined,!1,undefined,void 0,void 0),An={install:function(e){Jt(e,Mn),Jt(e,On)}};use(An);var Tn=An;var Bn=Qt({},undefined,{name:"BCollapse",model:{prop:"open",event:"update:open"},props:{open:{type:Boolean,default:!0},animation:{type:String,default:"fade"},ariaId:{type:String,default:""},position:{type:String,default:"is-top",validator:function(e){return["is-top","is-bottom"].indexOf(e)>-1}}},data:function(){return{isOpen:this.open}},watch:{open:function(e){this.isOpen=e}},methods:{toggle:function(){this.isOpen=!this.isOpen,this.$emit("update:open",this.isOpen),this.$emit(this.isOpen?"open":"close")}},render:function(e){var t=e("div",{staticClass:"collapse-trigger",on:{click:this.toggle}},this.$scopedSlots.trigger?[this.$scopedSlots.trigger({open:this.isOpen})]:[this.$slots.trigger]),content=e("transition",{props:{name:this.animation}},[e("div",{staticClass:"collapse-content",attrs:{id:this.ariaId},directives:[{name:"show",value:this.isOpen}]},this.$slots.default)]);return e("div",{staticClass:"collapse"},"is-top"===this.position?[t,content]:[content,t])}},undefined,undefined,undefined,void 0,void 0),Fn={install:function(e){Jt(e,Bn)}};use(Fn);var In,Nn=Fn,En="AM",Rn="PM",Vn="24",Ln="12",Hn={mixins:[en],inheritAttrs:!1,props:{value:Date,inline:Boolean,minTime:Date,maxTime:Date,placeholder:String,editable:Boolean,disabled:Boolean,hourFormat:{type:String,validator:function(e){return e===Vn||e===Ln}},incrementHours:{type:Number,default:1},incrementMinutes:{type:Number,default:1},incrementSeconds:{type:Number,default:1},timeFormatter:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultTimeFormatter?Kt.defaultTimeFormatter(e):function(e,t){return t.dtf.format(e)}(e,t)}},timeParser:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultTimeParser?Kt.defaultTimeParser(e):function(e,t){if(e){var n=null;if(t.computedValue&&!isNaN(t.computedValue)?n=new Date(t.computedValue):(n=t.timeCreator()).setMilliseconds(0),t.dtf.formatToParts&&"function"==typeof t.dtf.formatToParts){var r=jt(t.dtf.formatToParts(n).map((function(e){return"literal"===e.type?e.value.replace(/ /g,"\\s?"):"dayPeriod"===e.type?"((?!=<".concat(e.type,">)(").concat(t.amString,"|").concat(t.pmString,"|").concat(En,"|").concat(Rn,"|").concat(En.toLowerCase(),"|").concat(Rn.toLowerCase(),")?)"):"((?!=<".concat(e.type,">)\\d+)")})).join(""),e);if(r.hour=r.hour?parseInt(r.hour,10):null,r.minute=r.minute?parseInt(r.minute,10):null,r.second=r.second?parseInt(r.second,10):null,r.hour&&r.hour>=0&&r.hour<24&&r.minute&&r.minute>=0&&r.minute<59)return r.dayPeriod&&(r.dayPeriod.toLowerCase()===t.pmString.toLowerCase()||r.dayPeriod.toLowerCase()===Rn.toLowerCase())&&r.hour<12&&(r.hour+=12),n.setHours(r.hour),n.setMinutes(r.minute),n.setSeconds(r.second||0),n}var o=!1;if(t.hourFormat===Ln){var l=e.split(" ");e=l[0],o=l[1]===t.amString||l[1]===En}var time=e.split(":"),c=parseInt(time[0],10),d=parseInt(time[1],10),h=t.enableSeconds?parseInt(time[2],10):0;return isNaN(c)||c<0||c>23||t.hourFormat===Ln&&(c<1||c>12)||isNaN(d)||d<0||d>59?null:(n.setSeconds(h),n.setMinutes(d),t.hourFormat===Ln&&(o&&12===c?c=0:o||12===c||(c+=12)),n.setHours(c),new Date(n.getTime()))}return null}(e,t)}},mobileNative:{type:Boolean,default:function(){return Kt.defaultTimepickerMobileNative}},timeCreator:{type:Function,default:function(){return"function"==typeof Kt.defaultTimeCreator?Kt.defaultTimeCreator():new Date}},position:String,unselectableTimes:Array,openOnFocus:Boolean,enableSeconds:Boolean,defaultMinutes:Number,defaultSeconds:Number,focusable:{type:Boolean,default:!0},tzOffset:{type:Number,default:0},appendToBody:Boolean,resetOnMeridianChange:{type:Boolean,default:!1}},data:function(){return{dateSelected:this.value,hoursSelected:null,minutesSelected:null,secondsSelected:null,meridienSelected:null,_elementRef:"input",AM:En,PM:Rn,HOUR_FORMAT_24:Vn,HOUR_FORMAT_12:Ln}},computed:{computedValue:{get:function(){return this.dateSelected},set:function(e){this.dateSelected=e,this.$emit("input",this.dateSelected)}},localeOptions:function(){return new Intl.DateTimeFormat(this.locale,{hour:"numeric",minute:"numeric",second:this.enableSeconds?"numeric":void 0}).resolvedOptions()},dtf:function(){return new Intl.DateTimeFormat(this.locale,{hour:this.localeOptions.hour||"numeric",minute:this.localeOptions.minute||"numeric",second:this.enableSeconds?this.localeOptions.second||"numeric":void 0,hourCycle:this.isHourFormat24?"h23":"h12"})},newHourFormat:function(){return this.hourFormat||(this.localeOptions.hour12?Ln:Vn)},sampleTime:function(){var e=this.timeCreator();return e.setHours(10),e.setSeconds(0),e.setMinutes(0),e.setMilliseconds(0),e},hourLiteral:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime,t=this.dtf.formatToParts(e),n=t.find((function(e,n){return n>0&&"hour"===t[n-1].type}));if(n)return n.value}return":"},minuteLiteral:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime,t=this.dtf.formatToParts(e),n=t.find((function(e,n){return n>0&&"minute"===t[n-1].type}));if(n)return n.value}return":"},secondLiteral:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime,t=this.dtf.formatToParts(e),n=t.find((function(e,n){return n>0&&"second"===t[n-1].type}));if(n)return n.value}},amString:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime;e.setHours(10);var t=this.dtf.formatToParts(e).find((function(e){return"dayPeriod"===e.type}));if(t)return t.value}return En},pmString:function(){if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var e=this.sampleTime;e.setHours(20);var t=this.dtf.formatToParts(e).find((function(e){return"dayPeriod"===e.type}));if(t)return t.value}return Rn},hours:function(){if(!this.incrementHours||this.incrementHours<1)throw new Error("Hour increment cannot be null or less than 1.");for(var e=[],t=this.isHourFormat24?24:12,i=0;i=12?this.pmString:this.amString)},locale:function(){this.value||(this.meridienSelected=this.amString)},value:{handler:function(e){this.updateInternalState(e),!this.isValid&&this.$refs.input.checkHtml5Validity()},immediate:!0}},methods:{onMeridienChange:function(e){null!==this.hoursSelected&&this.resetOnMeridianChange?(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.computedValue=null):null!==this.hoursSelected&&(e===this.pmString?this.hoursSelected+=12:e===this.amString&&(this.hoursSelected-=12)),this.updateDateSelected(this.hoursSelected,this.minutesSelected,this.enableSeconds?this.secondsSelected:0,e)},onHoursChange:function(e){this.minutesSelected||void 0===this.defaultMinutes||(this.minutesSelected=this.defaultMinutes),this.secondsSelected||void 0===this.defaultSeconds||(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(parseInt(e,10),this.minutesSelected,this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onMinutesChange:function(e){!this.secondsSelected&&this.defaultSeconds&&(this.secondsSelected=this.defaultSeconds),this.updateDateSelected(this.hoursSelected,parseInt(e,10),this.enableSeconds?this.secondsSelected:0,this.meridienSelected)},onSecondsChange:function(e){this.updateDateSelected(this.hoursSelected,this.minutesSelected,parseInt(e,10),this.meridienSelected)},updateDateSelected:function(e,t,n,r){if(null!=e&&null!=t&&(!this.isHourFormat24&&null!==r||this.isHourFormat24)){var time=null;this.computedValue&&!isNaN(this.computedValue)?time=new Date(this.computedValue):(time=this.timeCreator()).setMilliseconds(0),time.setHours(e),time.setMinutes(t),time.setSeconds(n),isNaN(time.getTime())||(this.computedValue=new Date(time.getTime()))}},updateInternalState:function(e){e?(this.hoursSelected=e.getHours(),this.minutesSelected=e.getMinutes(),this.secondsSelected=e.getSeconds(),this.meridienSelected=e.getHours()>=12?this.pmString:this.amString):(this.hoursSelected=null,this.minutesSelected=null,this.secondsSelected=null,this.meridienSelected=this.amString),this.dateSelected=e},isHourDisabled:function(e){var t=this,n=!1;if(this.minTime){var r=this.minTime.getHours(),o=this.minutes.every((function(n){return t.isMinuteDisabledForHour(e,n.value)}));n=el}this.unselectableTimes&&(n||(n=this.unselectableTimes.filter((function(time){return t.enableSeconds&&null!==t.secondsSelected?time.getHours()===e&&time.getMinutes()===t.minutesSelected&&time.getSeconds()===t.secondsSelected:null!==t.minutesSelected&&(time.getHours()===e&&time.getMinutes()===t.minutesSelected)})).length>0||this.minutes.every((function(n){return t.unselectableTimes.filter((function(time){return time.getHours()===e&&time.getMinutes()===n.value})).length>0}))));return n},isMinuteDisabledForHour:function(e,t){var n=!1;if(this.minTime){var r=this.minTime.getHours(),o=this.minTime.getMinutes();n=e===r&&tc}return n},isMinuteDisabled:function(e){var t=this,n=!1;null!==this.hoursSelected&&(n=!!this.isHourDisabled(this.hoursSelected)||this.isMinuteDisabledForHour(this.hoursSelected,e),this.unselectableTimes&&(n||(n=this.unselectableTimes.filter((function(time){return t.enableSeconds&&null!==t.secondsSelected?time.getHours()===t.hoursSelected&&time.getMinutes()===e&&time.getSeconds()===t.secondsSelected:time.getHours()===t.hoursSelected&&time.getMinutes()===e})).length>0)));return n},isSecondDisabled:function(e){var t=this,n=!1;if(null!==this.minutesSelected){if(this.isMinuteDisabled(this.minutesSelected))n=!0;else{if(this.minTime){var r=this.minTime.getHours(),o=this.minTime.getMinutes(),l=this.minTime.getSeconds();n=this.hoursSelected===r&&this.minutesSelected===o&&eh}}if(this.unselectableTimes)if(!n)n=this.unselectableTimes.filter((function(time){return time.getHours()===t.hoursSelected&&time.getMinutes()===t.minutesSelected&&time.getSeconds()===e})).length>0}return n},onChange:function(e){var t=this.timeParser(e,this);this.updateInternalState(t),t&&!isNaN(t)?this.computedValue=t:(this.computedValue=null,this.$refs.input.newValue=this.computedValue)},toggle:function(e){this.$refs.dropdown&&(this.$refs.dropdown.isActive="boolean"==typeof e?e:!this.$refs.dropdown.isActive)},close:function(){this.toggle(!1)},handleOnFocus:function(){this.onFocus(),this.openOnFocus&&this.toggle(!0)},formatHHMMSS:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getHours(),r=t.getMinutes(),o=t.getSeconds();return this.formatNumber(n,!0)+":"+this.formatNumber(r,!0)+":"+this.formatNumber(o,!0)}return""},onChangeNativePicker:function(e){var t=e.target.value;if(t){var time=null;this.computedValue&&!isNaN(this.computedValue)?time=new Date(this.computedValue):(time=new Date).setMilliseconds(0);var n=t.split(":");time.setHours(parseInt(n[0],10)),time.setMinutes(parseInt(n[1],10)),time.setSeconds(n[2]?parseInt(n[2],10):0),this.computedValue=new Date(time.getTime())}else this.computedValue=null},formatNumber:function(e,t){return this.isHourFormat24||t?this.pad(e):e},pad:function(e){return(e<10?"0":"")+e},formatValue:function(e){return e&&!isNaN(e)?this.timeFormatter(e,this):null},keyPress:function(e){var t=e.key;this.$refs.dropdown&&this.$refs.dropdown.isActive&&("Escape"===t||"Esc"===t)&&this.toggle(!1)},onActiveChange:function(e){e||this.onBlur()}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}},zn=function(element){return element?arguments.length>1&&void 0!==arguments[1]&&arguments[1]?element.querySelectorAll('*[tabindex="-1"]'):element.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null},jn={bind:function(e,t){var n=t.value;if(void 0===n||n){var r=zn(e),o=zn(e,!0);r&&r.length>0&&(In=function(t){r=zn(e),o=zn(e,!0);var n=r[0],l=r[r.length-1];t.target===n&&t.shiftKey&&"Tab"===t.key?(t.preventDefault(),l.focus()):(t.target===l||Array.from(o).indexOf(t.target)>=0)&&!t.shiftKey&&"Tab"===t.key&&(t.preventDefault(),n.focus())},e.addEventListener("keydown",In))}},unbind:function(e){e.removeEventListener("keydown",In)}},Wn=["escape","outside"];var Yn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"dropdown",staticClass:"dropdown dropdown-menu-animation",class:e.rootClasses,on:{mouseleave:function(t){e.isHoverable=!1}}},[e.inline?e._e():n("div",{ref:"trigger",staticClass:"dropdown-trigger",attrs:{tabindex:!e.disabled&&e.triggerTabindex,"aria-haspopup":"true"},on:{click:e.onClick,contextmenu:function(t){return t.preventDefault(),e.onContextMenu(t)},mouseenter:e.onHover,"!focus":function(t){return e.onFocus(t)}}},[e._t("trigger",null,{active:e.isActive})],2),n("transition",{attrs:{name:e.animation}},[e.isMobileModal?n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!e.isActive}}):e._e()]),n("transition",{attrs:{name:e.animation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.disabled&&(e.isActive||e.isHoverable)||e.inline,expression:"(!disabled && (isActive || isHoverable)) || inline"},{name:"trap-focus",rawName:"v-trap-focus",value:e.trapFocus,expression:"trapFocus"}],ref:"dropdownMenu",staticClass:"dropdown-menu",style:e.style,attrs:{"aria-hidden":!e.isActive}},[n("div",{staticClass:"dropdown-content",style:e.contentStyle,attrs:{role:e.ariaRole,"aria-modal":!e.inline}},[e._t("default")],2)])])],1)},staticRenderFns:[]},undefined,{name:"BDropdown",directives:{trapFocus:jn},mixins:[gn("dropdown")],props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:200},position:{type:String,validator:function(e){return["is-top-right","is-top-left","is-bottom-left","is-bottom-right"].indexOf(e)>-1}},triggers:{type:Array,default:function(){return["click"]}},mobileModal:{type:Boolean,default:function(){return Kt.defaultDropdownMobileModal}},ariaRole:{type:String,validator:function(e){return["menu","list","dialog"].indexOf(e)>-1},default:null},animation:{type:String,default:"fade"},multiple:Boolean,trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,appendToBody:Boolean,appendToBodyCopyParent:Boolean,triggerTabindex:{type:Number,default:0}},data:function(){return{selected:this.value,style:{},isActive:!1,isHoverable:!1,_bodyEl:void 0}},computed:{rootClasses:function(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal,"is-expanded":this.expanded}]},isMobileModal:function(){return this.mobileModal&&!this.inline},cancelOptions:function(){return"boolean"==typeof this.canClose?this.canClose?Wn:[]:this.canClose},contentStyle:function(){return{maxHeight:this.scrollable?zt(this.maxHeight):null,overflow:this.scrollable?"auto":null}},hoverable:function(){return this.triggers.indexOf("hover")>=0}},watch:{value:function(e){this.selected=e},isActive:function(e){var t=this;this.$emit("active-change",e),this.handleScroll(),this.appendToBody&&this.$nextTick((function(){t.updateAppendToBody()}))},isHoverable:function(e){this.hoverable&&this.$emit("active-change",e)}},methods:{handleScroll:function(){"undefined"!=typeof window&&this.isMobileModal&&(this.isActive?document.documentElement.classList.add("is-clipped-touch"):document.documentElement.classList.remove("is-clipped-touch"))},selectItem:function(e){this.multiple?(this.selected?-1===this.selected.indexOf(e)?this.selected=[].concat(Ct(this.selected),[e]):this.selected=this.selected.filter((function(t){return t!==e})):this.selected=[e],this.$emit("change",this.selected)):this.selected!==e&&(this.selected=e,this.$emit("change",this.selected)),this.$emit("input",this.selected),this.multiple||(this.isActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1))},isInWhiteList:function(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(void 0!==this.$refs.dropdownMenu){var t=this.$refs.dropdownMenu.querySelectorAll("*"),n=!0,r=!1,o=void 0;try{for(var l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){if(e===l.value)return!0}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}if(void 0!==this.$refs.trigger){var d=this.$refs.trigger.querySelectorAll("*"),h=!0,f=!1,m=void 0;try{for(var v,y=d[Symbol.iterator]();!(h=(v=y.next()).done);h=!0){if(e===v.value)return!0}}catch(e){f=!0,m=e}finally{try{h||null==y.return||y.return()}finally{if(f)throw m}}}return!1},clickedOutside:function(e){if(!(this.cancelOptions.indexOf("outside")<0||this.inline)){var t=Wt(this)?e.composedPath()[0]:e.target;this.isInWhiteList(t)||(this.isActive=!1)}},keyPress:function(e){var t=e.key;if(this.isActive&&("Escape"===t||"Esc"===t)){if(this.cancelOptions.indexOf("escape")<0)return;this.isActive=!1}},onClick:function(){this.triggers.indexOf("click")<0||this.toggle()},onContextMenu:function(){this.triggers.indexOf("contextmenu")<0||this.toggle()},onHover:function(){this.triggers.indexOf("hover")<0||(this.isHoverable=!0)},onFocus:function(){this.triggers.indexOf("focus")<0||this.toggle()},toggle:function(){var e=this;this.disabled||(this.isActive?this.isActive=!this.isActive:this.$nextTick((function(){var t=!e.isActive;e.isActive=t,setTimeout((function(){return e.isActive=t}))})))},updateAppendToBody:function(){var e=this.$refs.dropdown,t=this.$refs.dropdownMenu,n=this.$refs.trigger;if(t&&n){var r=this.$data._bodyEl.children[0];if(r.classList.forEach((function(e){return r.classList.remove(e)})),r.classList.add("dropdown"),r.classList.add("dropdown-menu-animation"),this.$vnode&&this.$vnode.data&&this.$vnode.data.staticClass&&r.classList.add(this.$vnode.data.staticClass),this.rootClasses.forEach((function(e){if(e&&"object"===ut(e))for(var t in e)e[t]&&r.classList.add(t)})),this.appendToBodyCopyParent){var o=this.$refs.dropdown.parentNode,l=this.$data._bodyEl;l.classList.forEach((function(e){return l.classList.remove(e)})),o.classList.forEach((function(e){l.classList.add(e)}))}var rect=n.getBoundingClientRect(),c=rect.top+window.scrollY,d=rect.left+window.scrollX;!this.position||this.position.indexOf("bottom")>=0?c+=n.clientHeight:c-=t.clientHeight,this.position&&this.position.indexOf("left")>=0&&(d-=t.clientWidth-n.clientWidth),this.style={position:"absolute",top:"".concat(c,"px"),left:"".concat(d,"px"),zIndex:"99",width:this.expanded?"".concat(e.offsetWidth,"px"):void 0}}}},mounted:function(){this.appendToBody&&(this.$data._bodyEl=Rt(this.$refs.dropdownMenu),this.updateAppendToBody())},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),this.appendToBody&&Et(this.$data._bodyEl)}},undefined,!1,undefined,void 0,void 0);var qn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.separator?n("hr",{staticClass:"dropdown-divider"}):e.custom||e.hasLink?n("div",{class:e.itemClasses,attrs:{role:e.ariaRoleItem,tabindex:e.isFocusable?0:null},on:{click:e.selectItem}},[e._t("default")],2):n("a",{staticClass:"dropdown-item",class:e.anchorClasses,attrs:{role:e.ariaRoleItem,tabindex:e.isFocusable?0:null},on:{click:e.selectItem}},[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BDropdownItem",mixins:[bn("dropdown")],props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},computed:{anchorClasses:function(){return{"is-disabled":this.parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses:function(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem:function(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:null},isClickable:function(){return!(this.parent.disabled||this.separator||this.disabled||this.custom)},isActive:function(){return null!==this.parent.selected&&(this.parent.multiple?this.parent.selected.indexOf(this.value)>=0:this.value===this.parent.selected)},isFocusable:function(){return!this.hasLink&&this.focusable}},methods:{selectItem:function(){this.isClickable&&(this.parent.selectItem(this.value),this.$emit("click"))}}},undefined,!1,undefined,void 0,void 0),Un={name:"BFieldBody",props:{message:{type:[String,Array]},type:{type:[String,Object]}},render:function(e){var t=this,n=!0;return e("div",{attrs:{class:"field-body"}},this.$slots.default.map((function(element){return element.tag?(n&&(r=t.message,n=!1),e("b-field",{attrs:{type:t.type,message:r}},[element])):element;var r})))}};var Kn=Qt({},undefined,Un,undefined,undefined,undefined,void 0,void 0),Xn={name:"BField",components:ft({},Kn.name,Kn),provide:function(){return{BField:this}},inject:{parent:{from:"BField",default:!1}},props:{type:[String,Object],label:String,labelFor:String,message:[String,Array,Object],grouped:Boolean,groupMultiline:Boolean,position:String,expanded:Boolean,horizontal:Boolean,addons:{type:Boolean,default:!0},customClass:String,labelPosition:{type:String,default:function(){return Kt.defaultFieldLabelPosition}}},data:function(){return{newType:this.type,newMessage:this.message,fieldLabelSize:null,_isField:!0}},computed:{rootClasses:function(){return[{"is-expanded":this.expanded,"is-horizontal":this.horizontal,"is-floating-in-label":this.hasLabel&&!this.horizontal&&"inside"===this.labelPosition,"is-floating-label":this.hasLabel&&!this.horizontal&&"on-border"===this.labelPosition},this.numberInputClasses]},innerFieldClasses:function(){return[this.fieldType(),this.newPosition,{"is-grouped-multiline":this.groupMultiline}]},hasInnerField:function(){return this.grouped||this.groupMultiline||this.hasAddons()},newPosition:function(){if(void 0!==this.position){var e=this.position.split("-");if(!(e.length<1)){var t=this.grouped?"is-grouped-":"has-addons-";return this.position?t+e[1]:void 0}}},formattedMessage:function(){if(this.parent&&this.parent.hasInnerField)return"";if("string"==typeof this.newMessage)return[this.newMessage];var e=[];if(Array.isArray(this.newMessage))this.newMessage.forEach((function(t){if("string"==typeof t)e.push(t);else for(var n in t)t[n]&&e.push(n)}));else for(var t in this.newMessage)this.newMessage[t]&&e.push(t);return e.filter((function(e){if(e)return e}))},hasLabel:function(){return this.label||this.$slots.label},hasMessage:function(){return(!this.parent||!this.parent.hasInnerField)&&this.newMessage||this.$slots.message},numberInputClasses:function(){if(this.$slots.default){var e=this.$slots.default.filter((function(e){return e.tag&&e.tag.toLowerCase().indexOf("numberinput")>=0}))[0];if(e){var t=["has-numberinput"],n=e.componentOptions.propsData.controlsPosition,r=e.componentOptions.propsData.size;return n&&t.push("has-numberinput-".concat(n)),r&&t.push("has-numberinput-".concat(r)),t}}return null}},watch:{type:function(e){this.newType=e},message:function(e){this.newMessage=e},newMessage:function(e){this.parent&&this.parent.hasInnerField&&(this.parent.type||(this.parent.newType=this.newType),this.parent.message||(this.parent.newMessage=e))}},methods:{fieldType:function(){return this.grouped?"is-grouped":this.hasAddons()?"has-addons":void 0},hasAddons:function(){var e=0;return this.$slots.default&&(e=this.$slots.default.reduce((function(i,e){return e.tag?i+1:i}),0)),e>1&&this.addons&&!this.horizontal}},mounted:function(){this.horizontal&&(this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider").length>0&&(this.fieldLabelSize="is-normal"))}};var Gn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"field",class:e.rootClasses},[e.horizontal?n("div",{staticClass:"field-label",class:[e.customClass,e.fieldLabelSize]},[e.hasLabel?n("label",{staticClass:"label",class:e.customClass,attrs:{for:e.labelFor}},[e.$slots.label?e._t("label"):[e._v(e._s(e.label))]],2):e._e()]):[e.hasLabel?n("label",{staticClass:"label",class:e.customClass,attrs:{for:e.labelFor}},[e.$slots.label?e._t("label"):[e._v(e._s(e.label))]],2):e._e()],e.horizontal?n("b-field-body",{attrs:{message:e.newMessage?e.formattedMessage:"",type:e.newType}},[e._t("default")],2):e.hasInnerField?n("div",{staticClass:"field-body"},[n("b-field",{class:e.innerFieldClasses,attrs:{addons:!1,type:e.newType}},[e._t("default")],2)],1):[e._t("default")],e.hasMessage&&!e.horizontal?n("p",{staticClass:"help",class:e.newType},[e.$slots.message?e._t("message",null,{messages:e.formattedMessage}):[e._l(e.formattedMessage,(function(t,i){return[e._v(" "+e._s(t)+" "),i+1=this.countPerRing},calcHandAngle:function(e){var t=this.degreesPerUnit*(e-this.min);return this.isInnerRing(e)&&(t-=360),t},calcHandScale:function(e){return this.isInnerRing(e)?this.innerRadius/this.outerRadius:1},onMouseDown:function(e){e.preventDefault(),this.isDragging=!0,this.onDragMove(e)},onMouseUp:function(){this.isDragging=!1,this.isDisabled(this.inputValue)||this.$emit("change",this.inputValue)},onDragMove:function(e){if(e.preventDefault(),this.isDragging||"click"===e.type){var t=this.$refs.clock.getBoundingClientRect(),n=t.width,r=t.top,o=t.left,l="touches"in e?e.touches[0]:e,c={x:n/2,y:-n/2},d={x:l.clientX-o,y:r-l.clientY},h=Math.round(this.coordToAngle(c,d)+360)%360,f=this.double&&this.euclidean(c,d)<(this.outerRadius+this.innerRadius)/2-16,m=Math.round(h/this.degreesPerUnit)+this.min+(f?this.countPerRing:0);h>=360-this.degreesPerUnit/2&&(m=f?this.max:this.min),this.update(m)}},update:function(e){this.inputValue===e||this.isDisabled(e)||(this.prevAngle=this.handRotateAngle,this.inputValue=e,this.$emit("input",e))}}},undefined,!1,undefined,void 0,void 0);var Zn=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-clockpicker control",class:[e.size,e.type,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline,"append-to-body":e.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(){return[e._t("trigger",[n("b-input",e._b({ref:"input",attrs:{slot:"trigger",autocomplete:"off",value:e.formatValue(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,disabled:e.disabled,readonly:!e.editable,rounded:e.rounded,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){return e.checkHtml5Validity()}},nativeOn:{click:function(t){return e.onInputClick(t)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggle(!0)},change:function(t){return e.onChange(t.target.value)}},slot:"trigger"},"b-input",e.$attrs,!1))])]},proxy:!0}],null,!0)},[n("div",{staticClass:"card",attrs:{disabled:e.disabled,custom:""}},[e.inline?n("header",{staticClass:"card-header"},[n("div",{staticClass:"b-clockpicker-header card-header-title"},[n("div",{staticClass:"b-clockpicker-time"},[n("span",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v(e._s(e.hoursDisplay))]),n("span",[e._v(e._s(e.hourLiteral))]),n("span",{staticClass:"b-clockpicker-btn",class:{active:!e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!1}}},[e._v(e._s(e.minutesDisplay))])]),e.isHourFormat24?e._e():n("div",{staticClass:"b-clockpicker-period"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.amString||e.meridienSelected===e.AM},on:{click:function(t){return e.onMeridienClick(e.amString)}}},[e._v(e._s(e.amString))]),n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.pmString||e.meridienSelected===e.PM},on:{click:function(t){return e.onMeridienClick(e.pmString)}}},[e._v(e._s(e.pmString))])])])]):e._e(),n("div",{staticClass:"card-content"},[n("div",{staticClass:"b-clockpicker-body",style:{width:e.faceSize+"px",height:e.faceSize+"px"}},[e.inline?e._e():n("div",{staticClass:"b-clockpicker-time"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!0}}},[e._v(e._s(e.hoursLabel))]),n("span",{staticClass:"b-clockpicker-btn",class:{active:!e.isSelectingHour},on:{click:function(t){e.isSelectingHour=!1}}},[e._v(e._s(e.minutesLabel))])]),e.isHourFormat24||e.inline?e._e():n("div",{staticClass:"b-clockpicker-period"},[n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.amString||e.meridienSelected===e.AM},on:{click:function(t){return e.onMeridienClick(e.amString)}}},[e._v(e._s(e.amString))]),n("div",{staticClass:"b-clockpicker-btn",class:{active:e.meridienSelected===e.pmString||e.meridienSelected===e.PM},on:{click:function(t){return e.onMeridienClick(e.pmString)}}},[e._v(e._s(e.pmString))])]),n("b-clockpicker-face",{attrs:{"picker-size":e.faceSize,min:e.minFaceValue,max:e.maxFaceValue,"face-numbers":e.isSelectingHour?e.hours:e.minutes,"disabled-values":e.faceDisabledValues,double:e.isSelectingHour&&e.isHourFormat24,value:e.isSelectingHour?e.hoursSelected:e.minutesSelected},on:{input:e.onClockInput,change:e.onClockChange}})],1)]),void 0!==e.$slots.default&&e.$slots.default.length?n("footer",{staticClass:"b-clockpicker-footer card-footer"},[e._t("default")],2):e._e()])]):n("b-input",e._b({ref:"input",attrs:{type:"time",autocomplete:"off",value:e.formatHHMMSS(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,max:e.formatHHMMSS(e.maxTime),min:e.formatHHMMSS(e.minTime),disabled:e.disabled,readonly:!1,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){e.onBlur()&&e.checkHtml5Validity()}},nativeOn:{click:function(t){return t.stopPropagation(),e.toggle(!0)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggle(!0)},change:function(t){return e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]},undefined,{name:"BClockpicker",components:(Qn={},ft(Qn,Jn.name,Jn),ft(Qn,rn.name,rn),ft(Qn,Gn.name,Gn),ft(Qn,an.name,an),ft(Qn,Yn.name,Yn),ft(Qn,qn.name,qn),Qn),mixins:[Hn],props:{pickerSize:{type:Number,default:290},incrementMinutes:{type:Number,default:5},autoSwitch:{type:Boolean,default:!0},type:{type:String,default:"is-primary"},hoursLabel:{type:String,default:function(){return Kt.defaultClockpickerHoursLabel||"Hours"}},minutesLabel:{type:String,default:function(){return Kt.defaultClockpickerMinutesLabel||"Min"}}},data:function(){return{isSelectingHour:!0,isDragging:!1,_isClockpicker:!0}},computed:{hoursDisplay:function(){if(null==this.hoursSelected)return"--";if(this.isHourFormat24)return this.pad(this.hoursSelected);var e=this.hoursSelected;return this.meridienSelected===this.pmString&&(e-=12),0===e&&(e=12),e},minutesDisplay:function(){return null==this.minutesSelected?"--":this.pad(this.minutesSelected)},minFaceValue:function(){return this.isSelectingHour&&!this.isHourFormat24&&this.meridienSelected===this.pmString?12:0},maxFaceValue:function(){return this.isSelectingHour?this.isHourFormat24||this.meridienSelected!==this.amString?23:11:59},faceSize:function(){return this.pickerSize-24},faceDisabledValues:function(){return this.isSelectingHour?this.isHourDisabled:this.isMinuteDisabled}},methods:{onClockInput:function(e){this.isSelectingHour?(this.hoursSelected=e,this.onHoursChange(e)):(this.minutesSelected=e,this.onMinutesChange(e))},onClockChange:function(e){this.autoSwitch&&this.isSelectingHour&&(this.isSelectingHour=!this.isSelectingHour)},onMeridienClick:function(e){this.meridienSelected!==e&&(this.meridienSelected=e,this.onMeridienChange(e))},onInputClick:function(e){this.$refs.dropdown.isActive&&e.stopPropagation()}}},undefined,!1,undefined,void 0,void 0),ei={install:function(e){Jt(e,Zn)}};use(ei);var ti=ei;var ni=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:{"is-expanded":e.expanded,"has-icons-left":e.icon}},[n("span",{staticClass:"select",class:e.spanClasses},[n("select",e._b({directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"select",attrs:{multiple:e.multiple,size:e.nativeSize},on:{blur:function(t){e.$emit("blur",t)&&e.checkHtml5Validity()},focus:function(t){return e.$emit("focus",t)},change:function(t){var n=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.computedValue=t.target.multiple?n:n[0]}}},"select",e.$attrs,!1),[e.placeholder?[null==e.computedValue?n("option",{attrs:{disabled:"",hidden:""},domProps:{value:null}},[e._v(" "+e._s(e.placeholder)+" ")]):e._e()]:e._e(),e._t("default")],2)]),e.icon?n("b-icon",{staticClass:"is-left",attrs:{icon:e.icon,pack:e.iconPack,size:e.iconSize}}):e._e()],1)},staticRenderFns:[]},undefined,{name:"BSelect",components:ft({},an.name,an),mixins:[en],inheritAttrs:!1,props:{value:{type:[String,Number,Boolean,Object,Array,Function,Date],default:null},placeholder:String,multiple:Boolean,nativeSize:[String,Number]},data:function(){return{selected:this.value,_elementRef:"select"}},computed:{computedValue:{get:function(){return this.selected},set:function(e){this.selected=e,this.$emit("input",e),!this.isValid&&this.checkHtml5Validity()}},spanClasses:function(){return[this.size,this.statusType,{"is-fullwidth":this.expanded,"is-loading":this.loading,"is-multiple":this.multiple,"is-rounded":this.rounded,"is-empty":null===this.selected}]}},watch:{value:function(e){this.selected=e,!this.isValid&&this.checkHtml5Validity()}}},undefined,!1,undefined,void 0,void 0);var ii=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"tooltip",class:e.rootClasses},[n("transition",{attrs:{name:e.newAnimation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.active&&(e.isActive||e.always),expression:"active && (isActive || always)"}],ref:"content",class:["tooltip-content",e.contentClass]},[e.label?[e._v(e._s(e.label))]:e.$slots.content?[e._t("content")]:e._e()],2)]),n("div",{ref:"trigger",staticClass:"tooltip-trigger",style:e.triggerStyle,on:{click:e.onClick,contextmenu:e.onContextMenu,mouseenter:e.onHover,"!focus":function(t){return e.onFocus(t)},"!blur":function(t){return e.close(t)},mouseleave:e.close}},[e._t("default")],2)],1)},staticRenderFns:[]},undefined,{name:"BTooltip",props:{active:{type:Boolean,default:!0},type:{type:String,default:function(){return Kt.defaultTooltipType}},label:String,delay:{type:Number,default:function(){return Kt.defaultTooltipDelay}},closeDelay:{type:Number,default:function(){return Kt.defaultTooltipCloseDelay}},position:{type:String,default:"is-top",validator:function(e){return["is-top","is-bottom","is-left","is-right"].indexOf(e)>-1}},triggers:{type:Array,default:function(){return["hover"]}},always:Boolean,square:Boolean,dashed:Boolean,multilined:Boolean,size:{type:String,default:"is-medium"},appendToBody:Boolean,animated:{type:Boolean,default:!0},animation:{type:String,default:"fade"},contentClass:String,autoClose:{type:[Array,Boolean],default:!0}},data:function(){return{isActive:!1,triggerStyle:{},timer:null,_bodyEl:void 0}},computed:{rootClasses:function(){return["b-tooltip",this.type,this.position,this.size,{"is-square":this.square,"is-always":this.always,"is-multiline":this.multilined,"is-dashed":this.dashed}]},newAnimation:function(){return this.animated?this.animation:void 0}},watch:{isActive:function(){this.$emit(this.isActive?"open":"close"),this.appendToBody&&this.updateAppendToBody()}},methods:{updateAppendToBody:function(){var e=this.$refs.tooltip,t=this.$refs.trigger;if(e&&t){var n=this.$data._bodyEl.children[0];n.classList.forEach((function(e){return n.classList.remove(e)})),this.$vnode&&this.$vnode.data&&this.$vnode.data.staticClass&&n.classList.add(this.$vnode.data.staticClass),this.rootClasses.forEach((function(e){if("object"===ut(e))for(var t in e)e[t]&&n.classList.add(t);else n.classList.add(e)}));var rect=t.getBoundingClientRect(),r=rect.top+window.scrollY,o=rect.left+window.scrollX,l=t.clientHeight/2/2;switch(this.position){case"is-top":n.style.width="".concat(t.clientWidth,"px"),n.style.height="0px",r-=t.clientHeight-l;break;case"is-bottom":n.style.width="".concat(t.clientWidth,"px"),n.style.height="0px",r+=l;break;case"is-left":n.style.width="0px",n.style.height="".concat(t.clientHeight,"px");break;case"is-right":n.style.width="0px",n.style.height="".concat(t.clientHeight,"px"),o+=t.clientWidth}var c=this.$data._bodyEl;c.style.position="absolute",c.style.top="".concat(r,"px"),c.style.left="".concat(o,"px"),c.style.width="0px",c.style.zIndex=this.isActive||this.always?"99":"-1",this.triggerStyle={zIndex:this.isActive||this.always?"100":void 0}}},onClick:function(){var e=this;this.triggers.indexOf("click")<0||this.$nextTick((function(){setTimeout((function(){return e.open()}))}))},onHover:function(){this.triggers.indexOf("hover")<0||this.open()},onContextMenu:function(e){this.triggers.indexOf("contextmenu")<0||(e.preventDefault(),this.open())},onFocus:function(){this.triggers.indexOf("focus")<0||this.open()},open:function(){var e=this;this.delay?this.timer=setTimeout((function(){e.isActive=!0,e.timer=null}),this.delay):this.isActive=!0},close:function(){var e=this;"boolean"==typeof this.autoClose&&(this.autoClose&&this.timer&&clearTimeout(this.timer),this.closeDelay?this.timer=setTimeout((function(){e.isActive=!e.autoClose,e.timer=null}),this.closeDelay):this.isActive=!this.autoClose)},clickedOutside:function(e){if(this.isActive&&Array.isArray(this.autoClose)){if(this.autoClose.includes("outside")&&!this.isInWhiteList(e.target))return void(this.isActive=!1);this.autoClose.includes("inside")&&this.isInWhiteList(e.target)&&(this.isActive=!1)}},keyPress:function(e){var t=e.key;!this.isActive||"Escape"!==t&&"Esc"!==t||Array.isArray(this.autoClose)&&this.autoClose.indexOf("escape")>=0&&(this.isActive=!1)},isInWhiteList:function(e){if(e===this.$refs.content)return!0;if(void 0!==this.$refs.content){var t=this.$refs.content.querySelectorAll("*"),n=!0,r=!1,o=void 0;try{for(var l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){if(e===l.value)return!0}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}return!1}},mounted:function(){this.appendToBody&&"undefined"!=typeof window&&(this.$data._bodyEl=Rt(this.$refs.content),this.updateAppendToBody())},created:function(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),this.appendToBody&&Et(this.$data._bodyEl)}},undefined,!1,undefined,void 0,void 0),ai=["red","green","blue","alpha"],ri={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"},si=function(e){function t(){return ct(this,t),kt(this,vt(t).call(this,"ColorTypeError: type must be hex(a), rgb(a) or hsl(a)"))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&>(e,t)}(t,e),t}(yt(Error)),oi=function(){function e(){var t=this;if(ct(this,e),arguments.length>0)return e.parse.apply(e,arguments);this.$channels=new Uint8Array(ai.length),ai.forEach((function(e,n){Object.defineProperty(t,e,{get:function(){return t.$channels[n]},set:function(e){Number.isNaN(e/1)||(t.$channels[n]=Math.min(255,Math.max(0,e)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((function(e){var n=e.replace(/^./,(function(e){return e.toUpperCase()}));Object.defineProperty(t,e,{get:function(){return t["get".concat(n)]()},set:function(e){Number.isNaN(e/1)||t["set".concat(n)](e)},enumerable:!0,configurable:!0})}))}var t,n,r;return t=e,n=[{key:"getHue",value:function(){var e=xt(Array.from(this.$channels).map((function(e){return e/255})),3),t=e[0],n=e[1],r=e[2],o=[Math.min(t,n,r),Math.max(t,n,r)],l=o[1],c=l-o[0],d=0;if(0===c)return d;for(d=t===l?(n-r)/c%6:n===l?(r-t)/c+2:(t-n)/c+4,d*=60;d!==-1/0&&d<0;)d+=360;return Math.round(d%360)}},{key:"setHue",value:function(t){for(var n=e.fromHSL(t,this.saturation,this.lightness,this.alpha/255),i=0;i0&&void 0!==arguments[0]?arguments[0]:"hex").toLowerCase()){case"hex":return"#"+ai.slice(0,3).map((function(t){return e[t].toString(16).padStart(2,"0")})).join("");case"hexa":return"#"+ai.map((function(t){return e[t].toString(16).padStart(2,"0")})).join("");case"rgb":return"rgb(".concat(this.red,", ").concat(this.green,", ").concat(this.blue,")");case"rgba":return"rgba(".concat(this.red,", ").concat(this.green,", ").concat(this.blue,", ").concat(Math.round(this.alpha/2.55)/100,")");case"hsl":return"hsl(".concat(Math.round(this.hue),"deg, ").concat(Math.round(100*this.saturation),"%, ").concat(Math.round(100*this.lightness),"%)");case"hsla":return"hsla(".concat(Math.round(this.hue),"deg, ").concat(Math.round(100*this.saturation),"%, ").concat(Math.round(100*this.lightness),"%, ").concat(Math.round(this.alpha/2.55)/100,")");default:throw new si}}},{key:Symbol.toString,get:function(){return this.toString("hex")}}],r=[{key:"parse",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r3)o.red=n[0],o.green=n[1],o.blue=n[2],n[3]&&(o.alpha=n[3]);else if(1===n.length){var l=Number(n[0]);return e.parseIndex(l,l>Math.pow(2,24)?3:4)}}else if("string"==typeof n[0]){var c=null;if("string"==typeof ri[n[0].toLowerCase()])return e.parseHex(ri[n[0].toLowerCase()]);if(null!==(c=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return e.parseHex(c[2]);if(null!==(c=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){var d=[c[1],c[2],c[3],void 0!==c[5]?c[5]:1];return e.fromRGB.apply(e,Ct(d.map((function(e){return Number(e)}))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}},{key:"parseObject",value:function(object){var t=new e;return null===object||"object"!==ut(object)?t:e.isColor(object)?object.clone():(ai.forEach((function(e){Number.isNaN(object[e])||(t[e]=object[e])})),t)}},{key:"parseHex",value:function(t){if("string"!=typeof t)throw new Error("Hex expression must be a string");if(3!==(t=t.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==t.length||(t=t.split("").map((function(e){return e.repeat(2)})).join("")),6!==t.length&&8!==t.length)throw new Error("Incorrect Hex expression length");var n=t.split(/(..)/).filter((function(e){return e})).map((function(e){return Number.parseInt(e,16)}));return"number"==typeof n[3]&&(n[3]/=255),e.fromRGB.apply(e,Ct(n))}},{key:"parseIndex",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=new e,i=0;i<4;i++)r[ai[i]]=t>>8*(n-i)&&255;return r}},{key:"fromRGB",value:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if([t,n,r,o].some((function(e){return Number.isNaN(e/1)})))throw new Error("Invalid arguments");o*=255;var l=new e;return[t,n,r,o].forEach((function(e,t){l[ai[t]]=e})),l}},{key:"fromHSL",value:function(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if([t,n,r,o].some((function(e){return Number.isNaN(e)})))throw new Error("Invalid arguments");for(;t<0&&t!==-1/0;)t+=360;t%=360,n=Math.max(0,Math.min(1,n)),r=Math.max(0,Math.min(1,r)),o=Math.max(0,Math.min(1,o));var l=(1-Math.abs(2*r-1))*n,c=l*(1-Math.abs(t/60%2-1)),d=r-l/2,h=xt(t<60?[l,c,0]:t<120?[c,l,0]:t<180?[0,l,c]:t<240?[0,c,l]:t<300?[c,0,l]:[l,0,c],3),f=h[0],g=h[1],b=h[2];return e.fromRGB(255*(f+d),255*(g+d),255*(b+d),o)}},{key:"isColor",value:function(t){return t instanceof e}}],n&&ht(t.prototype,n),r&&ht(t,r),e}(),ui=.86602540378,ci=.5,di=0,hi={name:"BColorpickerHSLRepresentationTriangle",props:{value:{type:Object,required:!0,validator:function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness}},size:{type:Number,default:200},thickness:{type:Number,default:20}},data:function(){return{id:di++,hue:this.value.hue,saturation:this.value.saturation,lightness:this.value.lightness,captureMouse:!1,captureType:"hue",clientOffset:{cx:-1,cy:-1,width:0,height:0},cos30:ui,sin30:ci,debounce:0}},computed:{viewBox:function(){var e=this.size;return"0 0 ".concat(e," ").concat(e)},internalRadius:function(){return this.size/2-this.thickness},haloPath:function(){var e=this.size,t=this.thickness,n=e/2-2,r=n-t,o=e/2;return"M".concat(o-n," ").concat(o,"a").concat(n," ").concat(n," 0 1 1 ").concat(2*n," 0")+"h".concat(-t)+"a".concat(-r," ").concat(r," 0 1 0 ").concat(-2*r," 0")+"a".concat(r," ").concat(r," 0 1 0 ").concat(2*r," 0")+"h".concat(t)+"a".concat(n," ").concat(n," 0 1 1 ").concat(-2*n," 0z")},trianglePath:function(){var e=(this.size-4-2*this.thickness)/2;return"M0 ".concat(-e)+"L".concat(ui*e," ").concat(ci*e)+"H".concat(-ui*e,"z")}},watch:{captureMouse:function(e,t){if(!1===t&&!1!==e){var rect=this.$el.getBoundingClientRect();this.clientOffset.cx=rect.x+rect.width/2,this.clientOffset.cy=rect.y+rect.height/2,this.clientOffset.width=rect.width,this.clientOffset.height=rect.height}},value:{deep:!0,handler:function(e){var t=this,n=e.hue,r=e.saturation,o=e.lightness;window.clearTimeout(this.debounce),this.debounce=window.setTimeout((function(){o>=.03&&o<=.97&&r>0&&(t.hue=n),t.saturation=r,t.lightness=o}),200)}}},methods:{increaseHue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(this.hue+e)%360},decreaseHue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(360+this.hue-e)%360},increaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation+e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},decreaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation-e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},increaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness+e))},decreaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness-e))},hueKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":case"ArrowUp":this.increaseHue(),t=!0;break;case"ArrowLeft":case"ArrowDown":this.decreaseHue(),t=!0;break;case"Home":this.increaseHue(360-this.hue),t=!0;break;case"End":this.decreaseHue(this.hue),t=!0;break;case"PageUp":this.increaseHue(60-this.hue%60),t=!0;break;case"PageDown":this.decreaseHue(60+this.hue%60),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},slKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":this.decreaseLightness(),t=!0;break;case"ArrowUp":this.increaseSaturation(),t=!0;break;case"ArrowLeft":this.increaseLightness(),t=!0;break;case"ArrowDown":this.decreaseSaturation(),t=!0;break;case"Home":this.increaseLightness(1-this.lightness),t=!0;break;case"End":this.decreaseLightness(this.lightness),t=!0;break;case"PageUp":this.increaseSaturation(1-this.saturation),t=!0;break;case"PageDown":this.decreaseSaturation(this.saturation),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},clickHue:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.hueCursor.focus()},clickSL:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.slCursor.focus()},trackMouse:function(e){if(!1!==this.captureMouse){e.preventDefault(),e.stopPropagation();var t=0,n=0;if(void 0!==e.touches&&e.touches.length){var r=[e.touches[0].clientX,e.touches[0].clientY];t=r[0],n=r[1]}else{var o=[e.clientX,e.clientY];t=o[0],n=o[1]}var l=Math.atan2(n-this.clientOffset.cy,t-this.clientOffset.cx);if("sl"===this.captureType){var c=Math.sqrt(Math.pow(t-this.clientOffset.cx,2)+Math.pow(n-this.clientOffset.cy,2)),d=this.size/this.clientOffset.width,h=c*Math.cos(l-this.hue/180*Math.PI)*d,f=c*Math.sin(l-this.hue/180*Math.PI)*d,m=this.internalRadius,v=1-(Math.min(m*ci,Math.max(-m,f))+m)/(m+m*ci),y=(Math.min(m*ui*(1-v),Math.max(-m*ui*(1-v),h))+m*ui)/(2*m*ui);this.saturation=Math.round(1e3*v)/1e3,this.lightness=1-Math.round(1e3*y)/1e3}else this.hue=Math.round(l/Math.PI*180+90)%360;this.emitColor()}},startMouseCapture:function(e){e.stopPropagation(),this.captureMouse=!0,null!==e.target.closest(".colorpicker-triangle-slider-sl")?this.captureType="sl":this.captureType="hue"},stopMouseCapture:function(e){!1!==this.captureMouse&&(e.preventDefault(),e.stopPropagation(),this.$refs["sl"===this.captureType?"slCursor":"hueCursor"].focus()),this.captureMouse=!1},emitColor:function(){var e=this.hue,t=this.saturation,n=this.lightness;this.$emit("input",oi.fromHSL(e,t,n)),window.clearTimeout(this.debounce)}},mounted:function(){window.addEventListener("mousemove",this.trackMouse),window.addEventListener("touchmove",this.trackMouse,{passive:!1}),window.addEventListener("mouseup",this.stopMouseCapture),window.addEventListener("touchend",this.stopMouseCapture)},beforeDestroy:function(){window.removeEventListener("mousemove",this.trackMouse),window.removeEventListener("touchmove",this.trackMouse),window.removeEventListener("mouseup",this.stopMouseCapture),window.removeEventListener("touchend",this.stopMouseCapture)}};var fi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{staticClass:"b-colorpicker-triangle",attrs:{viewBox:e.viewBox}},[n("defs",[n("linearGradient",{attrs:{id:"cp-triangle-gradient-ligthness-"+e.id,x1:"0",y1:"0",x2:"1",y2:"0"}},[n("stop",{attrs:{offset:"0%","stop-color":"#fff"}}),n("stop",{attrs:{offset:"100%","stop-color":"#000"}})],1),n("linearGradient",{attrs:{id:"cp-triangle-gradient-saturation-"+e.id,x1:"0",y1:"0",x2:"0",y2:"1"}},[n("stop",{attrs:{offset:"0%","stop-color":"hsl("+e.hue+"deg, 100%, 50%)","stop-opacity":"1"}}),n("stop",{attrs:{offset:"100%","stop-color":"hsl("+e.hue+"deg, 100%, 50%)","stop-opacity":"0"}})],1),n("clipPath",{attrs:{id:"cp-triangle-clip-"+e.id}},[n("path",{attrs:{d:e.haloPath}})])],1),n("g",{staticClass:"colorpicker-triangle-slider-hue"},[n("foreignObject",{attrs:{x:0,y:0,width:e.size,height:e.size,"clip-path":"url(#cp-triangle-clip-"+e.id+")"}},[n("div",{staticClass:"colorpicker-triangle-hue",on:{click:e.clickHue,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})]),n("g",{style:"transform: rotate("+e.hue+"deg)"},[n("foreignObject",{attrs:{x:e.size/2-4,y:0,width:"8",height:e.thickness+4}},[n("div",{ref:"hueCursor",staticClass:"hue-range-thumb",style:"background-color: hsl("+e.hue+"deg, 100%, 50%)",attrs:{role:"slider",tabindex:"0","aria-label":"Hue","aria-valuemin":"0","aria-valuenow":e.hue,"aria-valuemax":"360"},on:{click:e.clickHue,keydown:e.hueKeyPress,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})])],1)],1),n("g",{staticClass:"colorpicker-triangle-slider-sl",style:"transform: rotate("+e.hue+"deg) translate(50%, 50%)",attrs:{role:"graphics-datagroup","aria-datascales":"lightness, saturation"}},[n("path",{attrs:{d:e.trianglePath,fill:"url(#cp-triangle-gradient-ligthness-"+e.id+")"}}),n("path",{staticStyle:{"mix-blend-mode":"overlay"},attrs:{d:e.trianglePath,fill:"url(#cp-triangle-gradient-saturation-"+e.id+")"},on:{click:e.clickSL,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}}),n("foreignObject",{attrs:{x:(e.internalRadius-3)*e.cos30*(.5-e.lightness)*2-6,y:-e.internalRadius+(1-e.saturation)*(e.internalRadius-3)*1.5-3,width:"12",height:"12"}},[n("div",{ref:"slCursor",staticClass:"sl-range-thumb",style:{backgroundColor:"hsl("+e.hue+"deg, "+100*e.saturation+"%, "+100*e.lightness+"%)"},attrs:{tabindex:"0","aria-datavalues":100*e.saturation+"%, "+100*e.lightness+"%"},on:{click:e.clickSL,keydown:e.slKeyPress,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})])],1)])},staticRenderFns:[]},undefined,hi,undefined,!1,undefined,void 0,void 0);function pi(){var data=St(["","px"]);return pi=function(){return data},data}function mi(){var data=St(["","px"]);return mi=function(){return data},data}function vi(){var data=St(["","px"]);return vi=function(){return data},data}var gi=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(this.hue+e)%360},decreaseHue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.hue=(360+this.hue-e)%360},increaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation+e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},decreaseSaturation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.saturation=Math.min(1,Math.max(0,this.saturation-e)),this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness))},increaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness+e))},decreaseLightness:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.lightness=Math.min(.5+.5*(1-this.saturation),Math.max(.5-.5*(1-this.saturation),this.lightness-e))},hueKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":case"ArrowUp":this.increaseHue(),t=!0;break;case"ArrowLeft":case"ArrowDown":this.decreaseHue(),t=!0;break;case"Home":this.increaseHue(360-this.hue),t=!0;break;case"End":this.decreaseHue(this.hue),t=!0;break;case"PageUp":this.increaseHue(60-this.hue%60),t=!0;break;case"PageDown":this.decreaseHue(60+this.hue%60),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},slKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":this.increaseSaturation(),t=!0;break;case"ArrowUp":this.increaseLightness(),t=!0;break;case"ArrowLeft":this.decreaseSaturation(),t=!0;break;case"ArrowDown":this.decreaseLightness(),t=!0;break;case"Home":this.increaseLightness(1-this.lightness),t=!0;break;case"End":this.decreaseLightness(this.lightness),t=!0;break;case"PageUp":this.increaseSaturation(1-this.saturation),t=!0;break;case"PageDown":this.decreaseSaturation(this.saturation),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitColor())},startMouseCapture:function(e){e.stopPropagation(),this.captureMouse=!0,null!==e.target.closest(".colorpicker-square-slider-sl")?this.captureType="sl":this.captureType="hue"},stopMouseCapture:function(e){!1!==this.captureMouse&&(e.preventDefault(),e.stopPropagation(),this.$refs["sl"===this.captureType?"slCursor":"hueCursor"].focus()),this.captureMouse=!1},clickHue:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.hueCursor.focus()},clickSL:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.slCursor.focus()},trackMouse:function(e){if(!1!==this.captureMouse){e.preventDefault(),e.stopPropagation();var t=0,n=0;if(void 0!==e.touches&&e.touches.length){var r=[e.touches[0].clientX,e.touches[0].clientY];t=r[0],n=r[1]}else{var o=[e.clientX,e.clientY];t=o[0],n=o[1]}var l=Math.atan2(n-this.clientOffset.cy,t-this.clientOffset.cx);if("sl"===this.captureType){var c=(t-this.clientOffset.cx)/(this.clientOffset.width-2*this.thickness)+.5,d=(n-this.clientOffset.cy)/(this.clientOffset.height-2*this.thickness)+.5;this.saturation=Math.round(1e3*Math.min(1,Math.max(0,c)))/1e3,this.lightness=1-Math.round(1e3*Math.min(1,Math.max(0,d)))/1e3}else this.hue=Math.round(l/Math.PI*180+90)%360;this.emitColor()}},emitColor:function(){var e=this.hue,t=this.saturation,n=this.lightness;this.$emit("input",oi.fromHSL(e,t,n)),window.clearTimeout(this.debounce)}},mounted:function(){window.addEventListener("mousemove",this.trackMouse),window.addEventListener("touchmove",this.trackMouse,{passive:!1}),window.addEventListener("mouseup",this.stopMouseCapture),window.addEventListener("touchend",this.stopMouseCapture)},beforeDestroy:function(){window.removeEventListener("mousemove",this.trackMouse),window.removeEventListener("touchmove",this.trackMouse),window.removeEventListener("mouseup",this.stopMouseCapture),window.removeEventListener("touchend",this.stopMouseCapture)}};var yi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-colorpicker-square",style:{width:e.size+"px"}},[n("div",{staticClass:"colorpicker-square-slider-hue",on:{click:e.clickHue,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}},[n("div",{ref:"hueCursor",staticClass:"hue-range-thumb",style:e.hueThumbStyle,attrs:{role:"slider",tabindex:"0","aria-label":"Hue","aria-valuemin":"0","aria-valuemax":"359"}})]),n("div",{staticClass:"colorpicker-square-slider-sl",style:{background:e.SLBackground,margin:e.thickness+"px"},attrs:{"aria-datascales":"lightness, saturation"},on:{click:e.clickSL,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}},[n("div",{ref:"slCursor",staticClass:"sl-range-thumb",style:e.slThumbStyle,attrs:{role:"slider",tabindex:"0","aria-datavalues":100*e.saturation+"%, "+100*e.lightness+"%"},on:{click:e.clickSL,keydown:e.slKeyPress,mousedown:function(t){return t.preventDefault(),e.startMouseCapture(t)},touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}})])])},staticRenderFns:[]},undefined,bi,undefined,!1,undefined,void 0,void 0),wi={name:"BColorpickerAlphaSlider",components:ft({},ii.name,ii),props:{value:{type:Number,validator:function(e){return e>=0&&e<256}},color:[String,Object]},data:function(){var e=oi.parse(this.color);return e.alpha=0,{startColor:e.toString("hex"),endColor:e.toString("hexa"),percent:Math.round(100*(1-this.value/255)),captureMouse:!1,clientOffset:{cx:-1,cy:-1,width:0,height:0}}},computed:{style:function(){return{backgroundImage:"linear-gradient(90deg, ".concat(this.startColor," 0%, ").concat(this.endColor," 100%),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7)"),backgroundSize:"100% 100%, 1em 1em, 1em 1em",backgroundPosition:"0 0, .5em .5em, 0 0"}}},watch:{value:function(e,t){e!==t&&(this.percent=Math.round(100*(1-e/255)))},color:function(e){var t=oi.parse(e);t.alpha=0,this.startColor=t.toString("hex"),this.endColor=t.toString("hexa")},captureMouse:function(e,t){if(!1===t&&!1!==e){var rect=this.$el.getBoundingClientRect();this.clientOffset.cx=rect.x+rect.width/2,this.clientOffset.cy=rect.y+rect.height/2,this.clientOffset.width=rect.width,this.clientOffset.height=rect.height}}},methods:{increaseAlpha:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.percent=Math.max(0,Math.min(100,this.percent+e))},decreaseAlpha:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.01;this.increaseAlpha(-e)},alphaKeyPress:function(e){var t=!1;switch(e.key){case"ArrowRight":case"ArrowUp":this.increaseAlpha(),t=!0;break;case"ArrowLeft":case"ArrowDown":this.decreaseAlpha(),t=!0;break;case"Home":this.decreaseAlpha(this.percent),t=!0;break;case"End":this.increaseAlpha(100-this.percent),t=!0;break;case"PageUp":this.increaseAlpha(10-this.percent%10),t=!0;break;case"PageDown":this.decreaseAlpha(this.percent%10),t=!0}t&&(e.preventDefault(),e.stopPropagation(),this.emitAlpha())},clickAlpha:function(e){this.startMouseCapture(e),this.trackMouse(e),this.stopMouseCapture(e),this.$refs.alphaCursor.focus()},startMouseCapture:function(e){e.stopPropagation(),this.captureMouse=!0},trackMouse:function(e){if(!1!==this.captureMouse){e.preventDefault(),e.stopPropagation();var t=0;if(void 0!==e.touches&&e.touches.length)t=[e.touches[0].clientX][0];else t=[e.clientX][0];var n=.5+(this.clientOffset.cx-t)/this.clientOffset.width;this.percent=Math.round(100-100*Math.max(0,Math.min(1,n))),this.emitAlpha()}},stopMouseCapture:function(e){!1!==this.captureMouse&&(e.preventDefault(),e.stopPropagation(),this.$refs.alphaCursor.focus()),this.captureMouse=!1},emitAlpha:function(){this.$emit("input",255*(1-this.percent/100))}},mounted:function(){window.addEventListener("mousemove",this.trackMouse),window.addEventListener("touchmove",this.trackMouse,{passive:!1}),window.addEventListener("mouseup",this.stopMouseCapture),window.addEventListener("touchend",this.stopMouseCapture)},beforeDestroy:function(){window.removeEventListener("mousemove",this.trackMouse),window.removeEventListener("touchmove",this.trackMouse),window.removeEventListener("mouseup",this.stopMouseCapture),window.removeEventListener("touchend",this.stopMouseCapture)}};var ki,Si=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-colorpicker-alpha-slider",style:e.style,on:{click:e.clickAlpha,keydown:e.alphaKeyPress,mousedown:e.startMouseCapture,touchstart:function(t){return t.preventDefault(),e.startMouseCapture(t)}}},[n("div",{ref:"alphaCursor",staticClass:"alpha-range-thumb",style:{left:e.percent+"%"},attrs:{role:"slider",tabindex:"0","aria-label":"Tranparency","aria-valuemin":"0","aria-valuenow":e.percent,"aria-valuemax":"100"}},[n("b-tooltip",{attrs:{label:e.percent+"%",always:e.captureMouse}})],1)])},staticRenderFns:[]},undefined,wi,undefined,!1,undefined,void 0,void 0);var xi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"colorpicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,expanded:e.expanded,disabled:e.disabled,inline:e.inline,"mobile-modal":e.mobileModal,"trap-focus":e.trapFocus,"aria-role":e.ariaRole,"append-to-body":e.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(){return[e._t("trigger",[n("b-button",{style:e.triggerStyle,attrs:{expanded:e.expanded,disabled:e.disabled}},[n("span",{staticClass:"color-name"},[e._v(e._s(e.colorFormatter(e.computedValue)))])])])]},proxy:!0}],null,!0)},[n("b-dropdown-item",{class:{"dropdown-horizontal-colorpicker":e.horizontalColorPicker},attrs:{disabled:e.disabled,focusable:e.focusable,custom:""}},[n("div",[n("header",{staticClass:"colorpicker-header"},[void 0!==e.$slots.header&&e.$slots.header.length?[e._t("header")]:e._e()],2),n("div",{staticClass:"colorpicker-content"},["square"===e.representation?n("b-colorpicker-h-s-l-representation-square",{attrs:{value:e.computedValue},on:{input:e.updateColor}}):n("b-colorpicker-h-s-l-representation-triangle",{attrs:{value:e.computedValue},on:{input:e.updateColor}})],1)]),n("footer",{staticClass:"colorpicker-footer"},[e.alpha?n("b-colorpicker-alpha-slider",{attrs:{value:e.computedValue.alpha,color:e.computedValue},on:{input:e.updateAlpha}}):e._e(),e._t("footer",[n("b-field",{staticClass:"colorpicker-fields",attrs:{grouped:""}},[n("b-field",{attrs:{horizontal:"",label:"R"}},[n("b-input",{attrs:{type:"number",size:"is-small","aria-label":"Red"},on:{input:e.updateRGB},model:{value:e.computedValue.red,callback:function(t){e.$set(e.computedValue,"red",e._n(t))},expression:"computedValue.red"}})],1),n("b-field",{attrs:{horizontal:"",label:"G"}},[n("b-input",{attrs:{type:"number",size:"is-small","aria-label":"Green"},on:{input:e.updateRGB},model:{value:e.computedValue.green,callback:function(t){e.$set(e.computedValue,"green",e._n(t))},expression:"computedValue.green"}})],1),n("b-field",{attrs:{horizontal:"",label:"B"}},[n("b-input",{attrs:{type:"number",size:"is-small","aria-label":"Blue"},on:{input:e.updateRGB},model:{value:e.computedValue.blue,callback:function(t){e.$set(e.computedValue,"blue",e._n(t))},expression:"computedValue.blue"}})],1)],1)],{color:e.computedValue})],2)])],1):e._e()],1)},staticRenderFns:[]},undefined,{name:"BColorpicker",components:(ki={},ft(ki,fi.name,fi),ft(ki,yi.name,yi),ft(ki,Si.name,Si),ft(ki,rn.name,rn),ft(ki,Gn.name,Gn),ft(ki,ni.name,ni),ft(ki,an.name,an),ft(ki,Yn.name,Yn),ft(ki,qn.name,qn),ki),mixins:[en],inheritAttrs:!1,provide:function(){return{$colorpicker:this}},props:{value:{type:[String,Object],validator:function(e){return"string"==typeof e||"object"===ut(e)&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue}},representation:{type:String,default:"triangle",value:function(e){return["triangle","square"].some((function(t){return t===e}))}},inline:Boolean,disabled:Boolean,horizontalColorPicker:{type:Boolean,default:!1},colorFormatter:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultColorFormatter?Kt.defaultColorFormatter(e):function(e,t){return e.alpha<1?e.toString("hexa"):e.toString("hex")}(e)}},colorParser:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultColorParser?Kt.defaultColorParser(e):function(e,t){return oi.parse(e)}(e)}},alpha:{type:Boolean,default:!1},expanded:Boolean,position:String,mobileModal:{type:Boolean,default:function(){return Kt.defaultDatepickerMobileModal}},focusable:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},appendToBody:Boolean},data:function(){return{color:this.parseColor(this.value)}},computed:{computedValue:{set:function(e){this.color=this.parseColor(e)},get:function(){return this.color}},background:function(){if(this.alpha)return"linear-gradient(\n 45deg,\n ".concat(this.computedValue.toString("hex")," 50%,\n ").concat(this.computedValue.toString("hexa")," 50%\n )");var e=this.computedValue.toString("hex");return"linear-gradient(\n 45deg,\n ".concat(e," 50%,\n ").concat(e," 50%\n )")},triggerStyle:function(){var e=this.computedValue,t=.299*e.red+.587*e.green+.114*e.blue>186;return{backgroundColor:"#ffffff",backgroundImage:"\n ".concat(this.background,",\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7)\n "),backgroundSize:"100% 100%, 16px 16px, 16px 16px",backgroundPosition:"0 0, 8px 8px, 0 0",color:t?"#000000":"#FFFFFF",textShadow:"0 0 2px ".concat(t?"#FFFFFFAA":"#000000AA")}},isMobile:function(){return this.mobileNative&&Nt.any()},ariaRole:function(){if(!this.inline)return"dialog"}},watch:{value:function(e){this.computedValue=new oi(e)}},methods:{parseColor:function(e){try{return this.colorParser(e)}catch(e){return new oi}},updateColor:function(e){e.alpha=this.computedValue.alpha,this.computedValue=e,this.$emit("input",e)},updateAlpha:function(e){this.computedValue.alpha=e,this.$emit("input",this.computedValue)},updateRGB:function(){this.$emit("input",this.computedValue)},formatValue:function(e){return e?this.colorFormatter(e,this):null},togglePicker:function(e){if(this.$refs.dropdown){var t="boolean"==typeof e?e:!this.$refs.dropdown.isActive;(t||this.closeOnClick)&&(this.$refs.dropdown.isActive=t)}},handleOnFocus:function(e){this.onFocus(e),this.openOnFocus&&this.togglePicker(!0)},toggle:function(){if(this.mobileNative&&this.isMobile){var input=this.$refs.input.$refs.input;return input.focus(),void input.click()}this.$refs.dropdown.toggle()},onInputClick:function(e){this.$refs.dropdown.isActive&&e.stopPropagation()},keyPress:function(e){var t=e.key;this.$refs.dropdown&&this.$refs.dropdown.isActive&&("Escape"===t||"Esc"===t)&&this.togglePicker(!1)},onActiveChange:function(e){e||this.onBlur(),this.$emit("active-change",e)}}},undefined,!1,undefined,void 0,void 0),Ci={install:function(e){Jt(e,xi)}};use(Ci);var Di=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"datepicker-row"},[e.showWeekNumber?n("a",{staticClass:"datepicker-cell is-week-number",class:{"is-clickable":e.weekNumberClickable},on:{click:function(t){t.preventDefault(),e.clickWeekNumber(e.getWeekNumber(e.week[6]))}}},[n("span",[e._v(e._s(e.getWeekNumber(e.week[6]).week))])]):e._e(),e._l(e.week,(function(t,r){return[e.selectableDate(t)&&!e.disabled?n("a",{key:r,ref:"day-"+t.getMonth()+"-"+t.getDate(),refInFor:!0,staticClass:"datepicker-cell",class:e.classObject(t),attrs:{role:"button",href:"#",disabled:e.disabled,tabindex:e.day===t.getDate()&&e.month===t.getMonth()?null:-1},on:{click:function(n){return n.preventDefault(),e.emitChosenDate(t)},mouseenter:function(n){return e.setRangeHoverEndDate(t)},keydown:function(n){return e.manageKeydown(n,t)}}},[n("span",[e._v(e._s(t.getDate()))]),e.eventsDateMatch(t)?n("div",{staticClass:"events"},e._l(e.eventsDateMatch(t),(function(e,t){return n("div",{key:t,staticClass:"event",class:e.type})})),0):e._e()]):n("div",{key:r,staticClass:"datepicker-cell",class:e.classObject(t)},[n("span",[e._v(e._s(t.getDate()))]),e.eventsDateMatch(t)?n("div",{staticClass:"events"},e._l(e.eventsDateMatch(t),(function(e,t){return n("div",{key:t,staticClass:"event",class:e.type})})),0):e._e()])]}))],2)},staticRenderFns:[]},undefined,{name:"BDatepickerTableRow",inject:{$datepicker:{name:"$datepicker",default:!1}},props:{selectedDate:{type:[Date,Array]},hoveredDateRange:Array,day:{type:Number},week:{type:Array,required:!0},month:{type:Number,required:!0},minDate:Date,maxDate:Date,disabled:Boolean,unselectableDates:[Array,Function],unselectableDaysOfWeek:Array,selectableDates:[Array,Function],events:Array,indicators:String,dateCreator:Function,nearbyMonthDays:Boolean,nearbySelectableMonthDays:Boolean,showWeekNumber:Boolean,weekNumberClickable:Boolean,range:Boolean,multiple:Boolean,rulesForFirstWeek:Number,firstDayOfWeek:Number},watch:{day:function(e){var t=this,n="day-".concat(this.month,"-").concat(e);this.$nextTick((function(){t.$refs[n]&&t.$refs[n].length>0&&t.$refs[n][0]&&t.$refs[n][0].focus()}))}},methods:{firstWeekOffset:function(e,t,n){var r=7+t-n;return-((7+new Date(e,0,r).getDay()-t)%7)+r-1},daysInYear:function(e){return this.isLeapYear(e)?366:365},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},getSetDayOfYear:function(input){return Math.round((input-new Date(input.getFullYear(),0,1))/864e5)+1},weeksInYear:function(e,t,n){var r=this.firstWeekOffset(e,t,n),o=this.firstWeekOffset(e+1,t,n);return(this.daysInYear(e)-r+o)/7},getWeekNumber:function(e){var t,n,r=this.firstDayOfWeek,o=this.rulesForFirstWeek,l=this.firstWeekOffset(e.getFullYear(),r,o),c=Math.floor((this.getSetDayOfYear(e)-l-1)/7)+1;return c<1?(n=e.getFullYear()-1,t=c+this.weeksInYear(n,r,o)):c>this.weeksInYear(e.getFullYear(),r,o)?(t=c-this.weeksInYear(e.getFullYear(),r,o),n=e.getFullYear()+1):(n=e.getFullYear(),t=c),{week:t,year:n}},clickWeekNumber:function(e){this.weekNumberClickable&&this.$datepicker.$emit("week-number-click",e.week,e.year)},selectableDate:function(e){var t=[];if(this.minDate&&t.push(e>=this.minDate),this.maxDate&&t.push(e<=this.maxDate),this.nearbyMonthDays&&!this.nearbySelectableMonthDays&&t.push(e.getMonth()===this.month),this.selectableDates)if("function"==typeof this.selectableDates){if(this.selectableDates(e))return!0;t.push(!1)}else for(var i=0;it[0]&&ethis.minDate)&&(!this.maxDate||ne?(this.selectedEndDate=this.selectedBeginDate,this.selectedBeginDate=e):this.selectedEndDate=e,this.$emit("range-end",e),this.$emit("input",[this.selectedBeginDate,this.selectedEndDate])):(this.selectedBeginDate=e,this.$emit("range-start",e))},handleSelectMultipleDates:function(e){this.multipleSelectedDates.filter((function(t){return t.getDate()===e.getDate()&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()})).length?this.multipleSelectedDates=this.multipleSelectedDates.filter((function(t){return t.getDate()!==e.getDate()||t.getFullYear()!==e.getFullYear()||t.getMonth()!==e.getMonth()})):this.multipleSelectedDates=[].concat(Ct(this.multipleSelectedDates),[e])},weekBuilder:function(e,t,n){for(var r=new Date(n,t),o=[],l=new Date(n,t,e).getDay(),c=l>=this.firstDayOfWeek?l-this.firstDayOfWeek:7-this.firstDayOfWeek+l,d=1,i=0;i=this.minDate),this.maxDate&&t.push(e<=this.maxDate),this.nearbyMonthDays&&!this.nearbySelectableMonthDays&&t.push(e.getMonth()===this.focused.month),this.selectableDates)if("function"==typeof this.selectableDates){if(this.selectableDates(e))return!0;t.push(!1)}else for(var i=0;i0&&this.$nextTick((function(){t.$refs[n][0]&&t.$refs[n][0].focus()}))}},methods:{selectMultipleDates:function(e){this.multipleSelectedDates.filter((function(t){return t.getDate()===e.getDate()&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()})).length?this.multipleSelectedDates=this.multipleSelectedDates.filter((function(t){return t.getDate()!==e.getDate()||t.getFullYear()!==e.getFullYear()||t.getMonth()!==e.getMonth()})):this.multipleSelectedDates.push(e),this.$emit("input",this.multipleSelectedDates)},selectableDate:function(e){var t=[];if(this.minDate&&t.push(e>=this.minDate),this.maxDate&&t.push(e<=this.maxDate),t.push(e.getFullYear()===this.focused.year),this.selectableDates)if("function"==typeof this.selectableDates){if(this.selectableDates(e))return!0;t.push(!1)}else for(var i=0;it[0]&&ee?(this.selectedEndDate=this.selectedBeginDate,this.selectedBeginDate=e):this.selectedEndDate=e,this.$emit("range-end",e),this.$emit("input",[this.selectedBeginDate,this.selectedEndDate])):(this.selectedBeginDate=e,this.$emit("range-start",e)))},setRangeHoverEndDate:function(e){this.range&&(this.hoveredEndDate=e)},changeFocus:function(e,t){var n=e;n.setMonth(e.getMonth()+t),this.$emit("change-focus",n)}}},undefined,!1,undefined,void 0,void 0),Mi={name:"BDatepicker",components:($i={},ft($i,_i.name,_i),ft($i,Pi.name,Pi),ft($i,rn.name,rn),ft($i,Gn.name,Gn),ft($i,ni.name,ni),ft($i,an.name,an),ft($i,Yn.name,Yn),ft($i,qn.name,qn),$i),mixins:[en],inheritAttrs:!1,provide:function(){return{$datepicker:this}},props:{value:{type:[Date,Array]},dayNames:{type:Array,default:function(){if(Array.isArray(Kt.defaultDayNames))return Kt.defaultDayNames}},monthNames:{type:Array,default:function(){if(Array.isArray(Kt.defaultMonthNames))return Kt.defaultMonthNames}},firstDayOfWeek:{type:Number,default:function(){return"number"==typeof Kt.defaultFirstDayOfWeek?Kt.defaultFirstDayOfWeek:0}},inline:Boolean,minDate:Date,maxDate:Date,focusedDate:Date,placeholder:String,editable:Boolean,disabled:Boolean,horizontalTimePicker:Boolean,unselectableDates:[Array,Function],unselectableDaysOfWeek:{type:Array,default:function(){return Kt.defaultUnselectableDaysOfWeek}},selectableDates:[Array,Function],dateFormatter:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultDateFormatter?Kt.defaultDateFormatter(e):function(e,t){var n=(Array.isArray(e)?e:[e]).map((function(e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),12);return t.isTypeMonth?t.dtfMonth.format(n):t.dtf.format(n)}));return t.multiple?n.join(", "):n.join(" - ")}(e,t)}},dateParser:{type:Function,default:function(e,t){return"function"==typeof Kt.defaultDateParser?Kt.defaultDateParser(e):function(e,t){if(t.dtf.formatToParts&&"function"==typeof t.dtf.formatToParts){var n=jt((t.isTypeMonth?t.dtfMonth:t.dtf).formatToParts(new Date(2e3,11,25)).map((function(e){return"literal"===e.type?e.value:"((?!=<".concat(e.type,">)\\d+)")})).join(""),e);if(n.year&&4===n.year.length&&n.month&&n.month<=12){if(t.isTypeMonth)return new Date(n.year,n.month-1);if(n.day&&n.day<=31)return new Date(n.year,n.month-1,n.day,12)}}if(!t.isTypeMonth)return new Date(Date.parse(e));if(e){var s=e.split("/"),r=4===s[0].length?s[0]:s[1],o=2===s[0].length?s[0]:s[1];if(r&&o)return new Date(parseInt(r,10),parseInt(o-1,10),1,0,0,0,0)}return null}(e,t)}},dateCreator:{type:Function,default:function(){return"function"==typeof Kt.defaultDateCreator?Kt.defaultDateCreator():new Date}},mobileNative:{type:Boolean,default:function(){return Kt.defaultDatepickerMobileNative}},position:String,iconRight:String,iconRightClickable:Boolean,events:Array,indicators:{type:String,default:"dots"},openOnFocus:Boolean,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},yearsRange:{type:Array,default:function(){return Kt.defaultDatepickerYearsRange}},type:{type:String,validator:function(e){return["month"].indexOf(e)>=0}},nearbyMonthDays:{type:Boolean,default:function(){return Kt.defaultDatepickerNearbyMonthDays}},nearbySelectableMonthDays:{type:Boolean,default:function(){return Kt.defaultDatepickerNearbySelectableMonthDays}},showWeekNumber:{type:Boolean,default:function(){return Kt.defaultDatepickerShowWeekNumber}},weekNumberClickable:{type:Boolean,default:function(){return Kt.defaultDatepickerWeekNumberClickable}},rulesForFirstWeek:{type:Number,default:function(){return 4}},range:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},mobileModal:{type:Boolean,default:function(){return Kt.defaultDatepickerMobileModal}},focusable:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},appendToBody:Boolean,ariaNextLabel:String,ariaPreviousLabel:String},data:function(){var e=(Array.isArray(this.value)?this.value[0]:this.value)||this.focusedDate||this.dateCreator();return!this.value&&this.maxDate&&this.maxDate.getFullYear()0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long",n=[],i=0;i<12;i++)n.push(new Date(2e3,i,15));var r=new Intl.DateTimeFormat(e,{month:t});return n.map((function(e){return r.format(e)}))}(this.locale)},newDayNames:function(){return Array.isArray(this.dayNames)?this.dayNames:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow",n=[],i=0;i<7;i++){var dt=new Date(2e3,0,i+1);n[dt.getDay()]=dt}var r=new Intl.DateTimeFormat(e,{weekday:t});return n.map((function(e){return r.format(e)}))}(this.locale)},listOfMonths:function(){var e=0,t=12;return this.minDate&&this.focusedDateData.year===this.minDate.getFullYear()&&(e=this.minDate.getMonth()),this.maxDate&&this.focusedDateData.year===this.maxDate.getFullYear()&&(t=this.maxDate.getMonth()),this.newMonthNames.map((function(n,r){return{name:n,index:r,disabled:rt}}))},listOfYears:function(){var e=this.focusedDateData.year+this.yearsRange[1];this.maxDate&&this.maxDate.getFullYear()t&&(t=Math.min(this.minDate.getFullYear(),this.focusedDateData.year));for(var n=[],i=t;i<=e;i++)n.push(i);return n.reverse()},showPrev:function(){return!!this.minDate&&(this.isTypeMonth?this.focusedDateData.year<=this.minDate.getFullYear():new Date(this.focusedDateData.year,this.focusedDateData.month)<=new Date(this.minDate.getFullYear(),this.minDate.getMonth()))},showNext:function(){return!!this.maxDate&&(this.isTypeMonth?this.focusedDateData.year>=this.maxDate.getFullYear():new Date(this.focusedDateData.year,this.focusedDateData.month)>=new Date(this.maxDate.getFullYear(),this.maxDate.getMonth()))},isMobile:function(){return this.mobileNative&&Nt.any()},isTypeMonth:function(){return"month"===this.type},ariaRole:function(){if(!this.inline)return"dialog"}},watch:{value:function(e){this.updateInternalState(e),this.multiple||this.togglePicker(!1)},focusedDate:function(e){e&&(this.focusedDateData={day:e.getDate(),month:e.getMonth(),year:e.getFullYear()})},"focusedDateData.month":function(e){this.$emit("change-month",e)},"focusedDateData.year":function(e){this.$emit("change-year",e)}},methods:{onChange:function(e){var t=this.dateParser(e,this);!t||isNaN(t)&&(!Array.isArray(t)||2!==t.length||isNaN(t[0])||isNaN(t[1]))?(this.computedValue=null,this.$refs.input&&(this.$refs.input.newValue=this.computedValue)):this.computedValue=t},formatValue:function(e){return Array.isArray(e)?Array.isArray(e)&&e.every((function(e){return!isNaN(e)}))?this.dateFormatter(Ct(e),this):null:e&&!isNaN(e)?this.dateFormatter(e,this):null},prev:function(){this.disabled||(this.isTypeMonth?this.focusedDateData.year-=1:this.focusedDateData.month>0?this.focusedDateData.month-=1:(this.focusedDateData.month=11,this.focusedDateData.year-=1))},next:function(){this.disabled||(this.isTypeMonth?this.focusedDateData.year+=1:this.focusedDateData.month<11?this.focusedDateData.month+=1:(this.focusedDateData.month=0,this.focusedDateData.year+=1))},formatNative:function(e){return this.isTypeMonth?this.formatYYYYMM(e):this.formatYYYYMMDD(e)},formatYYYYMMDD:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getFullYear(),r=t.getMonth()+1,o=t.getDate();return n+"-"+(r<10?"0":"")+r+"-"+(o<10?"0":"")+o}return""},formatYYYYMM:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getFullYear(),r=t.getMonth()+1;return n+"-"+(r<10?"0":"")+r}return""},onChangeNativePicker:function(e){var t=e.target.value,s=t?t.split("-"):[];if(3===s.length){var n=parseInt(s[0],10),r=parseInt(s[1])-1,o=parseInt(s[2]);this.computedValue=new Date(n,r,o)}else this.computedValue=null},updateInternalState:function(e){if(this.dateSelected!==e){var t=Array.isArray(e),n=t?e.length?e[e.length-1]:this.dateCreator():e||this.dateCreator();(!t||t&&this.dateSelected&&e.length>this.dateSelected.length)&&(this.focusedDateData={day:n.getDate(),month:n.getMonth(),year:n.getFullYear()}),this.dateSelected=e}},togglePicker:function(e){if(this.$refs.dropdown){var t="boolean"==typeof e?e:!this.$refs.dropdown.isActive;(t||this.closeOnClick)&&(this.$refs.dropdown.isActive=t)}},handleOnFocus:function(e){this.onFocus(e),this.openOnFocus&&this.togglePicker(!0)},toggle:function(){if(this.mobileNative&&this.isMobile){var input=this.$refs.input.$refs.input;return input.focus(),void input.click()}this.$refs.dropdown.toggle()},onInputClick:function(e){this.$refs.dropdown.isActive&&e.stopPropagation()},keyPress:function(e){var t=e.key;this.$refs.dropdown&&this.$refs.dropdown.isActive&&("Escape"===t||"Esc"===t)&&this.togglePicker(!1)},onActiveChange:function(e){e||this.onBlur(),this.$emit("active-change",e)},changeFocus:function(e){this.focusedDateData={day:e.getDate(),month:e.getMonth(),year:e.getFullYear()}}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}};var Oi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"datepicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline,"mobile-modal":e.mobileModal,"trap-focus":e.trapFocus,"aria-role":e.ariaRole,"append-to-body":e.appendToBody,"append-to-body-copy-parent":"","trigger-tabindex":-1},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(t){return[e._t("trigger",[n("b-input",e._b({ref:"input",attrs:{autocomplete:"off",value:e.formattedValue,placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-right":e.iconRight,"icon-right-clickable":e.iconRightClickable,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,disabled:e.disabled,readonly:!e.editable,"use-html5-validation":!1},on:{"icon-right-click":function(t){return e.$emit("icon-right-click",t)},focus:e.handleOnFocus},nativeOn:{click:function(t){return e.onInputClick(t)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.togglePicker(!0)},change:function(t){return e.onChange(t.target.value)}}},"b-input",e.$attrs,!1))],null,t)]}}],null,!0)},[n("b-dropdown-item",{class:{"dropdown-horizontal-timepicker":e.horizontalTimePicker},attrs:{disabled:e.disabled,focusable:e.focusable,custom:""}},[n("div",[n("header",{staticClass:"datepicker-header"},[void 0!==e.$slots.header&&e.$slots.header.length?[e._t("header")]:n("div",{staticClass:"pagination field is-centered",class:e.size},[n("a",{directives:[{name:"show",rawName:"v-show",value:!e.showPrev&&!e.disabled,expression:"!showPrev && !disabled"}],staticClass:"pagination-previous",attrs:{role:"button",href:"#",disabled:e.disabled,"aria-label":e.ariaPreviousLabel},on:{click:function(t){return t.preventDefault(),e.prev(t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.prev(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.prev(t))}]}},[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"",type:"is-primary is-clickable"}})],1),n("a",{directives:[{name:"show",rawName:"v-show",value:!e.showNext&&!e.disabled,expression:"!showNext && !disabled"}],staticClass:"pagination-next",attrs:{role:"button",href:"#",disabled:e.disabled,"aria-label":e.ariaNextLabel},on:{click:function(t){return t.preventDefault(),e.next(t)},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.next(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),e.next(t))}]}},[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"",type:"is-primary is-clickable"}})],1),n("div",{staticClass:"pagination-list"},[n("b-field",[e.isTypeMonth?e._e():n("b-select",{attrs:{disabled:e.disabled,size:e.size},model:{value:e.focusedDateData.month,callback:function(t){e.$set(e.focusedDateData,"month",t)},expression:"focusedDateData.month"}},e._l(e.listOfMonths,(function(t){return n("option",{key:t.name,attrs:{disabled:t.disabled},domProps:{value:t.index}},[e._v(" "+e._s(t.name)+" ")])})),0),n("b-select",{attrs:{disabled:e.disabled,size:e.size},model:{value:e.focusedDateData.year,callback:function(t){e.$set(e.focusedDateData,"year",t)},expression:"focusedDateData.year"}},e._l(e.listOfYears,(function(t){return n("option",{key:t,domProps:{value:t}},[e._v(" "+e._s(t)+" ")])})),0)],1)],1)])],2),e.isTypeMonth?n("div",[n("b-datepicker-month",{attrs:{"month-names":e.newMonthNames,"min-date":e.minDate,"max-date":e.maxDate,focused:e.focusedDateData,disabled:e.disabled,"unselectable-dates":e.unselectableDates,"unselectable-days-of-week":e.unselectableDaysOfWeek,"selectable-dates":e.selectableDates,events:e.events,indicators:e.indicators,"date-creator":e.dateCreator,range:e.range,multiple:e.multiple},on:{"range-start":function(t){return e.$emit("range-start",t)},"range-end":function(t){return e.$emit("range-end",t)},close:function(t){return e.togglePicker(!1)},"change-focus":e.changeFocus,"update:focused":function(t){e.focusedDateData=t}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}})],1):n("div",{staticClass:"datepicker-content",class:{"content-horizontal-timepicker":e.horizontalTimePicker}},[n("b-datepicker-table",{attrs:{"day-names":e.newDayNames,"month-names":e.newMonthNames,"first-day-of-week":e.firstDayOfWeek,"rules-for-first-week":e.rulesForFirstWeek,"min-date":e.minDate,"max-date":e.maxDate,focused:e.focusedDateData,disabled:e.disabled,"unselectable-dates":e.unselectableDates,"unselectable-days-of-week":e.unselectableDaysOfWeek,"selectable-dates":e.selectableDates,events:e.events,indicators:e.indicators,"date-creator":e.dateCreator,"type-month":e.isTypeMonth,"nearby-month-days":e.nearbyMonthDays,"nearby-selectable-month-days":e.nearbySelectableMonthDays,"show-week-number":e.showWeekNumber,"week-number-clickable":e.weekNumberClickable,range:e.range,multiple:e.multiple},on:{"range-start":function(t){return e.$emit("range-start",t)},"range-end":function(t){return e.$emit("range-end",t)},close:function(t){return e.togglePicker(!1)},"update:focused":function(t){e.focusedDateData=t}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}})],1)]),void 0!==e.$slots.default&&e.$slots.default.length?n("footer",{staticClass:"datepicker-footer",class:{"footer-horizontal-timepicker":e.horizontalTimePicker}},[e._t("default")],2):e._e()])],1):n("b-input",e._b({ref:"input",attrs:{type:e.isTypeMonth?"month":"date",autocomplete:"off",value:e.formatNative(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,max:e.formatNative(e.maxDate),min:e.formatNative(e.minDate),disabled:e.disabled,readonly:!1,"use-html5-validation":!1},on:{focus:e.onFocus,blur:e.onBlur},nativeOn:{change:function(t){return e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]},undefined,Mi,undefined,!1,undefined,void 0,void 0),Ai={install:function(e){Jt(e,Oi)}};use(Ai);var Ti,Bi=Ai;var Fi,Ii=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"timepicker control",class:[e.size,{"is-expanded":e.expanded}]},[!e.isMobile||e.inline?n("b-dropdown",{ref:"dropdown",attrs:{position:e.position,disabled:e.disabled,inline:e.inline,"append-to-body":e.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":e.onActiveChange},scopedSlots:e._u([e.inline?null:{key:"trigger",fn:function(){return[e._t("trigger",[n("b-input",e._b({ref:"input",attrs:{autocomplete:"off",value:e.formatValue(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,loading:e.loading,disabled:e.disabled,readonly:!e.editable,rounded:e.rounded,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggle(!0)},change:function(t){return e.onChange(t.target.value)}}},"b-input",e.$attrs,!1))])]},proxy:!0}],null,!0)},[n("b-dropdown-item",{attrs:{disabled:e.disabled,focusable:e.focusable,custom:""}},[n("b-field",{attrs:{grouped:"",position:"is-centered"}},[n("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){return e.onHoursChange(t.target.value)}},model:{value:e.hoursSelected,callback:function(t){e.hoursSelected=t},expression:"hoursSelected"}},e._l(e.hours,(function(t){return n("option",{key:t.value,attrs:{disabled:e.isHourDisabled(t.value)},domProps:{value:t.value}},[e._v(" "+e._s(t.label)+" ")])})),0),n("span",{staticClass:"control is-colon"},[e._v(e._s(e.hourLiteral))]),n("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){return e.onMinutesChange(t.target.value)}},model:{value:e.minutesSelected,callback:function(t){e.minutesSelected=t},expression:"minutesSelected"}},e._l(e.minutes,(function(t){return n("option",{key:t.value,attrs:{disabled:e.isMinuteDisabled(t.value)},domProps:{value:t.value}},[e._v(" "+e._s(t.label)+" ")])})),0),e.enableSeconds?[n("span",{staticClass:"control is-colon"},[e._v(e._s(e.minuteLiteral))]),n("b-select",{attrs:{disabled:e.disabled,placeholder:"00"},nativeOn:{change:function(t){return e.onSecondsChange(t.target.value)}},model:{value:e.secondsSelected,callback:function(t){e.secondsSelected=t},expression:"secondsSelected"}},e._l(e.seconds,(function(t){return n("option",{key:t.value,attrs:{disabled:e.isSecondDisabled(t.value)},domProps:{value:t.value}},[e._v(" "+e._s(t.label)+" ")])})),0),n("span",{staticClass:"control is-colon"},[e._v(e._s(e.secondLiteral))])]:e._e(),e.isHourFormat24?e._e():n("b-select",{attrs:{disabled:e.disabled},nativeOn:{change:function(t){return e.onMeridienChange(t.target.value)}},model:{value:e.meridienSelected,callback:function(t){e.meridienSelected=t},expression:"meridienSelected"}},e._l(e.meridiens,(function(t){return n("option",{key:t,domProps:{value:t}},[e._v(" "+e._s(t)+" ")])})),0)],2),void 0!==e.$slots.default&&e.$slots.default.length?n("footer",{staticClass:"timepicker-footer"},[e._t("default")],2):e._e()],1)],1):n("b-input",e._b({ref:"input",attrs:{type:"time",step:e.nativeStep,autocomplete:"off",value:e.formatHHMMSS(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,max:e.formatHHMMSS(e.maxTime),min:e.formatHHMMSS(e.minTime),disabled:e.disabled,readonly:!1,"use-html5-validation":e.useHtml5Validation},on:{focus:e.handleOnFocus,blur:function(t){e.onBlur()&&e.checkHtml5Validity()}},nativeOn:{change:function(t){return e.onChange(t.target.value)}}},"b-input",e.$attrs,!1))],1)},staticRenderFns:[]},undefined,{name:"BTimepicker",components:(Ti={},ft(Ti,rn.name,rn),ft(Ti,Gn.name,Gn),ft(Ti,ni.name,ni),ft(Ti,an.name,an),ft(Ti,Yn.name,Yn),ft(Ti,qn.name,qn),Ti),mixins:[Hn],inheritAttrs:!1,data:function(){return{_isTimepicker:!0}},computed:{nativeStep:function(){if(this.enableSeconds)return"1"}}},undefined,!1,undefined,void 0,void 0),Ni={name:"BDatetimepicker",components:(Fi={},ft(Fi,Oi.name,Oi),ft(Fi,Ii.name,Ii),Fi),mixins:[en],inheritAttrs:!1,props:{value:{type:Date},editable:{type:Boolean,default:!1},placeholder:String,horizontalTimePicker:Boolean,disabled:Boolean,firstDayOfWeek:{type:Number,default:function(){return"number"==typeof Kt.defaultFirstDayOfWeek?Kt.defaultFirstDayOfWeek:0}},rulesForFirstWeek:{type:Number,default:function(){return 4}},icon:String,iconRight:String,iconRightClickable:Boolean,iconPack:String,inline:Boolean,openOnFocus:Boolean,position:String,mobileNative:{type:Boolean,default:!0},minDatetime:Date,maxDatetime:Date,datetimeFormatter:{type:Function},datetimeParser:{type:Function},datetimeCreator:{type:Function,default:function(e){return"function"==typeof Kt.defaultDatetimeCreator?Kt.defaultDatetimeCreator(e):e}},datepicker:Object,timepicker:Object,tzOffset:{type:Number,default:0},focusable:{type:Boolean,default:!0},appendToBody:Boolean},data:function(){return{newValue:this.adjustValue(this.value)}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){if(e){var t=new Date(e.getTime());this.newValue?e.getDate()===this.newValue.getDate()&&e.getMonth()===this.newValue.getMonth()&&e.getFullYear()===this.newValue.getFullYear()||0!==e.getHours()||0!==e.getMinutes()||0!==e.getSeconds()||t.setHours(this.newValue.getHours(),this.newValue.getMinutes(),this.newValue.getSeconds(),0):t=this.datetimeCreator(e),this.minDatetime&&tthis.adjustValue(this.maxDatetime)&&(t=this.adjustValue(this.maxDatetime)),this.newValue=new Date(t.getTime())}else this.newValue=this.adjustValue(e);var n=this.adjustValue(this.newValue,!0);this.$emit("input",n)}},localeOptions:function(){return new Intl.DateTimeFormat(this.locale,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:this.enableSeconds()?"numeric":void 0}).resolvedOptions()},dtf:function(){return new Intl.DateTimeFormat(this.locale,{year:this.localeOptions.year||"numeric",month:this.localeOptions.month||"numeric",day:this.localeOptions.day||"numeric",hour:this.localeOptions.hour||"numeric",minute:this.localeOptions.minute||"numeric",second:this.enableSeconds()?this.localeOptions.second||"numeric":void 0,hourCycle:this.isHourFormat24()?"h23":"h12"})},isMobileNative:function(){return this.mobileNative&&0===this.tzOffset},isMobile:function(){return this.isMobileNative&&Nt.any()},minDate:function(){if(!this.minDatetime)return this.datepicker?this.adjustValue(this.datepicker.minDate):null;var e=this.adjustValue(this.minDatetime);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)},maxDate:function(){if(!this.maxDatetime)return this.datepicker?this.adjustValue(this.datepicker.maxDate):null;var e=this.adjustValue(this.maxDatetime);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)},minTime:function(){if(!this.minDatetime||null===this.newValue||void 0===this.newValue)return this.timepicker?this.adjustValue(this.timepicker.minTime):null;var e=this.adjustValue(this.minDatetime);return e.getFullYear()===this.newValue.getFullYear()&&e.getMonth()===this.newValue.getMonth()&&e.getDate()===this.newValue.getDate()?e:void 0},maxTime:function(){if(!this.maxDatetime||null===this.newValue||void 0===this.newValue)return this.timepicker?this.adjustValue(this.timepicker.maxTime):null;var e=this.adjustValue(this.maxDatetime);return e.getFullYear()===this.newValue.getFullYear()&&e.getMonth()===this.newValue.getMonth()&&e.getDate()===this.newValue.getDate()?e:void 0},datepickerSize:function(){return this.datepicker&&this.datepicker.size?this.datepicker.size:this.size},timepickerSize:function(){return this.timepicker&&this.timepicker.size?this.timepicker.size:this.size},timepickerDisabled:function(){return this.timepicker&&this.timepicker.disabled?this.timepicker.disabled:this.disabled}},watch:{value:function(){this.newValue=this.adjustValue(this.value)},tzOffset:function(){this.newValue=this.adjustValue(this.value)}},methods:{enableSeconds:function(){return!!this.$refs.timepicker&&this.$refs.timepicker.enableSeconds},isHourFormat24:function(){return this.$refs.timepicker?this.$refs.timepicker.isHourFormat24:!this.localeOptions.hour12},adjustValue:function(e){return e?arguments.length>1&&void 0!==arguments[1]&&arguments[1]?new Date(e.getTime()-6e4*this.tzOffset):new Date(e.getTime()+6e4*this.tzOffset):e},defaultDatetimeParser:function(e){if("function"==typeof this.datetimeParser)return this.datetimeParser(e);if("function"==typeof Kt.defaultDatetimeParser)return Kt.defaultDatetimeParser(e);if(this.dtf.formatToParts&&"function"==typeof this.dtf.formatToParts){var t=["AM","PM","AM".toLowerCase(),"PM".toLowerCase()];this.$refs.timepicker&&(t.push(this.$refs.timepicker.amString),t.push(this.$refs.timepicker.pmString));var n=this.dtf.formatToParts(new Date),r=jt(n.map((function(e,r){return"literal"===e.type?r+1)(").concat(t.join("|"),")?)"):"((?!=<".concat(e.type,">)\\d+)")})).join(""),e);if(r.year&&4===r.year.length&&r.month&&r.month<=12&&r.day&&r.day<=31&&r.hour&&r.hour>=0&&r.hour<24&&r.minute&&r.minute>=0&&r.minute<=59)return new Date(r.year,r.month-1,r.day,r.hour,r.minute,r.second||0)}return new Date(Date.parse(e))},defaultDatetimeFormatter:function(e){return"function"==typeof this.datetimeFormatter?this.datetimeFormatter(e):"function"==typeof Kt.defaultDatetimeFormatter?Kt.defaultDatetimeFormatter(e):this.dtf.format(e)},onChangeNativePicker:function(e){var t=e.target.value,s=t?t.split(/\D/):[];if(s.length>=5){var n=parseInt(s[0],10),r=parseInt(s[1],10)-1,o=parseInt(s[2],10),l=parseInt(s[3],10),c=parseInt(s[4],10);this.computedValue=new Date(n,r,o,l,c)}else this.computedValue=null},onActiveChange:function(e){this.$emit("active-change",e)},formatNative:function(e){var t=new Date(e);if(e&&!isNaN(t)){var n=t.getFullYear(),r=t.getMonth()+1,o=t.getDate(),l=t.getHours(),c=t.getMinutes(),d=t.getSeconds();return n+"-"+(r<10?"0":"")+r+"-"+(o<10?"0":"")+o+"T"+(l<10?"0":"")+l+":"+(c<10?"0":"")+c+":"+(d<10?"0":"")+d}return""},toggle:function(){this.$refs.datepicker.toggle()}},mounted:function(){this.isMobile&&!this.inline||this.newValue&&this.$refs.datepicker.$forceUpdate()}};var Ei=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return!e.isMobile||e.inline?n("b-datepicker",e._b({ref:"datepicker",attrs:{rounded:e.rounded,"open-on-focus":e.openOnFocus,position:e.position,loading:e.loading,inline:e.inline,editable:e.editable,expanded:e.expanded,"close-on-click":!1,"first-day-of-week":e.firstDayOfWeek,"rules-for-first-week":e.rulesForFirstWeek,"date-formatter":e.defaultDatetimeFormatter,"date-parser":e.defaultDatetimeParser,"min-date":e.minDate,"max-date":e.maxDate,icon:e.icon,"icon-right":e.iconRight,"icon-right-clickable":e.iconRightClickable,"icon-pack":e.iconPack,size:e.datepickerSize,placeholder:e.placeholder,"horizontal-time-picker":e.horizontalTimePicker,range:!1,disabled:e.disabled,"mobile-native":e.isMobileNative,locale:e.locale,focusable:e.focusable,"append-to-body":e.appendToBody},on:{focus:e.onFocus,blur:e.onBlur,"active-change":e.onActiveChange,"icon-right-click":function(t){return e.$emit("icon-right-click")},"change-month":function(t){return e.$emit("change-month",t)},"change-year":function(t){return e.$emit("change-year",t)}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},"b-datepicker",e.datepicker,!1),[n("nav",{staticClass:"level is-mobile"},[void 0!==e.$slots.left?n("div",{staticClass:"level-item has-text-centered"},[e._t("left")],2):e._e(),n("div",{staticClass:"level-item has-text-centered"},[n("b-timepicker",e._b({ref:"timepicker",attrs:{inline:"",editable:e.editable,"min-time":e.minTime,"max-time":e.maxTime,size:e.timepickerSize,disabled:e.timepickerDisabled,focusable:e.focusable,"mobile-native":e.isMobileNative,locale:e.locale},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},"b-timepicker",e.timepicker,!1))],1),void 0!==e.$slots.right?n("div",{staticClass:"level-item has-text-centered"},[e._t("right")],2):e._e()])]):n("b-input",e._b({ref:"input",attrs:{type:"datetime-local",autocomplete:"off",value:e.formatNative(e.computedValue),placeholder:e.placeholder,size:e.size,icon:e.icon,"icon-pack":e.iconPack,rounded:e.rounded,loading:e.loading,max:e.formatNative(e.maxDate),min:e.formatNative(e.minDate),disabled:e.disabled,readonly:!1,"use-html5-validation":e.useHtml5Validation},on:{focus:e.onFocus,blur:e.onBlur},nativeOn:{change:function(t){return e.onChangeNativePicker(t)}}},"b-input",e.$attrs,!1))},staticRenderFns:[]},undefined,Ni,undefined,!1,undefined,void 0,void 0),Ri={install:function(e){Jt(e,Ei)}};use(Ri);var Vi=Ri,Li={name:"BModal",directives:{trapFocus:jn},model:{prop:"active",event:"update:active"},props:{active:Boolean,component:[Object,Function,String],content:[String,Array],programmatic:Boolean,props:Object,events:Object,width:{type:[String,Number],default:960},hasModalCard:Boolean,animation:{type:String,default:"zoom-out"},canCancel:{type:[Array,Boolean],default:function(){return Kt.defaultModalCanCancel}},onCancel:{type:Function,default:function(){}},scroll:{type:String,default:function(){return Kt.defaultModalScroll?Kt.defaultModalScroll:"clip"},validator:function(e){return["clip","keep"].indexOf(e)>=0}},fullScreen:Boolean,trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},autoFocus:{type:Boolean,default:function(){return Kt.defaultAutoFocus}},customClass:String,customContentClass:[String,Array,Object],ariaRole:{type:String,validator:function(e){return["dialog","alertdialog"].indexOf(e)>=0}},ariaModal:Boolean,ariaLabel:{type:String,validator:function(e){return Boolean(e)}},closeButtonAriaLabel:String,destroyOnHide:{type:Boolean,default:!0}},data:function(){return{isActive:this.active||!1,savedScrollTop:null,newWidth:"number"==typeof this.width?this.width+"px":this.width,animating:!this.active,destroyed:!this.active}},computed:{cancelOptions:function(){return"boolean"==typeof this.canCancel?this.canCancel?Kt.defaultModalCanCancel:[]:this.canCancel},showX:function(){return this.cancelOptions.indexOf("x")>=0},customStyle:function(){return this.fullScreen?null:{maxWidth:this.newWidth}}},watch:{active:function(e){this.isActive=e},isActive:function(e){var t=this;e&&(this.destroyed=!1),this.handleScroll(),this.$nextTick((function(){e&&t.$el&&t.$el.focus&&t.autoFocus&&t.$el.focus()}))}},methods:{handleScroll:function(){"undefined"!=typeof window&&("clip"!==this.scroll?(this.savedScrollTop=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop,this.isActive?document.body.classList.add("is-noscroll"):document.body.classList.remove("is-noscroll"),this.isActive?document.body.style.top="-".concat(this.savedScrollTop,"px"):(document.documentElement.scrollTop=this.savedScrollTop,document.body.style.top=null,this.savedScrollTop=null)):this.isActive?document.documentElement.classList.add("is-clipped"):document.documentElement.classList.remove("is-clipped"))},cancel:function(e){this.cancelOptions.indexOf(e)<0||(this.$emit("cancel",arguments),this.onCancel.apply(null,arguments),this.close())},close:function(){var e=this;this.$emit("close"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout((function(){e.$destroy(),Et(e.$el)}),150))},keyPress:function(e){var t=e.key;!this.isActive||"Escape"!==t&&"Esc"!==t||this.cancel("escape")},afterEnter:function(){this.animating=!1,this.$emit("after-enter")},beforeLeave:function(){this.animating=!0},afterLeave:function(){this.destroyOnHide&&(this.destroyed=!0),this.$emit("after-leave")}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeMount:function(){this.programmatic&&document.body.appendChild(this.$el)},mounted:function(){this.programmatic?this.isActive=!0:this.isActive&&this.handleScroll()},beforeDestroy:function(){if("undefined"!=typeof window){document.removeEventListener("keyup",this.keyPress),document.documentElement.classList.remove("is-clipped");var e=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop;document.body.classList.remove("is-noscroll"),document.documentElement.scrollTop=e,document.body.style.top=null}}};var Hi,zi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation},on:{"after-enter":e.afterEnter,"before-leave":e.beforeLeave,"after-leave":e.afterLeave}},[e.destroyed?e._e():n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"},{name:"trap-focus",rawName:"v-trap-focus",value:e.trapFocus,expression:"trapFocus"}],staticClass:"modal is-active",class:[{"is-full-screen":e.fullScreen},e.customClass],attrs:{tabindex:"-1",role:e.ariaRole,"aria-label":e.ariaLabel,"aria-modal":e.ariaModal}},[n("div",{staticClass:"modal-background",on:{click:function(t){return e.cancel("outside")}}}),n("div",{staticClass:"animation-content",class:[{"modal-content":!e.hasModalCard},e.customContentClass],style:e.customStyle},[e.component?n(e.component,e._g(e._b({tag:"component",attrs:{"can-cancel":e.canCancel},on:{close:e.close}},"component",e.props,!1),e.events)):e.content?[n("div",{domProps:{innerHTML:e._s(e.content)}})]:e._t("default",null,{canCancel:e.canCancel,close:e.close}),e.showX?n("button",{directives:[{name:"show",rawName:"v-show",value:!e.animating,expression:"!animating"}],staticClass:"modal-close is-large",attrs:{type:"button","aria-label":e.closeButtonAriaLabel},on:{click:function(t){return e.cancel("x")}}}):e._e()],2)])])},staticRenderFns:[]},undefined,Li,undefined,!1,undefined,void 0,void 0);var ji,Wi=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation}},[e.isActive?n("div",{directives:[{name:"trap-focus",rawName:"v-trap-focus",value:e.trapFocus,expression:"trapFocus"}],staticClass:"dialog modal is-active",class:e.dialogClass,attrs:{role:e.ariaRole,"aria-modal":e.ariaModal}},[n("div",{staticClass:"modal-background",on:{click:function(t){return e.cancel("outside")}}}),n("div",{staticClass:"modal-card animation-content"},[e.title?n("header",{staticClass:"modal-card-head"},[n("p",{staticClass:"modal-card-title"},[e._v(e._s(e.title))])]):e._e(),n("section",{staticClass:"modal-card-body",class:{"is-titleless":!e.title,"is-flex":e.hasIcon}},[n("div",{staticClass:"media"},[e.hasIcon&&(e.icon||e.iconByType)?n("div",{staticClass:"media-left"},[n("b-icon",{attrs:{icon:e.icon?e.icon:e.iconByType,pack:e.iconPack,type:e.type,both:!e.icon,size:"is-large"}})],1):e._e(),n("div",{staticClass:"media-content"},[n("p",[e.$slots.default?[e._t("default")]:[n("div",{domProps:{innerHTML:e._s(e.message)}})]],2),e.hasInput?n("div",{staticClass:"field"},[n("div",{staticClass:"control"},["checkbox"===e.inputAttrs.type?n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.prompt,expression:"prompt"}],ref:"input",staticClass:"input",class:{"is-danger":e.validationMessage},attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.prompt)?e._i(e.prompt,null)>-1:e.prompt},on:{compositionstart:function(t){e.isCompositing=!0},compositionend:function(t){e.isCompositing=!1},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.confirm(t)},change:function(t){var n=e.prompt,r=t.target,o=!!r.checked;if(Array.isArray(n)){var l=e._i(n,null);r.checked?l<0&&(e.prompt=n.concat([null])):l>-1&&(e.prompt=n.slice(0,l).concat(n.slice(l+1)))}else e.prompt=o}}},"input",e.inputAttrs,!1)):"radio"===e.inputAttrs.type?n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.prompt,expression:"prompt"}],ref:"input",staticClass:"input",class:{"is-danger":e.validationMessage},attrs:{type:"radio"},domProps:{checked:e._q(e.prompt,null)},on:{compositionstart:function(t){e.isCompositing=!0},compositionend:function(t){e.isCompositing=!1},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.confirm(t)},change:function(t){e.prompt=null}}},"input",e.inputAttrs,!1)):n("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.prompt,expression:"prompt"}],ref:"input",staticClass:"input",class:{"is-danger":e.validationMessage},attrs:{type:e.inputAttrs.type},domProps:{value:e.prompt},on:{compositionstart:function(t){e.isCompositing=!0},compositionend:function(t){e.isCompositing=!1},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.confirm(t)},input:function(t){t.target.composing||(e.prompt=t.target.value)}}},"input",e.inputAttrs,!1))]),n("p",{staticClass:"help is-danger"},[e._v(e._s(e.validationMessage))])]):e._e()])])]),n("footer",{staticClass:"modal-card-foot"},[e.showCancel?n("b-button",{ref:"cancelButton",on:{click:function(t){return e.cancel("button")}}},[e._v(e._s(e.cancelText))]):e._e(),n("b-button",{ref:"confirmButton",attrs:{type:e.type},on:{click:e.confirm}},[e._v(e._s(e.confirmText))])],1)])]):e._e()])},staticRenderFns:[]},undefined,{name:"BDialog",components:(Hi={},ft(Hi,an.name,an),ft(Hi,pn.name,pn),Hi),directives:{trapFocus:jn},extends:zi,props:{title:String,message:[String,Array],icon:String,iconPack:String,hasIcon:Boolean,type:{type:String,default:"is-primary"},size:String,confirmText:{type:String,default:function(){return Kt.defaultDialogConfirmText?Kt.defaultDialogConfirmText:"OK"}},cancelText:{type:String,default:function(){return Kt.defaultDialogCancelText?Kt.defaultDialogCancelText:"Cancel"}},hasInput:Boolean,inputAttrs:{type:Object,default:function(){return{}}},onConfirm:{type:Function,default:function(){}},closeOnConfirm:{type:Boolean,default:!0},container:{type:String,default:function(){return Kt.defaultContainerElement}},focusOn:{type:String,default:"confirm"},trapFocus:{type:Boolean,default:function(){return Kt.defaultTrapFocus}},ariaRole:{type:String,validator:function(e){return["dialog","alertdialog"].indexOf(e)>=0}},ariaModal:Boolean},data:function(){return{prompt:this.hasInput&&this.inputAttrs.value||"",isActive:!1,validationMessage:"",isCompositing:!1}},computed:{dialogClass:function(){return[this.size,{"has-custom-container":null!==this.container}]},iconByType:function(){switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}},showCancel:function(){return this.cancelOptions.indexOf("button")>=0}},methods:{confirm:function(){var e=this;if(void 0!==this.$refs.input){if(this.isCompositing)return;if(!this.$refs.input.checkValidity())return this.validationMessage=this.$refs.input.validationMessage,void this.$nextTick((function(){return e.$refs.input.select()}))}this.$emit("confirm",this.prompt),this.onConfirm(this.prompt,this),this.closeOnConfirm&&this.close()},close:function(){var e=this;this.isActive=!1,setTimeout((function(){e.$destroy(),Et(e.$el)}),150)}},beforeMount:function(){var e=this;"undefined"!=typeof window&&this.$nextTick((function(){(document.querySelector(e.container)||document.body).appendChild(e.$el)}))},mounted:function(){var e=this;this.isActive=!0,void 0===this.inputAttrs.required&&this.$set(this.inputAttrs,"required",!0),this.$nextTick((function(){e.hasInput?e.$refs.input.focus():"cancel"===e.focusOn&&e.showCancel?e.$refs.cancelButton.$el.focus():e.$refs.confirmButton.$el.focus()}))}},undefined,!1,undefined,void 0,void 0);function Yi(e){var slot;Array.isArray(e.message)&&(slot=e.message,delete e.message);var component=new(("undefined"!=typeof window&&window.Vue?window.Vue:ji||Yt).extend(Wi))({el:document.createElement("div"),propsData:e});return slot&&(component.$slots.default=slot,component.$forceUpdate()),Kt.defaultProgrammaticPromise?new Promise((function(e){component.$on("confirm",(function(t){return e({result:t||!0,dialog:component})})),component.$on("cancel",(function(){return e({result:!1,dialog:component})}))})):component}var qi={alert:function(e){"string"==typeof e&&(e={message:e});return Yi(It({canCancel:!1},e))},confirm:function(e){return Yi(It({},e))},prompt:function(e){return Yi(It({hasInput:!0},e))}},Ui={install:function(e){ji=e,Jt(e,Wi),Zt(e,"dialog",qi)}};use(Ui);var dialog=Ui,Ki={install:function(e){Jt(e,Yn),Jt(e,qn)}};use(Ki);var Xi=Ki,Gi={install:function(e){Jt(e,Gn)}};use(Gi);var Qi=Gi,Ji={install:function(e){Jt(e,an)}};use(Ji);var Zi=Ji,ea={install:function(e){Jt(e,wn)}};use(ea);var ta=ea,na={install:function(e){Jt(e,rn)}};use(na);var ia=na,aa="undefined"==typeof window,ra=aa?Object:window.HTMLElement,sa=aa?Object:window.File,oa={name:"BLoading",model:{prop:"active",event:"update:active"},props:{active:Boolean,programmatic:Boolean,container:[Object,Function,ra],isFullPage:{type:Boolean,default:!0},animation:{type:String,default:"fade"},canCancel:{type:Boolean,default:!1},onCancel:{type:Function,default:function(){}}},data:function(){return{isActive:this.active||!1,displayInFullPage:this.isFullPage}},watch:{active:function(e){this.isActive=e},isFullPage:function(e){this.displayInFullPage=e}},methods:{cancel:function(){this.canCancel&&this.isActive&&this.close()},close:function(){var e=this;this.onCancel.apply(null,arguments),this.$emit("close"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout((function(){e.$destroy(),Et(e.$el)}),150))},keyPress:function(e){var t=e.key;"Escape"!==t&&"Esc"!==t||this.cancel()}},created:function(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},beforeMount:function(){this.programmatic&&(this.container?(this.displayInFullPage=!1,this.$emit("update:is-full-page",!1),this.container.appendChild(this.$el)):document.body.appendChild(this.$el))},mounted:function(){this.programmatic&&(this.isActive=!0)},beforeDestroy:function(){"undefined"!=typeof window&&document.removeEventListener("keyup",this.keyPress)}};var la,ua=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"loading-overlay is-active",class:{"is-full-page":e.displayInFullPage}},[n("div",{staticClass:"loading-background",on:{click:e.cancel}}),e._t("default",[n("div",{staticClass:"loading-icon"})])],2)])},staticRenderFns:[]},undefined,oa,undefined,!1,undefined,void 0,void 0),ca={open:function(e){var t=It({programmatic:!0},e);return new(("undefined"!=typeof window&&window.Vue?window.Vue:la||Yt).extend(ua))({el:document.createElement("div"),propsData:t})}},da={install:function(e){la=e,Jt(e,ua),Zt(e,"loading",ca)}};use(da);var ha=da;var fa=Qt({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"menu"},[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BMenu",props:{accordion:{type:Boolean,default:!0},activable:{type:Boolean,default:!0}},data:function(){return{_isMenu:!0}}},undefined,!1,undefined,void 0,void 0);var pa=Qt({},undefined,{name:"BMenuList",functional:!0,props:{label:String,icon:String,iconPack:String,ariaRole:{type:String,default:""},size:{type:String,default:"is-small"}},render:function(e,t){var n=null,r=t.slots();(t.props.label||r.label)&&(n=e("p",{attrs:{class:"menu-label"}},t.props.label?t.props.icon?[e("b-icon",{props:{icon:t.props.icon,pack:t.props.iconPack,size:t.props.size}}),e("span",{},t.props.label)]:t.props.label:r.label));var o=e("ul",{attrs:{class:"menu-list",role:"menu"===t.props.ariaRole?t.props.ariaRole:null}},r.default);return n?[n,o]:o}},undefined,undefined,undefined,void 0,void 0),ma={name:"BMenuItem",components:ft({},an.name,an),inheritAttrs:!1,model:{prop:"active",event:"update:active"},props:{label:String,active:Boolean,expanded:Boolean,disabled:Boolean,iconPack:String,icon:String,animation:{type:String,default:"slide"},tag:{type:String,default:"a",validator:function(e){return Kt.defaultLinkTags.indexOf(e)>=0}},ariaRole:{type:String,default:""},size:{type:String,default:"is-small"}},data:function(){return{newActive:this.active,newExpanded:this.expanded}},computed:{ariaRoleMenu:function(){return"menuitem"===this.ariaRole?this.ariaRole:null}},watch:{active:function(e){this.newActive=e},expanded:function(e){this.newExpanded=e}},methods:{onClick:function(e){if(!this.disabled){var menu=this.getMenu();this.reset(this.$parent,menu),this.newExpanded=this.$props.expanded||!this.newExpanded,this.$emit("update:expanded",this.newExpanded),menu&&menu.activable&&(this.newActive=!0,this.$emit("update:active",this.newActive))}},reset:function(e,menu){var t=this;e.$children.filter((function(e){return e.name===t.name})).forEach((function(n){n!==t&&(t.reset(n,menu),(!e.$data._isMenu||e.$data._isMenu&&e.accordion)&&(n.newExpanded=!1,n.$emit("update:expanded",n.newActive)),menu&&menu.activable&&(n.newActive=!1,n.$emit("update:active",n.newActive)))}))},getMenu:function(){for(var e=this.$parent;e&&!e.$data._isMenu;)e=e.$parent;return e}}};var va=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{attrs:{role:e.ariaRoleMenu}},[n(e.tag,e._g(e._b({tag:"component",class:{"is-active":e.newActive,"is-expanded":e.newExpanded,"is-disabled":e.disabled,"icon-text":e.icon},on:{click:function(t){return e.onClick(t)}}},"component",e.$attrs,!1),e.$listeners),[e.icon?n("b-icon",{attrs:{icon:e.icon,pack:e.iconPack,size:e.size}}):e._e(),e.label?n("span",[e._v(" "+e._s(e.label)+" ")]):e._t("label",null,{expanded:e.newExpanded,active:e.newActive})],2),e.$slots.default?[n("transition",{attrs:{name:e.animation}},[n("ul",{directives:[{name:"show",rawName:"v-show",value:e.newExpanded,expression:"newExpanded"}]},[e._t("default")],2)])]:e._e()],2)},staticRenderFns:[]},undefined,ma,undefined,!1,undefined,void 0,void 0),ga={install:function(e){Jt(e,fa),Jt(e,pa),Jt(e,va)}};use(ga);var menu=ga,ba={components:ft({},an.name,an),model:{prop:"active",event:"update:active"},props:{active:{type:Boolean,default:!0},title:String,closable:{type:Boolean,default:!0},message:String,type:String,hasIcon:Boolean,size:String,icon:String,iconPack:String,iconSize:String,autoClose:{type:Boolean,default:!1},duration:{type:Number,default:2e3},progressBar:{type:Boolean,default:!1}},data:function(){return{isActive:this.active,remainingTime:this.duration/1e3,newIconSize:this.iconSize||this.size||"is-large"}},watch:{active:function(e){this.isActive=e},isActive:function(e){e?(this.setAutoClose(),this.setDurationProgress()):this.timer&&clearTimeout(this.timer)}},computed:{computedIcon:function(){if(this.icon)return this.icon;switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}}},methods:{close:function(){this.isActive=!1,this.resetDurationProgress(),this.$emit("close"),this.$emit("update:active",!1)},click:function(){this.$emit("click")},setAutoClose:function(){var e=this;this.autoClose&&(this.timer=setTimeout((function(){e.isActive&&e.close()}),this.duration))},setDurationProgress:function(){var e=this;this.progressBar&&(this.$buefy.globalNoticeInterval=setInterval((function(){0!==e.remainingTime?e.remainingTime-=1:e.resetDurationProgress()}),1e3))},resetDurationProgress:function(){var e=this;setTimeout((function(){e.remainingTime=e.duration/1e3,clearInterval(e.$buefy.globalNoticeInterval)}),100)}},mounted:function(){this.setAutoClose()}};var ya=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"fade"}},[n("article",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"message",class:[e.type,e.size]},[e.$slots.header||e.title?n("header",{staticClass:"message-header"},[e.$slots.header?n("div",[e._t("header")],2):e.title?n("p",[e._v(e._s(e.title))]):e._e(),e.closable?n("button",{staticClass:"delete",attrs:{type:"button","aria-label":e.ariaCloseLabel},on:{click:e.close}}):e._e()]):e._e(),e.$slots.default?n("section",{staticClass:"message-body"},[n("div",{staticClass:"media"},[e.computedIcon&&e.hasIcon?n("div",{staticClass:"media-left"},[n("b-icon",{class:e.type,attrs:{icon:e.computedIcon,pack:e.iconPack,both:"",size:e.newIconSize}})],1):e._e(),n("div",{staticClass:"media-content"},[e._t("default")],2)])]):e._e(),e.autoClose&&e.progressBar?n("b-progress",{staticClass:"auto-close-progress",attrs:{value:e.remainingTime-1,max:e.duration/1e3-1,type:e.type,rounded:!1}}):e._e()],1)])},staticRenderFns:[]},undefined,{name:"BMessage",mixins:[ba],props:{ariaCloseLabel:String}},undefined,!1,undefined,void 0,void 0),wa={install:function(e){Jt(e,ya)}};use(wa);var ka,Sa=wa,xa={open:function(e){var t;"string"==typeof e&&(e={content:e});var slot;e.parent&&(t=e.parent,delete e.parent),Array.isArray(e.content)&&(slot=e.content,delete e.content);var n=It({programmatic:!0},e),component=new(("undefined"!=typeof window&&window.Vue?window.Vue:ka||Yt).extend(zi))({parent:t,el:document.createElement("div"),propsData:n});return slot&&(component.$slots.default=slot,component.$forceUpdate()),component}},Ca={install:function(e){ka=e,Jt(e,zi),Zt(e,"modal",xa)}};use(Ca);var Da=Ca,_a={props:{type:{type:String,default:"is-dark"},message:[String,Array],duration:Number,queue:{type:Boolean,default:void 0},indefinite:{type:Boolean,default:!1},pauseOnHover:{type:Boolean,default:!1},position:{type:String,default:"is-top",validator:function(e){return["is-top-right","is-top","is-top-left","is-bottom-right","is-bottom","is-bottom-left"].indexOf(e)>-1}},container:String},data:function(){return{isActive:!1,isPaused:!1,parentTop:null,parentBottom:null,newContainer:this.container||Kt.defaultContainerElement}},computed:{correctParent:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return this.parentTop;case"is-bottom-right":case"is-bottom":case"is-bottom-left":return this.parentBottom}},transition:function(){switch(this.position){case"is-top-right":case"is-top":case"is-top-left":return{enter:"fadeInDown",leave:"fadeOut"};case"is-bottom-right":case"is-bottom":case"is-bottom-left":return{enter:"fadeInUp",leave:"fadeOut"}}}},methods:{pause:function(){this.pauseOnHover&&!this.indefinite&&(this.isPaused=!0,clearInterval(this.$buefy.globalNoticeInterval))},removePause:function(){this.pauseOnHover&&!this.indefinite&&(this.isPaused=!1,this.close())},shouldQueue:function(){return!!(void 0!==this.queue?this.queue:Kt.defaultNoticeQueue)&&(this.parentTop.childElementCount>0||this.parentBottom.childElementCount>0)},click:function(){this.$emit("click")},close:function(){var e=this;this.isPaused||(clearTimeout(this.timer),this.isActive=!1,this.$emit("close"),setTimeout((function(){e.$destroy(),Et(e.$el)}),150))},timeoutCallback:function(){return this.close()},showNotice:function(){var e=this;this.shouldQueue()&&(this.correctParent.innerHTML=""),this.correctParent.insertAdjacentElement("afterbegin",this.$el),this.isActive=!0,this.indefinite||(this.timer=setTimeout((function(){return e.timeoutCallback()}),this.newDuration))},setupContainer:function(){if(this.parentTop=document.querySelector((this.newContainer?this.newContainer:"body")+">.notices.is-top"),this.parentBottom=document.querySelector((this.newContainer?this.newContainer:"body")+">.notices.is-bottom"),!this.parentTop||!this.parentBottom){this.parentTop||(this.parentTop=document.createElement("div"),this.parentTop.className="notices is-top"),this.parentBottom||(this.parentBottom=document.createElement("div"),this.parentBottom.className="notices is-bottom");var e=document.querySelector(this.newContainer)||document.body;e.appendChild(this.parentTop),e.appendChild(this.parentBottom),this.newContainer&&(this.parentTop.classList.add("has-custom-container"),this.parentBottom.classList.add("has-custom-container"))}}},beforeMount:function(){this.setupContainer()},mounted:function(){this.showNotice()}};var $a=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.animation}},[n("article",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"notification",class:[e.type,e.position],on:{click:e.click}},[e.closable?n("button",{staticClass:"delete",attrs:{type:"button","aria-label":e.ariaCloseLabel},on:{click:e.close}}):e._e(),e.$slots.default||e.message?n("div",{staticClass:"media"},[e.computedIcon&&e.hasIcon?n("div",{staticClass:"media-left"},[n("b-icon",{attrs:{icon:e.computedIcon,pack:e.iconPack,size:e.newIconSize,both:"","aria-hidden":""}})],1):e._e(),n("div",{staticClass:"media-content"},[e.$slots.default?[e._t("default")]:[n("p",{staticClass:"text",domProps:{innerHTML:e._s(e.message)}})]],2)]):e._e(),e.autoClose&&e.progressBar?n("b-progress",{staticClass:"auto-close-progress",attrs:{value:e.remainingTime-1,max:e.duration/1e3-1,type:e.type,rounded:!1}}):e._e()],1)])},staticRenderFns:[]},undefined,{name:"BNotification",mixins:[ba],props:{position:String,ariaCloseLabel:String,animation:{type:String,default:"fade"}}},undefined,!1,undefined,void 0,void 0);var Pa,Ma=Qt({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("b-notification",e._b({ref:"notification",on:{click:e.click,close:e.close},nativeOn:{mouseenter:function(t){return e.pause(t)},mouseleave:function(t){return e.removePause(t)}}},"b-notification",e.$options.propsData,!1),[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BNotificationNotice",mixins:[_a],data:function(){return{newDuration:this.duration||Kt.defaultNotificationDuration}},methods:{close:function(){var e=this;this.isPaused||(clearTimeout(this.timer),this.$refs.notification.isActive=!1,this.$emit("close"),setTimeout((function(){e.$destroy(),Et(e.$el)}),150))}}},undefined,!1,undefined,void 0,void 0),Oa={open:function(e){var t;"string"==typeof e&&(e={message:e});var slot,n={position:Kt.defaultNotificationPosition||"is-top-right"};e.parent&&(t=e.parent,delete e.parent),Array.isArray(e.message)&&(slot=e.message,delete e.message),e.active=!1;var r=It(n,e),component=new(("undefined"!=typeof window&&window.Vue?window.Vue:Pa||Yt).extend(Ma))({parent:t,el:document.createElement("div"),propsData:r});return slot&&(component.$slots.default=slot,component.$forceUpdate()),component.$children[0].isActive=!0,component}},Aa={install:function(e){Pa=e,Jt(e,$a),Zt(e,"notification",Oa)}};use(Aa);var Ta=Aa;var Ba=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a",e._g({staticClass:"navbar-burger burger",class:{"is-active":e.isOpened},attrs:{role:"button","aria-label":"menu","aria-expanded":e.isOpened,tabindex:"0"}},e.$listeners),[n("span",{attrs:{"aria-hidden":"true"}}),n("span",{attrs:{"aria-hidden":"true"}}),n("span",{attrs:{"aria-hidden":"true"}})])},staticRenderFns:[]},undefined,{name:"NavbarBurger",props:{isOpened:{type:Boolean,default:!1}}},undefined,!1,undefined,void 0,void 0),Fa="undefined"!=typeof window&&("ontouchstart"in window||navigator.msMaxTouchPoints>0)?["touchstart","click"]:["click"],Ia=[];function Na(e){var t="function"==typeof e;if(!t&&"object"!==ut(e))throw new Error("v-click-outside: Binding value should be a function or an object, ".concat(ut(e)," given"));return{handler:t?e:e.handler,middleware:e.middleware||function(e){return e},events:e.events||Fa}}function Ea(e){var t=e.el,n=e.event,r=e.handler,o=e.middleware;n.target!==t&&!t.contains(n.target)&&o(n,t)&&r(n,t)}function Ra(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).eventHandlers,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"add";e.forEach((function(e){var n=e.event,r=e.handler;document["".concat(t,"EventListener")](n,r)}))}var Va={bind:function(e,t){var n=Na(t.value),r=n.handler,o=n.middleware,l=n.events,c={el:e,eventHandlers:l.map((function(t){return{event:t,handler:function(t){return Ea({event:t,el:e,handler:r,middleware:o})}}}))};Ra(c,"add"),Ia.push(c)},update:function(e,t){var n=Na(t.value),r=n.handler,o=n.middleware,l=n.events,c=Ia.filter((function(t){return t.el===e}))[0];Ra(c,"remove"),c.eventHandlers=l.map((function(t){return{event:t,handler:function(t){return Ea({event:t,el:e,handler:r,middleware:o})}}})),Ra(c,"add")},unbind:function(e){Ra(Ia.filter((function(t){return t.el===e}))[0],"remove")},instances:Ia},La="has-navbar-fixed-top",Ha="has-spaced-navbar-fixed-top",za="has-navbar-fixed-bottom",ja="has-spaced-navbar-fixed-bottom";var Wa=Qt({},undefined,{name:"BNavbar",components:{NavbarBurger:Ba},directives:{clickOutside:Va},model:{prop:"active",event:"update:active"},props:{type:[String,Object],transparent:{type:Boolean,default:!1},fixedTop:{type:Boolean,default:!1},fixedBottom:{type:Boolean,default:!1},active:{type:Boolean,default:!1},centered:{type:Boolean,default:!1},wrapperClass:{type:[String,Array,Object]},closeOnClick:{type:Boolean,default:!0},mobileBurger:{type:Boolean,default:!0},spaced:Boolean,shadow:Boolean},data:function(){return{internalIsActive:this.active,_isNavBar:!0}},computed:{isOpened:function(){return this.internalIsActive},computedClasses:function(){var e;return[this.type,(e={},ft(e,"is-fixed-top",this.fixedTop),ft(e,"is-fixed-bottom",this.fixedBottom),ft(e,"has-navbar-centered",this.centered),ft(e,"is-spaced",this.spaced),ft(e,"has-shadow",this.shadow),ft(e,"is-transparent",this.transparent),e)]}},watch:{active:{handler:function(e){this.internalIsActive=e},immediate:!0},fixedTop:function(e){this.setBodyFixedTopClass(e)},bottomTop:function(e){this.setBodyFixedBottomClass(e)}},methods:{toggleActive:function(){this.internalIsActive=!this.internalIsActive,this.emitUpdateParentEvent()},closeMenu:function(){this.closeOnClick&&this.internalIsActive&&(this.internalIsActive=!1,this.emitUpdateParentEvent())},emitUpdateParentEvent:function(){this.$emit("update:active",this.internalIsActive)},setBodyClass:function(e){"undefined"!=typeof window&&document.body.classList.add(e)},removeBodyClass:function(e){"undefined"!=typeof window&&document.body.classList.remove(e)},checkIfFixedPropertiesAreColliding:function(){if(this.fixedTop&&this.fixedBottom)throw new Error("You should choose if the BNavbar is fixed bottom or fixed top, but not both")},genNavbar:function(e){var t=[this.genNavbarBrandNode(e),this.genNavbarSlotsNode(e)];if(!this.wrapperClass)return this.genNavbarSlots(e,t);var n=e("div",{class:this.wrapperClass},t);return this.genNavbarSlots(e,[n])},genNavbarSlots:function(e,t){return e("nav",{staticClass:"navbar",class:this.computedClasses,attrs:{role:"navigation","aria-label":"main navigation"},directives:[{name:"click-outside",value:this.closeMenu}]},t)},genNavbarBrandNode:function(e){return e("div",{class:"navbar-brand"},[this.$slots.brand,this.genBurgerNode(e)])},genBurgerNode:function(e){var t=this;if(this.mobileBurger){var n=e("navbar-burger",{props:{isOpened:this.isOpened},on:{click:this.toggleActive,keyup:function(e){13===e.keyCode&&t.toggleActive()}}});return!!this.$scopedSlots.burger?this.$scopedSlots.burger({isOpened:this.isOpened,toggleActive:this.toggleActive}):n}},genNavbarSlotsNode:function(e){return e("div",{staticClass:"navbar-menu",class:{"is-active":this.isOpened}},[this.genMenuPosition(e,"start"),this.genMenuPosition(e,"end")])},genMenuPosition:function(e,t){return e("div",{staticClass:"navbar-".concat(t)},this.$slots[t])},setBodyFixedTopClass:function(e){this.checkIfFixedPropertiesAreColliding(),e?(this.setBodyClass(La),this.spaced&&this.setBodyClass(Ha)):(this.removeBodyClass(La),this.removeBodyClass(Ha))},setBodyFixedBottomClass:function(e){this.checkIfFixedPropertiesAreColliding(),e?(this.setBodyClass(za),this.spaced&&this.setBodyClass(ja)):(this.removeBodyClass(za),this.removeBodyClass(ja))}},beforeMount:function(){this.fixedTop&&this.setBodyFixedTopClass(!0),this.fixedBottom&&this.setBodyFixedBottomClass(!0)},beforeDestroy:function(){if(this.fixedTop){var e=this.spaced?Ha:La;this.removeBodyClass(e)}else if(this.fixedBottom){var t=this.spaced?ja:za;this.removeBodyClass(t)}},render:function(e,t){return this.genNavbar(e)}},undefined,undefined,undefined,void 0,void 0),Ya=["div","span","input"];var qa=Qt({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.tag,e._g(e._b({tag:"component",staticClass:"navbar-item",class:{"is-active":e.active}},"component",e.$attrs,!1),e.$listeners),[e._t("default")],2)},staticRenderFns:[]},undefined,{name:"BNavbarItem",inheritAttrs:!1,props:{tag:{type:String,default:"a"},active:Boolean},methods:{keyPress:function(e){var t=e.key;"Escape"!==t&&"Esc"!==t||this.closeMenuRecursive(this,["NavBar"])},handleClickEvent:function(e){if(!Ya.some((function(t){return t===e.target.localName}))){var t=this.closeMenuRecursive(this,["NavbarDropdown","NavBar"]);t&&t.$data._isNavbarDropdown&&this.closeMenuRecursive(t,["NavBar"])}},closeMenuRecursive:function(e,t){return e.$parent?t.reduce((function(t,n){return e.$parent.$data["_is".concat(n)]?(e.$parent.closeMenu(),e.$parent):t}),null)||this.closeMenuRecursive(e.$parent,t):null}},mounted:function(){"undefined"!=typeof window&&(this.$el.addEventListener("click",this.handleClickEvent),document.addEventListener("keyup",this.keyPress))},beforeDestroy:function(){"undefined"!=typeof window&&(this.$el.removeEventListener("click",this.handleClickEvent),document.removeEventListener("keyup",this.keyPress))}},undefined,!1,undefined,void 0,void 0);var Ua=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeMenu,expression:"closeMenu"}],staticClass:"navbar-item has-dropdown",class:{"is-hoverable":e.isHoverable,"is-active":e.newActive},on:{mouseenter:e.checkHoverable}},[n(e.tag,e._g(e._b({tag:"component",staticClass:"navbar-link",class:{"is-arrowless":e.arrowless,"is-active":e.newActive&&e.collapsible},attrs:{"aria-haspopup":"true",tabindex:"0"},on:{click:function(t){return t.preventDefault(),e.toggleMenu(t)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.toggleMenu(t)}}},"component",e.$attrs,!1),e.$listeners),[e.label?[e._v(e._s(e.label))]:e._t("label")],2),n("div",{staticClass:"navbar-dropdown is-hidden-touch",class:{"is-right":e.right,"is-boxed":e.boxed}},[e._t("default")],2),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.collapsible||e.collapsible&&e.newActive,expression:"!collapsible || (collapsible && newActive)"}],staticClass:"navbar-dropdown is-hidden-desktop",class:{"is-right":e.right,"is-boxed":e.boxed}},[e._t("default")],2)],1)},staticRenderFns:[]},undefined,{name:"BNavbarDropdown",directives:{clickOutside:Va},inheritAttrs:!1,props:{label:String,hoverable:Boolean,active:Boolean,right:Boolean,arrowless:Boolean,boxed:Boolean,closeOnClick:{type:Boolean,default:!0},collapsible:Boolean,tag:{type:String,default:"a"}},data:function(){return{newActive:this.active,isHoverable:this.hoverable,_isNavbarDropdown:!0}},watch:{active:function(e){this.newActive=e},newActive:function(e){this.$emit("active-change",e)}},methods:{toggleMenu:function(){this.newActive=!this.newActive},showMenu:function(){this.newActive=!0},closeMenu:function(){this.newActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1)},checkHoverable:function(){this.hoverable&&(this.isHoverable=!0)}}},undefined,!1,undefined,void 0,void 0),Ka={install:function(e){Jt(e,Wa),Jt(e,qa),Jt(e,Ua)}};use(Ka);var Xa,Ga=Ka;var Qa=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-numberinput field",class:e.fieldClasses},[e._l(e.controlsLeft,(function(t){return n("p",{key:t,class:["control",t],on:{mouseup:e.onStopLongPress,mouseleave:e.onStopLongPress,touchend:e.onStopLongPress,touchcancel:e.onStopLongPress}},[n("button",{staticClass:"button",class:e.buttonClasses,attrs:{type:"button",disabled:e.isDisabled(t),"aria-label":"plus"===t?e.ariaPlusLabel:e.ariaMinusLabel},on:{mousedown:function(n){!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},touchstart:function(n){n.preventDefault(),!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},click:function(n){!e.isDisabled(t)&&e.onControlClick(n,"plus"===t)}}},[n("b-icon",{attrs:{both:"",icon:t,pack:e.iconPack,size:e.iconSize}})],1)])})),n("b-input",e._b({ref:"input",attrs:{type:"number",step:e.minStepNumber,max:e.max,min:e.min,size:e.size,disabled:e.disabled,readonly:!e.editable,loading:e.loading,rounded:e.rounded,icon:e.icon,"icon-pack":e.iconPack,autocomplete:e.autocomplete,expanded:e.expanded,placeholder:e.placeholder,"use-html5-validation":e.useHtml5Validation},on:{focus:function(t){return e.$emit("focus",t)},blur:function(t){return e.$emit("blur",t)}},model:{value:e.computedValue,callback:function(t){e.computedValue=t},expression:"computedValue"}},"b-input",e.$attrs,!1)),e._l(e.controlsRight,(function(t){return n("p",{key:t,class:["control",t],on:{mouseup:e.onStopLongPress,mouseleave:e.onStopLongPress,touchend:e.onStopLongPress,touchcancel:e.onStopLongPress}},[n("button",{staticClass:"button",class:e.buttonClasses,attrs:{type:"button",disabled:e.isDisabled(t),"aria-label":"plus"===t?e.ariaPlusLabel:e.ariaMinusLabel},on:{mousedown:function(n){!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},touchstart:function(n){n.preventDefault(),!e.isDisabled(t)&&e.onStartLongPress(n,"plus"===t)},click:function(n){!e.isDisabled(t)&&e.onControlClick(n,"plus"===t)}}},[n("b-icon",{attrs:{both:"",icon:t,pack:e.iconPack,size:e.iconSize}})],1)])}))],2)},staticRenderFns:[]},undefined,{name:"BNumberinput",components:(Xa={},ft(Xa,an.name,an),ft(Xa,rn.name,rn),Xa),mixins:[en],inheritAttrs:!1,props:{value:Number,min:{type:[Number,String]},max:[Number,String],step:[Number,String],minStep:[Number,String],exponential:[Boolean,Number],disabled:Boolean,type:{type:String,default:"is-primary"},editable:{type:Boolean,default:!0},controls:{type:Boolean,default:!0},controlsAlignment:{type:String,default:"center",validator:function(e){return["left","right","center"].indexOf(e)>=0}},controlsRounded:{type:Boolean,default:!1},controlsPosition:String,placeholder:[Number,String],ariaMinusLabel:String,ariaPlusLabel:String,longPress:{type:Boolean,default:!0}},data:function(){return{newValue:this.value,newStep:this.step||1,newMinStep:this.minStep,timesPressed:1,_elementRef:"input"}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){var t=this,n=0===Number(e)?0:Number(e)||null;""!==e&&null!=e||(n=void 0!==this.minNumber?this.minNumber:null),this.newValue=n,null===n?this.$emit("input",n):isNaN(n)||"-0"===n||this.$emit("input",Number(n)),this.$nextTick((function(){t.$refs.input&&t.$refs.input.checkHtml5Validity()}))}},controlsLeft:function(){return this.controls&&"right"!==this.controlsAlignment?"left"===this.controlsAlignment?["minus","plus"]:["minus"]:[]},controlsRight:function(){return this.controls&&"left"!==this.controlsAlignment?"right"===this.controlsAlignment?["minus","plus"]:["plus"]:[]},fieldClasses:function(){return[{"has-addons":"compact"===this.controlsPosition},{"is-grouped":"compact"!==this.controlsPosition},{"is-expanded":this.expanded}]},buttonClasses:function(){return[this.type,this.size,{"is-rounded":this.controlsRounded}]},minNumber:function(){return"string"==typeof this.min?parseFloat(this.min):this.min},maxNumber:function(){return"string"==typeof this.max?parseFloat(this.max):this.max},stepNumber:function(){return"any"===this.newStep?1:"string"==typeof this.newStep?parseFloat(this.newStep):this.newStep},minStepNumber:function(){if("any"===this.newStep&&void 0===this.newMinStep)return"any";var e=void 0!==this.newMinStep?this.newMinStep:this.newStep;return"string"==typeof e?parseFloat(e):e},disabledMin:function(){return this.computedValue-this.stepNumberthis.maxNumber},stepDecimals:function(){var e=this.minStepNumber.toString(),t=e.indexOf(".");return t>=0?e.substring(t+1).length:0}},watch:{value:{immediate:!0,handler:function(e){this.newValue=e}},step:function(e){this.newStep=e},minStep:function(e){this.newMinStep=e}},methods:{isDisabled:function(e){return this.disabled||("plus"===e?this.disabledMax:this.disabledMin)},decrement:function(){if(null===this.computedValue||void 0===this.computedValue){if(null!==this.maxNumber&&void 0!==this.maxNumber)return void(this.computedValue=this.maxNumber);this.computedValue=0}if(void 0===this.minNumber||this.computedValue-this.stepNumber>=this.minNumber){var e=this.computedValue-this.stepNumber;this.computedValue=parseFloat(e.toFixed(this.stepDecimals))}},increment:function(){if(null===this.computedValue||void 0===this.computedValue){if(null!==this.minNumber&&void 0!==this.minNumber)return void(this.computedValue=this.minNumber);this.computedValue=0}if(void 0===this.maxNumber||this.computedValue+this.stepNumber<=this.maxNumber){var e=this.computedValue+this.stepNumber;this.computedValue=parseFloat(e.toFixed(this.stepDecimals))}},onControlClick:function(e,t){0===e.detail&&"click"===e.type&&(t?this.increment():this.decrement())},longPressTick:function(e){var t=this;e?this.increment():this.decrement(),this._$intervalRef=setTimeout((function(){t.longPressTick(e)}),this.exponential?250/(this.exponential*this.timesPressed++):250)},onStartLongPress:function(e,t){this.longPress&&(0!==e.button&&"touchstart"!==e.type||(clearTimeout(this._$intervalRef),this.longPressTick(t)))},onStopLongPress:function(){this._$intervalRef&&(this.timesPressed=1,clearTimeout(this._$intervalRef),this._$intervalRef=null)}}},undefined,!1,undefined,void 0,void 0),Ja={install:function(e){Jt(e,Qa)}};use(Ja);var Za=Ja;var er,nr=Qt({render:function(){var e,t=this,n=t.$createElement;return(t._self._c||n)(t.tag,t._b({tag:"component",staticClass:"pagination-link",class:(e={"is-current":t.page.isCurrent},e[t.page.class]=!0,e),attrs:{role:"button",href:t.href,disabled:t.isDisabled,"aria-label":t.page["aria-label"],"aria-current":t.page.isCurrent},on:{click:function(e){return e.preventDefault(),t.page.click(e)}}},"component",t.$attrs,!1),[t._t("default",[t._v(t._s(t.page.number))])],2)},staticRenderFns:[]},undefined,{name:"BPaginationButton",props:{page:{type:Object,required:!0},tag:{type:String,default:"a",validator:function(e){return Kt.defaultLinkTags.indexOf(e)>=0}},disabled:{type:Boolean,default:!1}},computed:{href:function(){if("a"===this.tag)return"#"},isDisabled:function(){return this.disabled||this.page.disabled}}},undefined,!1,undefined,void 0,void 0);function ir(e,t,n){var r;return function(){var o=this,l=arguments,c=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(o,l)}),t),c&&e.apply(o,l)}}var ar={name:"BPagination",components:(er={},ft(er,an.name,an),ft(er,nr.name,nr),er),model:{prop:"current",event:"update:current"},props:{total:[Number,String],perPage:{type:[Number,String],default:20},current:{type:[Number,String],default:1},rangeBefore:{type:[Number,String],default:1},rangeAfter:{type:[Number,String],default:1},size:String,simple:Boolean,rounded:Boolean,order:String,iconPack:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,pageInput:{type:Boolean,default:!1},pageInputPosition:String,debouncePageInput:[Number,String]},data:function(){return{inputValue:this.current}},computed:{rootClasses:function(){return[this.order,this.size,this.pageInputPosition,{"is-simple":this.simple,"is-rounded":this.rounded,"has-input":this.pageInput}]},beforeCurrent:function(){return parseInt(this.rangeBefore)},afterCurrent:function(){return parseInt(this.rangeAfter)},pageCount:function(){return Math.ceil(this.total/this.perPage)},firstItem:function(){var e=this.current*this.perPage-this.perPage+1;return e>=0?e:0},hasPrev:function(){return this.current>1},hasFirst:function(){return this.current>=2+this.beforeCurrent},hasFirstEllipsis:function(){return this.current>=this.beforeCurrent+4},hasLast:function(){return this.current<=this.pageCount-(1+this.afterCurrent)},hasLastEllipsis:function(){return this.currente&&this.last()},current:function(e){this.inputValue=e},debouncePageInput:{handler:function(e){this.debounceHandlePageInput=ir(this.handleOnInputPageChange,e)},immediate:!0}},methods:{prev:function(e){this.changePage(this.current-1,e)},next:function(e){this.changePage(this.current+1,e)},first:function(e){this.changePage(1,e)},last:function(e){this.changePage(this.pageCount,e)},changePage:function(e,t){this.current===e||e<1||e>this.pageCount||(this.$emit("update:current",e),this.$emit("change",e),t&&t.target&&this.$nextTick((function(){return t.target.focus()})))},getPage:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{number:e,isCurrent:this.current===e,click:function(n){return t.changePage(e,n)},input:function(e,n){return t.changePage(+n,e)},disabled:n.disabled||!1,class:n.class||"","aria-label":n["aria-label"]||this.getAriaPageLabel(e,this.current===e)}},getAriaPageLabel:function(e,t){return!this.ariaPageLabel||t&&this.ariaCurrentLabel?this.ariaPageLabel&&t&&this.ariaCurrentLabel?this.ariaCurrentLabel+", "+this.ariaPageLabel+" "+e+".":null:this.ariaPageLabel+" "+e+"."},handleOnInputPageChange:function(e){this.getPage(this.inputValue).input(e,this.inputValue)},handleOnInputDebounce:function(e){this.debouncePageInput?this.debounceHandlePageInput(e):this.handleOnInputPageChange(e)},handleOnKeyPress:function(e){var t=e.which||e.keyCode;return t>=48&&t<=57||e.preventDefault()},handleAllowableInputPageRange:function(e){+e.target.value>0&&+e.target.value<=this.pageCount?this.handleOnInputValue(e):(this.inputValue=1,this.inputValue="")},handleOnInputValue:function(e){var t=+e.target.value;this.inputValue=t,Number.isInteger(this.inputValue)?this.handleOnInputDebounce(e):this.inputValue=this.current}}};var rr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("nav",{staticClass:"pagination",class:e.rootClasses},[e.$scopedSlots.previous?e._t("previous",[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"}})],{page:e.getPage(e.current-1,{disabled:!e.hasPrev,class:"pagination-previous","aria-label":e.ariaPreviousLabel})}):n("BPaginationButton",{staticClass:"pagination-previous",attrs:{disabled:!e.hasPrev,page:e.getPage(e.current-1),"aria-label":e.ariaPreviousLabel}},[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"}})],1),e.$scopedSlots.next?e._t("next",[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"}})],{page:e.getPage(e.current+1,{disabled:!e.hasNext,class:"pagination-next","aria-label":e.ariaNextLabel})}):n("BPaginationButton",{staticClass:"pagination-next",attrs:{disabled:!e.hasNext,page:e.getPage(e.current+1),"aria-label":e.ariaNextLabel}},[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"}})],1),n("div",{staticClass:"control pagination-input"},[e.pageInput?n("input",{staticClass:"input",attrs:{size:e.pageCount.toString().length,maxlength:e.pageCount.toString().length},domProps:{value:e.inputValue},on:{input:e.handleAllowableInputPageRange,keypress:e.handleOnKeyPress}}):e._e()]),e.simple?n("small",{staticClass:"info"},[1==e.perPage?[e._v(" "+e._s(e.firstItem)+" / "+e._s(e.total)+" ")]:[e._v(" "+e._s(e.firstItem)+"-"+e._s(Math.min(e.current*e.perPage,e.total))+" / "+e._s(e.total)+" ")]],2):n("ul",{staticClass:"pagination-list"},[e.hasFirst?n("li",[e.$scopedSlots.default?e._t("default",null,{page:e.getPage(1)}):n("BPaginationButton",{attrs:{page:e.getPage(1)}})],2):e._e(),e.hasFirstEllipsis?n("li",[n("span",{staticClass:"pagination-ellipsis"},[e._v("…")])]):e._e(),e._l(e.pagesInRange,(function(t){return n("li",{key:t.number},[e.$scopedSlots.default?e._t("default",null,{page:t}):n("BPaginationButton",{attrs:{page:t}})],2)})),e.hasLastEllipsis?n("li",[n("span",{staticClass:"pagination-ellipsis"},[e._v("…")])]):e._e(),e.hasLast?n("li",[e.$scopedSlots.default?e._t("default",null,{page:e.getPage(e.pageCount)}):n("BPaginationButton",{attrs:{page:e.getPage(e.pageCount)}})],2):e._e()],2)],2)},staticRenderFns:[]},undefined,ar,undefined,!1,undefined,void 0,void 0),sr={install:function(e){Jt(e,rr),Jt(e,nr)}};use(sr);var or=sr;var lr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"progress-wrapper",class:[e.wrapperClasses,{"is-squared":!e.rounded}]},[e.isNative?n("progress",{ref:"progress",staticClass:"progress",class:[e.newType,{"is-squared":!e.rounded}],attrs:{max:e.max},domProps:{value:e.value}},[e._v(e._s(e.newValue))]):e._t("bar"),e.isNative&&e.showValue?n("p",{staticClass:"progress-value"},[e._t("default",[e._v(e._s(e.newValue))])],2):e._e()],2)},staticRenderFns:[]},undefined,{name:"BProgress",mixins:[gn("progress")],props:{type:{type:[String,Object],default:"is-darkgrey"},size:String,rounded:{type:Boolean,default:!0},value:{type:Number,default:void 0},max:{type:Number,default:100},showValue:{type:Boolean,default:!1},format:{type:String,default:"raw",validator:function(e){return["raw","percent"].indexOf(e)>=0}},precision:{type:Number,default:2},keepTrailingZeroes:{type:Boolean,default:!1},locale:{type:[String,Array],default:function(){return Kt.defaultLocale}}},computed:{isIndeterminate:function(){return void 0===this.value||null===this.value},newType:function(){return[this.size,this.type,{"is-more-than-half":this.value&&this.value>this.max/2}]},newValue:function(){return this.calculateValue(this.value)},isNative:function(){return void 0===this.$slots.bar},wrapperClasses:function(){return ft({"is-not-native":!this.isNative},this.size,"string"==typeof this.size&&!this.isNative)}},watch:{isIndeterminate:function(e){var t=this;this.$nextTick((function(){t.$refs.progress&&(e?t.$refs.progress.removeAttribute("value"):t.$refs.progress.setAttribute("value",t.value))}))}},methods:{calculateValue:function(e){if(null!=e&&!isNaN(e)){var t=this.keepTrailingZeroes?this.precision:0,n=this.precision;return"percent"===this.format?new Intl.NumberFormat(this.locale,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:n}).format(e/this.max):new Intl.NumberFormat(this.locale,{minimumFractionDigits:t,maximumFractionDigits:n}).format(e)}}}},undefined,!1,undefined,void 0,void 0);var ur=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"progress-bar",class:e.newType,style:{width:e.barWidth},attrs:{role:"progressbar","aria-valuenow":e.value,"aria-valuemax":e.parent.max,"aria-valuemin":"0"}},[e.newShowValue?n("p",{staticClass:"progress-value"},[e._t("default",[e._v(e._s(e.newValue))])],2):e._e()])},staticRenderFns:[]},undefined,{name:"BProgressBar",mixins:[bn("progress")],props:{type:{type:[String,Object],default:void 0},value:{type:Number,default:void 0},showValue:{type:Boolean,default:!1}},computed:{newType:function(){return[this.parent.size,this.type||this.parent.type]},newShowValue:function(){return this.showValue||this.parent.showValue},newValue:function(){return this.parent.calculateValue(this.value)},barWidth:function(){return"".concat(100*this.value/this.parent.max,"%")}}},undefined,!1,undefined,void 0,void 0),cr={install:function(e){Jt(e,lr),Jt(e,ur)}};use(cr);var progress=cr;var dr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{ref:"label",staticClass:"b-radio radio",class:[e.size,{"is-disabled":e.disabled}],attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())}}},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"radio",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:e._q(e.computedValue,e.nativeValue)},on:{click:function(e){e.stopPropagation()},change:function(t){e.computedValue=e.nativeValue}}}),n("span",{staticClass:"check",class:e.type}),n("span",{staticClass:"control-label"},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BRadio",mixins:[Pn]},undefined,!1,undefined,void 0,void 0);var fr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"control",class:{"is-expanded":e.expanded}},[n("label",{ref:"label",staticClass:"b-radio radio button",class:e.labelClass,attrs:{disabled:e.disabled},on:{click:e.focus,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.preventDefault(),e.$refs.label.click())}}},[e._t("default"),n("input",{directives:[{name:"model",rawName:"v-model",value:e.computedValue,expression:"computedValue"}],ref:"input",attrs:{type:"radio",disabled:e.disabled,required:e.required,name:e.name},domProps:{value:e.nativeValue,checked:e._q(e.computedValue,e.nativeValue)},on:{click:function(e){e.stopPropagation()},focus:function(t){e.isFocused=!0},blur:function(t){e.isFocused=!1},change:function(t){e.computedValue=e.nativeValue}}})],2)])},staticRenderFns:[]},undefined,{name:"BRadioButton",mixins:[Pn],props:{type:{type:String,default:"is-primary"},expanded:Boolean},data:function(){return{isFocused:!1}},computed:{isSelected:function(){return this.newValue===this.nativeValue},labelClass:function(){return[this.isSelected?this.type:null,this.size,{"is-selected":this.isSelected,"is-disabled":this.disabled,"is-focused":this.isFocused}]}}},undefined,!1,undefined,void 0,void 0),pr={install:function(e){Jt(e,dr),Jt(e,fr)}};use(pr);var mr=pr;var vr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"rate",class:{"is-disabled":e.disabled,"is-spaced":e.spaced,"is-rtl":e.rtl}},[e._l(e.max,(function(t,r){return n("div",{key:r,staticClass:"rate-item",class:e.rateClass(t),on:{mousemove:function(n){return e.previewRate(t,n)},mouseleave:e.resetNewValue,click:function(n){return n.preventDefault(),e.confirmValue(t)}}},[n("b-icon",{attrs:{pack:e.iconPack,icon:e.icon,size:e.size}}),e.checkHalf(t)?n("b-icon",{staticClass:"is-half",style:e.halfStyle,attrs:{pack:e.iconPack,icon:e.icon,size:e.size}}):e._e()],1)})),e.showText||e.showScore||e.customText?n("div",{staticClass:"rate-text",class:e.size},[n("span",[e._v(e._s(e.showMe))]),e.customText&&!e.showText?n("span",[e._v(e._s(e.customText))]):e._e()]):e._e()],2)},staticRenderFns:[]},undefined,{name:"BRate",components:ft({},an.name,an),props:{value:{type:Number,default:0},max:{type:Number,default:5},icon:{type:String,default:"star"},iconPack:String,size:String,spaced:Boolean,rtl:Boolean,disabled:Boolean,showScore:Boolean,showText:Boolean,customText:String,texts:Array,locale:{type:[String,Array],default:function(){return Kt.defaultLocale}}},data:function(){return{newValue:this.value,hoverValue:0}},computed:{halfStyle:function(){return"width:".concat(this.valueDecimal,"%")},showMe:function(){var e="";return this.showScore?e=0===(e=this.disabled?this.value:this.newValue)?"":new Intl.NumberFormat(this.locale).format(this.value):this.showText&&(e=this.texts[Math.ceil(this.newValue)-1]),e},valueDecimal:function(){return 100*this.value-100*Math.floor(this.value)}},watch:{value:function(e){this.newValue=e}},methods:{resetNewValue:function(){this.disabled||(this.hoverValue=0)},previewRate:function(e,t){this.disabled||(this.hoverValue=e,t.stopPropagation())},confirmValue:function(e){this.disabled||(this.newValue=e,this.$emit("change",this.newValue),this.$emit("input",this.newValue))},checkHalf:function(e){return this.disabled&&this.valueDecimal>0&&e-1this.value},rateClass:function(e){var output="";return e<=(0!==this.hoverValue?this.hoverValue:this.newValue)?output="set-on":this.disabled&&Math.ceil(this.value)===e&&(output="set-half"),output}}},undefined,!1,undefined,void 0,void 0),gr={install:function(e){Jt(e,vr)}};use(gr);var yr=gr,wr={install:function(e){Jt(e,ni)}};use(wr);var kr=wr;var Sr=Qt({},undefined,{name:"BSkeleton",functional:!0,props:{active:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:[Number,String],height:[Number,String],circle:Boolean,rounded:{type:Boolean,default:!0},count:{type:Number,default:1},position:{type:String,default:"",validator:function(e){return["","is-centered","is-right"].indexOf(e)>-1}},size:String},render:function(e,t){if(t.props.active){for(var n=[],r=t.props.width,o=t.props.height,i=0;i=0}},fullheight:Boolean,fullwidth:Boolean,right:Boolean,mobile:{type:String},reduce:Boolean,expandOnHover:Boolean,expandOnHoverFixed:Boolean,delay:{type:Number,default:function(){return Kt.defaultSidebarDelay}},canCancel:{type:[Array,Boolean],default:function(){return["escape","outside"]}},onCancel:{type:Function,default:function(){}},scroll:{type:String,default:function(){return Kt.defaultModalScroll?Kt.defaultModalScroll:"clip"},validator:function(e){return["clip","keep"].indexOf(e)>=0}}},data:function(){return{isOpen:this.open,isDelayOver:!1,transitionName:null,animating:!0,savedScrollTop:null,hasLeaved:!1}},computed:{rootClasses:function(){return[this.type,{"is-fixed":this.isFixed,"is-static":this.isStatic,"is-absolute":this.isAbsolute,"is-fullheight":this.fullheight,"is-fullwidth":this.fullwidth,"is-right":this.right,"is-mini":this.reduce&&!this.isDelayOver,"is-mini-expand":this.expandOnHover||this.isDelayOver,"is-mini-expand-fixed":this.expandOnHover&&this.expandOnHoverFixed||this.isDelayOver,"is-mini-delayed":null!==this.delay,"is-mini-mobile":"reduce"===this.mobile,"is-hidden-mobile":"hide"===this.mobile,"is-fullwidth-mobile":"fullwidth"===this.mobile}]},cancelOptions:function(){return"boolean"==typeof this.canCancel?this.canCancel?["escape","outside"]:[]:this.canCancel},isStatic:function(){return"static"===this.position},isFixed:function(){return"fixed"===this.position},isAbsolute:function(){return"absolute"===this.position}},watch:{open:{handler:function(e){this.isOpen=e,this.overlay&&this.handleScroll();var t=this.right?!e:e;this.transitionName=t?"slide-next":"slide-prev"},immediate:!0}},methods:{keyPress:function(e){var t=e.key;this.isFixed&&(!this.isOpen||"Escape"!==t&&"Esc"!==t||this.cancel("escape"))},cancel:function(e){this.cancelOptions.indexOf(e)<0||this.isStatic||(this.onCancel.apply(null,arguments),this.close())},close:function(){this.isOpen=!1,this.$emit("close"),this.$emit("update:open",!1)},clickedOutside:function(e){this.isFixed&&this.isOpen&&!this.animating&&(e.composedPath().includes(this.$refs.sidebarContent)||this.cancel("outside"))},beforeEnter:function(){this.animating=!0},afterEnter:function(){this.animating=!1},handleScroll:function(){"undefined"!=typeof window&&("clip"!==this.scroll?(this.savedScrollTop=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop,this.open?document.body.classList.add("is-noscroll"):document.body.classList.remove("is-noscroll"),this.open?document.body.style.top="-".concat(this.savedScrollTop,"px"):(document.documentElement.scrollTop=this.savedScrollTop,document.body.style.top=null,this.savedScrollTop=null)):this.open?document.documentElement.classList.add("is-clipped"):document.documentElement.classList.remove("is-clipped"))},onHover:function(){var e=this;this.delay?(this.hasLeaved=!1,this.timer=setTimeout((function(){e.hasLeaved||(e.isDelayOver=!0),e.timer=null}),this.delay)):this.isDelayOver=!1},onHoverLeave:function(){this.hasLeaved=!0,this.timer=null,this.isDelayOver=!1}},created:function(){"undefined"!=typeof window&&(document.addEventListener("keyup",this.keyPress),document.addEventListener("click",this.clickedOutside))},mounted:function(){"undefined"!=typeof window&&this.isFixed&&document.body.appendChild(this.$el),this.overlay&&this.open&&this.handleScroll()},beforeDestroy:function(){if("undefined"!=typeof window&&(document.removeEventListener("keyup",this.keyPress),document.removeEventListener("click",this.clickedOutside),this.overlay)){document.documentElement.classList.remove("is-clipped");var e=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop;document.body.classList.remove("is-noscroll"),document.documentElement.scrollTop=e,document.body.style.top=null}this.isFixed&&Et(this.$el)}};var _r=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-sidebar"},[e.overlay&&e.isOpen?n("div",{staticClass:"sidebar-background"}):e._e(),n("transition",{attrs:{name:e.transitionName},on:{"before-enter":e.beforeEnter,"after-enter":e.afterEnter}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isOpen,expression:"isOpen"}],ref:"sidebarContent",staticClass:"sidebar-content",class:e.rootClasses,on:{mouseenter:e.onHover,mouseleave:e.onHoverLeave}},[e._t("default")],2)])],1)},staticRenderFns:[]},undefined,Dr,undefined,!1,undefined,void 0,void 0),$r={install:function(e){Jt(e,_r)}};use($r);var Pr=$r;var Mr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-slider-thumb-wrapper",class:{"is-dragging":e.dragging,"has-indicator":e.indicator},style:e.wrapperStyle},[n("b-tooltip",{attrs:{label:e.formattedValue,type:e.type,always:e.dragging||e.isFocused||e.tooltipAlways,active:!e.disabled&&e.tooltip}},[n("div",e._b({staticClass:"b-slider-thumb",attrs:{tabindex:!e.disabled&&0},on:{mousedown:e.onButtonDown,touchstart:e.onButtonDown,focus:e.onFocus,blur:e.onBlur,keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"left",37,t.key,["Left","ArrowLeft"])||"button"in t&&0!==t.button?null:(t.preventDefault(),e.onLeftKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"right",39,t.key,["Right","ArrowRight"])||"button"in t&&2!==t.button?null:(t.preventDefault(),e.onRightKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:(t.preventDefault(),e.onLeftKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:(t.preventDefault(),e.onRightKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"home",void 0,t.key,void 0)?null:(t.preventDefault(),e.onHomeKeyDown(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"end",void 0,t.key,void 0)?null:(t.preventDefault(),e.onEndKeyDown(t))}]}},"div",e.$attrs,!1),[e.indicator?n("span",[e._v(e._s(e.formattedValue))]):e._e()])])],1)},staticRenderFns:[]},undefined,{name:"BSliderThumb",components:ft({},ii.name,ii),inheritAttrs:!1,props:{value:{type:Number,default:0},type:{type:String,default:""},tooltip:{type:Boolean,default:!0},indicator:{type:Boolean,default:!1},customFormatter:Function,format:{type:String,default:"raw",validator:function(e){return["raw","percent"].indexOf(e)>=0}},locale:{type:[String,Array],default:function(){return Kt.defaultLocale}},tooltipAlways:{type:Boolean,default:!1}},data:function(){return{isFocused:!1,dragging:!1,startX:0,startPosition:0,newPosition:null,oldValue:this.value}},computed:{disabled:function(){return this.$parent.disabled},max:function(){return this.$parent.max},min:function(){return this.$parent.min},step:function(){return this.$parent.step},precision:function(){return this.$parent.precision},currentPosition:function(){return"".concat((this.value-this.min)/(this.max-this.min)*100,"%")},wrapperStyle:function(){return{left:this.currentPosition}},formattedValue:function(){return void 0!==this.customFormatter?this.customFormatter(this.value):"percent"===this.format?new Intl.NumberFormat(this.locale,{style:"percent"}).format((this.value-this.min)/(this.max-this.min)):new Intl.NumberFormat(this.locale).format(this.value)}},methods:{onFocus:function(){this.isFocused=!0},onBlur:function(){this.isFocused=!1},onButtonDown:function(e){this.disabled||(e.preventDefault(),this.onDragStart(e),"undefined"!=typeof window&&(document.addEventListener("mousemove",this.onDragging),document.addEventListener("touchmove",this.onDragging),document.addEventListener("mouseup",this.onDragEnd),document.addEventListener("touchend",this.onDragEnd),document.addEventListener("contextmenu",this.onDragEnd)))},onLeftKeyDown:function(){this.disabled||this.value===this.min||(this.newPosition=parseFloat(this.currentPosition)-this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onRightKeyDown:function(){this.disabled||this.value===this.max||(this.newPosition=parseFloat(this.currentPosition)+this.step/(this.max-this.min)*100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onHomeKeyDown:function(){this.disabled||this.value===this.min||(this.newPosition=0,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onEndKeyDown:function(){this.disabled||this.value===this.max||(this.newPosition=100,this.setPosition(this.newPosition),this.$parent.emitValue("change"))},onDragStart:function(e){this.dragging=!0,this.$emit("dragstart"),"touchstart"===e.type&&(e.clientX=e.touches[0].clientX),this.startX=e.clientX,this.startPosition=parseFloat(this.currentPosition),this.newPosition=this.startPosition},onDragging:function(e){if(this.dragging){"touchmove"===e.type&&(e.clientX=e.touches[0].clientX);var t=(e.clientX-this.startX)/this.$parent.sliderSize()*100;this.newPosition=this.startPosition+t,this.setPosition(this.newPosition)}},onDragEnd:function(){this.dragging=!1,this.$emit("dragend"),this.value!==this.oldValue&&this.$parent.emitValue("change"),this.setPosition(this.newPosition),"undefined"!=typeof window&&(document.removeEventListener("mousemove",this.onDragging),document.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd),document.removeEventListener("contextmenu",this.onDragEnd))},setPosition:function(e){if(null!==e&&!isNaN(e)){e<0?e=0:e>100&&(e=100);var t=100/((this.max-this.min)/this.step),n=Math.round(e/t)*t/100*(this.max-this.min)+this.min;n=parseFloat(n.toFixed(this.precision)),this.$emit("input",n),this.dragging||n===this.oldValue||(this.oldValue=n)}}}},undefined,!1,undefined,void 0,void 0);var Or,Ar=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-slider-tick",class:{"is-tick-hidden":e.hidden},style:e.getTickStyle(e.position)},[e.$slots.default?n("span",{staticClass:"b-slider-tick-label"},[e._t("default")],2):e._e()])},staticRenderFns:[]},undefined,{name:"BSliderTick",props:{value:{type:Number,default:0}},computed:{position:function(){var e=(this.value-this.$parent.min)/(this.$parent.max-this.$parent.min)*100;return e>=0&&e<=100?e:0},hidden:function(){return this.value===this.$parent.min||this.value===this.$parent.max}},methods:{getTickStyle:function(e){return{left:e+"%"}}},created:function(){if(!this.$parent.$data._isSlider)throw this.$destroy(),new Error("You should wrap bSliderTick on a bSlider")}},undefined,!1,undefined,void 0,void 0);var Tr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-slider",class:[e.size,e.type,e.rootClasses],on:{click:e.onSliderClick}},[n("div",{ref:"slider",staticClass:"b-slider-track"},[n("div",{staticClass:"b-slider-fill",style:e.barStyle}),e.ticks?e._l(e.tickValues,(function(e,t){return n("b-slider-tick",{key:t,attrs:{value:e}})})):e._e(),e._t("default"),n("b-slider-thumb",{ref:"button1",attrs:{"tooltip-always":e.tooltipAlways,type:e.newTooltipType,tooltip:e.tooltip,"custom-formatter":e.customFormatter,indicator:e.indicator,format:e.format,locale:e.locale,role:"slider","aria-valuenow":e.value1,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-orientation":"horizontal","aria-label":Array.isArray(e.ariaLabel)?e.ariaLabel[0]:e.ariaLabel,"aria-disabled":e.disabled},on:{dragstart:e.onDragStart,dragend:e.onDragEnd},model:{value:e.value1,callback:function(t){e.value1=t},expression:"value1"}}),e.isRange?n("b-slider-thumb",{ref:"button2",attrs:{"tooltip-always":e.tooltipAlways,type:e.newTooltipType,tooltip:e.tooltip,"custom-formatter":e.customFormatter,indicator:e.indicator,format:e.format,locale:e.locale,role:"slider","aria-valuenow":e.value2,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-orientation":"horizontal","aria-label":Array.isArray(e.ariaLabel)?e.ariaLabel[1]:"","aria-disabled":e.disabled},on:{dragstart:e.onDragStart,dragend:e.onDragEnd},model:{value:e.value2,callback:function(t){e.value2=t},expression:"value2"}}):e._e()],2)])},staticRenderFns:[]},undefined,{name:"BSlider",components:(Or={},ft(Or,Mr.name,Mr),ft(Or,Ar.name,Ar),Or),props:{value:{type:[Number,Array],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},type:{type:String,default:"is-primary"},size:String,ticks:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!0},tooltipType:String,rounded:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},customFormatter:Function,ariaLabel:[String,Array],biggerSliderFocus:{type:Boolean,default:!1},indicator:{type:Boolean,default:!1},format:{type:String,default:"raw",validator:function(e){return["raw","percent"].indexOf(e)>=0}},locale:{type:[String,Array],default:function(){return Kt.defaultLocale}},tooltipAlways:{type:Boolean,default:!1}},data:function(){return{value1:null,value2:null,dragging:!1,isRange:!1,_isSlider:!0}},computed:{newTooltipType:function(){return this.tooltipType?this.tooltipType:this.type},tickValues:function(){if(!this.ticks||this.min>this.max||0===this.step)return[];for(var e=[],i=this.min+this.step;ithis.max))if(Array.isArray(e)){this.isRange=!0;var t="number"!=typeof e[0]||isNaN(e[0])?this.min:At(e[0],this.min,this.max),n="number"!=typeof e[1]||isNaN(e[1])?this.max:At(e[1],this.min,this.max);this.value1=this.isThumbReversed?n:t,this.value2=this.isThumbReversed?t:n}else this.isRange=!1,this.value1=isNaN(e)?this.min:At(e,this.min,this.max),this.value2=null},onInternalValueUpdate:function(){this.isRange&&(this.isThumbReversed=this.value1>this.value2),this.lazy&&this.dragging||this.emitValue("input"),this.dragging&&this.emitValue("dragging")},sliderSize:function(){return this.$refs.slider.getBoundingClientRect().width},onSliderClick:function(e){if(!this.disabled&&!this.isTrackClickDisabled){var t=this.$refs.slider.getBoundingClientRect().left,n=(e.clientX-t)/this.sliderSize()*100,r=this.min+n*(this.max-this.min)/100,o=Math.abs(r-this.value1);if(this.isRange){var l=Math.abs(r-this.value2);if(o<=l){if(o1&&void 0!==arguments[1]&&arguments[1],n=null,r=e+1;r1&&void 0!==arguments[1]&&arguments[1],n=null,r=e-1;r>=0;r--){var o=this.items[r];if(o.visible&&(!t||t&&!o.disabled)){n=r;break}}return n}}}},zr=function(e){return{mixins:[bn(e,1)],props:{label:String,icon:String,iconPack:String,visible:{type:Boolean,default:!0},value:{type:String,default:function(){return this._uid.toString()}},headerClass:{type:[String,Array,Object],default:null}},data:function(){return{transitionName:null,elementClass:"item",elementRole:null}},computed:{isActive:function(){return this.parent.activeItem===this}},methods:{activate:function(e){this.transitionName=this.indext.index}]},[n("a",{staticClass:"step-link",class:{"is-clickable":e.isItemClickable(t)},on:{click:function(n){e.isItemClickable(t)&&e.childClick(t)}}},[n("div",{staticClass:"step-marker"},[t.icon?n("b-icon",{attrs:{icon:t.icon,pack:t.iconPack,size:e.size}}):t.step?n("span",[e._v(e._s(t.step))]):e._e()],1),n("div",{staticClass:"step-details"},[n("span",{staticClass:"step-title"},[e._v(e._s(t.label))])])])])})),0)]),n("section",{staticClass:"step-content",class:{"is-transitioning":e.isTransitioning}},[e._t("default")],2),e._t("navigation",[e.hasNavigation?n("nav",{staticClass:"step-navigation"},[n("a",{staticClass:"pagination-previous",attrs:{role:"button",disabled:e.navigationProps.previous.disabled,"aria-label":e.ariaPreviousLabel},on:{click:function(t){return t.preventDefault(),e.navigationProps.previous.action(t)}}},[n("b-icon",{attrs:{icon:e.iconPrev,pack:e.iconPack,both:"","aria-hidden":"true"}})],1),n("a",{staticClass:"pagination-next",attrs:{role:"button",disabled:e.navigationProps.next.disabled,"aria-label":e.ariaNextLabel},on:{click:function(t){return t.preventDefault(),e.navigationProps.next.action(t)}}},[n("b-icon",{attrs:{icon:e.iconNext,pack:e.iconPack,both:"","aria-hidden":"true"}})],1)]):e._e()],{previous:e.navigationProps.previous,next:e.navigationProps.next})],2)},staticRenderFns:[]},undefined,{name:"BSteps",components:ft({},an.name,an),mixins:[Hr("step")],props:{type:[String,Object],iconPack:String,iconPrev:{type:String,default:function(){return Kt.defaultIconPrev}},iconNext:{type:String,default:function(){return Kt.defaultIconNext}},hasNavigation:{type:Boolean,default:!0},labelPosition:{type:String,validator:function(e){return["bottom","right","left"].indexOf(e)>-1},default:"bottom"},rounded:{type:Boolean,default:!0},mobileMode:{type:String,validator:function(e){return["minimalist","compact"].indexOf(e)>-1},default:"minimalist"},ariaNextLabel:String,ariaPreviousLabel:String},computed:{activeItem:function(){var e=this;return this.childItems.filter((function(i){return i.value===e.activeId}))[0]||this.items[0]},wrapperClasses:function(){return[this.size,ft({"is-vertical":this.vertical},this.position,this.position&&this.vertical)]},mainClasses:function(){return[this.type,ft({"has-label-right":"right"===this.labelPosition,"has-label-left":"left"===this.labelPosition,"is-animated":this.animated,"is-rounded":this.rounded},"mobile-".concat(this.mobileMode),null!==this.mobileMode)]},hasPrev:function(){return null!==this.prevItemIdx},nextItemIdx:function(){var e=this.activeItem?this.items.indexOf(this.activeItem):0;return this.getNextItemIdx(e)},nextItem:function(){var e=null;return null!==this.nextItemIdx&&(e=this.items[this.nextItemIdx]),e},prevItemIdx:function(){if(!this.activeItem)return null;var e=this.items.indexOf(this.activeItem);return this.getPrevItemIdx(e)},prevItem:function(){if(!this.activeItem)return null;var e=null;return null!==this.prevItemIdx&&(e=this.items[this.prevItemIdx]),e},hasNext:function(){return null!==this.nextItemIdx},navigationProps:function(){return{previous:{disabled:!this.hasPrev,action:this.prev},next:{disabled:!this.hasNext,action:this.next}}}},methods:{isItemClickable:function(e){return void 0===e.clickable?e.index-1:e._q(e.computedValue,e.trueValue)},on:{click:function(e){e.stopPropagation()},change:function(t){var n=e.computedValue,r=t.target,o=r.checked?e.trueValue:e.falseValue;if(Array.isArray(n)){var l=e.nativeValue,c=e._i(n,l);r.checked?c<0&&(e.computedValue=n.concat([l])):c>-1&&(e.computedValue=n.slice(0,c).concat(n.slice(c+1)))}else e.computedValue=o}}}),n("span",{staticClass:"check",class:e.checkClasses}),e.showControlLabel?n("span",{staticClass:"control-label",attrs:{id:e.ariaLabelledby}},[e._t("default")],2):e._e()])},staticRenderFns:[]},undefined,{name:"BSwitch",props:{value:[String,Number,Boolean,Function,Object,Array,Date],nativeValue:[String,Number,Boolean,Function,Object,Array,Date],disabled:Boolean,type:String,passiveType:String,name:String,required:Boolean,size:String,ariaLabelledby:String,trueValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!0},falseValue:{type:[String,Number,Boolean,Function,Object,Array,Date],default:!1},rounded:{type:Boolean,default:function(){return Kt.defaultSwitchRounded}},outlined:{type:Boolean,default:!1},leftLabel:{type:Boolean,default:!1}},data:function(){return{newValue:this.value,isMouseDown:!1}},computed:{computedValue:{get:function(){return this.newValue},set:function(e){this.newValue=e,this.$emit("input",e)}},newClass:function(){return[this.size,{"is-disabled":this.disabled,"is-rounded":this.rounded,"is-outlined":this.outlined,"has-left-label":this.leftLabel}]},checkClasses:function(){return[{"is-elastic":this.isMouseDown&&!this.disabled},this.passiveType&&"".concat(this.passiveType,"-passive"),this.type]},showControlLabel:function(){return!!this.$slots.default}},watch:{value:function(e){this.newValue=e}},methods:{focus:function(){this.$refs.input.focus()}}},undefined,!1,undefined,void 0,void 0),Kr={install:function(e){Jt(e,Ur)}};use(Kr);var Xr,Gr=Kr;var Qr=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"field table-mobile-sort"},[n("div",{staticClass:"field has-addons"},[e.sortMultiple?n("b-select",{attrs:{expanded:""},model:{value:e.sortMultipleSelect,callback:function(t){e.sortMultipleSelect=t},expression:"sortMultipleSelect"}},e._l(e.columns,(function(t,r){return t.sortable?n("option",{key:r,domProps:{value:t}},[e._v(" "+e._s(e.getLabel(t))+" "),e.getSortingObjectOfColumn(t)?[e.columnIsDesc(t)?[e._v(" ↓ ")]:[e._v(" ↑ ")]]:e._e()],2):e._e()})),0):n("b-select",{attrs:{expanded:""},model:{value:e.mobileSort,callback:function(t){e.mobileSort=t},expression:"mobileSort"}},[e.placeholder?[n("option",{directives:[{name:"show",rawName:"v-show",value:e.showPlaceholder,expression:"showPlaceholder"}],attrs:{selected:"",disabled:"",hidden:""},domProps:{value:{}}},[e._v(" "+e._s(e.placeholder)+" ")])]:e._e(),e._l(e.columns,(function(t,r){return t.sortable?n("option",{key:r,domProps:{value:t}},[e._v(" "+e._s(t.label)+" ")]):e._e()}))],2),n("div",{staticClass:"control"},[e.sortMultiple&&e.sortMultipleData.length>0?[n("button",{staticClass:"button is-primary",on:{click:e.sort}},[n("b-icon",{class:{"is-desc":e.columnIsDesc(e.sortMultipleSelect)},attrs:{icon:e.sortIcon,pack:e.iconPack,size:e.sortIconSize,both:""}})],1),n("button",{staticClass:"button is-primary",on:{click:e.removePriority}},[n("b-icon",{attrs:{icon:"delete",size:e.sortIconSize,both:""}})],1)]:e.sortMultiple?e._e():n("button",{staticClass:"button is-primary",on:{click:e.sort}},[n("b-icon",{directives:[{name:"show",rawName:"v-show",value:e.currentSortColumn===e.mobileSort,expression:"currentSortColumn === mobileSort"}],class:{"is-desc":!e.isAsc},attrs:{icon:e.sortIcon,pack:e.iconPack,size:e.sortIconSize,both:""}})],1)],2)],1)])},staticRenderFns:[]},undefined,{name:"BTableMobileSort",components:(Xr={},ft(Xr,ni.name,ni),ft(Xr,an.name,an),Xr),props:{currentSortColumn:Object,sortMultipleData:Array,isAsc:Boolean,columns:Array,placeholder:String,iconPack:String,sortIcon:{type:String,default:"arrow-up"},sortIconSize:{type:String,default:"is-small"},sortMultiple:{type:Boolean,default:!1}},data:function(){return{sortMultipleSelect:"",mobileSort:this.currentSortColumn,defaultEvent:{shiftKey:!0,altKey:!0,ctrlKey:!0},ignoreSort:!1}},computed:{showPlaceholder:function(){var e=this;return!this.columns||!this.columns.some((function(t){return t===e.mobileSort}))}},watch:{sortMultipleSelect:function(e){this.ignoreSort?this.ignoreSort=!1:this.$emit("sort",e,this.defaultEvent)},mobileSort:function(e){this.currentSortColumn!==e&&this.$emit("sort",e,this.defaultEvent)},currentSortColumn:function(e){this.mobileSort=e}},methods:{removePriority:function(){var e=this;this.$emit("removePriority",this.sortMultipleSelect),this.ignoreSort=!0;var t=this.sortMultipleData.filter((function(data){return data.field!==e.sortMultipleSelect.field})).map((function(data){return data.field}));this.sortMultipleSelect=this.columns.filter((function(e){return t.includes(e.field)}))[0]},getSortingObjectOfColumn:function(e){return this.sortMultipleData.filter((function(i){return i.field===e.field}))[0]},columnIsDesc:function(e){var t=this.getSortingObjectOfColumn(e);return!t||!(!t.order||"desc"!==t.order)},getLabel:function(e){var t=this.getSortingObjectOfColumn(e);return t?e.label+"("+(this.sortMultipleData.indexOf(t)+1)+")":e.label},sort:function(){this.$emit("sort",this.sortMultiple?this.sortMultipleSelect:this.mobileSort,this.defaultEvent)}}},undefined,!1,undefined,void 0,void 0);var Jr=Qt({},undefined,{name:"BTableColumn",inject:{$table:{name:"$table",default:!1}},props:{label:String,customKey:[String,Number],field:String,meta:[String,Number,Boolean,Function,Object,Array],width:[Number,String],numeric:Boolean,centered:Boolean,searchable:Boolean,sortable:Boolean,visible:{type:Boolean,default:!0},subheading:[String,Number],customSort:Function,customSearch:Function,sticky:Boolean,headerSelectable:Boolean,headerClass:String,cellClass:String,thAttrs:{type:Function,default:function(){return{}}},tdAttrs:{type:Function,default:function(){return{}}}},data:function(){return{newKey:this.customKey||this.label,_isTableColumn:!0}},computed:{thClasses:function(){var e=this.thAttrs(this),t=[this.headerClass,{"is-sortable":this.sortable,"is-sticky":this.sticky,"is-unselectable":this.isHeaderUnSelectable}];return e&&e.class&&t.push(e.class),t},thStyle:function(){var e=this.thAttrs(this),style=[this.style];return e&&e.style&&style.push(e.style),style},rootClasses:function(){return[this.cellClass,{"has-text-right":this.numeric&&!this.centered,"has-text-centered":this.centered,"is-sticky":this.sticky}]},style:function(){return{width:zt(this.width)}},hasDefaultSlot:function(){return!!this.$scopedSlots.default},isHeaderUnSelectable:function(){return!this.headerSelectable&&this.sortable}},methods:{getRootClasses:function(e){var t=this.tdAttrs(e,this),n=[this.rootClasses];return t&&t.class&&n.push(t.class),n},getRootStyle:function(e){var t=this.tdAttrs(e,this),style=[];return t&&t.style&&style.push(t.style),style}},created:function(){if(!this.$table)throw this.$destroy(),new Error("You should wrap bTableColumn on a bTable");this.$table.refreshSlots()},beforeDestroy:function(){this.$table.refreshSlots()},render:function(e){return null}},undefined,undefined,undefined,void 0,void 0);var Zr,es=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"top level"},[n("div",{staticClass:"level-left"},[e._t("default")],2),n("div",{staticClass:"level-right"},[e.paginated?n("div",{staticClass:"level-item"},[n("b-pagination",{attrs:{"icon-pack":e.iconPack,total:e.total,"per-page":e.perPage,simple:e.paginationSimple,size:e.paginationSize,current:e.newCurrentPage,rounded:e.rounded,"aria-next-label":e.ariaNextLabel,"aria-previous-label":e.ariaPreviousLabel,"aria-page-label":e.ariaPageLabel,"aria-current-label":e.ariaCurrentLabel,"page-input":e.pageInput,order:e.paginationOrder,"page-input-position":e.pageInputPosition,"debounce-page-input":e.debouncePageInput},on:{change:e.pageChanged}})],1):e._e()])])},staticRenderFns:[]},undefined,{name:"BTablePagination",components:ft({},rr.name,rr),props:{paginated:Boolean,total:[Number,String],perPage:[Number,String],currentPage:[Number,String],paginationSimple:Boolean,paginationSize:String,rounded:Boolean,iconPack:String,ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,pageInput:Boolean,paginationOrder:String,pageInputPosition:String,debouncePageInput:[Number,String]},data:function(){return{newCurrentPage:this.currentPage}},watch:{currentPage:function(e){this.newCurrentPage=e}},methods:{pageChanged:function(e){this.newCurrentPage=e>0?e:1,this.$emit("update:currentPage",this.newCurrentPage),this.$emit("page-change",this.newCurrentPage)}}},undefined,!1,undefined,void 0,void 0),ts={name:"BTable",components:(Zr={},ft(Zr,Mn.name,Mn),ft(Zr,an.name,an),ft(Zr,rn.name,rn),ft(Zr,ua.name,ua),ft(Zr,Lr.name,Lr),ft(Zr,Qr.name,Qr),ft(Zr,Jr.name,Jr),ft(Zr,es.name,es),Zr),inheritAttrs:!1,provide:function(){return{$table:this}},props:{data:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},bordered:Boolean,striped:Boolean,narrowed:Boolean,hoverable:Boolean,loading:Boolean,detailed:Boolean,checkable:Boolean,headerCheckable:{type:Boolean,default:!0},checkboxType:{type:String,default:"is-primary"},checkboxPosition:{type:String,default:"left",validator:function(e){return["left","right"].indexOf(e)>=0}},stickyCheckbox:{type:Boolean,default:!1},selected:Object,isRowSelectable:{type:Function,default:function(){return!0}},focusable:Boolean,customIsChecked:Function,isRowCheckable:{type:Function,default:function(){return!0}},checkedRows:{type:Array,default:function(){return[]}},mobileCards:{type:Boolean,default:!0},defaultSort:[String,Array],defaultSortDirection:{type:String,default:"asc"},sortIcon:{type:String,default:"arrow-up"},sortIconSize:{type:String,default:"is-small"},sortMultiple:{type:Boolean,default:!1},sortMultipleData:{type:Array,default:function(){return[]}},sortMultipleKey:{type:String,default:null},paginated:Boolean,currentPage:{type:Number,default:1},perPage:{type:[Number,String],default:20},showDetailIcon:{type:Boolean,default:!0},detailIcon:{type:String,default:"chevron-right"},paginationPosition:{type:String,default:"bottom",validator:function(e){return["bottom","top","both"].indexOf(e)>=0}},paginationRounded:Boolean,backendSorting:Boolean,backendFiltering:Boolean,rowClass:{type:Function,default:function(){return""}},openedDetailed:{type:Array,default:function(){return[]}},hasDetailedVisible:{type:Function,default:function(){return!0}},detailKey:{type:String,default:""},detailTransition:{type:String,default:""},customDetailRow:{type:Boolean,default:!1},backendPagination:Boolean,total:{type:[Number,String],default:0},iconPack:String,mobileSortPlaceholder:String,customRowKey:String,draggable:{type:Boolean,default:!1},draggableColumn:{type:Boolean,default:!1},scrollable:Boolean,ariaNextLabel:String,ariaPreviousLabel:String,ariaPageLabel:String,ariaCurrentLabel:String,stickyHeader:Boolean,height:[Number,String],filtersEvent:{type:String,default:""},cardLayout:Boolean,showHeader:{type:Boolean,default:!0},debounceSearch:Number,caption:String,showCaption:{type:Boolean,default:!0},pageInput:{type:Boolean,default:!1},paginationOrder:String,pageInputPosition:String,debouncePageInput:[Number,String]},data:function(){return{sortMultipleDataLocal:[],getValueByPath:Tt,visibleDetailRows:this.openedDetailed,newData:this.data,newDataTotal:this.backendPagination?this.total:this.data.length,newCheckedRows:Ct(this.checkedRows),lastCheckedRowIndex:null,newCurrentPage:this.currentPage,currentSortColumn:{},isAsc:!0,filters:{},defaultSlots:[],firstTimeSort:!0,_isTable:!0,isDraggingRow:!1,isDraggingColumn:!1}},computed:{sortMultipleDataComputed:function(){return this.backendSorting?this.sortMultipleData:this.sortMultipleDataLocal},tableClasses:function(){return{"is-bordered":this.bordered,"is-striped":this.striped,"is-narrow":this.narrowed,"is-hoverable":(this.hoverable||this.focusable)&&this.visibleData.length}},tableWrapperClasses:function(){return{"has-mobile-cards":this.mobileCards,"has-sticky-header":this.stickyHeader,"is-card-list":this.cardLayout,"table-container":this.isScrollable}},tableStyle:function(){return{height:zt(this.height)}},visibleData:function(){if(!this.paginated)return this.newData;var e=this.newCurrentPage,t=this.perPage;if(this.newData.length<=t)return this.newData;var n=(e-1)*t,r=parseInt(n,10)+parseInt(t,10);return this.newData.slice(n,r)},visibleColumns:function(){return this.newColumns?this.newColumns.filter((function(e){return e.visible||void 0===e.visible})):this.newColumns},isAllChecked:function(){var e=this,t=this.visibleData.filter((function(t){return e.isRowCheckable(t)}));if(0===t.length)return!1;var n=t.some((function(t){return Bt(e.newCheckedRows,t,e.customIsChecked)<0}));return!n},isAllUncheckable:function(){var e=this;return 0===this.visibleData.filter((function(t){return e.isRowCheckable(t)})).length},hasSortablenewColumns:function(){return this.newColumns.some((function(e){return e.sortable}))},hasSearchablenewColumns:function(){return this.newColumns.some((function(e){return e.searchable}))},hasCustomSubheadings:function(){return!(!this.$scopedSlots||!this.$scopedSlots.subheading)||this.newColumns.some((function(e){return e.subheading||e.$scopedSlots&&e.$scopedSlots.subheading}))},columnCount:function(){var e=this.visibleColumns.length;return e+=this.checkable?1:0,e+=this.detailed&&this.showDetailIcon?1:0},showDetailRowIcon:function(){return this.detailed&&this.showDetailIcon},isScrollable:function(){return!!this.scrollable||!!this.newColumns&&this.newColumns.some((function(e){return e.sticky}))},newColumns:function(){var e=this;return this.columns&&this.columns.length?this.columns.map((function(t){var component=new(Yt.extend(Jr))({parent:e,propsData:t});return component.$scopedSlots={default:function(e){return[component.$createElement("span",{domProps:{innerHTML:Tt(e.row,t.field)}})]}},component})):this.defaultSlots.filter((function(e){return e.componentInstance&&e.componentInstance.$data&&e.componentInstance.$data._isTableColumn})).map((function(e){return e.componentInstance}))},canDragRow:function(){return this.draggable&&!this.isDraggingColumn},canDragColumn:function(){return this.draggableColumn&&!this.isDraggingRow}},watch:{data:function(e){var t=this;this.newData=e,this.backendFiltering||(this.newData=e.filter((function(e){return t.isRowFiltered(e)}))),this.backendSorting||this.sort(this.currentSortColumn,!0),this.backendPagination||(this.newDataTotal=this.newData.length)},total:function(e){this.backendPagination&&(this.newDataTotal=e)},currentPage:function(e){this.newCurrentPage=e},newCurrentPage:function(e){this.$emit("update:currentPage",e)},checkedRows:function(e){this.newCheckedRows=Ct(e)},debounceSearch:{handler:function(e){this.debouncedHandleFiltersChange=ir(this.handleFiltersChange,e)},immediate:!0},filters:{handler:function(e){this.debounceSearch?this.debouncedHandleFiltersChange(e):this.handleFiltersChange(e)},deep:!0},openedDetailed:function(e){this.visibleDetailRows=e}},methods:{onFiltersEvent:function(e){this.$emit("filters-event-".concat(this.filtersEvent),{event:e,filters:this.filters})},handleFiltersChange:function(e){var t=this;this.backendFiltering?this.$emit("filters-change",e):(this.newData=this.data.filter((function(e){return t.isRowFiltered(e)})),this.backendPagination||(this.newDataTotal=this.newData.length),this.backendSorting||(this.sortMultiple&&this.sortMultipleDataLocal&&this.sortMultipleDataLocal.length>0?this.doSortMultiColumn():Object.keys(this.currentSortColumn).length>0&&this.doSortSingleColumn(this.currentSortColumn)))},findIndexOfSortData:function(e){var t=this.sortMultipleDataComputed.filter((function(i){return i.field===e.field}))[0];return this.sortMultipleDataComputed.indexOf(t)+1},removeSortingPriority:function(e){if(this.backendSorting)this.$emit("sorting-priority-removed",e.field);else{this.sortMultipleDataLocal=this.sortMultipleDataLocal.filter((function(t){return t.field!==e.field}));var t=this.sortMultipleDataLocal.map((function(i){return(i.order&&"desc"===i.order?"-":"")+i.field}));0===t.length?this.resetMultiSorting():this.newData=Ht(this.newData,t)}},resetMultiSorting:function(){this.sortMultipleDataLocal=[],this.currentSortColumn={},this.newData=this.data},sortBy:function(e,t,n,r){return n&&"function"==typeof n?Ct(e).sort((function(a,b){return n(a,b,r)})):Ct(e).sort((function(a,b){var e=Tt(a,t),n=Tt(b,t);return"boolean"==typeof e&&"boolean"==typeof n?r?e-n:n-e:!Ut(n)&&Ut(e)?r?1:-1:!Ut(e)&&Ut(n)?r?-1:1:e===n?0:(e="string"==typeof e?e.toUpperCase():e,n="string"==typeof n?n.toUpperCase():n,r?e>n?1:-1:e>n?-1:1)}))},sortMultiColumn:function(e){if(this.currentSortColumn={},!this.backendSorting){var t=this.sortMultipleDataLocal.filter((function(i){return i.field===e.field}))[0];t?t.order="desc"===t.order?"asc":"desc":this.sortMultipleDataLocal.push({field:e.field,order:e.isAsc}),this.doSortMultiColumn()}},doSortMultiColumn:function(){var e=this.sortMultipleDataLocal.map((function(i){return(i.order&&"desc"===i.order?"-":"")+i.field}));this.newData=Ht(this.newData,e)},sort:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e&&e.sortable&&(!this.backendSorting&&this.sortMultiple&&(this.sortMultipleKey&&n[this.sortMultipleKey]||!this.sortMultipleKey)?t?this.doSortMultiColumn():this.sortMultiColumn(e):(this.sortMultiple&&(this.sortMultipleDataLocal=[]),t||(this.isAsc=e===this.currentSortColumn?!this.isAsc:"desc"!==this.defaultSortDirection.toLowerCase()),this.firstTimeSort||this.$emit("sort",e.field,this.isAsc?"asc":"desc",n),this.backendSorting||this.doSortSingleColumn(e),this.currentSortColumn=e))},doSortSingleColumn:function(e){this.newData=this.sortBy(this.newData,e.field,e.customSort,this.isAsc)},isRowSelected:function(e,t){return!!t&&(this.customRowKey?e[this.customRowKey]===t[this.customRowKey]:e===t)},isRowChecked:function(e){return Bt(this.newCheckedRows,e,this.customIsChecked)>=0},removeCheckedRow:function(e){var t=Bt(this.newCheckedRows,e,this.customIsChecked);t>=0&&this.newCheckedRows.splice(t,1)},checkAll:function(){var e=this,t=this.isAllChecked;this.visibleData.forEach((function(n){e.isRowCheckable(n)&&e.removeCheckedRow(n),t||e.isRowCheckable(n)&&e.newCheckedRows.push(n)})),this.$emit("check",this.newCheckedRows),this.$emit("check-all",this.newCheckedRows),this.$emit("update:checkedRows",this.newCheckedRows)},checkRow:function(e,t,n){if(this.isRowCheckable(e)){var r=this.lastCheckedRowIndex;this.lastCheckedRowIndex=t,n.shiftKey&&null!==r&&t!==r?this.shiftCheckRow(e,t,r):this.isRowChecked(e)?this.removeCheckedRow(e):this.newCheckedRows.push(e),this.$emit("check",this.newCheckedRows,e),this.$emit("update:checkedRows",this.newCheckedRows)}},shiftCheckRow:function(e,t,n){var r=this,o=this.visibleData.slice(Math.min(t,n),Math.max(t,n)+1),l=!this.isRowChecked(e);o.forEach((function(e){r.removeCheckedRow(e),l&&r.isRowCheckable(e)&&r.newCheckedRows.push(e)}))},selectRow:function(e,t){this.$emit("click",e),this.selected!==e&&this.isRowSelectable(e)&&(this.$emit("select",e,this.selected),this.$emit("update:selected",e))},toggleDetails:function(e){this.isVisibleDetailRow(e)?(this.closeDetailRow(e),this.$emit("details-close",e)):(this.openDetailRow(e),this.$emit("details-open",e)),this.$emit("update:openedDetailed",this.visibleDetailRows)},openDetailRow:function(e){var t=this.handleDetailKey(e);this.visibleDetailRows.push(t)},closeDetailRow:function(e){var t=this.handleDetailKey(e),i=this.visibleDetailRows.indexOf(t);i>=0&&this.visibleDetailRows.splice(i,1)},isVisibleDetailRow:function(e){var t=this.handleDetailKey(e);return this.visibleDetailRows.indexOf(t)>=0},isActiveDetailRow:function(e){return this.detailed&&!this.customDetailRow&&this.isVisibleDetailRow(e)},isActiveCustomDetailRow:function(e){return this.detailed&&this.customDetailRow&&this.isVisibleDetailRow(e)},isRowFiltered:function(e){var t=this,n=function(n){if(!t.filters[n])return"continue";var input=t.filters[n],r=t.newColumns.filter((function(e){return e.field===n}))[0];if(r&&r.customSearch&&"function"==typeof r.customSearch){if(!r.customSearch(e,input))return{v:!1}}else{var o=t.getValueByPath(e,n);if(null==o)return{v:!1};if(Number.isInteger(o)){if(o!==Number(input))return{v:!1}}else{var l=new RegExp(function(e){return e?e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):e}(input),"i");if(Array.isArray(o)){if(!o.some((function(e){return l.test(Lt(e))||l.test(e)})))return{v:!1}}else if(!l.test(Lt(o))&&!l.test(o))return{v:!1}}}};for(var r in this.filters){var o=n(r);if("continue"!==o&&"object"===ut(o))return o.v}return!0},handleDetailKey:function(e){var t=this.detailKey;return t.length&&e?e[t]:e},checkPredefinedDetailedRows:function(){if(this.openedDetailed.length>0&&!this.detailKey.length)throw new Error('If you set a predefined opened-detailed, you must provide a unique key using the prop "detail-key"')},checkSort:function(){if(this.newColumns.length&&this.firstTimeSort)this.initSort(),this.firstTimeSort=!1;else if(this.newColumns.length&&Object.keys(this.currentSortColumn).length>0)for(var i=0;i1)return!0;var e=this.$slots.footer[0].tag;return"th"===e||"td"===e},hasBottomLeftSlot:function(){return void 0!==this.$slots["bottom-left"]},pressedArrow:function(e){if(this.visibleData.length){var t=this.visibleData.indexOf(this.selected)+e;t=t<0?0:t>this.visibleData.length-1?this.visibleData.length-1:t;var n=this.visibleData[t];if(this.isRowSelectable(n))this.selectRow(n);else{var r=null;if(e>0)for(var i=t;i=0&&null===r;o--)this.isRowSelectable(this.visibleData[o])&&(r=o);r>=0&&this.selectRow(this.visibleData[r])}}},focus:function(){this.focusable&&this.$el.querySelector("table").focus()},initSort:function(){var e=this;if(this.sortMultiple&&this.sortMultipleData)this.sortMultipleData.forEach((function(t){e.sortMultiColumn(t)}));else{if(!this.defaultSort)return;var t="",n=this.defaultSortDirection;Array.isArray(this.defaultSort)?(t=this.defaultSort[0],this.defaultSort[1]&&(n=this.defaultSort[1])):t=this.defaultSort;var r=this.newColumns.filter((function(e){return e.field===t}))[0];r&&(this.isAsc="desc"!==n.toLowerCase(),this.sort(r,!0))}},handleDragStart:function(e,t,n){this.canDragRow&&(this.isDraggingRow=!0,this.$emit("dragstart",{event:e,row:t,index:n}))},handleDragEnd:function(e,t,n){this.canDragRow&&(this.isDraggingRow=!1,this.$emit("dragend",{event:e,row:t,index:n}))},handleDrop:function(e,t,n){this.canDragRow&&this.$emit("drop",{event:e,row:t,index:n})},handleDragOver:function(e,t,n){this.canDragRow&&this.$emit("dragover",{event:e,row:t,index:n})},handleDragLeave:function(e,t,n){this.canDragRow&&this.$emit("dragleave",{event:e,row:t,index:n})},emitEventForRow:function(e,t,n){return this.$listeners[e]?this.$emit(e,n,t):null},handleColumnDragStart:function(e,t,n){this.canDragColumn&&(this.isDraggingColumn=!0,this.$emit("columndragstart",{event:e,column:t,index:n}))},handleColumnDragEnd:function(e,t,n){this.canDragColumn&&(this.isDraggingColumn=!1,this.$emit("columndragend",{event:e,column:t,index:n}))},handleColumnDrop:function(e,t,n){this.canDragColumn&&this.$emit("columndrop",{event:e,column:t,index:n})},handleColumnDragOver:function(e,t,n){this.canDragColumn&&this.$emit("columndragover",{event:e,column:t,index:n})},handleColumnDragLeave:function(e,t,n){this.canDragColumn&&this.$emit("columndragleave",{event:e,column:t,index:n})},refreshSlots:function(){this.defaultSlots=this.$slots.default||[]}},mounted:function(){this.refreshSlots(),this.checkPredefinedDetailedRows(),this.checkSort()}};var ns=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-table"},[e._t("default"),e.mobileCards&&e.hasSortablenewColumns?n("b-table-mobile-sort",{attrs:{"current-sort-column":e.currentSortColumn,"sort-multiple":e.sortMultiple,"sort-multiple-data":e.sortMultipleDataComputed,"is-asc":e.isAsc,columns:e.newColumns,placeholder:e.mobileSortPlaceholder,"icon-pack":e.iconPack,"sort-icon":e.sortIcon,"sort-icon-size":e.sortIconSize},on:{sort:function(t,n){return e.sort(t,null,n)},removePriority:function(t){return e.removeSortingPriority(t)}}}):e._e(),!e.paginated||"top"!==e.paginationPosition&&"both"!==e.paginationPosition?e._e():[e._t("pagination",[n("b-table-pagination",e._b({attrs:{"per-page":e.perPage,paginated:e.paginated,rounded:e.paginationRounded,"icon-pack":e.iconPack,total:e.newDataTotal,"current-page":e.newCurrentPage,"aria-next-label":e.ariaNextLabel,"aria-previous-label":e.ariaPreviousLabel,"aria-page-label":e.ariaPageLabel,"aria-current-label":e.ariaCurrentLabel,"page-input":e.pageInput,"pagination-order":e.paginationOrder,"page-input-position":e.pageInputPosition,"debounce-page-input":e.debouncePageInput},on:{"update:currentPage":function(t){e.newCurrentPage=t},"update:current-page":function(t){e.newCurrentPage=t},"page-change":function(t){return e.$emit("page-change",t)}}},"b-table-pagination",e.$attrs,!1),[e._t("top-left")],2)])],n("div",{staticClass:"table-wrapper",class:e.tableWrapperClasses,style:e.tableStyle},[n("table",{staticClass:"table",class:e.tableClasses,attrs:{tabindex:!!e.focusable&&0},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])||t.target!==t.currentTarget?null:(t.preventDefault(),e.pressedArrow(-1))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])||t.target!==t.currentTarget?null:(t.preventDefault(),e.pressedArrow(1))}]}},[e.caption?n("caption",{directives:[{name:"show",rawName:"v-show",value:e.showCaption,expression:"showCaption"}]},[e._v(e._s(e.caption))]):e._e(),e.newColumns.length&&e.showHeader?n("thead",[n("tr",[e.showDetailRowIcon?n("th",{attrs:{width:"40px"}}):e._e(),e.checkable&&"left"===e.checkboxPosition?n("th",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[e.headerCheckable?[e._t("check-all",[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isAllChecked,type:e.checkboxType,disabled:e.isAllUncheckable},nativeOn:{change:function(t){return e.checkAll(t)}}})],{isAllChecked:e.isAllChecked,isAllUncheckable:e.isAllUncheckable,checkAll:e.checkAll})]:e._e()],2):e._e(),e._l(e.visibleColumns,(function(t,r){return n("th",e._b({key:t.newKey+":"+r+"header",class:[t.thClasses,{"is-current-sort":!e.sortMultiple&&e.currentSortColumn===t}],style:t.thStyle,attrs:{draggable:e.canDragColumn},on:{click:function(n){return n.stopPropagation(),e.sort(t,null,n)},dragstart:function(n){return e.handleColumnDragStart(n,t,r)},dragend:function(n){return e.handleColumnDragEnd(n,t,r)},drop:function(n){return e.handleColumnDrop(n,t,r)},dragover:function(n){return e.handleColumnDragOver(n,t,r)},dragleave:function(n){return e.handleColumnDragLeave(n,t,r)}}},"th",t.thAttrs(t),!1),[n("div",{staticClass:"th-wrap",class:{"is-numeric":t.numeric,"is-centered":t.centered}},[t.$scopedSlots&&t.$scopedSlots.header?[n("b-slot-component",{attrs:{component:t,scoped:"",name:"header",tag:"span",props:{column:t,index:r}}})]:[n("span",{staticClass:"is-relative"},[e._v(" "+e._s(t.label)+" "),e.sortMultiple&&e.sortMultipleDataComputed&&e.sortMultipleDataComputed.length>0&&e.sortMultipleDataComputed.filter((function(i){return i.field===t.field})).length>0?[n("b-icon",{class:{"is-desc":"desc"===e.sortMultipleDataComputed.filter((function(i){return i.field===t.field}))[0].order},attrs:{icon:e.sortIcon,pack:e.iconPack,both:"",size:e.sortIconSize}}),e._v(" "+e._s(e.findIndexOfSortData(t))+" "),n("button",{staticClass:"delete is-small multi-sort-cancel-icon",attrs:{type:"button"},on:{click:function(n){return n.stopPropagation(),e.removeSortingPriority(t)}}})]:n("b-icon",{staticClass:"sort-icon",class:{"is-desc":!e.isAsc,"is-invisible":e.currentSortColumn!==t},attrs:{icon:e.sortIcon,pack:e.iconPack,both:"",size:e.sortIconSize}})],2)]],2)])})),e.checkable&&"right"===e.checkboxPosition?n("th",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[e.headerCheckable?[e._t("check-all",[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isAllChecked,type:e.checkboxType,disabled:e.isAllUncheckable},nativeOn:{change:function(t){return e.checkAll(t)}}})],{isAllChecked:e.isAllChecked,isAllUncheckable:e.isAllUncheckable,checkAll:e.checkAll})]:e._e()],2):e._e()],2),e.hasCustomSubheadings?n("tr",{staticClass:"is-subheading"},[e.showDetailRowIcon?n("th",{attrs:{width:"40px"}}):e._e(),e.checkable&&"left"===e.checkboxPosition?n("th"):e._e(),e._l(e.visibleColumns,(function(t,r){return n("th",{key:t.newKey+":"+r+"subheading",style:t.style},[n("div",{staticClass:"th-wrap",class:{"is-numeric":t.numeric,"is-centered":t.centered}},[t.$scopedSlots&&t.$scopedSlots.subheading?[n("b-slot-component",{attrs:{component:t,scoped:"",name:"subheading",tag:"span",props:{column:t,index:r}}})]:[e._v(e._s(t.subheading))]],2)])})),e.checkable&&"right"===e.checkboxPosition?n("th"):e._e()],2):e._e(),e.hasSearchablenewColumns?n("tr",[e.showDetailRowIcon?n("th",{attrs:{width:"40px"}}):e._e(),e.checkable&&"left"===e.checkboxPosition?n("th"):e._e(),e._l(e.visibleColumns,(function(t,r){return n("th",e._b({key:t.newKey+":"+r+"searchable",class:{"is-sticky":t.sticky},style:t.thStyle},"th",t.thAttrs(t),!1),[n("div",{staticClass:"th-wrap"},[t.searchable?[t.$scopedSlots&&t.$scopedSlots.searchable?[n("b-slot-component",{attrs:{component:t,scoped:!0,name:"searchable",tag:"span",props:{column:t,filters:e.filters}}})]:n("b-input",{attrs:{type:t.numeric?"number":"text"},nativeOn:e._d({},[e.filtersEvent,function(t){return e.onFiltersEvent(t)}]),model:{value:e.filters[t.field],callback:function(n){e.$set(e.filters,t.field,n)},expression:"filters[column.field]"}})]:e._e()],2)])})),e.checkable&&"right"===e.checkboxPosition?n("th"):e._e()],2):e._e()]):e._e(),n("tbody",[e._l(e.visibleData,(function(t,r){return[n("tr",{key:e.customRowKey?t[e.customRowKey]:r,class:[e.rowClass(t,r),{"is-selected":e.isRowSelected(t,e.selected),"is-checked":e.isRowChecked(t)}],attrs:{draggable:e.canDragRow},on:{click:function(n){return e.selectRow(t)},dblclick:function(n){return e.$emit("dblclick",t)},mouseenter:function(n){return e.emitEventForRow("mouseenter",n,t)},mouseleave:function(n){return e.emitEventForRow("mouseleave",n,t)},contextmenu:function(n){return e.$emit("contextmenu",t,n)},dragstart:function(n){return e.handleDragStart(n,t,r)},dragend:function(n){return e.handleDragEnd(n,t,r)},drop:function(n){return e.handleDrop(n,t,r)},dragover:function(n){return e.handleDragOver(n,t,r)},dragleave:function(n){return e.handleDragLeave(n,t,r)}}},[e.showDetailRowIcon?n("td",{staticClass:"chevron-cell"},[e.hasDetailedVisible(t)?n("a",{attrs:{role:"button"},on:{click:function(n){return n.stopPropagation(),e.toggleDetails(t)}}},[n("b-icon",{class:{"is-expanded":e.isVisibleDetailRow(t)},attrs:{icon:e.detailIcon,pack:e.iconPack,both:""}})],1):e._e()]):e._e(),e.checkable&&"left"===e.checkboxPosition?n("td",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isRowChecked(t),type:e.checkboxType,disabled:!e.isRowCheckable(t)},nativeOn:{click:function(n){return n.preventDefault(),n.stopPropagation(),e.checkRow(t,r,n)}}})],1):e._e(),e._l(e.visibleColumns,(function(o,l){return[o.$scopedSlots&&o.$scopedSlots.default?[n("b-slot-component",e._b({key:o.newKey+":"+r+":"+l,class:o.getRootClasses(t),style:o.getRootStyle(t),attrs:{component:o,scoped:"",name:"default",tag:"td","data-label":o.label,props:{row:t,column:o,index:r,colindex:l,toggleDetails:e.toggleDetails}},nativeOn:{click:function(n){return e.$emit("cellclick",t,o,r,l)}}},"b-slot-component",o.tdAttrs(t,o),!1))]:e._e()]})),e.checkable&&"right"===e.checkboxPosition?n("td",{class:["checkbox-cell",{"is-sticky":e.stickyCheckbox}]},[n("b-checkbox",{attrs:{autocomplete:"off",value:e.isRowChecked(t),type:e.checkboxType,disabled:!e.isRowCheckable(t)},nativeOn:{click:function(n){return n.preventDefault(),n.stopPropagation(),e.checkRow(t,r,n)}}})],1):e._e()],2),n("transition",{key:(e.customRowKey?t[e.customRowKey]:r)+"detail",attrs:{name:e.detailTransition}},[e.isActiveDetailRow(t)?n("tr",{staticClass:"detail"},[n("td",{attrs:{colspan:e.columnCount}},[n("div",{staticClass:"detail-container"},[e._t("detail",null,{row:t,index:r})],2)])]):e._e()]),e.isActiveCustomDetailRow(t)?e._t("detail",null,{row:t,index:r}):e._e()]})),e.visibleData.length?e._e():n("tr",{staticClass:"is-empty"},[n("td",{attrs:{colspan:e.columnCount}},[e._t("empty")],2)])],2),void 0!==e.$slots.footer?n("tfoot",[n("tr",{staticClass:"table-footer"},[e.hasCustomFooterSlot()?e._t("footer"):n("th",{attrs:{colspan:e.columnCount}},[e._t("footer")],2)],2)]):e._e()]),e.loading?[e._t("loading",[n("b-loading",{attrs:{"is-full-page":!1,active:e.loading},on:{"update:active":function(t){e.loading=t}}})])]:e._e()],2),e.checkable&&e.hasBottomLeftSlot()||e.paginated&&("bottom"===e.paginationPosition||"both"===e.paginationPosition)?[e._t("pagination",[n("b-table-pagination",e._b({attrs:{"per-page":e.perPage,paginated:e.paginated,rounded:e.paginationRounded,"icon-pack":e.iconPack,total:e.newDataTotal,"current-page":e.newCurrentPage,"aria-next-label":e.ariaNextLabel,"aria-previous-label":e.ariaPreviousLabel,"aria-page-label":e.ariaPageLabel,"aria-current-label":e.ariaCurrentLabel,"page-input":e.pageInput,"pagination-order":e.paginationOrder,"page-input-position":e.pageInputPosition,"debounce-page-input":e.debouncePageInput},on:{"update:currentPage":function(t){e.newCurrentPage=t},"update:current-page":function(t){e.newCurrentPage=t},"page-change":function(t){return e.$emit("page-change",t)}}},"b-table-pagination",e.$attrs,!1),[e._t("bottom-left")],2)])]:e._e()],2)},staticRenderFns:[]},undefined,ts,undefined,!1,undefined,void 0,void 0),is={install:function(e){void 0===Yt&&Gt(e),Jt(e,ns),Jt(e,Jr)}};use(is);var table=is;var as=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"b-tabs",class:e.mainClasses},[n("nav",{staticClass:"tabs",class:e.navClasses,on:{keydown:e.manageTablistKeydown}},[e._t("start"),n("ul",{attrs:{"aria-orientation":e.vertical?"vertical":"horizontal",role:"tablist"}},e._l(e.items,(function(t,r){return n("li",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"childItem.visible"}],key:t.value,class:[t.headerClass,{"is-active":t.isActive,"is-disabled":t.disabled}],attrs:{role:"tab","aria-controls":t.value+"-content","aria-selected":""+t.isActive}},[t.$scopedSlots.header?n("b-slot-component",{ref:"tabLink",refInFor:!0,attrs:{component:t,name:"header",tag:"a",id:t.value+"-label",tabindex:t.isActive?0:-1},on:{keydown:function(n){return e.manageTabKeydown(n,t)}},nativeOn:{focus:function(t){e.currentFocus=r},click:function(n){return e.childClick(t)}}}):n("a",{ref:"tabLink",refInFor:!0,attrs:{id:t.value+"-label",tabindex:t.isActive?0:-1},on:{focus:function(t){e.currentFocus=r},click:function(n){return e.childClick(t)},keydown:function(n){return e.manageTabKeydown(n,t)}}},[t.icon?n("b-icon",{attrs:{icon:t.icon,pack:t.iconPack,size:e.size}}):e._e(),n("span",[e._v(e._s(t.label))])],1)],1)})),0),e._t("end")],2),n("section",{staticClass:"tab-content",class:{"is-transitioning":e.isTransitioning}},[e._t("default")],2)])},staticRenderFns:[]},undefined,{name:"BTabs",mixins:[Hr("tab")],props:{expanded:{type:Boolean,default:function(){return Kt.defaultTabsExpanded}},type:{type:[String,Object],default:function(){return Kt.defaultTabsType}},animated:{type:Boolean,default:function(){return Kt.defaultTabsAnimated}},multiline:Boolean},data:function(){return{currentFocus:this.value}},computed:{mainClasses:function(){return ft({"is-fullwidth":this.expanded,"is-vertical":this.vertical,"is-multiline":this.multiline},this.position,this.position&&this.vertical)},navClasses:function(){var e;return[this.type,this.size,(e={},ft(e,this.position,this.position&&!this.vertical),ft(e,"is-fullwidth",this.expanded),ft(e,"is-toggle","is-toggle-rounded"===this.type),e)]}},methods:{giveFocusToTab:function(e){e.$el&&e.$el.focus?e.$el.focus():e.focus&&e.focus()},manageTablistKeydown:function(e){switch(e.key){case this.vertical?"ArrowUp":"ArrowLeft":case this.vertical?"Up":"Left":var t=this.getPrevItemIdx(this.currentFocus,!0);null===t&&(t=this.getPrevItemIdx(this.items.length,!0)),null!==t&&this.$refs.tabLink&&t0?[e._v(" "+e._s(e.valueLength)+" / "+e._s(e.maxlength)+" ")]:e.maxtags?[e._v(" "+e._s(e.tagsLength)+" / "+e._s(e.maxtags)+" ")]:e._e()],2):e._e()])},staticRenderFns:[]},undefined,{name:"BTaginput",components:(ds={},ft(ds,on.name,on),ft(ds,ls.name,ls),ds),mixins:[en],inheritAttrs:!1,props:{value:{type:Array,default:function(){return[]}},data:{type:Array,default:function(){return[]}},type:String,closeType:String,rounded:{type:Boolean,default:!1},attached:{type:Boolean,default:!1},maxtags:{type:[Number,String],required:!1},hasCounter:{type:Boolean,default:function(){return Kt.defaultTaginputHasCounter}},field:{type:String,default:"value"},autocomplete:Boolean,groupField:String,groupOptions:String,nativeAutocomplete:String,openOnFocus:Boolean,keepOpen:{type:Boolean,default:!0},keepFirst:Boolean,disabled:Boolean,ellipsis:Boolean,closable:{type:Boolean,default:!0},ariaCloseLabel:String,confirmKeys:{type:Array,default:function(){return[",","Tab","Enter"]}},removeOnKeys:{type:Array,default:function(){return["Backspace"]}},allowNew:Boolean,onPasteSeparators:{type:Array,default:function(){return[","]}},beforeAdding:{type:Function,default:function(){return!0}},allowDuplicates:{type:Boolean,default:!1},checkInfiniteScroll:{type:Boolean,default:!1},createTag:{type:Function,default:function(e){return e}},appendToBody:Boolean},data:function(){return{tags:Array.isArray(this.value)?this.value.slice(0):this.value||[],newTag:"",isComposing:!1,_elementRef:"autocomplete",_isTaginput:!0}},computed:{listeners:function(){var e=this.$listeners,t=(e.input,wt(e,["input"]));return t},rootClasses:function(){return{"is-expanded":this.expanded}},containerClasses:function(){return{"is-focused":this.isFocused,"is-focusable":this.hasInput}},valueLength:function(){return this.newTag.trim().length},hasDefaultSlot:function(){return!!this.$scopedSlots.default},hasEmptySlot:function(){return!!this.$slots.empty},hasHeaderSlot:function(){return!!this.$slots.header},hasFooterSlot:function(){return!!this.$slots.footer},hasInput:function(){return null==this.maxtags||1===this.maxtags||this.tagsLength0&&this.removeTag(this.tagsLength-1)},keydown:function(e){var t=e.key;if(-1===this.removeOnKeys.indexOf(t)||this.newTag.length||this.removeLastTag(),(!this.autocomplete||this.allowNew)&&this.confirmKeys.indexOf(t)>=0){if("Tab"!==t&&e.preventDefault(),"Enter"===t&&this.isComposing)return;this.addTag()}},onTyping:function(e){this.$emit("typing",e.trim())},emitInfiniteScroll:function(){this.$emit("infinite-scroll")}}},undefined,!1,undefined,void 0,void 0),ps={install:function(e){Jt(e,fs)}};use(ps);var ms=ps,vs={install:function(e){Jt(e,Ii)}};use(vs);var gs=vs;var bs,ys=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{"enter-active-class":e.transition.enter,"leave-active-class":e.transition.leave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"toast",class:[e.type,e.position],attrs:{"aria-hidden":!e.isActive,role:"alert"},on:{mouseenter:e.pause,mouseleave:e.removePause}},[e.$slots.default?[e._t("default")]:[n("div",{domProps:{innerHTML:e._s(e.message)}})]],2)])},staticRenderFns:[]},undefined,{name:"BToast",mixins:[_a],data:function(){return{newDuration:this.duration||Kt.defaultToastDuration}}},undefined,!1,undefined,void 0,void 0),ws={open:function(e){var t;"string"==typeof e&&(e={message:e});var slot,n={position:Kt.defaultToastPosition||"is-top"};e.parent&&(t=e.parent,delete e.parent),Array.isArray(e.message)&&(slot=e.message,delete e.message);var r=It(n,e),component=new(("undefined"!=typeof window&&window.Vue?window.Vue:bs||Yt).extend(ys))({parent:t,el:document.createElement("div"),propsData:r});return slot&&(component.$slots.default=slot,component.$forceUpdate()),component}},ks={install:function(e){bs=e,Zt(e,"toast",ws)}};use(ks);var Ss=ks,xs={install:function(e){Jt(e,ii)}};use(xs);var Cs=xs;var Ds=Qt({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("label",{staticClass:"upload control",class:{"is-expanded":e.expanded,"is-rounded":e.rounded}},[e.dragDrop?n("div",{staticClass:"upload-draggable",class:[e.type,{"is-loading":e.loading,"is-disabled":e.disabled,"is-hovered":e.dragDropFocus,"is-expanded":e.expanded}],on:{dragover:function(t){return t.preventDefault(),e.updateDragDropFocus(!0)},dragleave:function(t){return t.preventDefault(),e.updateDragDropFocus(!1)},dragenter:function(t){return t.preventDefault(),e.updateDragDropFocus(!0)},drop:function(t){return t.preventDefault(),e.onFileChange(t)}}},[e._t("default")],2):[e._t("default")],n("input",e._b({ref:"input",attrs:{type:"file",multiple:e.multiple,accept:e.accept,disabled:e.disabled},on:{change:e.onFileChange}},"input",e.$attrs,!1))],2)},staticRenderFns:[]},undefined,{name:"BUpload",mixins:[en],inheritAttrs:!1,props:{value:{type:[Object,Function,sa,Array]},multiple:Boolean,disabled:Boolean,accept:String,dragDrop:Boolean,type:{type:String,default:"is-primary"},native:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1}},data:function(){return{newValue:this.value,dragDropFocus:!1,_elementRef:"input"}},watch:{value:function(e){this.newValue=e,(!e||Array.isArray(e)&&0===e.length)&&(this.$refs.input.value=null),!this.isValid&&!this.dragDrop&&this.checkHtml5Validity()}},methods:{onFileChange:function(e){if(!this.disabled&&!this.loading){this.dragDrop&&this.updateDragDropFocus(!1);var t=e.target.files||e.dataTransfer.files;if(0===t.length){if(!this.newValue)return;this.native&&(this.newValue=null)}else if(this.multiple){var n=!1;!this.native&&this.newValue||(this.newValue=[],n=!0);for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:{};for(var n in Gt(e),Xt(It(Kt,t,!0)),Ms)e.use(Ms[n]);Zt(e,"config",Ps),e.prototype.$buefy.globalNoticeInterval=null}};use(Os);var As=Os;c.a.use(As,{css:!1,materialDesignIcons:!0,materialDesignIconsHRef:"https://cdn.jsdelivr.net/npm/@mdi/font/css/materialdesignicons.min.css",async:!1,defaultTooltipType:"is-dark",defaultTooltipDelay:20});function Ts(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function Bs(e){for(var i=1;i has been deprecated and will be removed in Nuxt 3, please use instead")),v.a.render(e,t)}})),c.a.component($.name,$),c.a.component("NChild",$),c.a.component(T.name,T),Object.defineProperty(c.a.prototype,"$nuxt",{get:function(){var e=this.$root?this.$root.$options.$nuxt:null;return e||"undefined"==typeof window?e:window.$nuxt},configurable:!0}),c.a.use(d.a,{keyName:"head",attribute:"data-n-head",ssrAttribute:"data-n-head-ssr",tagIDKeyName:"hid"});var Fs={name:"page",mode:"out-in",appear:!0,appearClass:"appear",appearActiveClass:"appear-active",appearToClass:"appear-to"};function Is(e){return Ns.apply(this,arguments)}function Ns(){return Ns=Object(o.a)(regeneratorRuntime.mark((function e(t){var n,r,l,d,h,path,f,m=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f=function(e,t){if(!e)throw new Error("inject(key, value) has no key provided");if(void 0===t)throw new Error("inject('".concat(e,"', value) has no value provided"));l[e="$"+e]=t,l.context[e]||(l.context[e]=t);var n="__nuxt_"+e+"_installed__";c.a[n]||(c.a[n]=!0,c.a.use((function(){Object.prototype.hasOwnProperty.call(c.a.prototype,e)||Object.defineProperty(c.a.prototype,e,{get:function(){return this.$root.$options[e]}})})))},n=m.length>1&&void 0!==m[1]?m[1]:{},null,e.next=5,_(0,n);case 5:return r=e.sent,l=Bs({head:{title:"shogi-player",titleTemplate:"%s - shogi-player",htmlAttrs:{lang:"ja",prefix:"og: http://ogp.me/ns#",class:"NODE_ENV-production STAGE-production"},meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{hid:"description",name:"description",content:"将棋の棋譜再生・対局・盤面編集等が可能なVue.js用将棋盤コンポーネント"},{hid:"og:site_name",property:"og:site_name",content:"shogi-player"},{hid:"og:type",property:"og:type",content:"website"},{hid:"og:url",property:"og:url",content:"https://akicho8.github.io/shogi-player"},{hid:"og:title",property:"og:title",content:"shogi-player"},{hid:"og:description",property:"og:description",content:"将棋の棋譜再生・対局・盤面編集等が可能なVue.js用将棋盤コンポーネント"},{hid:"og:image",property:"og:image",content:"https://akicho8.github.io/shogi-player/ogp/application.png"},{hid:"twitter:card",property:"twitter:card",content:"summary_large_image"},{hid:"twitter:site",property:"twitter:site",content:"@sgkinakomochi"},{hid:"twitter:creator",property:"twitter:creator",content:"@sgkinakomochi"}],link:[{hid:"icon",rel:"icon",type:"image/x-icon",href:"/favicon.ico"},{hid:"apple-touch-icon",rel:"apple-touch-icon",href:"/apple-touch-icon.png"},{type:"text/css",href:"https://cdn.jsdelivr.net/npm/@mdi/font/css/materialdesignicons.min.css",rel:"stylesheet"}],style:[],script:[]},router:r,nuxt:{defaultTransition:Fs,transitions:[Fs],setTransitions:function(e){return Array.isArray(e)||(e=[e]),e=e.map((function(e){return e=e?"string"==typeof e?Object.assign({},Fs,{name:e}):Object.assign({},Fs,e):Fs})),this.$options.nuxt.transitions=e,e},err:null,dateErr:null,error:function(e){e=e||null,l.context._errored=Boolean(e),e=e?Object(k.p)(e):null;var n=l.nuxt;return this&&(n=this.nuxt||this.$options.nuxt),n.dateErr=Date.now(),n.err=e,t&&(t.nuxt.error=e),e}}},R),d=t?t.next:function(e){return l.router.push(e)},t?h=r.resolve(t.url).route:(path=Object(k.f)(r.options.base,r.options.mode),h=r.resolve(path).route),e.next=11,Object(k.t)(l,{route:h,next:d,error:l.nuxt.error.bind(l),payload:t?t.payload:void 0,req:t?t.req:void 0,res:t?t.res:void 0,beforeRenderFns:t?t.beforeRenderFns:void 0,beforeSerializeFns:t?t.beforeSerializeFns:void 0,ssrContext:t});case 11:f("config",n),l.context.enablePreview=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.previewData=Object.assign({},e),f("preview",e)},e.next=16;break;case 16:if("function"!=typeof lt){e.next=19;break}return e.next=19,lt(l.context,f);case 19:e.next=22;break;case 22:e.next=25;break;case 25:e.next=28;break;case 28:return l.context.enablePreview=function(){console.warn("You cannot call enablePreview() outside a plugin.")},e.next=31,new Promise((function(e,t){if(!r.resolve(l.context.route.fullPath).route.matched.length)return e();r.replace(l.context.route.fullPath,e,(function(n){if(!n._isRouter)return t(n);if(2!==n.type)return e();var c=r.afterEach(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Object(k.j)(n);case 3:l.context.route=t.sent,l.context.params=n.params||{},l.context.query=n.query||{},c(),e();case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())}))}));case 31:return e.abrupt("return",{app:l,router:r});case 32:case"end":return e.stop()}}),e)}))),Ns.apply(this,arguments)}},70:function(e,t,n){"use strict";var r={name:"NoSsr",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,l=r(),c=l.default;void 0===c&&(c=[]);var d=l.placeholder;return n._isMounted?c:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["no-ssr-placeholder"]},o.placeholder||d):c.length>0?c.map((function(){return e(!1)})):e(!1))}};e.exports=r}},[[357,72,7,0]]]); \ No newline at end of file diff --git a/docs/_nuxt/3989f40.js b/docs/_nuxt/3989f40.js deleted file mode 100644 index 39a073a3..00000000 --- a/docs/_nuxt/3989f40.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see LICENSES */ -(window.webpackJsonp=window.webpackJsonp||[]).push([[34,4,5,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,62,63,64,65,66,67,68,69,70,71],{1:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={inject:["TheSp"]}},100:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"none",name:"none"},{key:"wood_normal",name:"普通の木目"},{key:"wood_bright",name:"明るい木目"}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("wood_normal").key),console.log(d.fetch("wood_normal").name))}).call(this,t(179),"/index.js")},101:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"none",name:"none",format:""},{key:"nureyon",name:"ぬれよん",format:"SVG"},{key:"paper",name:"紙面風",format:"SVG"},{key:"zuan",name:"図案駒",format:"PNG"},{key:"portella",name:"Portella",format:"PNG"}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("a").key),console.log(d.fetch("a").name))}).call(this,t(179),"/index.js")},127:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return h}));var o=t(21),c=t(177),l=t(178),_=(t(11),t(45),t(98),t(530),t(57),t(74),t(543),t(23),t(180)),f=t(532),h=function(){function n(e){var t,r;if(Object(c.a)(this,n),"string"==typeof e){var l=this.__parse_from_string(e),_=Object(o.a)(l,2);t=_[0],r=_[1]}else{var f=Object(o.a)(e,2);t=f[0],r=f[1]}var h=[t,r];this._x=h[0],this._y=h[1]}return Object(l.a)(n,[{key:"key",get:function(){return[this._x,this._y].toString()}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"to_a",get:function(){return[this.x,this.y]}},{key:"to_h",get:function(){return{x:this.x,y:this.y}}},{key:"human_x",get:function(){return _.a.dimension-this._x}},{key:"kanji_human_x",get:function(){return n.TO_KANJI_REPLACE_TABLE_X[this.human_x]}},{key:"kanji_human_y",get:function(){return n.TO_KANJI_REPLACE_TABLE_Y[this.human_y]}},{key:"yomiage_x",get:function(){return f.a.fetch(this.human_x.toString()).yomiage}},{key:"yomiage_y",get:function(){return f.a.fetch(this.human_y.toString()).yomiage}},{key:"human_y",get:function(){return this._y+1}},{key:"flip_all",get:function(){return n.fetch([_.a.dimension-1-this._x,_.a.dimension-1-this._y])}},{key:"flop",get:function(){return n.fetch([_.a.dimension-1-this._x,this._y])}},{key:"flop_if",value:function(n){return n?this.flop:this}},{key:"sp_flip_if_white",value:function(n){return"white"===n.key?this.flip_all:this}},{key:"to_sfen",get:function(){return[_.a.dimension-this._x,n.TO_SFEN_REPLACE_TABLE_Y[this._y]].join("")}},{key:"css_place_key",get:function(){return["place",this.human_x,this.human_y].join("_")}},{key:"human_xy_ary",get:function(){return[this.human_x,this.human_y]}},{key:"kanji_human",get:function(){return[this.kanji_human_x,this.kanji_human_y].join("")}},{key:"digit_human",get:function(){return[this.human_x,this.human_y].join("")}},{key:"even_p",get:function(){return 0==(this.human_x+this.human_y&1)}},{key:"odd_p",get:function(){return!this.even_p}},{key:"tennozan_p",get:function(){return this.x===Math.trunc(_.a.dimension/2)&&this.y===Math.trunc(_.a.dimension/2)}},{key:"rotate_add",value:function(e,t){var r=this.__new_pos(this._x,e),o=this.__new_pos(this._y,t);return n.fetch([r,o])}},{key:"__new_pos",value:function(n,e){return Math.trunc((n+e+_.a.dimension)%_.a.dimension)}},{key:"__parse_from_string",value:function(s){var e=s.split("").map((function(e){var t;return Number(null!==(t=n.ANY_TO_NUMBER_REPLACE_TABLE[e])&&void 0!==t?t:e)})),t=Object(o.a)(e,2),r=t[0],c=t[1];return[_.a.dimension-r,c-1]}}],[{key:"fetch",value:function(e){return e instanceof this?e:Object.freeze(new n(e))}},{key:"xy_valid_p",value:function(n,e){return 0<=n&&n<_.a.dimension&&0<=e&&e<_.a.dimension}},{key:"xy_invalid_p",value:function(n,e){return!this.xy_valid_p(n,e)}}]),n}();h.ANY_TO_NUMBER_REPLACE_TABLE={"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,"一":1,"二":2,"三":3,"四":4,"五":5,"六":6,"七":7,"八":8,"九":9,a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:8,i:9},h.TO_KANJI_REPLACE_TABLE_X={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},h.TO_KANJI_REPLACE_TABLE_Y={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七",8:"八",9:"九"},h.TO_SFEN_REPLACE_TABLE_Y=["a","b","c","d","e","f","g","h","i"],void 0!==n&&n.argv[1]===r&&(console.log(h.fetch("6a").key),console.log(h.fetch([1,2]).key))}).call(this,t(179),"/index.js")},128:function(n,e,t){"use strict";t.d(e,"a",(function(){return j}));var r=t(21),o=t(177),c=t(178),l=(t(37),t(12),t(74),t(51),t(317),t(57),t(36),t(11),t(31),t(22),t(23)),_=t.n(l),f=t(2),h=t(180),d=t(127),y=t(522),v=t(521),m=t(314),k=t(537),w=t(524),O=t(71),x=t(570),j=function(){function n(){Object(o.a)(this,n);var e=new m.a;e.raw_body="position startpos",e.parse(),this.data_source=e,this.current_turn=0,this.board=null,this.hold_pieces=null,this.last_hand=null,this.piece_box={},this.env="production"}return Object(c.a)(n,[{key:"run",value:function(){var n=this;this.board=this.data_source.board,this.hold_pieces=this.data_source.hold_pieces,this.last_hand=null;var e=this.data_source.move_infos,t=this.turn_offset-this.turn_offset_min;_()(t).times((function(i){n.execute_one(e[i])}))}},{key:"execute_one",value:function(n){if(this.last_hand=n,n.drop_piece){var e=new v.a({piece:n.drop_piece,place:n.place,promoted:n.promoted,location:n.location});this.hold_pieces_add(n.location,e.piece,-1),this.board.place_on(e)}else{var t=this.board.lookup(n.place);t&&this.hold_pieces_add(n.location,t.piece,1);var r=this.board.lookup(n.origin_place);n.promoted_trigger&&(r.promoted=!0),r.place=n.place,this.board.delete_at(n.origin_place),this.board.place_on(r)}}},{key:"hold_pieces_count",value:function(n,e){return this.hold_pieces[n.key][e.key]||0}},{key:"hold_pieces_blank_p",value:function(n){return 0===Object.keys(this.hold_pieces[n.key]).length}},{key:"hold_pieces_add",value:function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.hold_pieces_count(n,e)+t,o=this.hold_pieces[n.key];f.a.delete(o,e.key),r>=1&&f.a.set(o,e.key,r)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var r=this.hold_pieces_count(n,e);return t>r&&(t=r),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r=[];return t&&r.push("location_".concat(t.location.key)),r}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r="";return t&&(r=t.name),r}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return _.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return _()(e).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return _()(n).filter((function(n){var e=Object(r.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;_.a.forIn(this.hold_pieces[n.key],(function(t,r){var o=y.a.fetch(r);e.hold_pieces_add(n,o,-t),e.piece_box_add(o,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;_.a.forIn(this.piece_box,(function(t,r){var o=y.a.fetch(r);e.piece_box_add(o,-t),e.hold_pieces_add(n,o,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),w.a.fetch(n).piece_box.forEach((function(n){var t=Object(r.a)(n,2),o=t[0],c=t[1];e.piece_box_add(y.a.fetch(o),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;w.a.fetch("全部駒箱").piece_box.forEach((function(o){var c=Object(r.a)(o,2),l=c[0],_=c[1],f=y.a.fetch(l),h=_-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return O.a.values.forEach((function(t){_.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var r=t.piece;e.board.delete_at(t.place),"K"===r.key?e.piece_box_add(r):e.hold_pieces_add(O.a.fetch("white"),r)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=O.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,r=null,o=null;return"bottom_left"===n&&(e=0,t=1,r=h.a.dimension-1,o=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,r=h.a.dimension-1,o=-1),[{piece:"K",promoted:!1,location:"black",place:[e,r]},{piece:"P",promoted:!0,location:"white",place:[e,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:O.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return U}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),w=t(549),O=t(550),x=t(551),j=t(552),P=t(553),R=t(554),N=t(555),E=t(556),B=t(557),S=t(558),L=t(559),M=t(560),A=t(561),$=t(562),z=t(563),K=t(564),D=t(565),G=t(566),I=t(567),T=t(568),F=t(569);function C(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var U=function(n){Object(l.a)(t,n);var e=C(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:O.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:N.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:L.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:M.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:z.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:T.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:F.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&(console.log(U.fetch("simple").key),console.log(U.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var o=t(20),c=t(177),l=t(178),_=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(_),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(l.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var r=!1,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,r=!1,o=n.once_vectors;return o&&(r=o.some((function(r){if(r)return t.once_reach_vec(n,e,r)}))),r}},{key:"once_reach_vec",value:function(n,e,t){var r=t[0],o=t[1]*n.location.value_sign,c=n.place.x+r,l=n.place.y+o;return c===e.x&&l===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!1,c=n.repeat_vectors;return c&&(o=c.some((function(o){if(o)return t.repeat_reach_vec(n,e,o,r)}))),o}},{key:"repeat_reach_vec",value:function(n,e,t){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.place.x,c=n.place.y,l=t[0],_=t[1]*n.location.value_sign,f=o+l,h=c+_,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==r.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(o+=c,c=0),l.promoted&&(o+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),o+=_}})),c>=1&&(o+=c),t.push(o)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===r&&console.log(m.dimension)}).call(this,t(179),"/index.js")},187:function(n,e,t){"use strict";t.d(e,"a",(function(){return m}));t(517),t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(11),t(22),t(520));function d(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function y(n){for(var i=1;i\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new w.a;return this.attributes.board.split("/").forEach((function(t,r){var o=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))o+=Number(t.piece);else{var c=new P.a({place:new j.a([o,r]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),o++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var r=x.a.fetch(t.piece_char),o=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);o+=e[c.key][r.key]||0,v.a.set(e[c.key],r.key,o)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var r=N.a.parse(t);if(!r)return!1;r.location=n.location_by_offset(i),e.push(r)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(O.a);void 0!==n&&n.argv[1]===r&&(B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B),B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return v}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var v=function(n){Object(l.a)(t,n);var e=y(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return L}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),w=t(180),O=t(522),x=t(127),j=t(71),P=t(314),R=t(524),N=t(521),E=t(538);function B(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),L=function(n){Object(_.a)(t,n);var e=B(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(l.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?j.a.fetch(this.preset_info.first_location_key):j.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,S);if(t)if(t.key){var r=t.value.trim();if(n.header[t.key]=r,t.key.match(/手の持駒/))if("なし"===r);else{var s=E.a.kanji_to_number_string(r);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,r){var o=O.a.lookup_by_name(e.piece_char),c=Number(e.count||1),l=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[l][o.key]||0,n.hold_pieces[l][o.key]=c}))}}else if(t.comment){var o,c,i=n.move_infos.length;null!==(c=(o=n.comment_lines_hash)[i])&&void 0!==c||(o[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=j.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=j.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var l={};l.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(l.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(l.place=x.a.fetch(t.to),e=l.place):(m()(t.same),m()(e),l.place=e),"成"===t.motion&&(l.promoted_trigger=!0),"打"===t.motion&&(l.drop_piece=O.a.lookup_by_name(t.piece)),n.move_infos.push(l)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new w.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,r){if("・"===e.piece);else{var o="v"===e.arrow?"white":"black",c=O.a.lookup_by_name(e.piece),l=!1;c||(c=O.a.lookup_by_promoted_name(e.piece),m()(c),l=!0);var _=new N.a({place:new x.a([r,t]),piece:c,promoted:l,location:j.a.fetch(o)});n.place_on(_)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===r){var M=new L;M.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",M.parse(),console.log(M.move_infos),console.log(M.comment_lines_hash),console.log(void 0===M.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(23),t(71);var r=t(571),o={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(r.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var r=t(23),o=t.n(r),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!o.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(72),t(73),t(11),t(22);var r=t(71),o={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return r.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=r.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var r=t(523),o=(t(11),t(22),t(71)),c=t(127);function l(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return _(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){l=!0,o=n},f:function(){try{c||null==t.return||t.return()}finally{if(l)throw o}}}}function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&o){var w=!0;if(this.sp_piece_auto_promote){var O=r.piece.piece_vector.force_promote_length;null!=O&&r.top_spaces<=O&&(this.promotable_piece_moved(r,!0),w=!1)}w&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=r,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:r,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(r),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new l.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=_.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var r=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&r&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(r.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,r){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(r,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),o=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=o.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=l(l({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(o),l=t(128),_=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(r.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return _.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var r=t(128),o=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return o.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=o.a.fetch(n),this.xcontainer=new r.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return o.a.values},init_preset_sfen:function(){if(this.sp_preset)return o.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(180),o=t(521),c=t(128),l={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(r.a.dimension)},api_random_puton:function(){var n=o.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20);function o(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(523),o=(t(11),t(51),t(23)),c=t.n(o),l={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o0&&r>0){var o=this[n.attr_w],c=this[n.attr_h],l=Math.abs(o-t),_=Math.abs(c-r),f=l>n.threshold||_>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=r),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(o,"x").concat(c," -> ").concat(t,"x").concat(r," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(51),t(11),t(517),t(177)),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),o=this.lp_el_create(["PieceTexture"].concat(Object(r.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(o),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,l=d.fetch(c);if(n.place){var _=this.place_to_cell_info(n.place),f=this.vector_scale(_.radius,this.devise_info.gap*l.sign*-1),h=this.vector_add(_.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(r.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},348:function(n,e,t){"use strict";const r=["red","green","blue","alpha"],o={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"};class c extends Error{constructor(){super("ColorTypeError: type must be hex(a), rgb(a) or hsl(a)")}}class l{constructor(...n){if(n.length>0)return l.parse(...n);this.$channels=new Uint8Array(r.length),r.forEach(((n,e)=>{Object.defineProperty(this,n,{get:()=>this.$channels[e],set:n=>{Number.isNaN(n/1)||(this.$channels[e]=Math.min(255,Math.max(0,n)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((n=>{const e=n.replace(/^./,(n=>n.toUpperCase()));Object.defineProperty(this,n,{get:()=>this[`get${e}`](),set:n=>{Number.isNaN(n/1)||this[`set${e}`](n)},enumerable:!0,configurable:!0})}))}getHue(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;let l=0;if(0===c)return l;for(l=n===o?(e-t)/c%6:e===o?(t-n)/c+2:(n-e)/c+4,l*=60;l!==-1/0&&l<0;)l+=360;return Math.round(l%360)}setHue(n){const e=l.fromHSL(n,this.saturation,this.lightness,this.alpha/255);for(let i=0;in/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;return 0!==c?Math.round(c/(1-Math.abs(2*this.lightness-1))*100)/100:0}setSaturation(n){const e=l.fromHSL(this.hue,n,this.lightness,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}getLightness(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)];return Math.round((o+r)/2*100)/100}setLightness(n){const e=l.fromHSL(this.hue,this.lightness,n,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}clone(){const n=new l;return r.forEach(((e,i)=>n.$channels[i]=this.$channels[i])),n}toString(n="hex"){switch(String(n).toLowerCase()){case"hex":return"#"+r.slice(0,3).map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"hexa":return"#"+r.map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${Math.round(this.alpha/2.55)/100})`;case"hsl":return`hsl(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%)`;case"hsla":return`hsla(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%, ${Math.round(this.alpha/2.55)/100})`;default:throw new c}}get[Symbol.toString](){return this.toString("hex")}static parse(...n){if("object"==typeof n[0])return l.parseObject(n[0]);if(n.every((n=>!Number.isNaN(n/1)))){const e=new l;if(n.length>3)e.red=n[0],e.green=n[1],e.blue=n[2],n[3]&&(e.alpha=n[3]);else if(1===n.length){const e=Number(n[0]);return l.parseIndex(e,e>2**24?3:4)}}else if("string"==typeof n[0]){let e=null;if("string"==typeof o[n[0].toLowerCase()])return l.parseHex(o[n[0].toLowerCase()]);if(null!==(e=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return l.parseHex(e[2]);if(null!==(e=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){const n=[e[1],e[2],e[3],void 0!==e[5]?e[5]:1];return l.fromRGB(...n.map((n=>Number(n))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}static parseObject(object){const n=new l;return null===object||"object"!=typeof object?n:l.isColor(object)?object.clone():(r.forEach((e=>{Number.isNaN(object[e])||(n[e]=object[e])})),n)}static parseHex(n){if("string"!=typeof n)throw new Error("Hex expression must be a string");if(3!==(n=n.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==n.length||(n=n.split("").map((n=>n.repeat(2))).join("")),6!==n.length&&8!==n.length)throw new Error("Incorrect Hex expression length");const e=n.split(/(..)/).filter((n=>n)).map((n=>Number.parseInt(n,16)));return"number"==typeof e[3]&&(e[3]/=255),l.fromRGB(...e)}static parseIndex(n,e=3){const t=new l;for(let i=0;i<4;i++)t[r[i]]=n>>8*(e-i)&&255;return t}static fromRGB(n,e,t,o=1){if([n,e,t,o].some((n=>Number.isNaN(n/1))))throw new Error("Invalid arguments");o*=255;const c=new l;return[n,e,t,o].forEach(((n,e)=>{c[r[e]]=n})),c}static fromHSL(n,e,t,r=1){if([n,e,t,r].some((n=>Number.isNaN(n))))throw new Error("Invalid arguments");for(;n<0&&n!==-1/0;)n+=360;n%=360,e=Math.max(0,Math.min(1,e)),t=Math.max(0,Math.min(1,t)),r=Math.max(0,Math.min(1,r));const o=(1-Math.abs(2*t-1))*e,c=o*(1-Math.abs(n/60%2-1)),_=t-o/2,[f,g,b]=n<60?[o,c,0]:n<120?[c,o,0]:n<180?[0,o,c]:n<240?[0,c,o]:n<300?[c,0,o]:[o,0,c];return l.fromRGB(255*(f+_),255*(g+_),255*(b+_),r)}static isColor(n){return n instanceof l}}e.a=l},351:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(517);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(11),t(31),t(22),t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){var n,e;return[(n={key:"default"},Object(r.a)(n,"key","初期値"),Object(r.a)(n,"func",(function(n){n.SeVariableInfo.values.forEach((function(e){n.$data[e.key]=e.default})),n.data_init()})),n),(e={key:"paper"},Object(r.a)(e,"key","紙面風"),Object(r.a)(e,"func",(function(n){n.se_ws_color="rgb(255,255,255)",n.sp_piece_variant="paper",n.sp_board_radius=0,n.sp_board_padding=0,n.sp_board_color="rgb(255,255,255)",n.sp_board_even_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_board_odd_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_grid_inner_stroke=1,n.sp_grid_outer_stroke=2,n.sp_board_edge_stroke=0,n.sp_stand_gravity="top",n.sp_stand_flip=!1,n.sp_name_direction="vertical",n.sp_balloon=!1,n.sp_location_mark_active_size=1,n.sp_location_mark_inactive_size=1,n.sp_player_info.black.name="先手",n.sp_player_info.white.name="後手",n.sp_coordinate=!0,n.sp_coordinate_variant_v="kanji",n.sp_board_horizontal_gap=.2,n.sp_coordinate_x_push=.05,n.sp_coordinate_y_push=.01,n.user_custom_css=""})),e)]}}]),t}(t(520).a)},352:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"基本"},{key:"背景"},{key:"盤テクスチャ"},{key:"盤のセル"},{key:"盤"},{key:"盤グリッド"},{key:"駒"},{key:"駒台"},{key:"対局者名"},{key:"駒数"},{key:"駒箱"},{key:"成り不成り選択"},{key:"駒を操作中の移動元スタイル"},{key:"座標"},{key:"Transform"},{key:"コントローラー&スライダー"},{key:"その他"},{key:"棋譜"},{key:"カスタムCSS"},{key:"コンポーネント引数確認"},{key:"CSS変数確認"}]}}]),t}(t(520).a)},353:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(43),t(44);var r=t(20),o=(t(11),t(31),t(22),t(531));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(w(w({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var r=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:r,place:n,promoted:r.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===r){var x=new O({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return k}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(_.a)(t,n);var e=m(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(l.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===r&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return h}));var o=t(177),c=t(178),l=(t(11),t(22),t(23)),_=t.n(l),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(o.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return _.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var r=t(20),o=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(r)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=l.a.exec(n,l()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return y}));var o=t(177),c=t(178),l=(t(98),t(57),t(11),t(22),t(23)),_=t.n(l),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(o.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],r=f.a.values.map((function(n){var r=t[n.key]||0,o="";if(0===r)return null;r>=2&&(o+=r);var c=n.key;return o+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return _.a.compact(r).join("")})).join("");return _.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===r){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(20),o=t(523),c=t(177),l=t(178),_=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(_);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),r=Math.pow(10,t),q=Math.trunc(n/r),o=Math.trunc(n%r);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=o}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(o.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(r.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),c=t(177),l=t(178);t(98),t(12);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(l.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;it?t:n},e=n,t=function(n){n._clipped=!1,n._unclipped=n.slice(0);for(var i=0;i<=3;i++)i<3?((n[i]<0||n[i]>255)&&(n._clipped=!0),n[i]=e(n[i],0,255)):3===i&&(n[i]=e(n[i],0,1));return n},r={},o=0,c=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(n):"object"==f(n[0])&&e?e.split("").filter((function(e){return void 0!==n[0][e]})).map((function(e){return n[0][e]})):n[0]},d=_,y=function(n){if(n.length<2)return null;var e=n.length-1;return"string"==d(n[e])?n[e].toLowerCase():null},v=Math.PI,m={clip_rgb:t,limit:n,type:_,unpack:h,last:y,PI:v,TWOPI:2*v,PITHIRD:v/3,DEG2RAD:v/180,RAD2DEG:180/v},k={format:{},autodetect:[]},w=m.last,O=m.clip_rgb,x=m.type,j=k,P=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=this;if("object"===x(n[0])&&n[0].constructor&&n[0].constructor===this.constructor)return n[0];var r=w(n),o=!1;if(!r){o=!0,j.sorted||(j.autodetect=j.autodetect.sort((function(a,b){return b.p-a.p})),j.sorted=!0);for(var i=0,c=j.autodetect;i4?n[4]:1;return 1===c?[0,0,0,l]:[t>=1?0:255*(1-t)*(1-c),r>=1?0:255*(1-r)*(1-c),o>=1?0:255*(1-o)*(1-c),l]},z=$,K=E,D=R,G=k,I=m.unpack,T=m.type,F=M;D.prototype.cmyk=function(){return F(this._rgb)},K.cmyk=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(D,[null].concat(n,["cmyk"])))},G.format.cmyk=z,G.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=I(n,"cmyk"),"array"===T(n)&&4===n.length)return"cmyk"}});var C=m.unpack,U=m.last,J=function(a){return Math.round(100*a)/100},Y=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=C(n,"hsla"),r=U(n)||"lsa";return t[0]=J(t[0]||0),t[1]=J(100*t[1])+"%",t[2]=J(100*t[2])+"%","hsla"===r||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,r="hsla"):t.length=3,r+"("+t.join(",")+")"},V=Y,H=m.unpack,X=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=H(n,"rgba"))[0],g=n[1],b=n[2];t/=255,g/=255,b/=255;var s,r,o=Math.min(t,g,b),c=Math.max(t,g,b),l=(c+o)/2;return c===o?(s=0,r=Number.NaN):s=l<.5?(c-o)/(c+o):(c-o)/(2-c-o),t==c?r=(g-b)/(c-o):g==c?r=2+(b-t)/(c-o):b==c&&(r=4+(t-g)/(c-o)),(r*=60)<0&&(r+=360),n.length>3&&void 0!==n[3]?[r,s,l,n[3]]:[r,s,l]},W=X,Z=m.unpack,Q=m.last,nn=V,en=W,tn=Math.round,rn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Z(n,"rgba"),r=Q(n)||"rgb";return"hsl"==r.substr(0,3)?nn(en(t),r):(t[0]=tn(t[0]),t[1]=tn(t[1]),t[2]=tn(t[2]),("rgba"===r||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,r="rgba"),r+"("+t.slice(0,"rgb"===r?3:4).join(",")+")")},on=rn,an=m.unpack,cn=Math.round,sn=function(){for(var n,e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,g,b,o=(e=an(e,"hsl"))[0],s=e[1],c=e[2];if(0===s)r=g=b=255*c;else{var l=[0,0,0],_=[0,0,0],f=c<.5?c*(1+s):c+s-c*s,h=2*c-f,d=o/360;l[0]=d+1/3,l[1]=d,l[2]=d-1/3;for(var i=0;i<3;i++)l[i]<0&&(l[i]+=1),l[i]>1&&(l[i]-=1),6*l[i]<1?_[i]=h+6*(f-h)*l[i]:2*l[i]<1?_[i]=f:3*l[i]<2?_[i]=h+(f-h)*(2/3-l[i])*6:_[i]=h;r=(n=[cn(255*_[0]),cn(255*_[1]),cn(255*_[2])])[0],g=n[1],b=n[2]}return e.length>3?[r,g,b,e[3]]:[r,g,b,1]},un=sn,ln=un,_n=k,fn=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,hn=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,pn=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,dn=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,yn=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,vn=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,bn=Math.round,mn=function(n){var e;if(n=n.toLowerCase().trim(),_n.format.named)try{return _n.format.named(n)}catch(n){}if(e=n.match(fn)){for(var t=e.slice(1,4),i=0;i<3;i++)t[i]=+t[i];return t[3]=1,t}if(e=n.match(hn)){for(var r=e.slice(1,5),o=0;o<4;o++)r[o]=+r[o];return r}if(e=n.match(pn)){for(var c=e.slice(1,4),l=0;l<3;l++)c[l]=bn(2.55*c[l]);return c[3]=1,c}if(e=n.match(dn)){for(var _=e.slice(1,5),f=0;f<3;f++)_[f]=bn(2.55*_[f]);return _[3]=+_[3],_}if(e=n.match(yn)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=ln(h);return d[3]=1,d}if(e=n.match(vn)){var y=e.slice(1,4);y[1]*=.01,y[2]*=.01;var v=ln(y);return v[3]=+e[4],v}};mn.test=function(s){return fn.test(s)||hn.test(s)||pn.test(s)||dn.test(s)||yn.test(s)||vn.test(s)};var gn=mn,kn=E,wn=R,On=k,xn=m.type,jn=on,Pn=gn;wn.prototype.css=function(n){return jn(this._rgb,n)},kn.css=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(wn,[null].concat(n,["css"])))},On.format.css=Pn,On.autodetect.push({p:5,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===xn(n)&&Pn.test(n))return"css"}});var Rn=R,Nn=E,En=k,Bn=m.unpack;En.format.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Bn(n,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},Nn.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Rn,[null].concat(n,["gl"])))},Rn.prototype.gl=function(){var n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};var Sn=m.unpack,Ln=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=Sn(n,"rgb"),o=r[0],g=r[1],b=r[2],c=Math.min(o,g,b),l=Math.max(o,g,b),_=l-c,f=100*_/255,h=c/(255-_)*100;return 0===_?t=Number.NaN:(o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,f,h]},Mn=Ln,An=m.unpack,$n=Math.floor,zn=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=An(l,"hcg"))[0],d=l[1],y=l[2];y*=255;var v=255*d;if(0===d)f=g=b=y;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$n(h/=60),m=h-i,p=y*(1-d),q=p+v*(1-m),k=p+v*m,w=p+v;switch(i){case 0:f=(n=[w,k,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,w,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,w,k])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,w])[0],g=r[1],b=r[2];break;case 4:f=(o=[k,p,w])[0],g=o[1],b=o[2];break;case 5:f=(c=[w,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Kn=zn,Dn=m.unpack,Gn=m.type,In=E,Tn=R,Fn=k,Cn=Mn;Tn.prototype.hcg=function(){return Cn(this._rgb)},In.hcg=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Tn,[null].concat(n,["hcg"])))},Fn.format.hcg=Kn,Fn.autodetect.push({p:1,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Dn(n,"hcg"),"array"===Gn(n)&&3===n.length)return"hcg"}});var qn=m.unpack,Un=m.last,Jn=Math.round,Yn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=qn(n,"rgba"),r=t[0],g=t[1],b=t[2],a=t[3],o=Un(n)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var c="000000"+((r=Jn(r))<<16|(g=Jn(g))<<8|(b=Jn(b))).toString(16);c=c.substr(c.length-6);var l="0"+Jn(255*a).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},Vn=Yn,Hn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Xn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Wn=function(n){if(n.match(Hn)){4!==n.length&&7!==n.length||(n=n.substr(1)),3===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var u=parseInt(n,16);return[u>>16,u>>8&255,255&u,1]}if(n.match(Xn)){5!==n.length&&9!==n.length||(n=n.substr(1)),4===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);var e=parseInt(n,16);return[e>>24&255,e>>16&255,e>>8&255,Math.round((255&e)/255*100)/100]}throw new Error("unknown hex color: "+n)},Zn=E,Qn=R,ne=m.type,ee=k,te=Vn;Qn.prototype.hex=function(n){return te(this._rgb,n)},Zn.hex=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Qn,[null].concat(n,["hex"])))},ee.format.hex=Wn,ee.autodetect.push({p:4,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===ne(n)&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});var re=m.unpack,oe=m.TWOPI,ie=Math.min,ae=Math.sqrt,ce=Math.acos,se=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=re(n,"rgb"),o=r[0],g=r[1],b=r[2],c=ie(o/=255,g/=255,b/=255),i=(o+g+b)/3,s=i>0?1-c/i:0;return 0===s?t=NaN:(t=(o-g+(o-b))/2,t/=ae((o-g)*(o-g)+(o-b)*(g-b)),t=ce(t),b>g&&(t=oe-t),t/=oe),[360*t,s,i]},ue=se,le=m.unpack,_e=m.limit,fe=m.TWOPI,he=m.PITHIRD,pe=Math.cos,de=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,g,b,r=(n=le(n,"hsi"))[0],s=n[1],i=n[2];return isNaN(r)&&(r=0),isNaN(s)&&(s=0),r>360&&(r-=360),r<0&&(r+=360),(r/=360)<1/3?g=1-((b=(1-s)/3)+(t=(1+s*pe(fe*r)/pe(he-fe*r))/3)):r<2/3?b=1-((t=(1-s)/3)+(g=(1+s*pe(fe*(r-=1/3))/pe(he-fe*r))/3)):t=1-((g=(1-s)/3)+(b=(1+s*pe(fe*(r-=2/3))/pe(he-fe*r))/3)),[255*(t=_e(i*t*3)),255*(g=_e(i*g*3)),255*(b=_e(i*b*3)),n.length>3?n[3]:1]},ye=de,ve=m.unpack,be=m.type,me=E,ge=R,ke=k,we=ue;ge.prototype.hsi=function(){return we(this._rgb)},me.hsi=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(ge,[null].concat(n,["hsi"])))},ke.format.hsi=ye,ke.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ve(n,"hsi"),"array"===be(n)&&3===n.length)return"hsi"}});var Oe=m.unpack,xe=m.type,je=E,Pe=R,Re=k,Ne=W;Pe.prototype.hsl=function(){return Ne(this._rgb)},je.hsl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pe,[null].concat(n,["hsl"])))},Re.format.hsl=un,Re.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Oe(n,"hsl"),"array"===xe(n)&&3===n.length)return"hsl"}});var Ee=m.unpack,Be=Math.min,Se=Math.max,Le=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,s,r,o=(n=Ee(n,"rgb"))[0],g=n[1],b=n[2],c=Be(o,g,b),l=Se(o,g,b),_=l-c;return r=l/255,0===l?(t=Number.NaN,s=0):(s=_/l,o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,s,r]},Me=Le,Ae=m.unpack,$e=Math.floor,ze=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=Ae(l,"hsv"))[0],s=l[1],d=l[2];if(d*=255,0===s)f=g=b=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$e(h/=60),y=h-i,p=d*(1-s),q=d*(1-s*y),v=d*(1-s*(1-y));switch(i){case 0:f=(n=[d,v,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,d,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,d,v])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,d])[0],g=r[1],b=r[2];break;case 4:f=(o=[v,p,d])[0],g=o[1],b=o[2];break;case 5:f=(c=[d,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Ke=ze,De=m.unpack,Ge=m.type,Ie=E,Te=R,Fe=k,Ce=Me;Te.prototype.hsv=function(){return Ce(this._rgb)},Ie.hsv=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Te,[null].concat(n,["hsv"])))},Fe.format.hsv=Ke,Fe.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=De(n,"hsv"),"array"===Ge(n)&&3===n.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ue=qe,Je=m.unpack,Ye=Math.pow,Ve=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Je(n,"rgb"),r=t[0],g=t[1],b=t[2],o=We(r,g,b),c=o[0],l=o[1],_=116*l-16;return[_<0?0:_,500*(c-l),200*(l-o[2])]},He=function(n){return(n/=255)<=.04045?n/12.92:Ye((n+.055)/1.055,2.4)},Xe=function(n){return n>Ue.t3?Ye(n,1/3):n/Ue.t2+Ue.t0},We=function(n,g,b){return n=He(n),g=He(g),b=He(b),[Xe((.4124564*n+.3575761*g+.1804375*b)/Ue.Xn),Xe((.2126729*n+.7151522*g+.072175*b)/Ue.Yn),Xe((.0193339*n+.119192*g+.9503041*b)/Ue.Zn)]},Ze=Ve,Qe=qe,nt=m.unpack,et=Math.pow,tt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r,o,c=(n=nt(n,"lab"))[0],a=n[1],b=n[2];return r=(c+16)/116,t=isNaN(a)?r:r+a/500,o=isNaN(b)?r:r-b/200,r=Qe.Yn*it(r),t=Qe.Xn*it(t),o=Qe.Zn*it(o),[ot(3.2404542*t-1.5371385*r-.4985314*o),ot(-.969266*t+1.8760108*r+.041556*o),ot(.0556434*t-.2040259*r+1.0572252*o),n.length>3?n[3]:1]},ot=function(n){return 255*(n<=.00304?12.92*n:1.055*et(n,1/2.4)-.055)},it=function(n){return n>Qe.t1?n*n*n:Qe.t2*(n-Qe.t0)},at=tt,ct=m.unpack,st=m.type,ut=E,lt=R,_t=k,ft=Ze;lt.prototype.lab=function(){return ft(this._rgb)},ut.lab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(lt,[null].concat(n,["lab"])))},_t.format.lab=at,_t.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ct(n,"lab"),"array"===st(n)&&3===n.length)return"lab"}});var ht=m.unpack,pt=m.RAD2DEG,yt=Math.sqrt,vt=Math.atan2,bt=Math.round,mt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=ht(n,"lab"),r=t[0],a=t[1],b=t[2],o=yt(a*a+b*b),c=(vt(b,a)*pt+360)%360;return 0===bt(1e4*o)&&(c=Number.NaN),[r,o,c]},gt=mt,kt=m.unpack,wt=Ze,Ot=gt,xt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=kt(n,"rgb"),r=t[0],g=t[1],b=t[2],o=wt(r,g,b),c=o[0],a=o[1],l=o[2];return Ot(c,a,l)},jt=xt,Pt=m.unpack,Rt=m.DEG2RAD,Nt=Math.sin,Et=Math.cos,Bt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Pt(n,"lch"),r=t[0],o=t[1],c=t[2];return isNaN(c)&&(c=0),[r,Et(c*=Rt)*o,Nt(c)*o]},St=Bt,Lt=m.unpack,Mt=St,At=at,$t=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Lt(n,"lch"))[0],r=n[1],o=n[2],c=Mt(t,r,o),l=c[0],a=c[1],_=c[2],f=At(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},zt=$t,Kt=m.unpack,Dt=zt,Gt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Kt(n,"hcl").reverse();return Dt.apply(void 0,t)},It=Gt,Tt=m.unpack,Ft=m.type,Ct=E,qt=R,Ut=k,Jt=jt;qt.prototype.lch=function(){return Jt(this._rgb)},qt.prototype.hcl=function(){return Jt(this._rgb).reverse()},Ct.lch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["lch"])))},Ct.hcl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["hcl"])))},Ut.format.lch=zt,Ut.format.hcl=It,["lch","hcl"].forEach((function(n){return Ut.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Tt(e,n),"array"===Ft(e)&&3===e.length)return n}})}));var Yt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Vt=R,Ht=k,Xt=m.type,Wt=Yt,Zt=Wn,Qt=Vn;Vt.prototype.name=function(){for(var n=Qt(this._rgb,"rgb"),i=0,e=Object.keys(Wt);i0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xt(n)&&Wt[n.toLowerCase()])return"named"}});var nr=m.unpack,er=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=nr(n,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},rr=er,or=m.type,ir=function(n){if("number"==or(n)&&n>=0&&n<=16777215)return[n>>16,n>>8&255,255&n,1];throw new Error("unknown num color: "+n)},ar=E,cr=R,sr=k,ur=m.type,lr=rr;cr.prototype.num=function(){return lr(this._rgb)},ar.num=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(n,["num"])))},sr.format.num=ir,sr.autodetect.push({p:5,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(1===n.length&&"number"===ur(n[0])&&n[0]>=0&&n[0]<=16777215)return"num"}});var _r=E,fr=R,pr=k,dr=m.unpack,yr=m.type,vr=Math.round;fr.prototype.rgb=function(n){return void 0===n&&(n=!0),!1===n?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vr)},fr.prototype.rgba=function(n){return void 0===n&&(n=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===n?e:vr(e):e}))},_r.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(fr,[null].concat(n,["rgb"])))},pr.format.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=dr(n,"rgba");return void 0===t[3]&&(t[3]=1),t},pr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=dr(n,"rgba"),"array"===yr(n)&&(3===n.length||4===n.length&&"number"==yr(n[3])&&n[3]>=0&&n[3]<=1))return"rgb"}});var mr=Math.log,gr=function(n){var e,g,b,t=n/100;return t<66?(e=255,g=t<6?0:-155.25485562709179-.44596950469579133*(g=t-2)+104.49216199393888*mr(g),b=t<20?0:.8274096064007395*(b=t-10)-254.76935184120902+115.67994401066147*mr(b)):(e=351.97690566805693+.114206453784165*(e=t-55)-40.25366309332127*mr(e),g=325.4494125711974+.07943456536662342*(g=t-50)-28.0852963507957*mr(g),b=255),[e,g,b,1]},kr=gr,wr=m.unpack,Or=Math.round,xr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];for(var t,r=wr(n,"rgb"),o=r[0],b=r[2],c=1e3,l=4e4,_=.4;l-c>_;){var f=kr(t=.5*(l+c));f[2]/f[0]>=b/o?l=t:c=t}return Or(t)},jr=E,Pr=R,Rr=k,Nr=xr;Pr.prototype.temp=Pr.prototype.kelvin=Pr.prototype.temperature=function(){return Nr(this._rgb)},jr.temp=jr.kelvin=jr.temperature=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pr,[null].concat(n,["temp"])))},Rr.format.temp=Rr.format.kelvin=Rr.format.temperature=gr;var Er=m.unpack,Br=Math.cbrt,Sr=Math.pow,Lr=Math.sign,Mr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Er(n,"rgb"),r=t[0],g=t[1],b=t[2],o=[$r(r/255),$r(g/255),$r(b/255)],c=o[0],l=o[1],_=o[2],f=Br(.4122214708*c+.5363325363*l+.0514459929*_),h=Br(.2119034982*c+.6806995451*l+.1073969566*_),s=Br(.0883024619*c+.2817188376*l+.6299787005*_);return[.2104542553*f+.793617785*h-.0040720468*s,1.9779984951*f-2.428592205*h+.4505937099*s,.0259040371*f+.7827717662*h-.808675766*s]},Ar=Mr;function $r(n){var e=Math.abs(n);return e<.04045?n/12.92:(Lr(n)||1)*Sr((e+.055)/1.055,2.4)}var zr=m.unpack,Kr=Math.pow,Dr=Math.sign,Gr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=zr(n,"lab"))[0],a=n[1],b=n[2],r=Kr(t+.3963377774*a+.2158037573*b,3),o=Kr(t-.1055613458*a-.0638541728*b,3),s=Kr(t-.0894841775*a-1.291485548*b,3);return[255*Tr(4.0767416621*r-3.3077115913*o+.2309699292*s),255*Tr(-1.2684380046*r+2.6097574011*o-.3413193965*s),255*Tr(-.0041960863*r-.7034186147*o+1.707614701*s),n.length>3?n[3]:1]},Ir=Gr;function Tr(n){var e=Math.abs(n);return e>.0031308?(Dr(n)||1)*(1.055*Kr(e,1/2.4)-.055):12.92*n}var Fr=m.unpack,Cr=m.type,qr=E,Ur=R,Jr=k,Yr=Ar;Ur.prototype.oklab=function(){return Yr(this._rgb)},qr.oklab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Ur,[null].concat(n,["oklab"])))},Jr.format.oklab=Ir,Jr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Fr(n,"oklab"),"array"===Cr(n)&&3===n.length)return"oklab"}});var Vr=m.unpack,Hr=Ar,Xr=gt,Wr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Vr(n,"rgb"),r=t[0],g=t[1],b=t[2],o=Hr(r,g,b),c=o[0],a=o[1],l=o[2];return Xr(c,a,l)},Zr=Wr,Qr=m.unpack,no=St,eo=Ir,to=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Qr(n,"lch"))[0],r=n[1],o=n[2],c=no(t,r,o),l=c[0],a=c[1],_=c[2],f=eo(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},ro=to,oo=m.unpack,io=m.type,ao=E,co=R,input=k,so=Zr;co.prototype.oklch=function(){return so(this._rgb)},ao.oklch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(co,[null].concat(n,["oklch"])))},input.format.oklch=ro,input.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=oo(n,"oklch"),"array"===io(n)&&3===n.length)return"oklch"}});var uo=R,lo=m.type;uo.prototype.alpha=function(a,n){return void 0===n&&(n=!1),void 0!==a&&"number"===lo(a)?n?(this._rgb[3]=a,this):new uo([this._rgb[0],this._rgb[1],this._rgb[2],a],"rgb"):this._rgb[3]},R.prototype.clipped=function(){return this._rgb._clipped||!1};var _o=R,fo=qe;_o.prototype.darken=function(n){void 0===n&&(n=1);var e=this,t=e.lab();return t[0]-=fo.Kn*n,new _o(t,"lab").alpha(e.alpha(),!0)},_o.prototype.brighten=function(n){return void 0===n&&(n=1),this.darken(-n)},_o.prototype.darker=_o.prototype.darken,_o.prototype.brighter=_o.prototype.brighten,R.prototype.get=function(n){var e=n.split("."),t=e[0],r=e[1],o=this[t]();if(r){var i=t.indexOf(r)-("ok"===t.substr(0,2)?2:0);if(i>-1)return o[i];throw new Error("unknown channel "+r+" in mode "+t)}return o};var ho=R,po=m.type,yo=Math.pow,vo=1e-7,bo=20;ho.prototype.luminance=function(n){if(void 0!==n&&"number"===po(n)){if(0===n)return new ho([0,0,0,this._rgb[3]],"rgb");if(1===n)return new ho([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",r=bo,o=function(e,c){var l=e.interpolate(c,.5,t),_=l.luminance();return Math.abs(n-_)n?o(e,l):o(l,c)},c=(e>n?o(new ho([0,0,0]),this):o(this,new ho([255,255,255]))).rgb();return new ho(c.concat([this._rgb[3]]))}return mo.apply(void 0,this._rgb.slice(0,3))};var mo=function(n,g,b){return.2126*(n=go(n))+.7152*(g=go(g))+.0722*(b=go(b))},go=function(n){return(n/=255)<=.03928?n/12.92:yo((n+.055)/1.055,2.4)},ko={},wo=R,Oo=m.type,xo=ko,jo=function(n,e,t){void 0===t&&(t=.5);for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var c=r[0]||"lrgb";if(xo[c]||r.length||(c=Object.keys(xo)[0]),!xo[c])throw new Error("interpolation mode "+c+" is not defined");return"object"!==Oo(n)&&(n=new wo(n)),"object"!==Oo(e)&&(e=new wo(e)),xo[c](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))},Po=R,Ro=jo;Po.prototype.mix=Po.prototype.interpolate=function(n,e){void 0===e&&(e=.5);for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];return Ro.apply(void 0,[this,n,e].concat(t))};var No=R;No.prototype.premultiply=function(n){void 0===n&&(n=!1);var e=this._rgb,a=e[3];return n?(this._rgb=[e[0]*a,e[1]*a,e[2]*a,a],this):new No([e[0]*a,e[1]*a,e[2]*a,a],"rgb")};var Eo=R,Bo=qe;Eo.prototype.saturate=function(n){void 0===n&&(n=1);var e=this,t=e.lch();return t[1]+=Bo.Kn*n,t[1]<0&&(t[1]=0),new Eo(t,"lch").alpha(e.alpha(),!0)},Eo.prototype.desaturate=function(n){return void 0===n&&(n=1),this.saturate(-n)};var So=R,Lo=m.type;So.prototype.set=function(n,e,t){void 0===t&&(t=!1);var r=n.split("."),o=r[0],c=r[1],l=this[o]();if(c){var i=o.indexOf(c)-("ok"===o.substr(0,2)?2:0);if(i>-1){if("string"==Lo(e))switch(e.charAt(0)){case"+":case"-":l[i]+=+e;break;case"*":l[i]*=+e.substr(1);break;case"/":l[i]/=+e.substr(1);break;default:l[i]=+e}else{if("number"!==Lo(e))throw new Error("unsupported value for Color.set");l[i]=e}var _=new So(l,o);return t?(this._rgb=_._rgb,this):_}throw new Error("unknown channel "+c+" in mode "+o)}return l};var Mo=R,Ao=function(n,e,t){var r=n._rgb,o=e._rgb;return new Mo(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"rgb")};ko.rgb=Ao;var $o=R,zo=Math.sqrt,Ko=Math.pow,Do=function(n,e,t){var r=n._rgb,o=r[0],c=r[1],l=r[2],_=e._rgb,f=_[0],h=_[1],d=_[2];return new $o(zo(Ko(o,2)*(1-t)+Ko(f,2)*t),zo(Ko(c,2)*(1-t)+Ko(h,2)*t),zo(Ko(l,2)*(1-t)+Ko(d,2)*t),"rgb")};ko.lrgb=Do;var Go=R,Io=function(n,e,t){var r=n.lab(),o=e.lab();return new Go(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"lab")};ko.lab=Io;var To=R,Fo=function(n,e,t,r){var o,c,l,_,f,h,d,y,v,m,k,w,O;return"hsl"===r?(l=n.hsl(),_=e.hsl()):"hsv"===r?(l=n.hsv(),_=e.hsv()):"hcg"===r?(l=n.hcg(),_=e.hcg()):"hsi"===r?(l=n.hsi(),_=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",l=n.hcl(),_=e.hcl()):"oklch"===r&&(l=n.oklch().reverse(),_=e.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(f=(o=l)[0],d=o[1],v=o[2],h=(c=_)[0],y=c[1],m=c[2]),isNaN(f)||isNaN(h)?isNaN(f)?isNaN(h)?w=Number.NaN:(w=h,1!=v&&0!=v||"hsv"==r||(k=y)):(w=f,1!=m&&0!=m||"hsv"==r||(k=d)):w=f+t*(h>f&&h-f>180?h-(f+360):h180?h+360-f:h-f),void 0===k&&(k=d+t*(y-d)),O=v+t*(m-v),new To("oklch"===r?[O,k,w]:[w,k,O],r)},Co=Fo,qo=function(n,e,t){return Co(n,e,t,"lch")};ko.lch=qo,ko.hcl=qo;var Uo=R,Jo=function(n,e,t){var r=n.num(),o=e.num();return new Uo(r+t*(o-r),"num")};ko.num=Jo;var Yo=Fo,Vo=function(n,e,t){return Yo(n,e,t,"hcg")};ko.hcg=Vo;var Ho=Fo,Xo=function(n,e,t){return Ho(n,e,t,"hsi")};ko.hsi=Xo;var Wo=Fo,Zo=function(n,e,t){return Wo(n,e,t,"hsl")};ko.hsl=Zo;var Qo=Fo,ni=function(n,e,t){return Qo(n,e,t,"hsv")};ko.hsv=ni;var ei=R,ti=function(n,e,t){var r=n.oklab(),o=e.oklab();return new ei(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"oklab")};ko.oklab=ti;var ri=Fo,oi=function(n,e,t){return ri(n,e,t,"oklch")};ko.oklch=oi;var ii=R,ai=m.clip_rgb,ci=Math.pow,si=Math.sqrt,ui=Math.PI,_i=Math.cos,fi=Math.sin,hi=Math.atan2,pi=function(n,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var r=n.length;t||(t=Array.from(new Array(r)).map((function(){return 1})));var o=r/t.reduce((function(a,b){return a+b}));if(t.forEach((function(n,i){t[i]*=o})),n=n.map((function(n){return new ii(n)})),"lrgb"===e)return di(n,t);for(var c=n.shift(),l=c.get(e),_=[],f=0,h=0,i=0;i=360;)m-=360;l[v]=m}else l[v]=l[v]/_[v];return y/=r,new ii(l,e).alpha(y>.99999?1:y,!0)},di=function(n,e){for(var t=n.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new ii(ai(r))},yi=E,vi=m.type,bi=Math.pow,mi=function(n){var e="rgb",t=yi("#ccc"),r=0,o=[0,1],c=[],l=[0,0],_=!1,f=[],h=!1,d=0,y=1,v=!1,m={},k=!0,w=1,O=function(n){if((n=n||["#fff","#000"])&&"string"===vi(n)&&yi.brewer&&yi.brewer[n.toLowerCase()]&&(n=yi.brewer[n.toLowerCase()]),"array"===vi(n)){1===n.length&&(n=[n[0],n[0]]),n=n.slice(0);for(var e=0;e=_[i];)i++;return i-1}return 0},j=function(n){return n},P=function(n){return n},R=function(n,r){var col,o;if(null==r&&(r=!1),isNaN(n)||null===n)return t;o=r?n:_&&_.length>2?x(n)/(_.length-2):y!==d?(n-d)/(y-d):1,o=P(o),r||(o=j(o)),1!==w&&(o=bi(o,w)),o=l[0]+o*(1-l[0]-l[1]),o=Math.min(1,Math.max(0,o));var h=Math.floor(1e4*o);if(k&&m[h])col=m[h];else{if("array"===vi(f))for(var i=0;i=p&&i===c.length-1){col=f[i];break}if(o>p&&o2){var _=n.map((function(e,i){return i/(n.length-1)})),h=n.map((function(n){return(n-d)/(y-d)}));h.every((function(n,i){return _[i]===n}))||(P=function(n){if(n<=0||n>=1)return n;for(var i=0;n>=h[i+1];)i++;var e=(n-h[i])/(h[i+1]-h[i]);return _[i]+e*(_[i+1]-_[i])})}}return o=[d,y],E},E.mode=function(n){return arguments.length?(e=n,N(),E):e},E.range=function(n,e){return O(n),E},E.out=function(n){return h=n,E},E.spread=function(n){return arguments.length?(r=n,E):r},E.correctLightness=function(n){return null==n&&(n=!0),v=n,N(),j=v?function(n){for(var e=R(0,!0).lab()[0],t=R(1,!0).lab()[0],r=e>t,o=R(n,!0).lab()[0],c=e+(t-e)*n,l=o-c,_=0,f=1,h=20;Math.abs(l)>.01&&h-- >0;)r&&(l*=-1),l<0?(_=n,n+=.5*(f-n)):(f=n,n+=.5*(_-n)),o=R(n,!0).lab()[0],l=o-c;return n}:function(n){return n},E},E.padding=function(p){return null!=p?("number"===vi(p)&&(p=[p,p]),l=p,E):l},E.colors=function(e,t){arguments.length<2&&(t="hex");var r=[];if(0===arguments.length)r=f.slice(0);else if(1===e)r=[E(.5)];else if(e>1){var c=o[0],dd=o[1]-c;r=gi(0,e,!1).map((function(i){return E(c+i/(e-1)*dd)}))}else{n=[];var l=[];if(_&&_.length>2)for(var i=1,h=_.length,d=1<=h;d?ih;d?i++:i--)l.push(.5*(_[i-1]+_[i]));else l=o;r=l.map((function(n){return E(n)}))}return yi[t]&&(r=r.map((function(n){return n[t]()}))),r},E.cache=function(n){return null!=n?(k=n,E):k},E.gamma=function(g){return null!=g?(w=g,E):w},E.nodata=function(n){return null!=n?(t=yi(n),E):t},E};function gi(n,e,t){for(var r=[],o=nc;o?i++:i--)r.push(i);return r}var ki=R,wi=mi,Oi=function(n){for(var e=[1,1],i=1;i=5))throw new RangeError("No point in running bezier with only one color.");var h,d,y;h=n.map((function(n){return n.lab()})),y=n.length-1,d=Oi(y),o=function(n){var u=1-n,e=[0,1,2].map((function(i){return h.reduce((function(e,t,r){return e+d[r]*Math.pow(u,y-r)*Math.pow(n,r)*t[i]}),0)}));return new ki(e,"lab")}}return o},ji=function(n){var e=xi(n);return e.scale=function(){return wi(e)},e},Pi=E,Ri=function(n,e,t){if(!Ri[t])throw new Error("unknown blend mode "+t);return Ri[t](n,e)},Ni=function(n){return function(e,t){var r=Pi(t).rgb(),o=Pi(e).rgb();return Pi.rgb(n(r,o))}},Ei=function(n){return function(e,t){var r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r}},Bi=function(a){return a},Si=function(a,b){return a*b/255},Li=function(a,b){return a>b?b:a},Mi=function(a,b){return a>b?a:b},Ai=function(a,b){return 255*(1-(1-a/255)*(1-b/255))},$i=function(a,b){return b<128?2*a*b/255:255*(1-2*(1-a/255)*(1-b/255))},zi=function(a,b){return 255*(1-(1-b/255)/(a/255))},Ki=function(a,b){return 255===a||(a=b/255*255/(1-a/255))>255?255:a};Ri.normal=Ni(Ei(Bi)),Ri.multiply=Ni(Ei(Si)),Ri.screen=Ni(Ei(Ai)),Ri.overlay=Ni(Ei($i)),Ri.darken=Ni(Ei(Li)),Ri.lighten=Ni(Ei(Mi)),Ri.dodge=Ni(Ei(Ki)),Ri.burn=Ni(Ei(zi));for(var Di=Ri,Gi=m.type,Ii=m.clip_rgb,Ti=m.TWOPI,Fi=Math.pow,Ci=Math.sin,qi=Math.cos,Ui=E,Ji=function(n,e,t,r,o){void 0===n&&(n=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===r&&(r=1),void 0===o&&(o=[0,1]);var dl,c=0;"array"===Gi(o)?dl=o[1]-o[0]:(dl=0,o=[o,o]);var l=function(l){var a=Ti*((n+120)/360+e*l),_=Fi(o[0]+dl*l,r),f=(0!==c?t[0]+l*c:t)*_*(1-_)/2,h=qi(a),d=Ci(a);return Ui(Ii([255*(_+f*(-.14861*h+1.78277*d)),255*(_+f*(-.29227*h-.90649*d)),255*(_+f*(1.97294*h)),1]))};return l.start=function(s){return null==s?n:(n=s,l)},l.rotations=function(n){return null==n?e:(e=n,l)},l.gamma=function(g){return null==g?r:(r=g,l)},l.hue=function(n){return null==n?t:("array"===Gi(t=n)?0==(c=t[1]-t[0])&&(t=t[1]):c=0,l)},l.lightness=function(n){return null==n?o:("array"===Gi(n)?(o=n,dl=n[1]-n[0]):(o=[n,n],dl=0),l)},l.scale=function(){return Ui.scale(l)},l.hue(t),l},Yi=R,Vi="0123456789abcdef",Hi=Math.floor,Xi=Math.random,Wi=function(){for(var code="#",i=0;i<6;i++)code+=Vi.charAt(Hi(16*Xi()));return new Yi(code,"hex")},Zi=_,Qi=Math.log,na=Math.pow,ea=Math.floor,ta=Math.abs,ra=function(data,n){void 0===n&&(n=null);var e={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Zi(data)&&(data=Object.values(data)),data.forEach((function(t){n&&"object"===Zi(t)&&(t=t[n]),null==t||isNaN(t)||(e.values.push(t),e.sum+=t,te.max&&(e.max=t),e.count+=1)})),e.domain=[e.min,e.max],e.limits=function(n,t){return oa(e,n,t)},e},oa=function(data,n,e){void 0===n&&(n="equal"),void 0===e&&(e=7),"array"==Zi(data)&&(data=ra(data));var t=data.min,r=data.max,o=data.values.sort((function(a,b){return a-b}));if(1===e)return[t,r];var c=[];if("c"===n.substr(0,1)&&(c.push(t),c.push(r)),"e"===n.substr(0,1)){c.push(t);for(var i=1;i 0");var l=Math.LOG10E*Qi(t),_=Math.LOG10E*Qi(r);c.push(t);for(var f=1;f200&&(O=!1)}for(var G={},I=0;Ie?(n+.05)/(e+.05):(e+.05)/(n+.05)},sa=R,ua=Math.sqrt,la=Math.pow,_a=Math.min,fa=Math.max,ha=Math.atan2,pa=Math.abs,da=Math.cos,ya=Math.sin,va=Math.exp,ba=Math.PI,ma=function(a,b,n,e,t){void 0===n&&(n=1),void 0===e&&(e=1),void 0===t&&(t=1);var r=function(n){return 360*n/(2*ba)},o=function(n){return 2*ba*n/360};a=new sa(a),b=new sa(b);var c=Array.from(a.lab()),l=c[0],_=c[1],f=c[2],h=Array.from(b.lab()),d=h[0],y=h[1],v=h[2],m=(l+d)/2,k=(ua(la(_,2)+la(f,2))+ua(la(y,2)+la(v,2)))/2,w=.5*(1-ua(la(k,7)/(la(k,7)+la(25,7)))),O=_*(1+w),x=y*(1+w),j=ua(la(O,2)+la(f,2)),P=ua(la(x,2)+la(v,2)),R=(j+P)/2,N=r(ha(f,O)),E=r(ha(v,x)),B=N>=0?N:N+360,S=E>=0?E:E+360,L=pa(B-S)>180?(B+S+360)/2:(B+S)/2,M=1-.17*da(o(L-30))+.24*da(o(2*L))+.32*da(o(3*L+6))-.2*da(o(4*L-63)),A=S-B;A=pa(A)<=180?A:S<=B?A+360:A-360,A=2*ua(j*P)*ya(o(A)/2);var $=d-l,z=P-j,K=1+.015*la(m-50,2)/ua(20+la(m-50,2)),D=1+.045*R,G=1+.015*R*M,I=30*va(-la((L-275)/25,2)),T=-2*ua(la(R,7)/(la(R,7)+la(25,7)))*ya(2*o(I)),F=ua(la($/(n*K),2)+la(z/(e*D),2)+la(A/(t*G),2)+T*(z/(e*D))*(A/(t*G)));return fa(0,_a(100,F))},ga=R,ka=function(a,b,n){void 0===n&&(n="lab"),a=new ga(a),b=new ga(b);var e=a.get(n),t=b.get(n),r=0;for(var i in e){var o=(e[i]||0)-(t[i]||0);r+=o*o}return Math.sqrt(r)},wa=R,Oa=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];try{return new(Function.prototype.bind.apply(wa,[null].concat(n))),!0}catch(n){return!1}},xa=E,ja=mi,Pa={cool:function(){return ja([xa.hsl(180,1,.9),xa.hsl(250,.7,.4)])},hot:function(){return ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ra={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},i=0,Na=Object.keys(Ra);i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,r=this.hold_pieces_count(n,e)+t,o=this.hold_pieces[n.key];f.a.delete(o,e.key),r>=1&&f.a.set(o,e.key,r)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var r=this.hold_pieces_count(n,e);return t>r&&(t=r),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r=[];return t&&r.push("location_".concat(t.location.key)),r}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r="";return t&&(r=t.name),r}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return _.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return _()(e).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return _()(n).filter((function(n){var e=Object(r.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;_.a.forIn(this.hold_pieces[n.key],(function(t,r){var o=y.a.fetch(r);e.hold_pieces_add(n,o,-t),e.piece_box_add(o,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;_.a.forIn(this.piece_box,(function(t,r){var o=y.a.fetch(r);e.piece_box_add(o,-t),e.hold_pieces_add(n,o,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),w.a.fetch(n).piece_box.forEach((function(n){var t=Object(r.a)(n,2),o=t[0],c=t[1];e.piece_box_add(y.a.fetch(o),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;w.a.fetch("全部駒箱").piece_box.forEach((function(o){var c=Object(r.a)(o,2),l=c[0],_=c[1],f=y.a.fetch(l),h=_-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return O.a.values.forEach((function(t){_.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var r=t.piece;e.board.delete_at(t.place),"K"===r.key?e.piece_box_add(r):e.hold_pieces_add(O.a.fetch("white"),r)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=O.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,r=null,o=null;return"bottom_left"===n&&(e=0,t=1,r=h.a.dimension-1,o=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,r=h.a.dimension-1,o=-1),[{piece:"K",promoted:!1,location:"black",place:[e,r]},{piece:"P",promoted:!0,location:"white",place:[e,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:O.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return U}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),w=t(549),O=t(550),x=t(551),j=t(552),P=t(553),R=t(554),N=t(555),E=t(556),B=t(557),S=t(558),L=t(559),M=t(560),A=t(561),$=t(562),z=t(563),K=t(564),D=t(565),G=t(566),I=t(567),T=t(568),F=t(569);function C(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var U=function(n){Object(l.a)(t,n);var e=C(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:O.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:N.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:L.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:M.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:z.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:T.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:F.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&(console.log(U.fetch("simple").key),console.log(U.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var o=t(20),c=t(177),l=t(178),_=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(_),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(l.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var r=!1,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,r=!1,o=n.once_vectors;return o&&(r=o.some((function(r){if(r)return t.once_reach_vec(n,e,r)}))),r}},{key:"once_reach_vec",value:function(n,e,t){var r=t[0],o=t[1]*n.location.value_sign,c=n.place.x+r,l=n.place.y+o;return c===e.x&&l===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!1,c=n.repeat_vectors;return c&&(o=c.some((function(o){if(o)return t.repeat_reach_vec(n,e,o,r)}))),o}},{key:"repeat_reach_vec",value:function(n,e,t){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.place.x,c=n.place.y,l=t[0],_=t[1]*n.location.value_sign,f=o+l,h=c+_,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==r.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(o+=c,c=0),l.promoted&&(o+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),o+=_}})),c>=1&&(o+=c),t.push(o)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===r&&console.log(m.dimension)}).call(this,t(179),"/index.js")},187:function(n,e,t){"use strict";t.d(e,"a",(function(){return m}));t(517),t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(11),t(22),t(520));function d(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function y(n){for(var i=1;i\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new w.a;return this.attributes.board.split("/").forEach((function(t,r){var o=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))o+=Number(t.piece);else{var c=new P.a({place:new j.a([o,r]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),o++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var r=x.a.fetch(t.piece_char),o=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);o+=e[c.key][r.key]||0,v.a.set(e[c.key],r.key,o)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var r=N.a.parse(t);if(!r)return!1;r.location=n.location_by_offset(i),e.push(r)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(O.a);void 0!==n&&n.argv[1]===r&&(B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B),B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return v}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var v=function(n){Object(l.a)(t,n);var e=y(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return L}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),w=t(180),O=t(522),x=t(127),j=t(71),P=t(314),R=t(524),N=t(521),E=t(538);function B(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),L=function(n){Object(_.a)(t,n);var e=B(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(l.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?j.a.fetch(this.preset_info.first_location_key):j.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,S);if(t)if(t.key){var r=t.value.trim();if(n.header[t.key]=r,t.key.match(/手の持駒/))if("なし"===r);else{var s=E.a.kanji_to_number_string(r);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,r){var o=O.a.lookup_by_name(e.piece_char),c=Number(e.count||1),l=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[l][o.key]||0,n.hold_pieces[l][o.key]=c}))}}else if(t.comment){var o,c,i=n.move_infos.length;null!==(c=(o=n.comment_lines_hash)[i])&&void 0!==c||(o[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=j.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=j.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var l={};l.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(l.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(l.place=x.a.fetch(t.to),e=l.place):(m()(t.same),m()(e),l.place=e),"成"===t.motion&&(l.promoted_trigger=!0),"打"===t.motion&&(l.drop_piece=O.a.lookup_by_name(t.piece)),n.move_infos.push(l)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new w.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,r){if("・"===e.piece);else{var o="v"===e.arrow?"white":"black",c=O.a.lookup_by_name(e.piece),l=!1;c||(c=O.a.lookup_by_promoted_name(e.piece),m()(c),l=!0);var _=new N.a({place:new x.a([r,t]),piece:c,promoted:l,location:j.a.fetch(o)});n.place_on(_)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===r){var M=new L;M.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",M.parse(),console.log(M.move_infos),console.log(M.comment_lines_hash),console.log(void 0===M.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(23),t(71);var r=t(571),o={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(r.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var r=t(23),o=t.n(r),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!o.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(72),t(73),t(11),t(22);var r=t(71),o={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return r.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=r.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var r=t(523),o=(t(11),t(22),t(71)),c=t(127);function l(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return _(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){l=!0,o=n},f:function(){try{c||null==t.return||t.return()}finally{if(l)throw o}}}}function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var w=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(w),this.move_info_create({type:"put",to:w}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&o){var O=!0;if(this.sp_piece_auto_promote){var x=r.piece.piece_vector.force_promote_length;null!=x&&r.top_spaces<=x&&(this.promotable_piece_moved(r,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=r,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:r,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(r),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new l.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=_.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var r=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&r&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(r.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,r){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(r,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),o=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=o.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=l(l({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(o),l=t(128),_=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(r.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return _.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var r=t(128),o=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return o.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=o.a.fetch(n),this.xcontainer=new r.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return o.a.values},init_preset_sfen:function(){if(this.sp_preset)return o.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(180),o=t(521),c=t(128),l={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(r.a.dimension)},api_random_puton:function(){var n=o.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20);function o(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(523),o=(t(11),t(51),t(23)),c=t.n(o),l={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o0&&r>0){var o=this[n.attr_w],c=this[n.attr_h],l=Math.abs(o-t),_=Math.abs(c-r),f=l>n.threshold||_>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=r),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(o,"x").concat(c," -> ").concat(t,"x").concat(r," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(51),t(11),t(517),t(177)),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),o=this.lp_el_create(["PieceTexture"].concat(Object(r.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(o),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,l=d.fetch(c);if(n.place){var _=this.place_to_cell_info(n.place),f=this.vector_scale(_.radius,this.devise_info.gap*l.sign*-1),h=this.vector_add(_.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(r.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},348:function(n,e,t){"use strict";const r=["red","green","blue","alpha"],o={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"};class c extends Error{constructor(){super("ColorTypeError: type must be hex(a), rgb(a) or hsl(a)")}}class l{constructor(...n){if(n.length>0)return l.parse(...n);this.$channels=new Uint8Array(r.length),r.forEach(((n,e)=>{Object.defineProperty(this,n,{get:()=>this.$channels[e],set:n=>{Number.isNaN(n/1)||(this.$channels[e]=Math.min(255,Math.max(0,n)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((n=>{const e=n.replace(/^./,(n=>n.toUpperCase()));Object.defineProperty(this,n,{get:()=>this[`get${e}`](),set:n=>{Number.isNaN(n/1)||this[`set${e}`](n)},enumerable:!0,configurable:!0})}))}getHue(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;let l=0;if(0===c)return l;for(l=n===o?(e-t)/c%6:e===o?(t-n)/c+2:(n-e)/c+4,l*=60;l!==-1/0&&l<0;)l+=360;return Math.round(l%360)}setHue(n){const e=l.fromHSL(n,this.saturation,this.lightness,this.alpha/255);for(let i=0;in/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;return 0!==c?Math.round(c/(1-Math.abs(2*this.lightness-1))*100)/100:0}setSaturation(n){const e=l.fromHSL(this.hue,n,this.lightness,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}getLightness(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)];return Math.round((o+r)/2*100)/100}setLightness(n){const e=l.fromHSL(this.hue,this.lightness,n,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}clone(){const n=new l;return r.forEach(((e,i)=>n.$channels[i]=this.$channels[i])),n}toString(n="hex"){switch(String(n).toLowerCase()){case"hex":return"#"+r.slice(0,3).map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"hexa":return"#"+r.map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${Math.round(this.alpha/2.55)/100})`;case"hsl":return`hsl(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%)`;case"hsla":return`hsla(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%, ${Math.round(this.alpha/2.55)/100})`;default:throw new c}}get[Symbol.toString](){return this.toString("hex")}static parse(...n){if("object"==typeof n[0])return l.parseObject(n[0]);if(n.every((n=>!Number.isNaN(n/1)))){const e=new l;if(n.length>3)e.red=n[0],e.green=n[1],e.blue=n[2],n[3]&&(e.alpha=n[3]);else if(1===n.length){const e=Number(n[0]);return l.parseIndex(e,e>2**24?3:4)}}else if("string"==typeof n[0]){let e=null;if("string"==typeof o[n[0].toLowerCase()])return l.parseHex(o[n[0].toLowerCase()]);if(null!==(e=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return l.parseHex(e[2]);if(null!==(e=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){const n=[e[1],e[2],e[3],void 0!==e[5]?e[5]:1];return l.fromRGB(...n.map((n=>Number(n))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}static parseObject(object){const n=new l;return null===object||"object"!=typeof object?n:l.isColor(object)?object.clone():(r.forEach((e=>{Number.isNaN(object[e])||(n[e]=object[e])})),n)}static parseHex(n){if("string"!=typeof n)throw new Error("Hex expression must be a string");if(3!==(n=n.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==n.length||(n=n.split("").map((n=>n.repeat(2))).join("")),6!==n.length&&8!==n.length)throw new Error("Incorrect Hex expression length");const e=n.split(/(..)/).filter((n=>n)).map((n=>Number.parseInt(n,16)));return"number"==typeof e[3]&&(e[3]/=255),l.fromRGB(...e)}static parseIndex(n,e=3){const t=new l;for(let i=0;i<4;i++)t[r[i]]=n>>8*(e-i)&&255;return t}static fromRGB(n,e,t,o=1){if([n,e,t,o].some((n=>Number.isNaN(n/1))))throw new Error("Invalid arguments");o*=255;const c=new l;return[n,e,t,o].forEach(((n,e)=>{c[r[e]]=n})),c}static fromHSL(n,e,t,r=1){if([n,e,t,r].some((n=>Number.isNaN(n))))throw new Error("Invalid arguments");for(;n<0&&n!==-1/0;)n+=360;n%=360,e=Math.max(0,Math.min(1,e)),t=Math.max(0,Math.min(1,t)),r=Math.max(0,Math.min(1,r));const o=(1-Math.abs(2*t-1))*e,c=o*(1-Math.abs(n/60%2-1)),_=t-o/2,[f,g,b]=n<60?[o,c,0]:n<120?[c,o,0]:n<180?[0,o,c]:n<240?[0,c,o]:n<300?[c,0,o]:[o,0,c];return l.fromRGB(255*(f+_),255*(g+_),255*(b+_),r)}static isColor(n){return n instanceof l}}e.a=l},351:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(517);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(11),t(31),t(22),t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){var n,e;return[(n={key:"default"},Object(r.a)(n,"key","初期値"),Object(r.a)(n,"func",(function(n){n.SeVariableInfo.values.forEach((function(e){n.$data[e.key]=e.default})),n.data_init()})),n),(e={key:"paper"},Object(r.a)(e,"key","紙面風"),Object(r.a)(e,"func",(function(n){n.se_ws_color="rgb(255,255,255)",n.sp_piece_variant="paper",n.sp_board_radius=0,n.sp_board_padding=0,n.sp_board_color="rgb(255,255,255)",n.sp_board_even_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_board_odd_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_grid_inner_stroke=1,n.sp_grid_outer_stroke=2,n.sp_board_edge_stroke=0,n.sp_stand_gravity="top",n.sp_stand_flip=!1,n.sp_name_direction="vertical",n.sp_balloon=!1,n.sp_location_mark_active_size=1,n.sp_location_mark_inactive_size=1,n.sp_player_info.black.name="先手",n.sp_player_info.white.name="後手",n.sp_coordinate=!0,n.sp_coordinate_variant_v="kanji",n.sp_board_horizontal_gap=.2,n.sp_coordinate_x_push=.05,n.sp_coordinate_y_push=.01,n.user_custom_css=""})),e)]}}]),t}(t(520).a)},352:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"基本"},{key:"背景"},{key:"盤テクスチャ"},{key:"盤のセル"},{key:"盤"},{key:"盤グリッド"},{key:"駒"},{key:"駒台"},{key:"対局者名"},{key:"駒数"},{key:"駒箱"},{key:"成り不成り選択"},{key:"駒を操作中の移動元スタイル"},{key:"座標"},{key:"Transform"},{key:"コントローラー&スライダー"},{key:"その他"},{key:"棋譜"},{key:"カスタムCSS"},{key:"コンポーネント引数確認"},{key:"CSS変数確認"}]}}]),t}(t(520).a)},353:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(43),t(44);var r=t(20),o=(t(11),t(31),t(22),t(531));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(w(w({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var r=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:r,place:n,promoted:r.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===r){var x=new O({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return k}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(_.a)(t,n);var e=m(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(l.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===r&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return h}));var o=t(177),c=t(178),l=(t(11),t(22),t(23)),_=t.n(l),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(o.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return _.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var r=t(20),o=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(r)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=l.a.exec(n,l()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return y}));var o=t(177),c=t(178),l=(t(98),t(57),t(11),t(22),t(23)),_=t.n(l),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(o.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],r=f.a.values.map((function(n){var r=t[n.key]||0,o="";if(0===r)return null;r>=2&&(o+=r);var c=n.key;return o+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return _.a.compact(r).join("")})).join("");return _.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===r){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(20),o=t(523),c=t(177),l=t(178),_=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(_);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),r=Math.pow(10,t),q=Math.trunc(n/r),o=Math.trunc(n%r);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=o}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(o.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(r.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),c=t(177),l=t(178);t(98),t(12);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(l.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;it?t:n},e=n,t=function(n){n._clipped=!1,n._unclipped=n.slice(0);for(var i=0;i<=3;i++)i<3?((n[i]<0||n[i]>255)&&(n._clipped=!0),n[i]=e(n[i],0,255)):3===i&&(n[i]=e(n[i],0,1));return n},r={},o=0,c=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(n):"object"==f(n[0])&&e?e.split("").filter((function(e){return void 0!==n[0][e]})).map((function(e){return n[0][e]})):n[0]},d=_,y=function(n){if(n.length<2)return null;var e=n.length-1;return"string"==d(n[e])?n[e].toLowerCase():null},v=Math.PI,m={clip_rgb:t,limit:n,type:_,unpack:h,last:y,PI:v,TWOPI:2*v,PITHIRD:v/3,DEG2RAD:v/180,RAD2DEG:180/v},k={format:{},autodetect:[]},w=m.last,O=m.clip_rgb,x=m.type,j=k,P=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=this;if("object"===x(n[0])&&n[0].constructor&&n[0].constructor===this.constructor)return n[0];var r=w(n),o=!1;if(!r){o=!0,j.sorted||(j.autodetect=j.autodetect.sort((function(a,b){return b.p-a.p})),j.sorted=!0);for(var i=0,c=j.autodetect;i4?n[4]:1;return 1===c?[0,0,0,l]:[t>=1?0:255*(1-t)*(1-c),r>=1?0:255*(1-r)*(1-c),o>=1?0:255*(1-o)*(1-c),l]},z=$,K=E,D=R,G=k,I=m.unpack,T=m.type,F=M;D.prototype.cmyk=function(){return F(this._rgb)},K.cmyk=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(D,[null].concat(n,["cmyk"])))},G.format.cmyk=z,G.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=I(n,"cmyk"),"array"===T(n)&&4===n.length)return"cmyk"}});var C=m.unpack,U=m.last,J=function(a){return Math.round(100*a)/100},Y=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=C(n,"hsla"),r=U(n)||"lsa";return t[0]=J(t[0]||0),t[1]=J(100*t[1])+"%",t[2]=J(100*t[2])+"%","hsla"===r||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,r="hsla"):t.length=3,r+"("+t.join(",")+")"},V=Y,H=m.unpack,X=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=H(n,"rgba"))[0],g=n[1],b=n[2];t/=255,g/=255,b/=255;var s,r,o=Math.min(t,g,b),c=Math.max(t,g,b),l=(c+o)/2;return c===o?(s=0,r=Number.NaN):s=l<.5?(c-o)/(c+o):(c-o)/(2-c-o),t==c?r=(g-b)/(c-o):g==c?r=2+(b-t)/(c-o):b==c&&(r=4+(t-g)/(c-o)),(r*=60)<0&&(r+=360),n.length>3&&void 0!==n[3]?[r,s,l,n[3]]:[r,s,l]},W=X,Z=m.unpack,Q=m.last,nn=V,en=W,tn=Math.round,rn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Z(n,"rgba"),r=Q(n)||"rgb";return"hsl"==r.substr(0,3)?nn(en(t),r):(t[0]=tn(t[0]),t[1]=tn(t[1]),t[2]=tn(t[2]),("rgba"===r||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,r="rgba"),r+"("+t.slice(0,"rgb"===r?3:4).join(",")+")")},on=rn,an=m.unpack,cn=Math.round,sn=function(){for(var n,e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,g,b,o=(e=an(e,"hsl"))[0],s=e[1],c=e[2];if(0===s)r=g=b=255*c;else{var l=[0,0,0],_=[0,0,0],f=c<.5?c*(1+s):c+s-c*s,h=2*c-f,d=o/360;l[0]=d+1/3,l[1]=d,l[2]=d-1/3;for(var i=0;i<3;i++)l[i]<0&&(l[i]+=1),l[i]>1&&(l[i]-=1),6*l[i]<1?_[i]=h+6*(f-h)*l[i]:2*l[i]<1?_[i]=f:3*l[i]<2?_[i]=h+(f-h)*(2/3-l[i])*6:_[i]=h;r=(n=[cn(255*_[0]),cn(255*_[1]),cn(255*_[2])])[0],g=n[1],b=n[2]}return e.length>3?[r,g,b,e[3]]:[r,g,b,1]},un=sn,ln=un,_n=k,fn=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,hn=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,pn=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,dn=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,yn=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,vn=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,bn=Math.round,mn=function(n){var e;if(n=n.toLowerCase().trim(),_n.format.named)try{return _n.format.named(n)}catch(n){}if(e=n.match(fn)){for(var t=e.slice(1,4),i=0;i<3;i++)t[i]=+t[i];return t[3]=1,t}if(e=n.match(hn)){for(var r=e.slice(1,5),o=0;o<4;o++)r[o]=+r[o];return r}if(e=n.match(pn)){for(var c=e.slice(1,4),l=0;l<3;l++)c[l]=bn(2.55*c[l]);return c[3]=1,c}if(e=n.match(dn)){for(var _=e.slice(1,5),f=0;f<3;f++)_[f]=bn(2.55*_[f]);return _[3]=+_[3],_}if(e=n.match(yn)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=ln(h);return d[3]=1,d}if(e=n.match(vn)){var y=e.slice(1,4);y[1]*=.01,y[2]*=.01;var v=ln(y);return v[3]=+e[4],v}};mn.test=function(s){return fn.test(s)||hn.test(s)||pn.test(s)||dn.test(s)||yn.test(s)||vn.test(s)};var gn=mn,kn=E,wn=R,On=k,xn=m.type,jn=on,Pn=gn;wn.prototype.css=function(n){return jn(this._rgb,n)},kn.css=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(wn,[null].concat(n,["css"])))},On.format.css=Pn,On.autodetect.push({p:5,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===xn(n)&&Pn.test(n))return"css"}});var Rn=R,Nn=E,En=k,Bn=m.unpack;En.format.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Bn(n,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},Nn.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Rn,[null].concat(n,["gl"])))},Rn.prototype.gl=function(){var n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};var Sn=m.unpack,Ln=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=Sn(n,"rgb"),o=r[0],g=r[1],b=r[2],c=Math.min(o,g,b),l=Math.max(o,g,b),_=l-c,f=100*_/255,h=c/(255-_)*100;return 0===_?t=Number.NaN:(o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,f,h]},Mn=Ln,An=m.unpack,$n=Math.floor,zn=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=An(l,"hcg"))[0],d=l[1],y=l[2];y*=255;var v=255*d;if(0===d)f=g=b=y;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$n(h/=60),m=h-i,p=y*(1-d),q=p+v*(1-m),k=p+v*m,w=p+v;switch(i){case 0:f=(n=[w,k,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,w,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,w,k])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,w])[0],g=r[1],b=r[2];break;case 4:f=(o=[k,p,w])[0],g=o[1],b=o[2];break;case 5:f=(c=[w,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Kn=zn,Dn=m.unpack,Gn=m.type,In=E,Tn=R,Fn=k,Cn=Mn;Tn.prototype.hcg=function(){return Cn(this._rgb)},In.hcg=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Tn,[null].concat(n,["hcg"])))},Fn.format.hcg=Kn,Fn.autodetect.push({p:1,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Dn(n,"hcg"),"array"===Gn(n)&&3===n.length)return"hcg"}});var qn=m.unpack,Un=m.last,Jn=Math.round,Yn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=qn(n,"rgba"),r=t[0],g=t[1],b=t[2],a=t[3],o=Un(n)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var c="000000"+((r=Jn(r))<<16|(g=Jn(g))<<8|(b=Jn(b))).toString(16);c=c.substr(c.length-6);var l="0"+Jn(255*a).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},Vn=Yn,Hn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Xn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Wn=function(n){if(n.match(Hn)){4!==n.length&&7!==n.length||(n=n.substr(1)),3===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var u=parseInt(n,16);return[u>>16,u>>8&255,255&u,1]}if(n.match(Xn)){5!==n.length&&9!==n.length||(n=n.substr(1)),4===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);var e=parseInt(n,16);return[e>>24&255,e>>16&255,e>>8&255,Math.round((255&e)/255*100)/100]}throw new Error("unknown hex color: "+n)},Zn=E,Qn=R,ne=m.type,ee=k,te=Vn;Qn.prototype.hex=function(n){return te(this._rgb,n)},Zn.hex=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Qn,[null].concat(n,["hex"])))},ee.format.hex=Wn,ee.autodetect.push({p:4,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===ne(n)&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});var re=m.unpack,oe=m.TWOPI,ie=Math.min,ae=Math.sqrt,ce=Math.acos,se=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=re(n,"rgb"),o=r[0],g=r[1],b=r[2],c=ie(o/=255,g/=255,b/=255),i=(o+g+b)/3,s=i>0?1-c/i:0;return 0===s?t=NaN:(t=(o-g+(o-b))/2,t/=ae((o-g)*(o-g)+(o-b)*(g-b)),t=ce(t),b>g&&(t=oe-t),t/=oe),[360*t,s,i]},ue=se,le=m.unpack,_e=m.limit,fe=m.TWOPI,he=m.PITHIRD,pe=Math.cos,de=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,g,b,r=(n=le(n,"hsi"))[0],s=n[1],i=n[2];return isNaN(r)&&(r=0),isNaN(s)&&(s=0),r>360&&(r-=360),r<0&&(r+=360),(r/=360)<1/3?g=1-((b=(1-s)/3)+(t=(1+s*pe(fe*r)/pe(he-fe*r))/3)):r<2/3?b=1-((t=(1-s)/3)+(g=(1+s*pe(fe*(r-=1/3))/pe(he-fe*r))/3)):t=1-((g=(1-s)/3)+(b=(1+s*pe(fe*(r-=2/3))/pe(he-fe*r))/3)),[255*(t=_e(i*t*3)),255*(g=_e(i*g*3)),255*(b=_e(i*b*3)),n.length>3?n[3]:1]},ye=de,ve=m.unpack,be=m.type,me=E,ge=R,ke=k,we=ue;ge.prototype.hsi=function(){return we(this._rgb)},me.hsi=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(ge,[null].concat(n,["hsi"])))},ke.format.hsi=ye,ke.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ve(n,"hsi"),"array"===be(n)&&3===n.length)return"hsi"}});var Oe=m.unpack,xe=m.type,je=E,Pe=R,Re=k,Ne=W;Pe.prototype.hsl=function(){return Ne(this._rgb)},je.hsl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pe,[null].concat(n,["hsl"])))},Re.format.hsl=un,Re.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Oe(n,"hsl"),"array"===xe(n)&&3===n.length)return"hsl"}});var Ee=m.unpack,Be=Math.min,Se=Math.max,Le=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,s,r,o=(n=Ee(n,"rgb"))[0],g=n[1],b=n[2],c=Be(o,g,b),l=Se(o,g,b),_=l-c;return r=l/255,0===l?(t=Number.NaN,s=0):(s=_/l,o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,s,r]},Me=Le,Ae=m.unpack,$e=Math.floor,ze=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=Ae(l,"hsv"))[0],s=l[1],d=l[2];if(d*=255,0===s)f=g=b=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$e(h/=60),y=h-i,p=d*(1-s),q=d*(1-s*y),v=d*(1-s*(1-y));switch(i){case 0:f=(n=[d,v,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,d,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,d,v])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,d])[0],g=r[1],b=r[2];break;case 4:f=(o=[v,p,d])[0],g=o[1],b=o[2];break;case 5:f=(c=[d,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Ke=ze,De=m.unpack,Ge=m.type,Ie=E,Te=R,Fe=k,Ce=Me;Te.prototype.hsv=function(){return Ce(this._rgb)},Ie.hsv=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Te,[null].concat(n,["hsv"])))},Fe.format.hsv=Ke,Fe.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=De(n,"hsv"),"array"===Ge(n)&&3===n.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ue=qe,Je=m.unpack,Ye=Math.pow,Ve=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Je(n,"rgb"),r=t[0],g=t[1],b=t[2],o=We(r,g,b),c=o[0],l=o[1],_=116*l-16;return[_<0?0:_,500*(c-l),200*(l-o[2])]},He=function(n){return(n/=255)<=.04045?n/12.92:Ye((n+.055)/1.055,2.4)},Xe=function(n){return n>Ue.t3?Ye(n,1/3):n/Ue.t2+Ue.t0},We=function(n,g,b){return n=He(n),g=He(g),b=He(b),[Xe((.4124564*n+.3575761*g+.1804375*b)/Ue.Xn),Xe((.2126729*n+.7151522*g+.072175*b)/Ue.Yn),Xe((.0193339*n+.119192*g+.9503041*b)/Ue.Zn)]},Ze=Ve,Qe=qe,nt=m.unpack,et=Math.pow,tt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r,o,c=(n=nt(n,"lab"))[0],a=n[1],b=n[2];return r=(c+16)/116,t=isNaN(a)?r:r+a/500,o=isNaN(b)?r:r-b/200,r=Qe.Yn*it(r),t=Qe.Xn*it(t),o=Qe.Zn*it(o),[ot(3.2404542*t-1.5371385*r-.4985314*o),ot(-.969266*t+1.8760108*r+.041556*o),ot(.0556434*t-.2040259*r+1.0572252*o),n.length>3?n[3]:1]},ot=function(n){return 255*(n<=.00304?12.92*n:1.055*et(n,1/2.4)-.055)},it=function(n){return n>Qe.t1?n*n*n:Qe.t2*(n-Qe.t0)},at=tt,ct=m.unpack,st=m.type,ut=E,lt=R,_t=k,ft=Ze;lt.prototype.lab=function(){return ft(this._rgb)},ut.lab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(lt,[null].concat(n,["lab"])))},_t.format.lab=at,_t.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ct(n,"lab"),"array"===st(n)&&3===n.length)return"lab"}});var ht=m.unpack,pt=m.RAD2DEG,yt=Math.sqrt,vt=Math.atan2,bt=Math.round,mt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=ht(n,"lab"),r=t[0],a=t[1],b=t[2],o=yt(a*a+b*b),c=(vt(b,a)*pt+360)%360;return 0===bt(1e4*o)&&(c=Number.NaN),[r,o,c]},gt=mt,kt=m.unpack,wt=Ze,Ot=gt,xt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=kt(n,"rgb"),r=t[0],g=t[1],b=t[2],o=wt(r,g,b),c=o[0],a=o[1],l=o[2];return Ot(c,a,l)},jt=xt,Pt=m.unpack,Rt=m.DEG2RAD,Nt=Math.sin,Et=Math.cos,Bt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Pt(n,"lch"),r=t[0],o=t[1],c=t[2];return isNaN(c)&&(c=0),[r,Et(c*=Rt)*o,Nt(c)*o]},St=Bt,Lt=m.unpack,Mt=St,At=at,$t=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Lt(n,"lch"))[0],r=n[1],o=n[2],c=Mt(t,r,o),l=c[0],a=c[1],_=c[2],f=At(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},zt=$t,Kt=m.unpack,Dt=zt,Gt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Kt(n,"hcl").reverse();return Dt.apply(void 0,t)},It=Gt,Tt=m.unpack,Ft=m.type,Ct=E,qt=R,Ut=k,Jt=jt;qt.prototype.lch=function(){return Jt(this._rgb)},qt.prototype.hcl=function(){return Jt(this._rgb).reverse()},Ct.lch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["lch"])))},Ct.hcl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["hcl"])))},Ut.format.lch=zt,Ut.format.hcl=It,["lch","hcl"].forEach((function(n){return Ut.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Tt(e,n),"array"===Ft(e)&&3===e.length)return n}})}));var Yt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Vt=R,Ht=k,Xt=m.type,Wt=Yt,Zt=Wn,Qt=Vn;Vt.prototype.name=function(){for(var n=Qt(this._rgb,"rgb"),i=0,e=Object.keys(Wt);i0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xt(n)&&Wt[n.toLowerCase()])return"named"}});var nr=m.unpack,er=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=nr(n,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},rr=er,or=m.type,ir=function(n){if("number"==or(n)&&n>=0&&n<=16777215)return[n>>16,n>>8&255,255&n,1];throw new Error("unknown num color: "+n)},ar=E,cr=R,sr=k,ur=m.type,lr=rr;cr.prototype.num=function(){return lr(this._rgb)},ar.num=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(n,["num"])))},sr.format.num=ir,sr.autodetect.push({p:5,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(1===n.length&&"number"===ur(n[0])&&n[0]>=0&&n[0]<=16777215)return"num"}});var _r=E,fr=R,pr=k,dr=m.unpack,yr=m.type,vr=Math.round;fr.prototype.rgb=function(n){return void 0===n&&(n=!0),!1===n?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vr)},fr.prototype.rgba=function(n){return void 0===n&&(n=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===n?e:vr(e):e}))},_r.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(fr,[null].concat(n,["rgb"])))},pr.format.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=dr(n,"rgba");return void 0===t[3]&&(t[3]=1),t},pr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=dr(n,"rgba"),"array"===yr(n)&&(3===n.length||4===n.length&&"number"==yr(n[3])&&n[3]>=0&&n[3]<=1))return"rgb"}});var mr=Math.log,gr=function(n){var e,g,b,t=n/100;return t<66?(e=255,g=t<6?0:-155.25485562709179-.44596950469579133*(g=t-2)+104.49216199393888*mr(g),b=t<20?0:.8274096064007395*(b=t-10)-254.76935184120902+115.67994401066147*mr(b)):(e=351.97690566805693+.114206453784165*(e=t-55)-40.25366309332127*mr(e),g=325.4494125711974+.07943456536662342*(g=t-50)-28.0852963507957*mr(g),b=255),[e,g,b,1]},kr=gr,wr=m.unpack,Or=Math.round,xr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];for(var t,r=wr(n,"rgb"),o=r[0],b=r[2],c=1e3,l=4e4,_=.4;l-c>_;){var f=kr(t=.5*(l+c));f[2]/f[0]>=b/o?l=t:c=t}return Or(t)},jr=E,Pr=R,Rr=k,Nr=xr;Pr.prototype.temp=Pr.prototype.kelvin=Pr.prototype.temperature=function(){return Nr(this._rgb)},jr.temp=jr.kelvin=jr.temperature=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pr,[null].concat(n,["temp"])))},Rr.format.temp=Rr.format.kelvin=Rr.format.temperature=gr;var Er=m.unpack,Br=Math.cbrt,Sr=Math.pow,Lr=Math.sign,Mr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Er(n,"rgb"),r=t[0],g=t[1],b=t[2],o=[$r(r/255),$r(g/255),$r(b/255)],c=o[0],l=o[1],_=o[2],f=Br(.4122214708*c+.5363325363*l+.0514459929*_),h=Br(.2119034982*c+.6806995451*l+.1073969566*_),s=Br(.0883024619*c+.2817188376*l+.6299787005*_);return[.2104542553*f+.793617785*h-.0040720468*s,1.9779984951*f-2.428592205*h+.4505937099*s,.0259040371*f+.7827717662*h-.808675766*s]},Ar=Mr;function $r(n){var e=Math.abs(n);return e<.04045?n/12.92:(Lr(n)||1)*Sr((e+.055)/1.055,2.4)}var zr=m.unpack,Kr=Math.pow,Dr=Math.sign,Gr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=zr(n,"lab"))[0],a=n[1],b=n[2],r=Kr(t+.3963377774*a+.2158037573*b,3),o=Kr(t-.1055613458*a-.0638541728*b,3),s=Kr(t-.0894841775*a-1.291485548*b,3);return[255*Tr(4.0767416621*r-3.3077115913*o+.2309699292*s),255*Tr(-1.2684380046*r+2.6097574011*o-.3413193965*s),255*Tr(-.0041960863*r-.7034186147*o+1.707614701*s),n.length>3?n[3]:1]},Ir=Gr;function Tr(n){var e=Math.abs(n);return e>.0031308?(Dr(n)||1)*(1.055*Kr(e,1/2.4)-.055):12.92*n}var Fr=m.unpack,Cr=m.type,qr=E,Ur=R,Jr=k,Yr=Ar;Ur.prototype.oklab=function(){return Yr(this._rgb)},qr.oklab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Ur,[null].concat(n,["oklab"])))},Jr.format.oklab=Ir,Jr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Fr(n,"oklab"),"array"===Cr(n)&&3===n.length)return"oklab"}});var Vr=m.unpack,Hr=Ar,Xr=gt,Wr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Vr(n,"rgb"),r=t[0],g=t[1],b=t[2],o=Hr(r,g,b),c=o[0],a=o[1],l=o[2];return Xr(c,a,l)},Zr=Wr,Qr=m.unpack,no=St,eo=Ir,to=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Qr(n,"lch"))[0],r=n[1],o=n[2],c=no(t,r,o),l=c[0],a=c[1],_=c[2],f=eo(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},ro=to,oo=m.unpack,io=m.type,ao=E,co=R,input=k,so=Zr;co.prototype.oklch=function(){return so(this._rgb)},ao.oklch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(co,[null].concat(n,["oklch"])))},input.format.oklch=ro,input.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=oo(n,"oklch"),"array"===io(n)&&3===n.length)return"oklch"}});var uo=R,lo=m.type;uo.prototype.alpha=function(a,n){return void 0===n&&(n=!1),void 0!==a&&"number"===lo(a)?n?(this._rgb[3]=a,this):new uo([this._rgb[0],this._rgb[1],this._rgb[2],a],"rgb"):this._rgb[3]},R.prototype.clipped=function(){return this._rgb._clipped||!1};var _o=R,fo=qe;_o.prototype.darken=function(n){void 0===n&&(n=1);var e=this,t=e.lab();return t[0]-=fo.Kn*n,new _o(t,"lab").alpha(e.alpha(),!0)},_o.prototype.brighten=function(n){return void 0===n&&(n=1),this.darken(-n)},_o.prototype.darker=_o.prototype.darken,_o.prototype.brighter=_o.prototype.brighten,R.prototype.get=function(n){var e=n.split("."),t=e[0],r=e[1],o=this[t]();if(r){var i=t.indexOf(r)-("ok"===t.substr(0,2)?2:0);if(i>-1)return o[i];throw new Error("unknown channel "+r+" in mode "+t)}return o};var ho=R,po=m.type,yo=Math.pow,vo=1e-7,bo=20;ho.prototype.luminance=function(n){if(void 0!==n&&"number"===po(n)){if(0===n)return new ho([0,0,0,this._rgb[3]],"rgb");if(1===n)return new ho([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",r=bo,o=function(e,c){var l=e.interpolate(c,.5,t),_=l.luminance();return Math.abs(n-_)n?o(e,l):o(l,c)},c=(e>n?o(new ho([0,0,0]),this):o(this,new ho([255,255,255]))).rgb();return new ho(c.concat([this._rgb[3]]))}return mo.apply(void 0,this._rgb.slice(0,3))};var mo=function(n,g,b){return.2126*(n=go(n))+.7152*(g=go(g))+.0722*(b=go(b))},go=function(n){return(n/=255)<=.03928?n/12.92:yo((n+.055)/1.055,2.4)},ko={},wo=R,Oo=m.type,xo=ko,jo=function(n,e,t){void 0===t&&(t=.5);for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var c=r[0]||"lrgb";if(xo[c]||r.length||(c=Object.keys(xo)[0]),!xo[c])throw new Error("interpolation mode "+c+" is not defined");return"object"!==Oo(n)&&(n=new wo(n)),"object"!==Oo(e)&&(e=new wo(e)),xo[c](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))},Po=R,Ro=jo;Po.prototype.mix=Po.prototype.interpolate=function(n,e){void 0===e&&(e=.5);for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];return Ro.apply(void 0,[this,n,e].concat(t))};var No=R;No.prototype.premultiply=function(n){void 0===n&&(n=!1);var e=this._rgb,a=e[3];return n?(this._rgb=[e[0]*a,e[1]*a,e[2]*a,a],this):new No([e[0]*a,e[1]*a,e[2]*a,a],"rgb")};var Eo=R,Bo=qe;Eo.prototype.saturate=function(n){void 0===n&&(n=1);var e=this,t=e.lch();return t[1]+=Bo.Kn*n,t[1]<0&&(t[1]=0),new Eo(t,"lch").alpha(e.alpha(),!0)},Eo.prototype.desaturate=function(n){return void 0===n&&(n=1),this.saturate(-n)};var So=R,Lo=m.type;So.prototype.set=function(n,e,t){void 0===t&&(t=!1);var r=n.split("."),o=r[0],c=r[1],l=this[o]();if(c){var i=o.indexOf(c)-("ok"===o.substr(0,2)?2:0);if(i>-1){if("string"==Lo(e))switch(e.charAt(0)){case"+":case"-":l[i]+=+e;break;case"*":l[i]*=+e.substr(1);break;case"/":l[i]/=+e.substr(1);break;default:l[i]=+e}else{if("number"!==Lo(e))throw new Error("unsupported value for Color.set");l[i]=e}var _=new So(l,o);return t?(this._rgb=_._rgb,this):_}throw new Error("unknown channel "+c+" in mode "+o)}return l};var Mo=R,Ao=function(n,e,t){var r=n._rgb,o=e._rgb;return new Mo(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"rgb")};ko.rgb=Ao;var $o=R,zo=Math.sqrt,Ko=Math.pow,Do=function(n,e,t){var r=n._rgb,o=r[0],c=r[1],l=r[2],_=e._rgb,f=_[0],h=_[1],d=_[2];return new $o(zo(Ko(o,2)*(1-t)+Ko(f,2)*t),zo(Ko(c,2)*(1-t)+Ko(h,2)*t),zo(Ko(l,2)*(1-t)+Ko(d,2)*t),"rgb")};ko.lrgb=Do;var Go=R,Io=function(n,e,t){var r=n.lab(),o=e.lab();return new Go(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"lab")};ko.lab=Io;var To=R,Fo=function(n,e,t,r){var o,c,l,_,f,h,d,y,v,m,k,w,O;return"hsl"===r?(l=n.hsl(),_=e.hsl()):"hsv"===r?(l=n.hsv(),_=e.hsv()):"hcg"===r?(l=n.hcg(),_=e.hcg()):"hsi"===r?(l=n.hsi(),_=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",l=n.hcl(),_=e.hcl()):"oklch"===r&&(l=n.oklch().reverse(),_=e.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(f=(o=l)[0],d=o[1],v=o[2],h=(c=_)[0],y=c[1],m=c[2]),isNaN(f)||isNaN(h)?isNaN(f)?isNaN(h)?w=Number.NaN:(w=h,1!=v&&0!=v||"hsv"==r||(k=y)):(w=f,1!=m&&0!=m||"hsv"==r||(k=d)):w=f+t*(h>f&&h-f>180?h-(f+360):h180?h+360-f:h-f),void 0===k&&(k=d+t*(y-d)),O=v+t*(m-v),new To("oklch"===r?[O,k,w]:[w,k,O],r)},Co=Fo,qo=function(n,e,t){return Co(n,e,t,"lch")};ko.lch=qo,ko.hcl=qo;var Uo=R,Jo=function(n,e,t){var r=n.num(),o=e.num();return new Uo(r+t*(o-r),"num")};ko.num=Jo;var Yo=Fo,Vo=function(n,e,t){return Yo(n,e,t,"hcg")};ko.hcg=Vo;var Ho=Fo,Xo=function(n,e,t){return Ho(n,e,t,"hsi")};ko.hsi=Xo;var Wo=Fo,Zo=function(n,e,t){return Wo(n,e,t,"hsl")};ko.hsl=Zo;var Qo=Fo,ni=function(n,e,t){return Qo(n,e,t,"hsv")};ko.hsv=ni;var ei=R,ti=function(n,e,t){var r=n.oklab(),o=e.oklab();return new ei(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"oklab")};ko.oklab=ti;var ri=Fo,oi=function(n,e,t){return ri(n,e,t,"oklch")};ko.oklch=oi;var ii=R,ai=m.clip_rgb,ci=Math.pow,si=Math.sqrt,ui=Math.PI,_i=Math.cos,fi=Math.sin,hi=Math.atan2,pi=function(n,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var r=n.length;t||(t=Array.from(new Array(r)).map((function(){return 1})));var o=r/t.reduce((function(a,b){return a+b}));if(t.forEach((function(n,i){t[i]*=o})),n=n.map((function(n){return new ii(n)})),"lrgb"===e)return di(n,t);for(var c=n.shift(),l=c.get(e),_=[],f=0,h=0,i=0;i=360;)m-=360;l[v]=m}else l[v]=l[v]/_[v];return y/=r,new ii(l,e).alpha(y>.99999?1:y,!0)},di=function(n,e){for(var t=n.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new ii(ai(r))},yi=E,vi=m.type,bi=Math.pow,mi=function(n){var e="rgb",t=yi("#ccc"),r=0,o=[0,1],c=[],l=[0,0],_=!1,f=[],h=!1,d=0,y=1,v=!1,m={},k=!0,w=1,O=function(n){if((n=n||["#fff","#000"])&&"string"===vi(n)&&yi.brewer&&yi.brewer[n.toLowerCase()]&&(n=yi.brewer[n.toLowerCase()]),"array"===vi(n)){1===n.length&&(n=[n[0],n[0]]),n=n.slice(0);for(var e=0;e=_[i];)i++;return i-1}return 0},j=function(n){return n},P=function(n){return n},R=function(n,r){var col,o;if(null==r&&(r=!1),isNaN(n)||null===n)return t;o=r?n:_&&_.length>2?x(n)/(_.length-2):y!==d?(n-d)/(y-d):1,o=P(o),r||(o=j(o)),1!==w&&(o=bi(o,w)),o=l[0]+o*(1-l[0]-l[1]),o=Math.min(1,Math.max(0,o));var h=Math.floor(1e4*o);if(k&&m[h])col=m[h];else{if("array"===vi(f))for(var i=0;i=p&&i===c.length-1){col=f[i];break}if(o>p&&o2){var _=n.map((function(e,i){return i/(n.length-1)})),h=n.map((function(n){return(n-d)/(y-d)}));h.every((function(n,i){return _[i]===n}))||(P=function(n){if(n<=0||n>=1)return n;for(var i=0;n>=h[i+1];)i++;var e=(n-h[i])/(h[i+1]-h[i]);return _[i]+e*(_[i+1]-_[i])})}}return o=[d,y],E},E.mode=function(n){return arguments.length?(e=n,N(),E):e},E.range=function(n,e){return O(n),E},E.out=function(n){return h=n,E},E.spread=function(n){return arguments.length?(r=n,E):r},E.correctLightness=function(n){return null==n&&(n=!0),v=n,N(),j=v?function(n){for(var e=R(0,!0).lab()[0],t=R(1,!0).lab()[0],r=e>t,o=R(n,!0).lab()[0],c=e+(t-e)*n,l=o-c,_=0,f=1,h=20;Math.abs(l)>.01&&h-- >0;)r&&(l*=-1),l<0?(_=n,n+=.5*(f-n)):(f=n,n+=.5*(_-n)),o=R(n,!0).lab()[0],l=o-c;return n}:function(n){return n},E},E.padding=function(p){return null!=p?("number"===vi(p)&&(p=[p,p]),l=p,E):l},E.colors=function(e,t){arguments.length<2&&(t="hex");var r=[];if(0===arguments.length)r=f.slice(0);else if(1===e)r=[E(.5)];else if(e>1){var c=o[0],dd=o[1]-c;r=gi(0,e,!1).map((function(i){return E(c+i/(e-1)*dd)}))}else{n=[];var l=[];if(_&&_.length>2)for(var i=1,h=_.length,d=1<=h;d?ih;d?i++:i--)l.push(.5*(_[i-1]+_[i]));else l=o;r=l.map((function(n){return E(n)}))}return yi[t]&&(r=r.map((function(n){return n[t]()}))),r},E.cache=function(n){return null!=n?(k=n,E):k},E.gamma=function(g){return null!=g?(w=g,E):w},E.nodata=function(n){return null!=n?(t=yi(n),E):t},E};function gi(n,e,t){for(var r=[],o=nc;o?i++:i--)r.push(i);return r}var ki=R,wi=mi,Oi=function(n){for(var e=[1,1],i=1;i=5))throw new RangeError("No point in running bezier with only one color.");var h,d,y;h=n.map((function(n){return n.lab()})),y=n.length-1,d=Oi(y),o=function(n){var u=1-n,e=[0,1,2].map((function(i){return h.reduce((function(e,t,r){return e+d[r]*Math.pow(u,y-r)*Math.pow(n,r)*t[i]}),0)}));return new ki(e,"lab")}}return o},ji=function(n){var e=xi(n);return e.scale=function(){return wi(e)},e},Pi=E,Ri=function(n,e,t){if(!Ri[t])throw new Error("unknown blend mode "+t);return Ri[t](n,e)},Ni=function(n){return function(e,t){var r=Pi(t).rgb(),o=Pi(e).rgb();return Pi.rgb(n(r,o))}},Ei=function(n){return function(e,t){var r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r}},Bi=function(a){return a},Si=function(a,b){return a*b/255},Li=function(a,b){return a>b?b:a},Mi=function(a,b){return a>b?a:b},Ai=function(a,b){return 255*(1-(1-a/255)*(1-b/255))},$i=function(a,b){return b<128?2*a*b/255:255*(1-2*(1-a/255)*(1-b/255))},zi=function(a,b){return 255*(1-(1-b/255)/(a/255))},Ki=function(a,b){return 255===a||(a=b/255*255/(1-a/255))>255?255:a};Ri.normal=Ni(Ei(Bi)),Ri.multiply=Ni(Ei(Si)),Ri.screen=Ni(Ei(Ai)),Ri.overlay=Ni(Ei($i)),Ri.darken=Ni(Ei(Li)),Ri.lighten=Ni(Ei(Mi)),Ri.dodge=Ni(Ei(Ki)),Ri.burn=Ni(Ei(zi));for(var Di=Ri,Gi=m.type,Ii=m.clip_rgb,Ti=m.TWOPI,Fi=Math.pow,Ci=Math.sin,qi=Math.cos,Ui=E,Ji=function(n,e,t,r,o){void 0===n&&(n=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===r&&(r=1),void 0===o&&(o=[0,1]);var dl,c=0;"array"===Gi(o)?dl=o[1]-o[0]:(dl=0,o=[o,o]);var l=function(l){var a=Ti*((n+120)/360+e*l),_=Fi(o[0]+dl*l,r),f=(0!==c?t[0]+l*c:t)*_*(1-_)/2,h=qi(a),d=Ci(a);return Ui(Ii([255*(_+f*(-.14861*h+1.78277*d)),255*(_+f*(-.29227*h-.90649*d)),255*(_+f*(1.97294*h)),1]))};return l.start=function(s){return null==s?n:(n=s,l)},l.rotations=function(n){return null==n?e:(e=n,l)},l.gamma=function(g){return null==g?r:(r=g,l)},l.hue=function(n){return null==n?t:("array"===Gi(t=n)?0==(c=t[1]-t[0])&&(t=t[1]):c=0,l)},l.lightness=function(n){return null==n?o:("array"===Gi(n)?(o=n,dl=n[1]-n[0]):(o=[n,n],dl=0),l)},l.scale=function(){return Ui.scale(l)},l.hue(t),l},Yi=R,Vi="0123456789abcdef",Hi=Math.floor,Xi=Math.random,Wi=function(){for(var code="#",i=0;i<6;i++)code+=Vi.charAt(Hi(16*Xi()));return new Yi(code,"hex")},Zi=_,Qi=Math.log,na=Math.pow,ea=Math.floor,ta=Math.abs,ra=function(data,n){void 0===n&&(n=null);var e={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Zi(data)&&(data=Object.values(data)),data.forEach((function(t){n&&"object"===Zi(t)&&(t=t[n]),null==t||isNaN(t)||(e.values.push(t),e.sum+=t,te.max&&(e.max=t),e.count+=1)})),e.domain=[e.min,e.max],e.limits=function(n,t){return oa(e,n,t)},e},oa=function(data,n,e){void 0===n&&(n="equal"),void 0===e&&(e=7),"array"==Zi(data)&&(data=ra(data));var t=data.min,r=data.max,o=data.values.sort((function(a,b){return a-b}));if(1===e)return[t,r];var c=[];if("c"===n.substr(0,1)&&(c.push(t),c.push(r)),"e"===n.substr(0,1)){c.push(t);for(var i=1;i 0");var l=Math.LOG10E*Qi(t),_=Math.LOG10E*Qi(r);c.push(t);for(var f=1;f200&&(O=!1)}for(var G={},I=0;Ie?(n+.05)/(e+.05):(e+.05)/(n+.05)},sa=R,ua=Math.sqrt,la=Math.pow,_a=Math.min,fa=Math.max,ha=Math.atan2,pa=Math.abs,da=Math.cos,ya=Math.sin,va=Math.exp,ba=Math.PI,ma=function(a,b,n,e,t){void 0===n&&(n=1),void 0===e&&(e=1),void 0===t&&(t=1);var r=function(n){return 360*n/(2*ba)},o=function(n){return 2*ba*n/360};a=new sa(a),b=new sa(b);var c=Array.from(a.lab()),l=c[0],_=c[1],f=c[2],h=Array.from(b.lab()),d=h[0],y=h[1],v=h[2],m=(l+d)/2,k=(ua(la(_,2)+la(f,2))+ua(la(y,2)+la(v,2)))/2,w=.5*(1-ua(la(k,7)/(la(k,7)+la(25,7)))),O=_*(1+w),x=y*(1+w),j=ua(la(O,2)+la(f,2)),P=ua(la(x,2)+la(v,2)),R=(j+P)/2,N=r(ha(f,O)),E=r(ha(v,x)),B=N>=0?N:N+360,S=E>=0?E:E+360,L=pa(B-S)>180?(B+S+360)/2:(B+S)/2,M=1-.17*da(o(L-30))+.24*da(o(2*L))+.32*da(o(3*L+6))-.2*da(o(4*L-63)),A=S-B;A=pa(A)<=180?A:S<=B?A+360:A-360,A=2*ua(j*P)*ya(o(A)/2);var $=d-l,z=P-j,K=1+.015*la(m-50,2)/ua(20+la(m-50,2)),D=1+.045*R,G=1+.015*R*M,I=30*va(-la((L-275)/25,2)),T=-2*ua(la(R,7)/(la(R,7)+la(25,7)))*ya(2*o(I)),F=ua(la($/(n*K),2)+la(z/(e*D),2)+la(A/(t*G),2)+T*(z/(e*D))*(A/(t*G)));return fa(0,_a(100,F))},ga=R,ka=function(a,b,n){void 0===n&&(n="lab"),a=new ga(a),b=new ga(b);var e=a.get(n),t=b.get(n),r=0;for(var i in e){var o=(e[i]||0)-(t[i]||0);r+=o*o}return Math.sqrt(r)},wa=R,Oa=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];try{return new(Function.prototype.bind.apply(wa,[null].concat(n))),!0}catch(n){return!1}},xa=E,ja=mi,Pa={cool:function(){return ja([xa.hsl(180,1,.9),xa.hsl(250,.7,.4)])},hot:function(){return ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ra={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},i=0,Na=Object.keys(Ra);i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i0?R:L)(d)},$=function(d){if(null==d)throw TypeError("Can't call method on "+d);return d},z=(M=!1,function(d,e){var a,b,s=String($(d)),i=U(e),t=s.length;return i<0||i>=t?M?"":void 0:(a=s.charCodeAt(i))<55296||a>56319||i+1===t||(b=s.charCodeAt(i+1))<56320||b>57343?M?s.charAt(i):a:M?s.slice(i,i+2):b-56320+(a-55296<<10)+65536});T(T.P,"String",{codePointAt:function(d){return z(this,d)}}),t.String.codePointAt;var G=Math.max,H=Math.min,V=function(d,e){return(d=U(d))<0?G(d+e,0):H(d,e)},J=String.fromCharCode,Z=String.fromCodePoint;T(T.S+T.F*(!!Z&&1!=Z.length),"String",{fromCodePoint:function(d){for(var code,e=arguments,t=[],n=arguments.length,i=0;n>i;){if(code=+e[i++],V(code,1114111)!==code)throw RangeError(code+" is not a valid code point");t.push(code<65536?J(code):J(55296+((code-=65536)>>10),code%1024+56320))}return t.join("")}}),t.String.fromCodePoint;var source,K,W,Y,line,X,Q,uu,du,eu,tu,nu,ru,fu,cu={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},au={isSpaceSeparator:function(d){return"string"==typeof d&&cu.Space_Separator.test(d)},isIdStartChar:function(d){return"string"==typeof d&&(d>="a"&&d<="z"||d>="A"&&d<="Z"||"$"===d||"_"===d||cu.ID_Start.test(d))},isIdContinueChar:function(d){return"string"==typeof d&&(d>="a"&&d<="z"||d>="A"&&d<="Z"||d>="0"&&d<="9"||"$"===d||"_"===d||"‌"===d||"‍"===d||cu.ID_Continue.test(d))},isDigit:function(d){return"string"==typeof d&&/[0-9]/.test(d)},isHexDigit:function(d){return"string"==typeof d&&/[0-9A-Fa-f]/.test(d)}},Du=function(text,d){source=String(text),K="start",W=[],Y=0,line=1,X=0,Q=void 0,uu=void 0,du=void 0;do{Q=iu(),vu[K]()}while("eof"!==Q.type);return"function"==typeof d?ou({"":du},"",d):du};function ou(d,e,t){var n=d[e];if(null!=n&&"object"==typeof n)if(Array.isArray(n))for(var i=0;i0;){var t=su();if(!au.isHexDigit(t))throw mu(lu());d+=lu()}return String.fromCodePoint(parseInt(d,16))}var vu={start:function(){if("eof"===Q.type)throw gu();Bu()},beforePropertyName:function(){switch(Q.type){case"identifier":case"string":return uu=Q.value,void(K="afterPropertyName");case"punctuator":return void hu();case"eof":throw gu()}},afterPropertyName:function(){if("eof"===Q.type)throw gu();K="beforePropertyValue"},beforePropertyValue:function(){if("eof"===Q.type)throw gu();Bu()},beforeArrayValue:function(){if("eof"===Q.type)throw gu();"punctuator"!==Q.type||"]"!==Q.value?Bu():hu()},afterPropertyValue:function(){if("eof"===Q.type)throw gu();switch(Q.value){case",":return void(K="beforePropertyName");case"}":hu()}},afterArrayValue:function(){if("eof"===Q.type)throw gu();switch(Q.value){case",":return void(K="beforeArrayValue");case"]":hu()}},end:function(){}};function Bu(){var d;switch(Q.type){case"punctuator":switch(Q.value){case"{":d={};break;case"[":d=[]}break;case"null":case"boolean":case"numeric":case"string":d=Q.value}if(void 0===du)du=d;else{var e=W[W.length-1];Array.isArray(e)?e.push(d):Object.defineProperty(e,uu,{value:d,writable:!0,enumerable:!0,configurable:!0})}if(null!==d&&"object"==typeof d)W.push(d),K=Array.isArray(d)?"beforeArrayValue":"beforePropertyName";else{var t=W[W.length-1];K=null==t?"end":Array.isArray(t)?"afterArrayValue":"afterPropertyValue"}}function hu(){W.pop();var d=W[W.length-1];K=null==d?"end":Array.isArray(d)?"afterArrayValue":"afterPropertyValue"}function mu(d){return Su(void 0===d?"JSON5: invalid end of input at "+line+":"+X:"JSON5: invalid character '"+wu(d)+"' at "+line+":"+X)}function gu(){return Su("JSON5: invalid end of input at "+line+":"+X)}function yu(){return Su("JSON5: invalid identifier character at "+line+":"+(X-=5))}function xu(d){console.warn("JSON5: '"+wu(d)+"' in strings is not valid ECMAScript; consider escaping")}function wu(d){var e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[d])return e[d];if(d<" "){var t=d.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return d}function Su(d){var e=new SyntaxError(d);return e.lineNumber=line,e.columnNumber=X,e}return{parse:Du,stringify:function(d,e,t){var n,r,f,c=[],D="",o="";if(null==e||"object"!=typeof e||Array.isArray(e)||(t=e.space,f=e.quote,e=e.replacer),"function"==typeof e)r=e;else if(Array.isArray(e)){n=[];for(var i=0,l=e;i0&&(t=Math.min(10,Math.floor(t)),o=" ".substr(0,t)):"string"==typeof t&&(o=t.substr(0,10)),A("",{"":d});function A(d,e){var t=e[d];switch(null!=t&&("function"==typeof t.toJSON5?t=t.toJSON5(d):"function"==typeof t.toJSON&&(t=t.toJSON(d))),r&&(t=r.call(e,d,t)),t instanceof Number?t=Number(t):t instanceof String?t=String(t):t instanceof Boolean&&(t=t.valueOf()),t){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof t?E(t,!1):"number"==typeof t?String(t):"object"==typeof t?Array.isArray(t)?h(t):v(t):void 0}function E(d){for(var e={"'":.1,'"':.2},t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},n="",i=0;i=0)throw TypeError("Converting circular structure to JSON5");c.push(d);var e=D;D+=o;for(var t,r,f=[],i=0,l=n||Object.keys(d);i=0)throw TypeError("Converting circular structure to JSON5");c.push(d);var e=D;D+=o;for(var t,n=[],i=0;i1||"".split(/.?/).length?function(d,t){var f=v(F(this)),c=void 0===t?_:t>>>0;if(0===c)return[];if(void 0===d)return[f];if(!l(d))return r(e,f,d,c);for(var D,o,C,output=[],A=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(d.sticky?"y":""),E=0,B=new RegExp(d.source,A+"g");(D=r(y,B,f))&&!((o=B.lastIndex)>E&&(j(output,N(f,E,D.index)),D.length>1&&D.index=c));)B.lastIndex===D.index&&B.lastIndex++;return E===f.length?!C&&P(B,"")||j(output,""):j(output,N(f,E)),output.length>c?h(output,0,c):output}:"0".split(void 0,0).length?function(d,t){return void 0===d&&0===t?[]:r(e,this,d,t)}:e,[function(e,t){var n=F(this),c=o(e)?void 0:B(e,d);return c?r(c,e,n,t):r(f,v(n),e,t)},function(d,n){var r=D(this),c=v(d),o=t(f,r,c,n,f!==e);if(o.done)return o.value;var l=C(r,RegExp),F=r.unicode,B=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(S?"g":"y"),h=new l(S?"^(?:"+r.source+")":r,B),y=void 0===n?_:n>>>0;if(0===y)return[];if(0===c.length)return null===m(h,c)?[c]:[];for(var p=0,q=0,x=[];q(d.forEach((d=>{const t=e[d];if(null!=t){if(t in a)throw new Error([`${this.name}#${d} ${JSON.stringify(t)} is duplicate`,`Existing: ${JSON.stringify(Object.keys(a))}`,`Conflict: ${JSON.stringify(e)}`].join("\n"));a[t]=e}})),a)),{})}static lookup(d){return d instanceof this?d:"number"==typeof d?this.codes_hash[d]:this.keys_hash[d]}static fetch(d){const element=this.lookup(d);if(!element)throw new Error([`${this.name}.fetch(${JSON.stringify(d)}) does not match anything`,`keys: ${JSON.stringify(this.keys)}`,`codes: ${JSON.stringify(this.codes)}`].join("\n"));return element}static fetch_if(d){if(null!=d)return this.fetch(d)}static lookup_or_first(d){return this.lookup(d)||this.values[0]}static get values(){return void 0!==this._values||(this._values=f.default.map(this.__source_records,((d,i)=>("code"in(d=Object.assign({},d,{index:i}))||(d=Object.assign({},d,{code:i})),"key"in d||(d=Object.assign({},d,{key:`_key${i}`})),Object.freeze(new this(d)))))),this._values}static get keys_hash(){return null!=this._keys_hash||(this._keys_hash=this.memory_record_create_index_by(["key"])),this._keys_hash}static get codes_hash(){return null!=this._codes_hash||(this._codes_hash=this.memory_record_create_index_by(["code"])),this._codes_hash}static get keys(){return null!=this._keys||(this._keys=Object.keys(this.keys_hash)),this._keys}static get codes(){return null!=this._codes||(this._codes=this.values.map((d=>d.code))),this._codes}static get names(){return null!=this._names||(this._names=this.values.map((d=>d.name))),this._names}static get count(){return this.values.length}static get __source_records(){return null!=this._records||(this._records=this.define),this._records}constructor(d){Object.defineProperty(this,"attributes",{value:d,writable:!1,enumerable:!1,configurable:!1}),f.default.forIn(d,((d,e)=>{Object.defineProperty(this,e,{value:d,writable:!1,enumerable:!0,configurable:!1})})),"name"in this||Object.defineProperty(this,"name",{value:d.name||d.key.toString(),writable:!1,enumerable:!0,configurable:!1})}}if(e.default=c,void 0!==d&&d.argv[1]===n){class d extends c{static get define(){return[{key:"black",name:"☗"},{key:"white",name:"☖"},{code:7}]}}console.log(d.keys),console.log(d.codes);const e=d.values[0];console.log(e.key),console.log(e.code),console.log(e.name),console.log(d.values),console.log(d.lookup("black").name),console.log(d.lookup("black").code),console.log(d.lookup("_key2").name);let t=d.lookup("black");console.log(t instanceof d),console.log(d.lookup(0)),console.log(d.lookup(1)),console.log(d.lookup(2)),console.log(d.values[0]==d.values[0]),console.log(d.values.map((d=>d.key))),console.log(Object.keys(d.keys_hash)),console.log(d.fetch("unknown"))}}).call(this,t(179),"/index.js")},function(d,e,t){"use strict";var n=t(4),r=t(106).find,f=t(181),c="find",D=!0;c in[]&&Array(1)[c]((function(){D=!1})),n({target:"Array",proto:!0,forced:D},{find:function(d){return r(this,d,arguments.length>1?arguments[1]:void 0)}}),f(c)},function(d,e,t){var n=t(4),r=t(582),f=t(5),c=t(24),D=t(597).onFreeze,o=Object.freeze;n({target:"Object",stat:!0,forced:f((function(){o(1)})),sham:!r},{freeze:function(d){return o&&c(d)?o(D(d)):d}})},,,,,,,,,,,,,,,,,,,,,,,,,,,function(d,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Xinteger=void 0;var n=t(855),r={imodulo:function(d,e){return n.Xassertion.assert_nonzero(e),d%=e,(d=Math.trunc(d))<0&&(d=e+d),d+0},idiv:function(d,e){return n.Xassertion.assert_nonzero(e),Math.floor(d/e)},idivmod:function(d,e){return[this.idiv(d,e),this.imodulo(d,e)]},even_p:function(d){return d%2==0},odd_p:function(d){return!this.even_p(d)},gcd:function(a,b){return 0===a?b:this.gcd(b%a,a)},lcm:function(a,b){return a*b/this.gcd(a,b)},iclamp:function(d,e,t){if(t1&&"undefined"==typeof MSStream};function x(param){var nav={userAgent:"",platform:"",maxTouchPoints:0};param||"undefined"==typeof navigator?"string"==typeof param?nav.userAgent=param:param&¶m.userAgent&&(nav={userAgent:param.userAgent,platform:param.platform,maxTouchPoints:param.maxTouchPoints||0}):nav={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var d=nav.userAgent,e=d.split("[FBAN");void 0!==e[1]&&(d=e[0]),void 0!==(e=d.split("Twitter"))[1]&&(d=e[0]);var t=function(d){return function(e){return e.test(d)}}(d),x={apple:{phone:t(n)&&!t(C),ipod:t(r),tablet:!t(n)&&(t(f)||y(nav))&&!t(C),universal:t(c),device:(t(n)||t(r)||t(f)||t(c)||y(nav))&&!t(C)},amazon:{phone:t(l),tablet:!t(l)&&t(F),device:t(l)||t(F)},android:{phone:!t(C)&&t(l)||!t(C)&&t(D),tablet:!t(C)&&!t(l)&&!t(D)&&(t(F)||t(o)),device:!t(C)&&(t(l)||t(F)||t(D)||t(o))||t(/\bokhttp\b/i)},windows:{phone:t(C),tablet:t(A),device:t(C)||t(A)},other:{blackberry:t(E),blackberry10:t(v),opera:t(B),firefox:t(m),chrome:t(h),device:t(E)||t(v)||t(B)||t(m)||t(h)},any:!1,phone:!1,tablet:!1};return x.any=x.apple.device||x.android.device||x.windows.device||x.other.device,x.phone=x.apple.phone||x.android.phone||x.windows.phone,x.tablet=x.apple.tablet||x.android.tablet||x.windows.tablet,x}},function(d,e,t){"use strict";var n=t(578),r=t(645),f=t(628),c=t(577),D=t(647).f,o=t(694),path=t(584),l=t(634),F=t(604),C=t(579),A=function(d){var e=function(a,b,t){if(this instanceof e){switch(arguments.length){case 0:return new d;case 1:return new d(a);case 2:return new d(a,b)}return new d(a,b,t)}return r(d,this,arguments)};return e.prototype=d.prototype,e};d.exports=function(d,source){var e,t,r,E,v,B,h,m,y,x=d.target,w=d.global,S=d.stat,_=d.proto,O=w?n:S?n[x]:(n[x]||{}).prototype,k=w?path:path[x]||F(path,x,{})[x],P=k.prototype;for(E in source)t=!(e=o(w?E:x+(S?".":"#")+E,d.forced))&&O&&C(O,E),B=k[E],t&&(h=d.dontCallGetSet?(y=D(O,E))&&y.value:O[E]),v=t&&h?h:source[E],t&&typeof B==typeof v||(m=d.bind&&t?l(v,n):d.wrap&&t?A(v):_&&c(v)?f(v):v,(d.sham||v&&v.sham||B&&B.sham)&&F(m,"sham",!0),F(k,E,m),_&&(C(path,r=x+"Prototype")||F(path,r,{}),F(path[r],E,v),d.real&&P&&(e||!P[E])&&F(P,E,v)))}},function(d,e,t){var path=t(584),n=t(579),r=t(674),f=t(585).f;d.exports=function(d){var e=path.Symbol||(path.Symbol={});n(e,d)||f(e,d,{value:r.f(d)})}},function(d,e,t){var n=t(613),r=Function.prototype,f=r.call,c=n&&r.bind.bind(f,f);d.exports=n?c:function(d){return function(){return f.apply(d,arguments)}}},function(d,e){d.exports=function(d){try{return!!d()}catch(d){return!0}}},function(d,e,t){var n=t(578),r=t(603),f=t(579),c=t(633),D=t(601),o=t(649),l=n.Symbol,F=r("wks"),C=o?l.for||l:l&&l.withoutSetter||c;d.exports=function(d){return f(F,d)||(F[d]=D&&f(l,d)?l[d]:C("Symbol."+d)),F[d]}},function(d,e,t){var n=t(646),r=n.all;d.exports=n.IS_HTMLDDA?function(d){return"function"==typeof d||d===r}:function(d){return"function"==typeof d}},function(d,e,t){(function(e){var t=function(d){return d&&d.Math==Math&&d};d.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||function(){return this}()||this||Function("return this")()}).call(this,t(53))},function(d,e,t){var n=t(574),r=t(588),f=n({}.hasOwnProperty);d.exports=Object.hasOwn||function(d,e){return f(r(d),e)}},function(d,e,t){var n=t(575);d.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(d,e,t){var n=t(574);d.exports=n({}.isPrototypeOf)},function(d,e,t){var n=t(5);d.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(d,e,t){var n=t(613),r=Function.prototype.call;d.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},function(d,e){d.exports={}},function(d,e,t){var n=t(580),r=t(650),f=t(652),c=t(589),D=t(615),o=TypeError,l=Object.defineProperty,F=Object.getOwnPropertyDescriptor,C="enumerable",A="configurable",E="writable";e.f=n?f?function(d,e,t){if(c(d),e=D(e),c(t),"function"==typeof d&&"prototype"===e&&"value"in t&&E in t&&!t[E]){var n=F(d,e);n&&n[E]&&(d[e]=t.value,t={configurable:A in t?t[A]:n[A],enumerable:C in t?t[C]:n[C],writable:!1})}return l(d,e,t)}:l:function(d,e,t){if(c(d),e=D(e),c(t),r)try{return l(d,e,t)}catch(d){}if("get"in t||"set"in t)throw o("Accessors not supported");return"value"in t&&(d[e]=t.value),d}},function(d,e,t){var n=t(577),r=t(646),f=r.all;d.exports=r.IS_HTMLDDA?function(d){return"object"==typeof d?null!==d:n(d)||d===f}:function(d){return"object"==typeof d?null!==d:n(d)}},function(d,e,t){var path=t(584),n=t(578),r=t(577),f=function(d){return r(d)?d:void 0};d.exports=function(d,e){return arguments.length<2?f(path[d])||f(n[d]):path[d]&&path[d][e]||n[d]&&n[d][e]}},function(d,e,t){var n=t(614),r=Object;d.exports=function(d){return r(n(d))}},function(d,e,t){var n=t(586),r=String,f=TypeError;d.exports=function(d){if(n(d))return d;throw f(r(d)+" is not an object")}},function(d,e,t){var n=t(701);d.exports=function(d){return n(d.length)}},function(d,e,t){d.exports=t(688)},function(d,e,t){var n=t(629),r=t(614);d.exports=function(d){return n(r(d))}},function(d,e){d.exports=function(d){return d&&d.__esModule?d:{default:d}},d.exports.__esModule=!0,d.exports.default=d.exports},function(d,e,t){var path=t(584);d.exports=function(d){return path[d+"Prototype"]}},function(d,e,t){var n=t(606),r=String;d.exports=function(d){if("Symbol"===n(d))throw TypeError("Cannot convert a Symbol value to a string");return r(d)}},function(d,e,t){"use strict";var n=t(6),r=t(46),f=t(24),c=t(16),D=t(105),o=t(103),l=Function,F=n([].concat),C=n([].join),A={};d.exports=o?l.bind:function(d){var e=r(this),t=e.prototype,n=D(arguments,1),o=function(){var t=F(n,D(arguments));return this instanceof o?function(d,e,t){if(!c(A,e)){for(var n=[],i=0;i0&&n[0]<4?1:+(n[0]+n[1])),!r&&c&&(!(n=c.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=c.match(/Chrome\/(\d+)/))&&(r=+n[1]),d.exports=r},function(d,e){d.exports=!0},function(d,e,t){var n=t(636),r=t(585).f,f=t(604),c=t(579),D=t(709),o=t(576)("toStringTag");d.exports=function(d,e,t,l){if(d){var F=t?d:d.prototype;c(F,o)||r(F,o,{configurable:!0,value:e}),l&&!n&&f(F,"toString",D)}}},function(d,e,t){var n=t(575);d.exports=!n((function(){var d=function(){}.bind();return"function"!=typeof d||d.hasOwnProperty("prototype")}))},function(d,e,t){var n=t(630),r=TypeError;d.exports=function(d){if(n(d))throw r("Can't call method on "+d);return d}},function(d,e,t){var n=t(691),r=t(609);d.exports=function(d){var e=n(d,"string");return r(e)?e:e+""}},function(d,e){d.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(d,e){var t=String;d.exports=function(d){try{return t(d)}catch(d){return"Object"}}},function(d,e,t){d.exports=t(653)},function(d,e,t){"use strict";var n=t(615),r=t(585),f=t(608);d.exports=function(object,d,e){var t=n(d);t in object?r.f(object,t,f(0,e)):object[t]=e}},function(d,e,t){var n=t(603),r=t(633),f=n("keys");d.exports=function(d){return f[d]||(f[d]=r(d))}},function(d,e){d.exports={}},function(d,e,t){var n,r=t(589),f=t(660),c=t(641),D=t(621),html=t(707),o=t(651),l=t(620),F="prototype",C="script",A=l("IE_PROTO"),E=function(){},v=function(content){return"<"+C+">"+content+""},B=function(d){d.write(v("")),d.close();var e=d.parentWindow.Object;return d=null,e},h=function(){try{n=new ActiveXObject("htmlfile")}catch(d){}var d,iframe,e;h="undefined"!=typeof document?document.domain&&n?B(n):(iframe=o("iframe"),e="java"+C+":",iframe.style.display="none",html.appendChild(iframe),iframe.src=String(e),(d=iframe.contentWindow.document).open(),d.write(v("document.F=Object")),d.close(),d.F):B(n);for(var t=c.length;t--;)delete h[F][c[t]];return h()};D[A]=!0,d.exports=Object.create||function(d,e){var t;return null!==d?(E[F]=r(d),t=new E,E[F]=null,t[A]=d):t=h(),void 0===e?t:f.f(t,e)}},function(d,e,t){var n=t(604);d.exports=function(d,e,t,r){return r&&r.enumerable?d[e]=t:n(d,e,t),d}},function(d,e,t){"use strict";var n=t(575);d.exports=function(d,e){var t=[][d];return!!t&&n((function(){t.call(null,e||function(){return 1},1)}))}},function(d,e,t){d.exports=t(818)},function(d,e,t){d.exports=t(831)},function(d,e,t){var n=t(107).PROPER,r=t(5),f=t(350);d.exports=function(d){return r((function(){return!!f[d]()||"​…᠎"!=="​…᠎"[d]()||n&&f[d].name!==d}))}},function(d,e,t){var n=t(600),r=t(574);d.exports=function(d){if("Function"===n(d))return r(d)}},function(d,e,t){var n=t(574),r=t(575),f=t(600),c=Object,D=n("".split);d.exports=r((function(){return!c("z").propertyIsEnumerable(0)}))?function(d){return"String"==f(d)?D(d,""):c(d)}:c},function(d,e){d.exports=function(d){return null==d}},function(d,e,t){var n=t(602),r=t(630);d.exports=function(d,e){var t=d[e];return r(t)?void 0:n(t)}},function(d,e,t){var n=t(578),r=t(693),f="__core-js_shared__",c=n[f]||r(f,{});d.exports=c},function(d,e,t){var n=t(574),r=0,f=Math.random(),c=n(1..toString);d.exports=function(d){return"Symbol("+(void 0===d?"":d)+")_"+c(++r+f,36)}},function(d,e,t){var n=t(628),r=t(602),f=t(613),c=n(n.bind);d.exports=function(d,e){return r(d),void 0===e?d:f?c(d,e):function(){return d.apply(e,arguments)}}},function(d,e,t){var n=t(574),r=t(575),f=t(577),c=t(606),D=t(587),o=t(699),l=function(){},F=[],C=D("Reflect","construct"),A=/^\s*(?:class|function)\b/,E=n(A.exec),v=!A.exec(l),B=function(d){if(!f(d))return!1;try{return C(l,F,d),!0}catch(d){return!1}},h=function(d){if(!f(d))return!1;switch(c(d)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!E(A,o(d))}catch(d){return!0}};h.sham=!0,d.exports=!C||r((function(){var d;return B(B.call)||!B(Object)||!B((function(){d=!0}))||d}))?h:B},function(d,e,t){var n={};n[t(576)("toStringTag")]="z",d.exports="[object z]"===String(n)},function(d,e,t){var n=t(638),r=Math.max,f=Math.min;d.exports=function(d,e){var t=n(d);return t<0?r(t+e,0):f(t,e)}},function(d,e,t){var n=t(700);d.exports=function(d){var e=+d;return e!=e||0===e?0:n(e)}},function(d,e,t){var n=t(575),r=t(576),f=t(610),c=r("species");d.exports=function(d){return f>=51||!n((function(){var e=[];return(e.constructor={})[c]=function(){return{foo:1}},1!==e[d](Boolean).foo}))}},function(d,e,t){var n,r,f,c=t(704),D=t(578),o=t(586),l=t(604),F=t(579),C=t(632),A=t(620),E=t(621),v="Object already initialized",B=D.TypeError,h=D.WeakMap;if(c||C.state){var m=C.state||(C.state=new h);m.get=m.get,m.has=m.has,m.set=m.set,n=function(d,e){if(m.has(d))throw B(v);return e.facade=d,m.set(d,e),e},r=function(d){return m.get(d)||{}},f=function(d){return m.has(d)}}else{var y=A("state");E[y]=!0,n=function(d,e){if(F(d,y))throw B(v);return e.facade=d,l(d,y,e),e},r=function(d){return F(d,y)?d[y]:{}},f=function(d){return F(d,y)}}d.exports={set:n,get:r,has:f,enforce:function(d){return f(d)?r(d):n(d,{})},getterFor:function(d){return function(e){var t;if(!o(e)||(t=r(e)).type!==d)throw B("Incompatible receiver, "+d+" required");return t}}}},function(d,e){d.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(d,e,t){var n=t(606),r=t(631),f=t(630),c=t(607),D=t(576)("iterator");d.exports=function(d){if(!f(d))return r(d,D)||r(d,"@@iterator")||c[n(d)]}},function(d,e,t){var n=t(634),r=t(574),f=t(629),c=t(588),D=t(590),o=t(670),l=r([].push),F=function(d){var e=1==d,t=2==d,r=3==d,F=4==d,C=6==d,A=7==d,E=5==d||C;return function(v,B,h,m){for(var y,x,w=c(v),S=f(w),_=n(B,h),O=D(S),k=0,P=m||o,j=e?P(v,O):t||A?P(v,0):void 0;O>k;k++)if((E||k in S)&&(x=_(y=S[k],k,w),d))if(e)j[k]=x;else if(x)switch(d){case 3:return!0;case 5:return y;case 6:return k;case 2:l(j,y)}else switch(d){case 4:return!1;case 7:l(j,y)}return C?-1:r||F?F:j}};d.exports={forEach:F(0),map:F(1),filter:F(2),some:F(3),every:F(4),find:F(5),findIndex:F(6),filterReject:F(7)}},function(d,e,t){t(677);var n=t(750),r=t(578),f=t(606),c=t(604),D=t(607),o=t(576)("toStringTag");for(var l in n){var F=r[l],C=F&&F.prototype;C&&f(C)!==o&&c(C,o,l),D[l]=D.Array}},function(d,e,t){var n=t(613),r=Function.prototype,f=r.apply,c=r.call;d.exports="object"==typeof Reflect&&Reflect.apply||(n?c.bind(f):function(){return c.apply(f,arguments)})},function(d,e){var t="object"==typeof document&&document.all,n=void 0===t&&void 0!==t;d.exports={all:t,IS_HTMLDDA:n}},function(d,e,t){var n=t(580),r=t(583),f=t(648),c=t(608),D=t(592),o=t(615),l=t(579),F=t(650),C=Object.getOwnPropertyDescriptor;e.f=n?C:function(d,e){if(d=D(d),e=o(e),F)try{return C(d,e)}catch(d){}if(l(d,e))return c(!r(f.f,d,e),d[e])}},function(d,e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,f=r&&!n.call({1:2},1);e.f=f?function(d){var e=r(this,d);return!!e&&e.enumerable}:n},function(d,e,t){var n=t(601);d.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(d,e,t){var n=t(580),r=t(575),f=t(651);d.exports=!n&&!r((function(){return 7!=Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a}))},function(d,e,t){var n=t(578),r=t(586),f=n.document,c=r(f)&&r(f.createElement);d.exports=function(d){return c?f.createElement(d):{}}},function(d,e,t){var n=t(580),r=t(575);d.exports=n&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(d,e,t){var n=t(696);d.exports=n},function(d,e,t){var n=t(574);d.exports=n([].slice)},function(d,e,t){d.exports=t(656)},function(d,e,t){var n=t(702);d.exports=n},function(d,e,t){"use strict";var n=t(703).charAt,r=t(595),f=t(640),c=t(658),D=t(665),o="String Iterator",l=f.set,F=f.getterFor(o);c(String,"String",(function(d){l(this,{type:o,string:r(d),index:0})}),(function(){var d,e=F(this),t=e.string,r=e.index;return r>=t.length?D(void 0,!0):(d=n(t,r),e.index+=d.length,D(d,!1))}))},function(d,e,t){"use strict";var n=t(572),r=t(583),f=t(611),c=t(705),D=t(577),o=t(706),l=t(664),F=t(710),C=t(612),A=t(604),E=t(623),v=t(576),B=t(607),h=t(659),m=c.PROPER,y=c.CONFIGURABLE,x=h.IteratorPrototype,w=h.BUGGY_SAFARI_ITERATORS,S=v("iterator"),_="keys",O="values",k="entries",P=function(){return this};d.exports=function(d,e,t,c,v,h,j){o(t,e,c);var N,I,M,T=function(d){if(d===v&&z)return z;if(!w&&d in U)return U[d];switch(d){case _:case O:case k:return function(){return new t(this,d)}}return function(){return new t(this)}},L=e+" Iterator",R=!1,U=d.prototype,$=U[S]||U["@@iterator"]||v&&U[v],z=!w&&$||T(v),G="Array"==e&&U.entries||$;if(G&&(N=l(G.call(new d)))!==Object.prototype&&N.next&&(f||l(N)===x||(F?F(N,x):D(N[S])||E(N,S,P)),C(N,L,!0,!0),f&&(B[L]=P)),m&&v==O&&$&&$.name!==O&&(!f&&y?A(U,"name",O):(R=!0,z=function(){return r($,this)})),v)if(I={values:T(O),keys:h?z:T(_),entries:T(k)},j)for(M in I)(w||R||!(M in U))&&E(U,M,I[M]);else n({target:e,proto:!0,forced:w||R},I);return f&&!j||U[S]===z||E(U,S,z,{name:v}),B[e]=z,I}},function(d,e,t){"use strict";var n,r,f,c=t(575),D=t(577),o=t(586),l=t(622),F=t(664),C=t(623),A=t(576),E=t(611),v=A("iterator"),B=!1;[].keys&&("next"in(f=[].keys())?(r=F(F(f)))!==Object.prototype&&(n=r):B=!0),!o(n)||c((function(){var d={};return n[v].call(d)!==d}))?n={}:E&&(n=l(n)),D(n[v])||C(n,v,(function(){return this})),d.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:B}},function(d,e,t){var n=t(580),r=t(652),f=t(585),c=t(589),D=t(592),o=t(661);e.f=n&&!r?Object.defineProperties:function(d,e){c(d);for(var t,n=D(e),r=o(e),l=r.length,F=0;l>F;)f.f(d,t=r[F++],n[t]);return d}},function(d,e,t){var n=t(662),r=t(641);d.exports=Object.keys||function(d){return n(d,r)}},function(d,e,t){var n=t(574),r=t(579),f=t(592),c=t(663).indexOf,D=t(621),o=n([].push);d.exports=function(object,d){var e,t=f(object),i=0,n=[];for(e in t)!r(D,e)&&r(t,e)&&o(n,e);for(;d.length>i;)r(t,e=d[i++])&&(~c(n,e)||o(n,e));return n}},function(d,e,t){var n=t(592),r=t(637),f=t(590),c=function(d){return function(e,t,c){var D,o=n(e),l=f(o),F=r(c,l);if(d&&t!=t){for(;l>F;)if((D=o[F++])!=D)return!0}else for(;l>F;F++)if((d||F in o)&&o[F]===t)return d||F||0;return!d&&-1}};d.exports={includes:c(!0),indexOf:c(!1)}},function(d,e,t){var n=t(579),r=t(577),f=t(588),c=t(620),D=t(708),o=c("IE_PROTO"),l=Object,F=l.prototype;d.exports=D?l.getPrototypeOf:function(d){var object=f(d);if(n(object,o))return object[o];var e=object.constructor;return r(e)&&object instanceof e?e.prototype:object instanceof l?F:null}},function(d,e){d.exports=function(d,e){return{value:d,done:e}}},function(d,e,t){d.exports=t(667)},function(d,e,t){var n=t(720);t(644),d.exports=n},function(d,e,t){"use strict";var n=t(572),r=t(575),f=t(605),c=t(586),D=t(588),o=t(590),l=t(669),F=t(619),C=t(670),A=t(639),E=t(576),v=t(610),B=E("isConcatSpreadable"),h=v>=51||!r((function(){var d=[];return d[B]=!1,d.concat()[0]!==d})),m=function(d){if(!c(d))return!1;var e=d[B];return void 0!==e?!!e:f(d)};n({target:"Array",proto:!0,arity:1,forced:!h||!A("concat")},{concat:function(d){var i,e,t,n,r,f=D(this),c=C(f,0),A=0;for(i=-1,t=arguments.length;i9007199254740991)throw t("Maximum allowed index exceeded");return d}},function(d,e,t){var n=t(721);d.exports=function(d,e){return new(n(d))(0===e?0:e)}},function(d,e,t){var n=t(662),r=t(641).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(d){return n(d,r)}},function(d,e,t){var n=t(637),r=t(590),f=t(619),c=Array,D=Math.max;d.exports=function(d,e,t){for(var o=r(d),l=n(e,o),F=n(void 0===t?o:t,o),C=c(D(F-l,0)),A=0;l=e.length?(d.target=void 0,l(void 0,!0)):l("keys"==t?n:"values"==t?e[n]:[n,e[n]],!1)}),"values");var B=f.Arguments=f.Array;if(r("keys"),r("values"),r("entries"),!F&&C&&"values"!==B.name)try{D(B,"name",{value:"values"})}catch(d){}},function(d,e,t){d.exports=t(679)},function(d,e,t){d.exports=t(751)},function(d,e,t){d.exports=t(681)},function(d,e,t){var n=t(755);d.exports=n},function(d,e,t){var n=t(757),r=t(761),f=t(786),c=t(794);d.exports=function(d,i){return n(d)||r(d,i)||f(d,i)||c()},d.exports.__esModule=!0,d.exports.default=d.exports},function(d,e,t){var n=t(587),r=t(574),f=n("Symbol"),c=f.keyFor,D=r(f.prototype.valueOf);d.exports=f.isRegisteredSymbol||function(d){try{return void 0!==c(D(d))}catch(d){return!1}}},function(d,e,t){for(var n=t(603),r=t(587),f=t(574),c=t(609),D=t(576),o=r("Symbol"),l=o.isWellKnownSymbol,F=r("Object","getOwnPropertyNames"),C=f(o.prototype.valueOf),A=n("wks"),i=0,E=F(o),v=E.length;i=d.length?{done:!0}:{done:!1,value:d[i++]}},e:function(d){throw d},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,F=!0,C=!1;return{s:function(){t=t.call(d)},n:function(){var d=t.next();return F=d.done,d},e:function(d){C=!0,l=d},f:function(){try{F||null==t.return||t.return()}finally{if(C)throw l}}}}function w(d,e){(null==e||e>d.length)&&(e=d.length);for(var i=0,t=new Array(e);i]+)>|(\d\d?|[\s\S]?))/g,L=void 0===/()??/.exec("")[1],R=void 0!==(0,C.default)(/x/);function U(d){var e=!0;try{if(new RegExp("",d),"y"===d){".."===".a".replace(new RegExp("a","gy"),".")&&(e=!1)}}catch(d){e=!1}return e}var $=U("d"),z=U("s"),G=U("u"),H=U("y"),V={d:$,g:!0,i:!0,m:!0,s:z,u:G,y:H},J=z?/[^dgimsuy]+/g:/[^dgimuy]+/g;function Z(d,e,t,n,r){var f;if(d[S]={captureNames:e},r)return d;if(d.__proto__)d.__proto__=au.prototype;else for(var p in au.prototype)d[p]=au.prototype[p];return d[S].source=t,d[S].flags=n?(0,A.default)(f=n.split("")).call(f).join(""):n,d}function K(d){return d.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function W(d,e){var t;if(!au.isRegExp(d))throw new TypeError("Type RegExp expected");var n=d[S]||{},r=function(d){return R?(0,C.default)(d):/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(d))[1]}(d),f="",c="",D=null,o=null;return(e=e||{}).removeG&&(c+="g"),e.removeY&&(c+="y"),c&&(r=r.replace(new RegExp("[".concat(c,"]+"),"g"),"")),e.addG&&(f+="g"),e.addY&&(f+="y"),f&&(r=K(r+f)),e.isInternalOnly||(void 0!==n.source&&(D=n.source),null!=(0,C.default)(n)&&(o=f?K((0,C.default)(n)+f):(0,C.default)(n))),d=Z(new RegExp(e.source||d.source,r),function(d){return!(!d[S]||!d[S].captureNames)}(d)?(0,E.default)(t=n.captureNames).call(t,0):null,D,o,e.isInternalOnly)}function Y(d){return(0,v.default)(d,16)}function X(d,e,t){var n=d.index+d[0].length,r=d.input[d.index-1],f=d.input[n];return/^[()|]$/.test(r)||/^[()|]$/.test(f)||0===d.index||n===d.input.length||/\(\?(?:[:=!]|<[=!])$/.test(d.input.substring(d.index-4,d.index))||function(pattern,d,e){var t=-1!==(0,B.default)(e).call(e,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/;return t.test((0,E.default)(pattern).call(pattern,d))}(d.input,n,t)?"":"(?:)"}function Q(d){return(0,v.default)(d,10).toString(16)}function uu(d,e){return Object.prototype.toString.call(d)==="[object ".concat(e,"]")}function du(d){if(null==d)throw new TypeError("Cannot convert null or undefined to object");return d}function eu(d){for(;d.length<4;)d="0".concat(d);return d}function tu(d){var e={};return uu(d,"String")?((0,h.default)(au).call(au,d,/[^\s,]+/,(function(d){e[d]=!0})),e):d}function nu(d){if(!/^[\w$]$/.test(d))throw new Error("Flag must be a single character A-Za-z0-9_$");V[d]=!0}function ru(pattern,d,e,t,n){for(var r,f,i=j.length,c=pattern[e],D=null;i--;)if(!((f=j[i]).leadChar&&f.leadChar!==c||f.scope!==t&&"all"!==f.scope||f.flag&&-1===(0,B.default)(d).call(d,f.flag))&&(r=au.exec(pattern,f.regex,e,"sticky"))){D={matchLength:r[0].length,output:f.handler.call(n,r,t,d),reparse:f.reparse};break}return D}function fu(d){_.astral=d}function cu(d){_.namespacing=d}function au(pattern,d){if(au.isRegExp(pattern)){if(void 0!==d)throw new TypeError("Cannot supply flags when copying a RegExp");return W(pattern)}if(pattern=void 0===pattern?"":String(pattern),d=void 0===d?"":String(d),au.isInstalled("astral")&&-1===(0,B.default)(d).call(d,"A")&&(d+="A"),P[pattern]||(P[pattern]={}),!P[pattern][d]){for(var e,t={hasNamedCapture:!1,captureNames:[]},n=N,output="",r=0,f=function(pattern,d){if(K(d)!==d)throw new SyntaxError("Invalid duplicate regex flag ".concat(d));pattern=pattern.replace(/^\(\?([\w$]+)\)/,(function(e,t){if(/[dgy]/.test(t))throw new SyntaxError("Cannot use flags dgy in mode modifier ".concat(e));return d=K(d+t),""}));var e,t=x(d);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(!V[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(d){t.e(d)}finally{t.f()}return{pattern:pattern,flags:d}}(pattern,d),c=f.pattern,D=(0,C.default)(f);r")}else if(t)return"\\".concat(+t+n);return d}if(!uu(d,"Array")||!d.length)throw new TypeError("Must provide a nonempty array of patterns to merge");var o,l=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,output=[],F=x(d);try{for(F.s();!(o=F.n()).done;){var pattern=o.value;au.isRegExp(pattern)?(n=c,r=pattern[S]&&pattern[S].captureNames||[],output.push(au(pattern.source).source.replace(l,D))):output.push(au.escape(pattern))}}catch(d){F.e(d)}finally{F.f()}var C="none"===f?"":"|";return au(output.join(C),e)},O.exec=function(d){var e=this.lastIndex,t=RegExp.prototype.exec.apply(this,arguments);if(t){if(!L&&t.length>1&&-1!==(0,B.default)(t).call(t,"")){var n,r=W(this,{removeG:!0,isInternalOnly:!0});(0,E.default)(n=String(d)).call(n,t.index).replace(r,(function(){for(var d=arguments.length,i=1;it.index&&(this.lastIndex=t.index)}return this.global||(this.lastIndex=e),t},O.test=function(d){return!!O.exec.call(this,d)},O.match=function(d){if(au.isRegExp(d)){if(d.global){var e=String.prototype.match.apply(this,arguments);return d.lastIndex=0,e}}else d=new RegExp(d);return O.exec.call(d,du(this))},O.replace=function(d,e){var t,n,r,f=au.isRegExp(d);return f?(d[S]&&(n=d[S].captureNames),t=d.lastIndex):d+="",r=uu(e,"Function")?String(this).replace(d,(function(){for(var d=arguments.length,t=new Array(d),r=0;rl)throw new SyntaxError("Backreference to undefined group ".concat(d));return t[f]||""}throw new SyntaxError("Invalid token ".concat(d))}))})),f&&(d.global?d.lastIndex=0:d.lastIndex=t),r},O.split=function(d,e){if(!au.isRegExp(d))return String.prototype.split.apply(this,arguments);var t,n=String(this),output=[],r=d.lastIndex,f=0;return e=(void 0===e?-1:e)>>>0,(0,h.default)(au).call(au,n,d,(function(d){d.index+d[0].length>f&&(output.push((0,E.default)(n).call(n,f,d.index)),d.length>1&&d.indexe?(0,E.default)(output).call(output,0,e):output},au.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(d,e){if("B"===d[1]&&e===N)return d[0];throw new SyntaxError("Invalid escape ".concat(d[0]))}),{scope:"all",leadChar:"\\"}),au.addToken(/\\u{([\dA-Fa-f]+)}/,(function(d,e,t){var code=Y(d[1]);if(code>1114111)throw new SyntaxError("Invalid Unicode code point ".concat(d[0]));if(code<=65535)return"\\u".concat(eu(Q(code)));if(G&&-1!==(0,B.default)(t).call(t,"u"))return d[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),au.addToken(/\(\?#[^)]*\)/,X,{leadChar:"("}),au.addToken(/\s+|#[^\n]*\n?/,X,{flag:"x"}),z||au.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),au.addToken(/\\k<([^>]+)>/,(function(d){var e,t,n=isNaN(d[1])?(0,B.default)(e=this.captureNames).call(e,d[1])+1:+d[1],r=d.index+d[0].length;if(!n||n>this.captureNames.length)throw new SyntaxError("Backreference to undefined group ".concat(d[0]));return(0,y.default)(t="\\".concat(n)).call(t,r===d.input.length||isNaN(d.input[r])?"":"(?:)")}),{leadChar:"\\"}),au.addToken(/\\(\d+)/,(function(d,e){if(!(e===N&&/^[1-9]/.test(d[1])&&+d[1]<=this.captureNames.length)&&"0"!==d[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(d[0]));return d[0]}),{scope:"all",leadChar:"\\"}),au.addToken(/\(\?P?<((?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])*)>/,(function(d){var e;if(!au.isInstalled("namespacing")&&("length"===d[1]||"__proto__"===d[1]))throw new SyntaxError("Cannot use reserved word as capture name ".concat(d[0]));if(-1!==(0,B.default)(e=this.captureNames).call(e,d[1]))throw new SyntaxError("Cannot use same name for multiple groups ".concat(d[0]));return this.captureNames.push(d[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),au.addToken(/\((?!\?)/,(function(d,e,t){return-1!==(0,B.default)(t).call(t,"n")?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("});var Du=au;e.default=Du,d.exports=e.default},function(d,e,t){var n=t(581),r=t(697),f=Array.prototype;d.exports=function(d){var e=d.slice;return d===f||n(f,d)&&e===f.slice?r:e}},function(d,e,t){t(698);var n=t(594);d.exports=n("Array").slice},function(d,e,t){"use strict";var n=t(572),r=t(605),f=t(635),c=t(586),D=t(637),o=t(590),l=t(592),F=t(619),C=t(576),A=t(639),E=t(654),v=A("slice"),B=C("species"),h=Array,m=Math.max;n({target:"Array",proto:!0,forced:!v},{slice:function(d,e){var t,n,C,A=l(this),v=o(A),y=D(d,v),x=D(void 0===e?v:e,v);if(r(A)&&(t=A.constructor,(f(t)&&(t===h||r(t.prototype))||c(t)&&null===(t=t[B]))&&(t=void 0),t===h||void 0===t))return E(A,y,x);for(n=new(void 0===t?h:t)(m(x-y,0)),C=0;y0?n:t)(e)}},function(d,e,t){var n=t(638),r=Math.min;d.exports=function(d){return d>0?r(n(d),9007199254740991):0}},function(d,e,t){t(657),t(713);var path=t(584);d.exports=path.Array.from},function(d,e,t){var n=t(574),r=t(638),f=t(595),c=t(614),D=n("".charAt),o=n("".charCodeAt),l=n("".slice),F=function(d){return function(e,t){var n,F,C=f(c(e)),A=r(t),E=C.length;return A<0||A>=E?d?"":void 0:(n=o(C,A))<55296||n>56319||A+1===E||(F=o(C,A+1))<56320||F>57343?d?D(C,A):n:d?l(C,A,A+2):F-56320+(n-55296<<10)+65536}};d.exports={codeAt:F(!1),charAt:F(!0)}},function(d,e,t){var n=t(578),r=t(577),f=n.WeakMap;d.exports=r(f)&&/native code/.test(String(f))},function(d,e,t){var n=t(580),r=t(579),f=Function.prototype,c=n&&Object.getOwnPropertyDescriptor,D=r(f,"name"),o=D&&"something"===function(){}.name,l=D&&(!n||n&&c(f,"name").configurable);d.exports={EXISTS:D,PROPER:o,CONFIGURABLE:l}},function(d,e,t){"use strict";var n=t(659).IteratorPrototype,r=t(622),f=t(608),c=t(612),D=t(607),o=function(){return this};d.exports=function(d,e,t,l){var F=e+" Iterator";return d.prototype=r(n,{next:f(+!l,t)}),c(d,F,!1,!0),D[F]=o,d}},function(d,e,t){var n=t(587);d.exports=n("document","documentElement")},function(d,e,t){var n=t(575);d.exports=!n((function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype}))},function(d,e,t){"use strict";var n=t(636),r=t(606);d.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(d,e,t){var n=t(711),r=t(589),f=t(712);d.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var d,e=!1,t={};try{(d=n(Object.prototype,"__proto__","set"))(t,[]),e=t instanceof Array}catch(d){}return function(t,n){return r(t),f(n),e?d(t,n):t.__proto__=n,t}}():void 0)},function(d,e,t){var n=t(574),r=t(602);d.exports=function(object,d,e){try{return n(r(Object.getOwnPropertyDescriptor(object,d)[e]))}catch(d){}}},function(d,e,t){var n=t(577),r=String,f=TypeError;d.exports=function(d){if("object"==typeof d||n(d))return d;throw f("Can't set "+r(d)+" as a prototype")}},function(d,e,t){var n=t(572),r=t(714);n({target:"Array",stat:!0,forced:!t(719)((function(d){Array.from(d)}))},{from:r})},function(d,e,t){"use strict";var n=t(634),r=t(583),f=t(588),c=t(715),D=t(717),o=t(635),l=t(590),F=t(619),C=t(718),A=t(642),E=Array;d.exports=function(d){var e=f(d),t=o(this),v=arguments.length,B=v>1?arguments[1]:void 0,h=void 0!==B;h&&(B=n(B,v>2?arguments[2]:void 0));var m,y,x,w,S,_,O=A(e),k=0;if(!O||this===E&&D(O))for(m=l(e),y=t?new this(m):E(m);m>k;k++)_=h?B(e[k],k):e[k],F(y,k,_);else for(S=(w=C(e,O)).next,y=t?new this:[];!(x=r(S,w)).done;k++)_=h?c(w,B,[x.value,k],!0):x.value,F(y,k,_);return y.length=k,y}},function(d,e,t){var n=t(589),r=t(716);d.exports=function(d,e,t,f){try{return f?e(n(t)[0],t[1]):e(t)}catch(e){r(d,"throw",e)}}},function(d,e,t){var n=t(583),r=t(589),f=t(631);d.exports=function(d,e,t){var c,D;r(d);try{if(!(c=f(d,"return"))){if("throw"===e)throw t;return t}c=n(c,d)}catch(d){D=!0,c=d}if("throw"===e)throw t;if(D)throw c;return r(c),t}},function(d,e,t){var n=t(576),r=t(607),f=n("iterator"),c=Array.prototype;d.exports=function(d){return void 0!==d&&(r.Array===d||c[f]===d)}},function(d,e,t){var n=t(583),r=t(602),f=t(589),c=t(617),D=t(642),o=TypeError;d.exports=function(d,e){var t=arguments.length<2?D(d):e;if(r(t))return f(n(t,d));throw o(c(d)+" is not iterable")}},function(d,e,t){var n=t(576)("iterator"),r=!1;try{var f=0,c={next:function(){return{done:!!f++}},return:function(){r=!0}};c[n]=function(){return this},Array.from(c,(function(){throw 2}))}catch(d){}d.exports=function(d,e){if(!e&&!r)return!1;var t=!1;try{var object={};object[n]=function(){return{next:function(){return{done:t=!0}}}},d(object)}catch(d){}return t}},function(d,e,t){t(668),t(722),t(723),t(732),t(733),t(734),t(735),t(736),t(737),t(738),t(739),t(740),t(741),t(742),t(743),t(744),t(745),t(746),t(747),t(748);var path=t(584);d.exports=path.Symbol},function(d,e,t){var n=t(605),r=t(635),f=t(586),c=t(576)("species"),D=Array;d.exports=function(d){var e;return n(d)&&(e=d.constructor,(r(e)&&(e===D||n(e.prototype))||f(e)&&null===(e=e[c]))&&(e=void 0)),void 0===e?D:e}},function(d,e){},function(d,e,t){t(724),t(727),t(728),t(729),t(731)},function(d,e,t){"use strict";var n=t(572),r=t(578),f=t(583),c=t(574),D=t(611),o=t(580),l=t(601),F=t(575),C=t(579),A=t(581),E=t(589),v=t(592),B=t(615),h=t(595),m=t(608),y=t(622),x=t(661),w=t(671),S=t(725),_=t(673),O=t(647),k=t(585),P=t(660),j=t(648),N=t(623),I=t(726),M=t(603),T=t(620),L=t(621),R=t(633),U=t(576),$=t(674),z=t(573),G=t(675),H=t(612),V=t(640),J=t(643).forEach,Z=T("hidden"),K="Symbol",W="prototype",Y=V.set,X=V.getterFor(K),Q=Object[W],uu=r.Symbol,du=uu&&uu[W],eu=r.TypeError,tu=r.QObject,nu=O.f,ru=k.f,fu=S.f,cu=j.f,au=c([].push),Du=M("symbols"),ou=M("op-symbols"),iu=M("wks"),su=!tu||!tu[W]||!tu[W].findChild,lu=o&&F((function(){return 7!=y(ru({},"a",{get:function(){return ru(this,"a",{value:7}).a}})).a}))?function(d,e,t){var n=nu(Q,e);n&&delete Q[e],ru(d,e,t),n&&d!==Q&&ru(Q,e,n)}:ru,Fu=function(d,e){var symbol=Du[d]=y(du);return Y(symbol,{type:K,tag:d,description:e}),o||(symbol.description=e),symbol},Cu=function(d,e,t){d===Q&&Cu(ou,e,t),E(d);var n=B(e);return E(t),C(Du,n)?(t.enumerable?(C(d,Z)&&d[Z][n]&&(d[Z][n]=!1),t=y(t,{enumerable:m(0,!1)})):(C(d,Z)||ru(d,Z,m(1,{})),d[Z][n]=!0),lu(d,n,t)):ru(d,n,t)},Au=function(d,e){E(d);var t=v(e),n=x(t).concat(vu(t));return J(n,(function(e){o&&!f(Eu,t,e)||Cu(d,e,t[e])})),d},Eu=function(d){var e=B(d),t=f(cu,this,e);return!(this===Q&&C(Du,e)&&!C(ou,e))&&(!(t||!C(this,e)||!C(Du,e)||C(this,Z)&&this[Z][e])||t)},pu=function(d,e){var t=v(d),n=B(e);if(t!==Q||!C(Du,n)||C(ou,n)){var r=nu(t,n);return!r||!C(Du,n)||C(t,Z)&&t[Z][n]||(r.enumerable=!0),r}},bu=function(d){var e=fu(v(d)),t=[];return J(e,(function(d){C(Du,d)||C(L,d)||au(t,d)})),t},vu=function(d){var e=d===Q,t=fu(e?ou:v(d)),n=[];return J(t,(function(d){!C(Du,d)||e&&!C(Q,d)||au(n,Du[d])})),n};l||(uu=function(){if(A(du,this))throw eu("Symbol is not a constructor");var d=arguments.length&&void 0!==arguments[0]?h(arguments[0]):void 0,e=R(d),t=function(d){this===Q&&f(t,ou,d),C(this,Z)&&C(this[Z],e)&&(this[Z][e]=!1),lu(this,e,m(1,d))};return o&&su&&lu(Q,e,{configurable:!0,set:t}),Fu(e,d)},N(du=uu[W],"toString",(function(){return X(this).tag})),N(uu,"withoutSetter",(function(d){return Fu(R(d),d)})),j.f=Eu,k.f=Cu,P.f=Au,O.f=pu,w.f=S.f=bu,_.f=vu,$.f=function(d){return Fu(U(d),d)},o&&(I(du,"description",{configurable:!0,get:function(){return X(this).description}}),D||N(Q,"propertyIsEnumerable",Eu,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!l,sham:!l},{Symbol:uu}),J(x(iu),(function(d){z(d)})),n({target:K,stat:!0,forced:!l},{useSetter:function(){su=!0},useSimple:function(){su=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!o},{create:function(d,e){return void 0===e?y(d):Au(y(d),e)},defineProperty:Cu,defineProperties:Au,getOwnPropertyDescriptor:pu}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:bu}),G(),H(uu,K),L[Z]=!0},function(d,e,t){var n=t(600),r=t(592),f=t(671).f,c=t(672),D="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(d){return D&&"Window"==n(d)?function(d){try{return f(d)}catch(d){return c(D)}}(d):f(r(d))}},function(d,e,t){var n=t(585);d.exports=function(d,e,t){return n.f(d,e,t)}},function(d,e,t){var n=t(572),r=t(587),f=t(579),c=t(595),D=t(603),o=t(676),l=D("string-to-symbol-registry"),F=D("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!o},{for:function(d){var e=c(d);if(f(l,e))return l[e];var symbol=r("Symbol")(e);return l[e]=symbol,F[symbol]=e,symbol}})},function(d,e,t){var n=t(572),r=t(579),f=t(609),c=t(617),D=t(603),o=t(676),l=D("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!o},{keyFor:function(d){if(!f(d))throw TypeError(c(d)+" is not a symbol");if(r(l,d))return l[d]}})},function(d,e,t){var n=t(572),r=t(587),f=t(645),c=t(583),D=t(574),o=t(575),l=t(577),F=t(609),C=t(654),A=t(730),E=t(601),v=String,B=r("JSON","stringify"),h=D(/./.exec),m=D("".charAt),y=D("".charCodeAt),x=D("".replace),w=D(1..toString),S=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,k=!E||o((function(){var symbol=r("Symbol")();return"[null]"!=B([symbol])||"{}"!=B({a:symbol})||"{}"!=B(Object(symbol))})),P=o((function(){return'"\\udf06\\ud834"'!==B("\udf06\ud834")||'"\\udead"'!==B("\udead")})),j=function(d,e){var t=C(arguments),n=A(e);if(l(n)||void 0!==d&&!F(d))return t[1]=function(d,e){if(l(n)&&(e=c(n,this,v(d),e)),!F(e))return e},f(B,null,t)},N=function(d,e,t){var n=m(t,e-1),r=m(t,e+1);return h(_,d)&&!h(O,r)||h(O,d)&&!h(_,n)?"\\u"+w(y(d,0),16):d};B&&n({target:"JSON",stat:!0,arity:3,forced:k||P},{stringify:function(d,e,t){var n=C(arguments),r=f(k?j:B,null,n);return P&&"string"==typeof r?x(r,S,N):r}})},function(d,e,t){var n=t(574),r=t(605),f=t(577),c=t(600),D=t(595),o=n([].push);d.exports=function(d){if(f(d))return d;if(r(d)){for(var e=d.length,t=[],i=0;id.length)&&(e=d.length);for(var i=0,t=new Array(e);i3)){if(v)return!0;if(h)return h<603;var code,d,e,t,n="";for(code=65;code<76;code++){switch(d=String.fromCharCode(code),code){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(t=0;t<47;t++)m.push({k:d+t,v:e})}for(m.sort((function(a,b){return b.v-a.v})),t=0;tl(t)?1:-1}}(d)),t=D(r),n=0;n0;)d[t]=d[--t];t!==i++&&(d[t]=element)}return d},D=function(d,e,t,n){for(var r=e.length,f=t.length,c=0,D=0;c>>0||(E(A,t)?16:10))}:l},function(d,e,t){var n=t(574),r=t(614),f=t(595),c=t(685),D=n("".replace),o=RegExp("^["+c+"]+"),l=RegExp("(^|[^"+c+"])["+c+"]+$"),F=function(d){return function(e){var t=f(r(e));return 1&d&&(t=D(t,o,"")),2&d&&(t=D(t,l,"$1")),t}};d.exports={start:F(1),end:F(2),trim:F(3)}},function(d,e,t){var n=t(819);d.exports=n},function(d,e,t){var n=t(581),r=t(820),f=Array.prototype;d.exports=function(d){var e=d.indexOf;return d===f||n(f,d)&&e===f.indexOf?r:e}},function(d,e,t){t(821);var n=t(594);d.exports=n("Array").indexOf},function(d,e,t){"use strict";var n=t(572),r=t(628),f=t(663).indexOf,c=t(624),D=r([].indexOf),o=!!D&&1/D([1],1,-0)<0;n({target:"Array",proto:!0,forced:o||!c("indexOf")},{indexOf:function(d){var e=arguments.length>1?arguments[1]:void 0;return o?D(this,d,e)||0:f(this,d,e)}})},function(d,e,t){t(644);var n=t(606),r=t(579),f=t(581),c=t(823),D=Array.prototype,o={DOMTokenList:!0,NodeList:!0};d.exports=function(d){var e=d.forEach;return d===D||f(D,d)&&e===D.forEach||r(o,n(d))?c:e}},function(d,e,t){var n=t(824);d.exports=n},function(d,e,t){t(825);var n=t(594);d.exports=n("Array").forEach},function(d,e,t){"use strict";var n=t(572),r=t(826);n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(d,e,t){"use strict";var n=t(643).forEach,r=t(624)("forEach");d.exports=r?[].forEach:function(d){return n(this,d,arguments.length>1?arguments[1]:void 0)}},function(d,e,t){d.exports=t(828)},function(d,e,t){var n=t(829);d.exports=n},function(d,e,t){t(830);var n=t(584).Object;d.exports=function(d,e){return n.create(d,e)}},function(d,e,t){t(572)({target:"Object",stat:!0,sham:!t(580)},{create:t(622)})},function(d,e,t){var n=t(832);d.exports=n},function(d,e,t){var n=t(581),r=t(833),f=Array.prototype;d.exports=function(d){var e=d.concat;return d===f||n(f,d)&&e===f.concat?r:e}},function(d,e,t){t(668);var n=t(594);d.exports=n("Array").concat},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(835)),c=r(t(842)),D=r(t(625)),o=r(t(626));e.default=function(d){var e="xregexp",t=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,n=d.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,t],"g",{conjunction:"or"});function r(pattern){var d=/^(?:\(\?:\))*\^/,e=/\$(?:\(\?:\))*$/;return d.test(pattern)&&e.test(pattern)&&e.test(pattern.replace(/\\[\s\S]/g,""))?pattern.replace(d,"").replace(e,""):pattern}function l(t,n){var r=n?"x":"";return d.isRegExp(t)?t[e]&&t[e].captureNames?t:d(t.source,r):d(t,r)}function F(e){return e instanceof RegExp?e:d.escape(e)}function C(d,e,t){return d["subpattern".concat(t)]=e,d}function A(d,e,t){return d+(e1?D-1:0),l=1;l")):D="(?:",A=v;var E=data[F].pattern.replace(t,(function(d,e,t){if(e){if(c=data[F].names[v-A],++v,c)return"(?<".concat(c,">")}else if(t)return l=+t-1,data[F].names[l]?"\\k<".concat(data[F].names[l],">"):"\\".concat(+t+A);return d}));return(0,o.default)(C="".concat(D)).call(C,E,")")}if(r){if(c=m[B],h[++B]=++v,c)return"(?<".concat(c,">")}else if(f)return m[l=+f-1]?"\\k<".concat(m[l],">"):"\\".concat(h[+f]);return d}));return d(output,c)}},d.exports=e.default},function(d,e,t){d.exports=t(836)},function(d,e,t){var n=t(837);d.exports=n},function(d,e,t){var n=t(581),r=t(838),f=Array.prototype;d.exports=function(d){var e=d.reduce;return d===f||n(f,d)&&e===f.reduce?r:e}},function(d,e,t){t(839);var n=t(594);d.exports=n("Array").reduce},function(d,e,t){"use strict";var n=t(572),r=t(840).left,f=t(624),c=t(610);n({target:"Array",proto:!0,forced:!t(841)&&c>79&&c<83||!f("reduce")},{reduce:function(d){var e=arguments.length;return r(this,d,e,e>1?arguments[1]:void 0)}})},function(d,e,t){var n=t(602),r=t(588),f=t(629),c=t(590),D=TypeError,o=function(d){return function(e,t,o,l){n(t);var F=r(e),C=f(F),A=c(F),E=d?A-1:0,i=d?-1:1;if(o<2)for(;;){if(E in C){l=C[E],E+=i;break}if(E+=i,d?E<0:A<=E)throw D("Reduce of empty array with no initial value")}for(;d?E>=0:A>E;E+=i)E in C&&(l=t(l,C[E],E,F));return l}};d.exports={left:o(!1),right:o(!0)}},function(d,e,t){(function(e){var n=t(600);d.exports=void 0!==e&&"process"==n(e)}).call(this,t(179))},function(d,e,t){d.exports=t(843)},function(d,e,t){var n=t(844);d.exports=n},function(d,e,t){var n=t(581),r=t(845),f=Array.prototype;d.exports=function(d){var e=d.map;return d===f||n(f,d)&&e===f.map?r:e}},function(d,e,t){t(846);var n=t(594);d.exports=n("Array").map},function(d,e,t){"use strict";var n=t(572),r=t(643).map;n({target:"Array",proto:!0,forced:!t(639)("map")},{map:function(d){return r(this,d,arguments.length>1?arguments[1]:void 0)}})},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(625)),c=r(t(626)),D=r(t(618));e.default=function(d){function e(d,e,t,n){return{name:d,value:e,start:t,end:n}}d.matchRecursive=function(t,n,r,o,l){o=o||"",l=l||{};var F,C=-1!==(0,f.default)(o).call(o,"g"),A=-1!==(0,f.default)(o).call(o,"y"),E=o.replace(/y/g,"");n=d(n,E),r=d(r,E);var v=l.escapeChar;if(v){var B,h;if(v.length>1)throw new Error("Cannot use more than one escape character");v=d.escape(v),F=new RegExp((0,c.default)(B=(0,c.default)(h="(?:".concat(v,"[\\S\\s]|(?:(?!")).call(h,d.union([n,r],"",{conjunction:"or"}).source,")[^")).call(B,v,"])+)+"),o.replace(d._hasNativeFlag("s")?/[^imsu]/g:/[^imu]/g,""))}for(var m,y,x,w,S=0,_=0,O=0,k=0,P=l.valueNames,output=[];;){if(v&&(O+=(d.exec(t,F,O,"sticky")||[""])[0].length),x=d.exec(t,n,O),w=d.exec(t,r,O),x&&w&&(x.index<=w.index?w=null:x=null),x||w)O=(_=(x||w).index)+(x||w)[0].length;else if(!S)break;if(A&&!S&&_>k)break;if(x)S||(m=_,y=O),S+=1;else if(w&&S){if(!(S-=1)&&(P?(P[0]&&m>k&&output.push(e(P[0],(0,D.default)(t).call(t,k,m),k,m)),P[1]&&output.push(e(P[1],(0,D.default)(t).call(t,m,y),m,y)),P[2]&&output.push(e(P[2],(0,D.default)(t).call(t,y,_),y,_)),P[3]&&output.push(e(P[3],(0,D.default)(t).call(t,_,O),_,O))):output.push((0,D.default)(t).call(t,y,_)),k=O,!C))break}else{var j=l.unbalanced||"error";if("skip"!==j&&"skip-lazy"!==j){if("error"===j){var N,I=w?"right":"left",M=w?_:m;throw new Error((0,c.default)(N="Unbalanced ".concat(I," delimiter found in string at position ")).call(N,M))}throw new Error("Unsupported value for unbalanced: ".concat(j))}if(w)w=null;else{if("skip"===j)O=m+(d.exec(t,n,m,"sticky")[0].length||1);else O=m+1;S=0}}_===O&&(O+=1)}return C&&output.length>0&&!A&&P&&P[0]&&t.length>k&&output.push(e(P[0],(0,D.default)(t).call(t,k),k,t.length)),output}},d.exports=e.default},function(d,e,t){"use strict";var n=t(618),r=t(655),f=t(666),c=t(678),D=t(680),o=t(591),l=t(593);o(e,"__esModule",{value:!0}),e.default=void 0;var F=l(t(682)),C=l(t(686)),A=l(t(626)),E=l(t(625));function v(d,e){var t=void 0!==f&&c(d)||d["@@iterator"];if(!t){if(D(d)||(t=function(d,e){var t;if(!d)return;if("string"==typeof d)return B(d,e);var f=n(t=Object.prototype.toString.call(d)).call(t,8,-1);"Object"===f&&d.constructor&&(f=d.constructor.name);if("Map"===f||"Set"===f)return r(d);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return B(d,e)}(d))||e&&d&&"number"==typeof d.length){t&&(d=t);var i=0,o=function(){};return{s:o,n:function(){return i>=d.length?{done:!0}:{done:!1,value:d[i++]}},e:function(d){throw d},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,F=!0,C=!1;return{s:function(){t=t.call(d)},n:function(){var d=t.next();return F=d.done,d},e:function(d){C=!0,l=d},f:function(){try{F||null==t.return||t.return()}finally{if(C)throw l}}}}function B(d,e){(null==e||e>d.length)&&(e=d.length);for(var i=0,t=new Array(e);ic+1&&(output+="\\u".concat(f(r(c+1))),e>c+2&&(output+="-\\u".concat(f(r(e-1))))),c=D(d[2]||d[1])})),c<65535&&(output+="\\u".concat(f(r(c+1))),c<65534&&(output+="-\\uFFFF")),output))}function l(d,t){var n=t?"a!":"a=";return e[d][n]||(e[d][n]=function(d,t){var n,r,f=e[d],c="";return f.bmp&&!f.isBmpLast&&(c=(0,A.default)(n="[".concat(f.bmp,"]")).call(n,f.astral?"|":"")),f.astral&&(c+=f.astral),f.isBmpLast&&f.bmp&&(c+=(0,A.default)(r="".concat(f.astral?"|":"","[")).call(r,f.bmp,"]")),t?"(?:(?!".concat(c,")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-￿]))"):"(?:".concat(c,")")}(d,t))}d.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,(function(d,n,r){var f="Unknown Unicode token ",D=(0,F.default)(d,6),C=D[0],v=D[1],B=D[2],h=D[3],m=D[4],y=D[5],x="P"===v||!!B,w=-1!==(0,E.default)(r).call(r,"A"),S=c(y||m),_=e[S];if("P"===v&&B)throw new SyntaxError("Invalid double negation "+C);if(!e.hasOwnProperty(S))throw new SyntaxError(f+C);if(h&&(!t[h]||!t[h][S]))throw new SyntaxError(f+C);if(_.inverseOf){var O;if(S=c(_.inverseOf),!e.hasOwnProperty(S))throw new ReferenceError((0,A.default)(O="".concat("Unicode token missing data "+C," -> ")).call(O,_.inverseOf));_=e[S],x=!x}if(!_.bmp&&!w)throw new SyntaxError("Astral mode required for Unicode token "+C);if(w){if("class"===n)throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");return l(S,x)}return"class"===n?x?o(S):_.bmp:"".concat((x?"[^":"[")+_.bmp,"]")}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),d.addUnicodeData=function(data,n){n&&(t[n]={});var r,f=v(data);try{for(f.s();!(r=f.n()).done;){var D=r.value;if(!D.name)throw new Error("Unicode token requires name");if(!(D.inverseOf||D.bmp||D.astral))throw new Error("Unicode token has no character data "+D.name);var o=c(D.name);if(e[o]=D,n&&(t[n][o]=!0),D.alias){var l=c(D.alias);e[l]=D,n&&(t[n][l]=!0)}}}catch(d){f.e(d)}finally{f.f()}d.cache.flush("patterns")},d._getUnicodeProperty=function(d){var t=c(d);return e[t]}},d.exports=e.default},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(850));e.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");d.addUnicodeData(f.default)},d.exports=e.default},function(d,e){d.exports=[{name:"C",alias:"Other",isBmpLast:!0,bmp:"\0--Ÿ­͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-؅؜۝܎܏݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏-ࢗ࣢঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠎᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿​-‏‪-‮⁠-⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽-＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￾￿",astral:"\ud800[\udc0c\udc27\udc3b\udc3e\udc4e\udc4f\udc5e-\udc7f\udcfb-\udcff\udd03-\udd06\udd34-\udd36\udd8f\udd9d-\udd9f\udda1-\uddcf\uddfe-\ude7f\ude9d-\ude9f\uded1-\udedf\udefc-\udeff\udf24-\udf2c\udf4b-\udf4f\udf7b-\udf7f\udf9e\udfc4-\udfc7\udfd6-\udfff]|\ud801[\udc9e\udc9f\udcaa-\udcaf\udcd4-\udcd7\udcfc-\udcff\udd28-\udd2f\udd64-\udd6e\udd7b\udd8b\udd93\udd96\udda2\uddb2\uddba\uddbd-\uddff\udf37-\udf3f\udf56-\udf5f\udf68-\udf7f\udf86\udfb1\udfbb-\udfff]|\ud802[\udc06\udc07\udc09\udc36\udc39-\udc3b\udc3d\udc3e\udc56\udc9f-\udca6\udcb0-\udcdf\udcf3\udcf6-\udcfa\udd1c-\udd1e\udd3a-\udd3e\udd40-\udd7f\uddb8-\uddbb\uddd0\uddd1\ude04\ude07-\ude0b\ude14\ude18\ude36\ude37\ude3b-\ude3e\ude49-\ude4f\ude59-\ude5f\udea0-\udebf\udee7-\udeea\udef7-\udeff\udf36-\udf38\udf56\udf57\udf73-\udf77\udf92-\udf98\udf9d-\udfa8\udfb0-\udfff]|\ud803[\udc49-\udc7f\udcb3-\udcbf\udcf3-\udcf9\udd28-\udd2f\udd3a-\ude5f\ude7f\udeaa\udeae\udeaf\udeb2-\udeff\udf28-\udf2f\udf5a-\udf6f\udf8a-\udfaf\udfcc-\udfdf\udff7-\udfff]|\ud804[\udc4e-\udc51\udc76-\udc7e\udcbd\udcc3-\udccf\udce9-\udcef\udcfa-\udcff\udd35\udd48-\udd4f\udd77-\udd7f\udde0\uddf5-\uddff\ude12\ude3f-\ude7f\ude87\ude89\ude8e\ude9e\udeaa-\udeaf\udeeb-\udeef\udefa-\udeff\udf04\udf0d\udf0e\udf11\udf12\udf29\udf31\udf34\udf3a\udf45\udf46\udf49\udf4a\udf4e\udf4f\udf51-\udf56\udf58-\udf5c\udf64\udf65\udf6d-\udf6f\udf75-\udfff]|\ud805[\udc5c\udc62-\udc7f\udcc8-\udccf\udcda-\udd7f\uddb6\uddb7\uddde-\uddff\ude45-\ude4f\ude5a-\ude5f\ude6d-\ude7f\udeba-\udebf\udeca-\udeff\udf1b\udf1c\udf2c-\udf2f\udf47-\udfff]|\ud806[\udc3c-\udc9f\udcf3-\udcfe\udd07\udd08\udd0a\udd0b\udd14\udd17\udd36\udd39\udd3a\udd47-\udd4f\udd5a-\udd9f\udda8\udda9\uddd8\uddd9\udde5-\uddff\ude48-\ude4f\udea3-\udeaf\udef9-\udfff]|\ud807[\udc09\udc37\udc46-\udc4f\udc6d-\udc6f\udc90\udc91\udca8\udcb7-\udcff\udd07\udd0a\udd37-\udd39\udd3b\udd3e\udd48-\udd4f\udd5a-\udd5f\udd66\udd69\udd8f\udd92\udd99-\udd9f\uddaa-\udedf\udef9-\udfaf\udfb1-\udfbf\udff2-\udffe]|\ud808[\udf9a-\udfff]|\ud809[\udc6f\udc75-\udc7f\udd44-\udfff]|[\ud80a\ud80e-\ud810\ud812-\ud819\ud824-\ud82a\ud82d\ud82e\ud830-\ud832\ud83f\ud87b-\ud87d\ud87f\ud885-\udb3f\udb41-\udbff][\udc00-\udfff]|\ud80b[\udc00-\udf8f\udff3-\udfff]|\ud80d[\udc2f-\udfff]|\ud811[\ude47-\udfff]|\ud81a[\ude39-\ude3f\ude5f\ude6a-\ude6d\udebf\udeca-\udecf\udeee\udeef\udef6-\udeff\udf46-\udf4f\udf5a\udf62\udf78-\udf7c\udf90-\udfff]|\ud81b[\udc00-\ude3f\ude9b-\udeff\udf4b-\udf4e\udf88-\udf8e\udfa0-\udfdf\udfe5-\udfef\udff2-\udfff]|\ud821[\udff8-\udfff]|\ud823[\udcd6-\udcff\udd09-\udfff]|\ud82b[\udc00-\udfef\udff4\udffc\udfff]|\ud82c[\udd23-\udd4f\udd53-\udd63\udd68-\udd6f\udefc-\udfff]|\ud82f[\udc6b-\udc6f\udc7d-\udc7f\udc89-\udc8f\udc9a\udc9b\udca0-\udfff]|\ud833[\udc00-\udeff\udf2e\udf2f\udf47-\udf4f\udfc4-\udfff]|\ud834[\udcf6-\udcff\udd27\udd28\udd73-\udd7a\uddeb-\uddff\ude46-\udedf\udef4-\udeff\udf57-\udf5f\udf79-\udfff]|\ud835[\udc55\udc9d\udca0\udca1\udca3\udca4\udca7\udca8\udcad\udcba\udcbc\udcc4\udd06\udd0b\udd0c\udd15\udd1d\udd3a\udd3f\udd45\udd47-\udd49\udd51\udea6\udea7\udfcc\udfcd]|\ud836[\ude8c-\ude9a\udea0\udeb0-\udfff]|\ud837[\udc00-\udeff\udf1f-\udfff]|\ud838[\udc07\udc19\udc1a\udc22\udc25\udc2b-\udcff\udd2d-\udd2f\udd3e\udd3f\udd4a-\udd4d\udd50-\ude8f\udeaf-\udebf\udefa-\udefe\udf00-\udfff]|\ud839[\udc00-\udfdf\udfe7\udfec\udfef\udfff]|\ud83a[\udcc5\udcc6\udcd7-\udcff\udd4c-\udd4f\udd5a-\udd5d\udd60-\udfff]|\ud83b[\udc00-\udc70\udcb5-\udd00\udd3e-\uddff\ude04\ude20\ude23\ude25\ude26\ude28\ude33\ude38\ude3a\ude3c-\ude41\ude43-\ude46\ude48\ude4a\ude4c\ude50\ude53\ude55\ude56\ude58\ude5a\ude5c\ude5e\ude60\ude63\ude65\ude66\ude6b\ude73\ude78\ude7d\ude7f\ude8a\ude9c-\udea0\udea4\udeaa\udebc-\udeef\udef2-\udfff]|\ud83c[\udc2c-\udc2f\udc94-\udc9f\udcaf\udcb0\udcc0\udcd0\udcf6-\udcff\uddae-\udde5\ude03-\ude0f\ude3c-\ude3f\ude49-\ude4f\ude52-\ude5f\ude66-\udeff]|\ud83d[\uded8-\udedc\udeed-\udeef\udefd-\udeff\udf74-\udf7f\udfd9-\udfdf\udfec-\udfef\udff1-\udfff]|\ud83e[\udc0c-\udc0f\udc48-\udc4f\udc5a-\udc5f\udc88-\udc8f\udcae\udcaf\udcb2-\udcff\ude54-\ude5f\ude6e\ude6f\ude75-\ude77\ude7d-\ude7f\ude87-\ude8f\udead-\udeaf\udebb-\udebf\udec6-\udecf\udeda-\udedf\udee8-\udeef\udef7-\udeff\udf93\udfcb-\udfef\udffa-\udfff]|\ud869[\udee0-\udeff]|\ud86d[\udf39-\udf3f]|\ud86e[\udc1e\udc1f]|\ud873[\udea2-\udeaf]|\ud87a[\udfe1-\udfff]|\ud87e[\ude1e-\udfff]|\ud884[\udf4b-\udfff]|\udb40[\udc00-\udcff\uddf0-\udfff]"},{name:"Cc",alias:"Control",bmp:"\0--Ÿ"},{name:"Cf",alias:"Format",bmp:"­؀-؅؜۝܏࢐࢑࣢᠎​-‏‪-‮⁠-⁤⁦-\ufeff-",astral:"\ud804[\udcbd\udccd]|\ud80d[\udc30-\udc38]|\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|\udb40[\udc01\udc20-\udc7f]"},{name:"Cn",alias:"Unassigned",bmp:"͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-׿܎݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏࢒-ࢗ঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿⁥⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-퟿﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽﻾＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￸￾￿",astral:"\ud800[\udc0c\udc27\udc3b\udc3e\udc4e\udc4f\udc5e-\udc7f\udcfb-\udcff\udd03-\udd06\udd34-\udd36\udd8f\udd9d-\udd9f\udda1-\uddcf\uddfe-\ude7f\ude9d-\ude9f\uded1-\udedf\udefc-\udeff\udf24-\udf2c\udf4b-\udf4f\udf7b-\udf7f\udf9e\udfc4-\udfc7\udfd6-\udfff]|\ud801[\udc9e\udc9f\udcaa-\udcaf\udcd4-\udcd7\udcfc-\udcff\udd28-\udd2f\udd64-\udd6e\udd7b\udd8b\udd93\udd96\udda2\uddb2\uddba\uddbd-\uddff\udf37-\udf3f\udf56-\udf5f\udf68-\udf7f\udf86\udfb1\udfbb-\udfff]|\ud802[\udc06\udc07\udc09\udc36\udc39-\udc3b\udc3d\udc3e\udc56\udc9f-\udca6\udcb0-\udcdf\udcf3\udcf6-\udcfa\udd1c-\udd1e\udd3a-\udd3e\udd40-\udd7f\uddb8-\uddbb\uddd0\uddd1\ude04\ude07-\ude0b\ude14\ude18\ude36\ude37\ude3b-\ude3e\ude49-\ude4f\ude59-\ude5f\udea0-\udebf\udee7-\udeea\udef7-\udeff\udf36-\udf38\udf56\udf57\udf73-\udf77\udf92-\udf98\udf9d-\udfa8\udfb0-\udfff]|\ud803[\udc49-\udc7f\udcb3-\udcbf\udcf3-\udcf9\udd28-\udd2f\udd3a-\ude5f\ude7f\udeaa\udeae\udeaf\udeb2-\udeff\udf28-\udf2f\udf5a-\udf6f\udf8a-\udfaf\udfcc-\udfdf\udff7-\udfff]|\ud804[\udc4e-\udc51\udc76-\udc7e\udcc3-\udccc\udcce\udccf\udce9-\udcef\udcfa-\udcff\udd35\udd48-\udd4f\udd77-\udd7f\udde0\uddf5-\uddff\ude12\ude3f-\ude7f\ude87\ude89\ude8e\ude9e\udeaa-\udeaf\udeeb-\udeef\udefa-\udeff\udf04\udf0d\udf0e\udf11\udf12\udf29\udf31\udf34\udf3a\udf45\udf46\udf49\udf4a\udf4e\udf4f\udf51-\udf56\udf58-\udf5c\udf64\udf65\udf6d-\udf6f\udf75-\udfff]|\ud805[\udc5c\udc62-\udc7f\udcc8-\udccf\udcda-\udd7f\uddb6\uddb7\uddde-\uddff\ude45-\ude4f\ude5a-\ude5f\ude6d-\ude7f\udeba-\udebf\udeca-\udeff\udf1b\udf1c\udf2c-\udf2f\udf47-\udfff]|\ud806[\udc3c-\udc9f\udcf3-\udcfe\udd07\udd08\udd0a\udd0b\udd14\udd17\udd36\udd39\udd3a\udd47-\udd4f\udd5a-\udd9f\udda8\udda9\uddd8\uddd9\udde5-\uddff\ude48-\ude4f\udea3-\udeaf\udef9-\udfff]|\ud807[\udc09\udc37\udc46-\udc4f\udc6d-\udc6f\udc90\udc91\udca8\udcb7-\udcff\udd07\udd0a\udd37-\udd39\udd3b\udd3e\udd48-\udd4f\udd5a-\udd5f\udd66\udd69\udd8f\udd92\udd99-\udd9f\uddaa-\udedf\udef9-\udfaf\udfb1-\udfbf\udff2-\udffe]|\ud808[\udf9a-\udfff]|\ud809[\udc6f\udc75-\udc7f\udd44-\udfff]|[\ud80a\ud80e-\ud810\ud812-\ud819\ud824-\ud82a\ud82d\ud82e\ud830-\ud832\ud83f\ud87b-\ud87d\ud87f\ud885-\udb3f\udb41-\udb7f][\udc00-\udfff]|\ud80b[\udc00-\udf8f\udff3-\udfff]|\ud80d[\udc2f\udc39-\udfff]|\ud811[\ude47-\udfff]|\ud81a[\ude39-\ude3f\ude5f\ude6a-\ude6d\udebf\udeca-\udecf\udeee\udeef\udef6-\udeff\udf46-\udf4f\udf5a\udf62\udf78-\udf7c\udf90-\udfff]|\ud81b[\udc00-\ude3f\ude9b-\udeff\udf4b-\udf4e\udf88-\udf8e\udfa0-\udfdf\udfe5-\udfef\udff2-\udfff]|\ud821[\udff8-\udfff]|\ud823[\udcd6-\udcff\udd09-\udfff]|\ud82b[\udc00-\udfef\udff4\udffc\udfff]|\ud82c[\udd23-\udd4f\udd53-\udd63\udd68-\udd6f\udefc-\udfff]|\ud82f[\udc6b-\udc6f\udc7d-\udc7f\udc89-\udc8f\udc9a\udc9b\udca4-\udfff]|\ud833[\udc00-\udeff\udf2e\udf2f\udf47-\udf4f\udfc4-\udfff]|\ud834[\udcf6-\udcff\udd27\udd28\uddeb-\uddff\ude46-\udedf\udef4-\udeff\udf57-\udf5f\udf79-\udfff]|\ud835[\udc55\udc9d\udca0\udca1\udca3\udca4\udca7\udca8\udcad\udcba\udcbc\udcc4\udd06\udd0b\udd0c\udd15\udd1d\udd3a\udd3f\udd45\udd47-\udd49\udd51\udea6\udea7\udfcc\udfcd]|\ud836[\ude8c-\ude9a\udea0\udeb0-\udfff]|\ud837[\udc00-\udeff\udf1f-\udfff]|\ud838[\udc07\udc19\udc1a\udc22\udc25\udc2b-\udcff\udd2d-\udd2f\udd3e\udd3f\udd4a-\udd4d\udd50-\ude8f\udeaf-\udebf\udefa-\udefe\udf00-\udfff]|\ud839[\udc00-\udfdf\udfe7\udfec\udfef\udfff]|\ud83a[\udcc5\udcc6\udcd7-\udcff\udd4c-\udd4f\udd5a-\udd5d\udd60-\udfff]|\ud83b[\udc00-\udc70\udcb5-\udd00\udd3e-\uddff\ude04\ude20\ude23\ude25\ude26\ude28\ude33\ude38\ude3a\ude3c-\ude41\ude43-\ude46\ude48\ude4a\ude4c\ude50\ude53\ude55\ude56\ude58\ude5a\ude5c\ude5e\ude60\ude63\ude65\ude66\ude6b\ude73\ude78\ude7d\ude7f\ude8a\ude9c-\udea0\udea4\udeaa\udebc-\udeef\udef2-\udfff]|\ud83c[\udc2c-\udc2f\udc94-\udc9f\udcaf\udcb0\udcc0\udcd0\udcf6-\udcff\uddae-\udde5\ude03-\ude0f\ude3c-\ude3f\ude49-\ude4f\ude52-\ude5f\ude66-\udeff]|\ud83d[\uded8-\udedc\udeed-\udeef\udefd-\udeff\udf74-\udf7f\udfd9-\udfdf\udfec-\udfef\udff1-\udfff]|\ud83e[\udc0c-\udc0f\udc48-\udc4f\udc5a-\udc5f\udc88-\udc8f\udcae\udcaf\udcb2-\udcff\ude54-\ude5f\ude6e\ude6f\ude75-\ude77\ude7d-\ude7f\ude87-\ude8f\udead-\udeaf\udebb-\udebf\udec6-\udecf\udeda-\udedf\udee8-\udeef\udef7-\udeff\udf93\udfcb-\udfef\udffa-\udfff]|\ud869[\udee0-\udeff]|\ud86d[\udf39-\udf3f]|\ud86e[\udc1e\udc1f]|\ud873[\udea2-\udeaf]|\ud87a[\udfe1-\udfff]|\ud87e[\ude1e-\udfff]|\ud884[\udf4b-\udfff]|\udb40[\udc00\udc02-\udc1f\udc80-\udcff\uddf0-\udfff]|[\udbbf\udbff][\udffe\udfff]"},{name:"Co",alias:"Private_Use",bmp:"-",astral:"[\udb80-\udbbe\udbc0-\udbfe][\udc00-\udfff]|[\udbbf\udbff][\udc00-\udffd]"},{name:"Cs",alias:"Surrogate",bmp:"\ud800-\udfff"},{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf40\udf42-\udf49\udf50-\udf75\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\ude00-\udf36\udf40-\udf55\udf60-\udf67\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00\ude10-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2\udd00-\udd23\ude80-\udea9\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc03-\udc37\udc71\udc72\udc75\udc83-\udcaf\udcd0-\udce8\udd03-\udd26\udd44\udd47\udd50-\udd72\udd76\udd83-\uddb2\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude2b\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udede\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d\udf50\udf5d-\udf61]|\ud805[\udc00-\udc34\udc47-\udc4a\udc5f-\udc61\udc80-\udcaf\udcc4\udcc5\udcc7\udd80-\uddae\uddd8-\udddb\ude00-\ude2f\ude44\ude80-\udeaa\udeb8\udf00-\udf1a\udf40-\udf46]|\ud806[\udc00-\udc2b\udca0-\udcdf\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd2f\udd3f\udd41\udda0-\udda7\uddaa-\uddd0\udde1\udde3\ude00\ude0b-\ude32\ude3a\ude50\ude5c-\ude89\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc2e\udc40\udc72-\udc8f\udd00-\udd06\udd08\udd09\udd0b-\udd30\udd46\udd60-\udd65\udd67\udd68\udd6a-\udd89\udd98\udee0-\udef2\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\ude40-\ude7f\udf00-\udf4a\udf50\udf93-\udf9f\udfe0\udfe1\udfe3]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf1e]|\ud838[\udd00-\udd2c\udd37-\udd3d\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd4b]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"LC",alias:"Cased_Letter",bmp:"A-Za-zµÀ-ÖØ-öø-ƺƼ-ƿDŽ-ʓʕ-ʯͰ-ͳͶͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՠ-ֈႠ-ჅჇჍა-ჺჽ-ჿᎠ-Ᏽᏸ-ᏽᲀ-ᲈᲐ-ᲺᲽ-Ჿᴀ-ᴫᵫ-ᵷᵹ-ᶚḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⱻⱾ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭꙀ-ꙭꚀ-ꚛꜢ-ꝯꝱ-ꞇꞋ-ꞎꞐ-ꟊꟐꟑꟓꟕ-ꟙꟵꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗA-Za-z",astral:"\ud801[\udc00-\udc4f\udcb0-\udcd3\udcd8-\udcfb\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]|\ud803[\udc80-\udcb2\udcc0-\udcf2]|\ud806[\udca0-\udcdf]|\ud81b[\ude40-\ude7f]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd00-\udd43]"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud81b[\ude60-\ude7f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd22-\udd43]"},{name:"Lm",alias:"Modifier_Letter",bmp:"ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨࣉॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꚜꚝꜗ-ꜟꝰꞈꟲ-ꟴꟸꟹꧏꧦꩰꫝꫳꫴꭜ-ꭟꭩー゙゚",astral:"\ud801[\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud81a[\udf40-\udf43]|\ud81b[\udf93-\udf9f\udfe0\udfe1\udfe3]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud838[\udd37-\udd3d]|𞥋"},{name:"Lo",alias:"Other_Letter",bmp:"ªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣈऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳳᳵᳶᳺℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf40\udf42-\udf49\udf50-\udf75\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf]|\ud801[\udc50-\udc9d\udd00-\udd27\udd30-\udd63\ude00-\udf36\udf40-\udf55\udf60-\udf67]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00\ude10-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udd00-\udd23\ude80-\udea9\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc03-\udc37\udc71\udc72\udc75\udc83-\udcaf\udcd0-\udce8\udd03-\udd26\udd44\udd47\udd50-\udd72\udd76\udd83-\uddb2\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude2b\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udede\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d\udf50\udf5d-\udf61]|\ud805[\udc00-\udc34\udc47-\udc4a\udc5f-\udc61\udc80-\udcaf\udcc4\udcc5\udcc7\udd80-\uddae\uddd8-\udddb\ude00-\ude2f\ude44\ude80-\udeaa\udeb8\udf00-\udf1a\udf40-\udf46]|\ud806[\udc00-\udc2b\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd2f\udd3f\udd41\udda0-\udda7\uddaa-\uddd0\udde1\udde3\ude00\ude0b-\ude32\ude3a\ude50\ude5c-\ude89\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc2e\udc40\udc72-\udc8f\udd00-\udd06\udd08\udd09\udd0b-\udd30\udd46\udd60-\udd65\udd67\udd68\udd6a-\udd89\udd98\udee0-\udef2\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf63-\udf77\udf7d-\udf8f]|\ud81b[\udf00-\udf4a\udf50]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99]|𝼊|\ud838[\udd00-\udd2c\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼ"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud81b[\ude40-\ude5f]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]"},{name:"M",alias:"Mark",bmp:"̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣඁ-ඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-ᫎᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯",astral:"\ud800[\uddfd\udee0\udf76-\udf7a]|\ud802[\ude01-\ude03\ude05\ude06\ude0c-\ude0f\ude38-\ude3a\ude3f\udee5\udee6]|\ud803[\udd24-\udd27\udeab\udeac\udf46-\udf50\udf82-\udf85]|\ud804[\udc00-\udc02\udc38-\udc46\udc70\udc73\udc74\udc7f-\udc82\udcb0-\udcba\udcc2\udd00-\udd02\udd27-\udd34\udd45\udd46\udd73\udd80-\udd82\uddb3-\uddc0\uddc9-\uddcc\uddce\uddcf\ude2c-\ude37\ude3e\udedf-\udeea\udf00-\udf03\udf3b\udf3c\udf3e-\udf44\udf47\udf48\udf4b-\udf4d\udf57\udf62\udf63\udf66-\udf6c\udf70-\udf74]|\ud805[\udc35-\udc46\udc5e\udcb0-\udcc3\uddaf-\uddb5\uddb8-\uddc0\udddc\udddd\ude30-\ude40\udeab-\udeb7\udf1d-\udf2b]|\ud806[\udc2c-\udc3a\udd30-\udd35\udd37\udd38\udd3b-\udd3e\udd40\udd42\udd43\uddd1-\uddd7\uddda-\udde0\udde4\ude01-\ude0a\ude33-\ude39\ude3b-\ude3e\ude47\ude51-\ude5b\ude8a-\ude99]|\ud807[\udc2f-\udc36\udc38-\udc3f\udc92-\udca7\udca9-\udcb6\udd31-\udd36\udd3a\udd3c\udd3d\udd3f-\udd45\udd47\udd8a-\udd8e\udd90\udd91\udd93-\udd97\udef3-\udef6]|\ud81a[\udef0-\udef4\udf30-\udf36]|\ud81b[\udf4f\udf51-\udf87\udf8f-\udf92\udfe4\udff0\udff1]|\ud82f[\udc9d\udc9e]|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd65-\udd69\udd6d-\udd72\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44]|\ud836[\ude00-\ude36\ude3b-\ude6c\ude75\ude84\ude9b-\ude9f\udea1-\udeaf]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd30-\udd36\udeae\udeec-\udeef]|\ud83a[\udcd0-\udcd6\udd44-\udd4a]|\udb40[\udd00-\uddef]"},{name:"Mc",alias:"Spacing_Mark",bmp:"ःऻा-ीॉ-ौॎॏংঃা-ীেৈোৌৗਃਾ-ੀઃા-ીૉોૌଂଃାୀେୈୋୌୗாிுூெ-ைொ-ௌௗఁ-ఃు-ౄಂಃಾೀ-ೄೇೈೊೋೕೖംഃാ-ീെ-ൈൊ-ൌൗංඃා-ෑෘ-ෟෲෳ༾༿ཿါာေးျြၖၗၢ-ၤၧ-ၭႃႄႇ-ႌႏႚ-ႜ᜕᜴ាើ-ៅះៈᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸᨙᨚᩕᩗᩡᩣᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ᭄ᮂᮡᮦᮧ᮪ᯧᯪ-ᯬᯮ᯲᯳ᰤ-ᰫᰴᰵ᳡᳷〮〯ꠣꠤꠧꢀꢁꢴ-ꣃꥒ꥓ꦃꦴꦵꦺꦻꦾ-꧀ꨯꨰꨳꨴꩍꩻꩽꫫꫮꫯꫵꯣꯤꯦꯧꯩꯪ꯬",astral:"\ud804[\udc00\udc02\udc82\udcb0-\udcb2\udcb7\udcb8\udd2c\udd45\udd46\udd82\uddb3-\uddb5\uddbf\uddc0\uddce\ude2c-\ude2e\ude32\ude33\ude35\udee0-\udee2\udf02\udf03\udf3e\udf3f\udf41-\udf44\udf47\udf48\udf4b-\udf4d\udf57\udf62\udf63]|\ud805[\udc35-\udc37\udc40\udc41\udc45\udcb0-\udcb2\udcb9\udcbb-\udcbe\udcc1\uddaf-\uddb1\uddb8-\uddbb\uddbe\ude30-\ude32\ude3b\ude3c\ude3e\udeac\udeae\udeaf\udeb6\udf20\udf21\udf26]|\ud806[\udc2c-\udc2e\udc38\udd30-\udd35\udd37\udd38\udd3d\udd40\udd42\uddd1-\uddd3\udddc-\udddf\udde4\ude39\ude57\ude58\ude97]|\ud807[\udc2f\udc3e\udca9\udcb1\udcb4\udd8a-\udd8e\udd93\udd94\udd96\udef5\udef6]|\ud81b[\udf51-\udf87\udff0\udff1]|\ud834[\udd65\udd66\udd6d-\udd72]"},{name:"Me",alias:"Enclosing_Mark",bmp:"҈҉᪾⃝-⃠⃢-⃤꙰-꙲"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৾ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣૺ-૿ଁ଼ିୁ-ୄ୍୕ୖୢୣஂீ்ఀఄ఼ా-ీె-ైొ-్ౕౖౢౣಁ಼ಿೆೌ್ೢೣഀഁ഻഼ു-ൄ്ൢൣඁ්ි-ුූัิ-ฺ็-๎ັິ-ຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲᜳᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᪿ-ᫎᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꠬꣄ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꦽꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯",astral:"\ud800[\uddfd\udee0\udf76-\udf7a]|\ud802[\ude01-\ude03\ude05\ude06\ude0c-\ude0f\ude38-\ude3a\ude3f\udee5\udee6]|\ud803[\udd24-\udd27\udeab\udeac\udf46-\udf50\udf82-\udf85]|\ud804[\udc01\udc38-\udc46\udc70\udc73\udc74\udc7f-\udc81\udcb3-\udcb6\udcb9\udcba\udcc2\udd00-\udd02\udd27-\udd2b\udd2d-\udd34\udd73\udd80\udd81\uddb6-\uddbe\uddc9-\uddcc\uddcf\ude2f-\ude31\ude34\ude36\ude37\ude3e\udedf\udee3-\udeea\udf00\udf01\udf3b\udf3c\udf40\udf66-\udf6c\udf70-\udf74]|\ud805[\udc38-\udc3f\udc42-\udc44\udc46\udc5e\udcb3-\udcb8\udcba\udcbf\udcc0\udcc2\udcc3\uddb2-\uddb5\uddbc\uddbd\uddbf\uddc0\udddc\udddd\ude33-\ude3a\ude3d\ude3f\ude40\udeab\udead\udeb0-\udeb5\udeb7\udf1d-\udf1f\udf22-\udf25\udf27-\udf2b]|\ud806[\udc2f-\udc37\udc39\udc3a\udd3b\udd3c\udd3e\udd43\uddd4-\uddd7\uddda\udddb\udde0\ude01-\ude0a\ude33-\ude38\ude3b-\ude3e\ude47\ude51-\ude56\ude59-\ude5b\ude8a-\ude96\ude98\ude99]|\ud807[\udc30-\udc36\udc38-\udc3d\udc3f\udc92-\udca7\udcaa-\udcb0\udcb2\udcb3\udcb5\udcb6\udd31-\udd36\udd3a\udd3c\udd3d\udd3f-\udd45\udd47\udd90\udd91\udd95\udd97\udef3\udef4]|\ud81a[\udef0-\udef4\udf30-\udf36]|\ud81b[\udf4f\udf8f-\udf92\udfe4]|\ud82f[\udc9d\udc9e]|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44]|\ud836[\ude00-\ude36\ude3b-\ude6c\ude75\ude84\ude9b-\ude9f\udea1-\udeaf]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd30-\udd36\udeae\udeec-\udeef]|\ud83a[\udcd0-\udcd6\udd44-\udd4a]|\udb40[\udd00-\uddef]"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\ud800[\udd07-\udd33\udd40-\udd78\udd8a\udd8b\udee1-\udefb\udf20-\udf23\udf41\udf4a\udfd1-\udfd5]|\ud801[\udca0-\udca9]|\ud802[\udc58-\udc5f\udc79-\udc7f\udca7-\udcaf\udcfb-\udcff\udd16-\udd1b\uddbc\uddbd\uddc0-\uddcf\uddd2-\uddff\ude40-\ude48\ude7d\ude7e\ude9d-\ude9f\udeeb-\udeef\udf58-\udf5f\udf78-\udf7f\udfa9-\udfaf]|\ud803[\udcfa-\udcff\udd30-\udd39\ude60-\ude7e\udf1d-\udf26\udf51-\udf54\udfc5-\udfcb]|\ud804[\udc52-\udc6f\udcf0-\udcf9\udd36-\udd3f\uddd0-\uddd9\udde1-\uddf4\udef0-\udef9]|\ud805[\udc50-\udc59\udcd0-\udcd9\ude50-\ude59\udec0-\udec9\udf30-\udf3b]|\ud806[\udce0-\udcf2\udd50-\udd59]|\ud807[\udc50-\udc6c\udd50-\udd59\udda0-\udda9\udfc0-\udfd4]|\ud809[\udc00-\udc6e]|\ud81a[\ude60-\ude69\udec0-\udec9\udf50-\udf59\udf5b-\udf61]|\ud81b[\ude80-\ude96]|\ud834[\udee0-\udef3\udf60-\udf78]|\ud835[\udfce-\udfff]|\ud838[\udd40-\udd49\udef0-\udef9]|\ud83a[\udcc7-\udccf\udd50-\udd59]|\ud83b[\udc71-\udcab\udcad-\udcaf\udcb1-\udcb4\udd01-\udd2d\udd2f-\udd3d]|\ud83c[\udd00-\udd0c]|\ud83e[\udff0-\udff9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\ud801[\udca0-\udca9]|\ud803[\udd30-\udd39]|\ud804[\udc66-\udc6f\udcf0-\udcf9\udd36-\udd3f\uddd0-\uddd9\udef0-\udef9]|\ud805[\udc50-\udc59\udcd0-\udcd9\ude50-\ude59\udec0-\udec9\udf30-\udf39]|\ud806[\udce0-\udce9\udd50-\udd59]|\ud807[\udc50-\udc59\udd50-\udd59\udda0-\udda9]|\ud81a[\ude60-\ude69\udec0-\udec9\udf50-\udf59]|\ud835[\udfce-\udfff]|\ud838[\udd40-\udd49\udef0-\udef9]|\ud83a[\udd50-\udd59]|\ud83e[\udff0-\udff9]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ",astral:"\ud800[\udd40-\udd74\udf41\udf4a\udfd1-\udfd5]|\ud809[\udc00-\udc6e]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"\ud800[\udd07-\udd33\udd75-\udd78\udd8a\udd8b\udee1-\udefb\udf20-\udf23]|\ud802[\udc58-\udc5f\udc79-\udc7f\udca7-\udcaf\udcfb-\udcff\udd16-\udd1b\uddbc\uddbd\uddc0-\uddcf\uddd2-\uddff\ude40-\ude48\ude7d\ude7e\ude9d-\ude9f\udeeb-\udeef\udf58-\udf5f\udf78-\udf7f\udfa9-\udfaf]|\ud803[\udcfa-\udcff\ude60-\ude7e\udf1d-\udf26\udf51-\udf54\udfc5-\udfcb]|\ud804[\udc52-\udc65\udde1-\uddf4]|\ud805[\udf3a\udf3b]|\ud806[\udcea-\udcf2]|\ud807[\udc5a-\udc6c\udfc0-\udfd4]|\ud81a[\udf5b-\udf61]|\ud81b[\ude80-\ude96]|\ud834[\udee0-\udef3\udf60-\udf78]|\ud83a[\udcc7-\udccf]|\ud83b[\udc71-\udcab\udcad-\udcaf\udcb1-\udcb4\udd01-\udd2d\udd2f-\udd3d]|\ud83c[\udd00-\udd0c]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎⌈-⌋〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⹏⹒-⹝、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・",astral:"\ud800[\udd00-\udd02\udf9f\udfd0]|𐕯|\ud802[\udc57\udd1f\udd3f\ude50-\ude58\ude7f\udef0-\udef6\udf39-\udf3f\udf99-\udf9c]|\ud803[\udead\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb\udcbc\udcbe-\udcc1\udd40-\udd43\udd74\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2]|\ud807[\udc41-\udc45\udc70\udc71\udef7\udef8\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1\udff2]|\ud81a[\ude6e\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|𛲟|\ud836[\ude87-\ude8b]|\ud83a[\udd5e\udd5f]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴﹍-﹏_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\-֊־᐀᠆‐-―⸗⸚⸺⸻⹀⹝〜〰゠︱︲﹘﹣-",astral:"𐺭"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\)\\]\\}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩⹖⹘⹚⹜〉》」』】〕〗〙〛〞〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\*,\\.\\/:;\\?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹏⹒-⹔、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・",astral:"\ud800[\udd00-\udd02\udf9f\udfd0]|𐕯|\ud802[\udc57\udd1f\udd3f\ude50-\ude58\ude7f\udef0-\udef6\udf39-\udf3f\udf99-\udf9c]|\ud803[\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb\udcbc\udcbe-\udcc1\udd40-\udd43\udd74\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2]|\ud807[\udc41-\udc45\udc70\udc71\udef7\udef8\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1\udff2]|\ud81a[\ude6e\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|𛲟|\ud836[\ude87-\ude8b]|\ud83a[\udd5e\udd5f]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\(\\[\\{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂⹕⹗⹙⹛〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「"},{name:"S",alias:"Symbol",bmp:"\\$\\+<->\\^`\\|~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֍-֏؆-؈؋؎؏۞۩۽۾߶߾߿࢈৲৳৺৻૱୰௳-௺౿൏൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-⃀℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏↊↋←-⌇⌌-⌨⌫-␦⑀-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹꭛꭪꭫﬩﮲-﯂﵀-﵏﷏﷼-﷿﹢﹤-﹦﹩$+<->^`|~¢-₩│-○�",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9c\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|𑜿|\ud807[\udfd5-\udff1]|\ud81a[\udf3c-\udf3f\udf45]|𛲜|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\uddea\ude00-\ude41\ude45\udf00-\udf56]|\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|\ud838[\udd4f\udeff]|\ud83b[\udcac\udcb0\udd2e\udef0\udef1]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd0d-\uddad\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udfff]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\$¢-¥֏؋߾߿৲৳৻૱௹฿៛₠-⃀꠸﷼﹩$¢£¥₩",astral:"\ud807[\udfdd-\udfe0]|𞋿|𞲰"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅࢈᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊꭛꭪꭫﮲-﯂^` ̄",astral:"\ud83c[\udffb-\udfff]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\+<->\\|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud83b[\udef0\udef1]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂֍֎؎؏۞۩۽۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↊↋↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭍-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﵀-﵏﷏﷽-﷿¦│■○�",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9c\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|𑜿|\ud807[\udfd5-\udfdc\udfe1-\udff1]|\ud81a[\udf3c-\udf3f\udf45]|𛲜|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\uddea\ude00-\ude41\ude45\udf00-\udf56]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|𞅏|\ud83b[\udcac\udd2e]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd0d-\uddad\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udffa]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca]"},{name:"Z",alias:"Separator",bmp:"    - \u2028\u2029   "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"    -    "}]},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(852));e.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var e=f.default;e.push({name:"Assigned",inverseOf:"Cn"}),d.addUnicodeData(e)},d.exports=e.default},function(d,e){d.exports=[{name:"ASCII",bmp:"\0-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈְ-ׇֽֿׁׂׅׄא-תׯ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉࣔ-ࣣࣟ-ࣰࣩ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱৼਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣૹ-ૼଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-ౌౕౖౘ-ౚౝౠ-ౣಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೝೞೠ-ೣೱೲഀ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൔ-ൗൟ-ൣൺ-ൿඁ-ඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄຆ-ຊຌ-ຣລວ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ႏႚ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜓᜟ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᪿᫀᫌ-ᫎᬀ-ᬳᬵ-ᭃᭅ-ᭌᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰶᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿᷧ-ᷴḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠅꠇ-ꠧꡀ-ꡳꢀ-ꣃꣅꣲ-ꣷꣻꣽ-ꣿꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꧠ-ꧯꧺ-ꧾꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\udd40-\udd74\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf4a\udf50-\udf7a\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf\udfd1-\udfd5]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\ude00-\udf36\udf40-\udf55\udf60-\udf67\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2\udd00-\udd27\ude80-\udea9\udeab\udeac\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc00-\udc45\udc71-\udc75\udc82-\udcb8\udcc2\udcd0-\udce8\udd00-\udd32\udd44-\udd47\udd50-\udd72\udd76\udd80-\uddbf\uddc1-\uddc4\uddce\uddcf\uddda\udddc\ude00-\ude11\ude13-\ude34\ude37\ude3e\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udee8\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d-\udf44\udf47\udf48\udf4b\udf4c\udf50\udf57\udf5d-\udf63]|\ud805[\udc00-\udc41\udc43-\udc45\udc47-\udc4a\udc5f-\udc61\udc80-\udcc1\udcc4\udcc5\udcc7\udd80-\uddb5\uddb8-\uddbe\uddd8-\udddd\ude00-\ude3e\ude40\ude44\ude80-\udeb5\udeb8\udf00-\udf1a\udf1d-\udf2a\udf40-\udf46]|\ud806[\udc00-\udc38\udca0-\udcdf\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd35\udd37\udd38\udd3b\udd3c\udd3f-\udd42\udda0-\udda7\uddaa-\uddd7\uddda-\udddf\udde1\udde3\udde4\ude00-\ude32\ude35-\ude3e\ude50-\ude97\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc3e\udc40\udc72-\udc8f\udc92-\udca7\udca9-\udcb6\udd00-\udd06\udd08\udd09\udd0b-\udd36\udd3a\udd3c\udd3d\udd3f-\udd41\udd43\udd46\udd47\udd60-\udd65\udd67\udd68\udd6a-\udd8e\udd90\udd91\udd93-\udd96\udd98\udee0-\udef6\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\ude40-\ude7f\udf00-\udf4a\udf4f-\udf87\udf8f-\udf9f\udfe0\udfe1\udfe3\udff0\udff1]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9e]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf1e]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd00-\udd2c\udd37-\udd3d\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd47\udd4b]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Any",isBmpLast:!0,bmp:"\0-￿",astral:"[\ud800-\udbff][\udc00-\udfff]"},{name:"Default_Ignorable_Code_Point",bmp:"­͏؜ᅟᅠ឴឵᠋-᠏​-‏‪-‮⁠-ㅤ︀-️\ufeffᅠ￰-￸",astral:"\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛ-ꚝꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟸ-ꟺꬰ-ꭚꭜ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\udf80\udf83-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud81b[\ude60-\ude7f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd22-\udd43]"},{name:"Noncharacter_Code_Point",bmp:"﷐-﷯￾￿",astral:"[\ud83f\ud87f\ud8bf\ud8ff\ud93f\ud97f\ud9bf\ud9ff\uda3f\uda7f\udabf\udaff\udb3f\udb7f\udbbf\udbff][\udffe\udfff]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud81b[\ude40-\ude5f]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]"},{name:"White_Space",bmp:"\t-\r …   - \u2028\u2029   "}]},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(854));e.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");d.addUnicodeData(f.default,"Script")},d.exports=e.default},function(d,e){d.exports=[{name:"Adlam",astral:"\ud83a[\udd00-\udd4b\udd50-\udd59\udd5e\udd5f]"},{name:"Ahom",astral:"\ud805[\udf00-\udf1a\udf1d-\udf2b\udf30-\udf46]"},{name:"Anatolian_Hieroglyphs",astral:"\ud811[\udc00-\ude46]"},{name:"Arabic",bmp:"؀-؄؆-؋؍-ؚ؜-؞ؠ-ؿف-يٖ-ٯٱ-ۜ۞-ۿݐ-ݿࡰ-ࢎ࢐࢑࢘-ࣣ࣡-ࣿﭐ-﯂ﯓ-ﴽ﵀-ﶏﶒ-ﷇ﷏ﷰ-﷿ﹰ-ﹴﹶ-ﻼ",astral:"\ud803[\ude60-\ude7e]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb\udef0\udef1]"},{name:"Armenian",bmp:"Ա-Ֆՙ-֊֍-֏ﬓ-ﬗ"},{name:"Avestan",astral:"\ud802[\udf00-\udf35\udf39-\udf3f]"},{name:"Balinese",bmp:"ᬀ-ᭌ᭐-᭾"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"\ud81a[\udc00-\ude38]"},{name:"Bassa_Vah",astral:"\ud81a[\uded0-\udeed\udef0-\udef5]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঀ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৾"},{name:"Bhaiksuki",astral:"\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc45\udc50-\udc6c]"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄯㆠ-ㆿ"},{name:"Brahmi",astral:"\ud804[\udc00-\udc4d\udc52-\udc75\udc7f]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ",astral:"\ud806[\udeb0-\udebf]"},{name:"Carian",astral:"\ud800[\udea0-\uded0]"},{name:"Caucasian_Albanian",astral:"\ud801[\udd30-\udd63\udd6f]"},{name:"Chakma",astral:"\ud804[\udd00-\udd34\udd36-\udd47]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏽᏸ-ᏽꭰ-ꮿ"},{name:"Chorasmian",astral:"\ud803[\udfb0-\udfcb]"},{name:"Common",bmp:"\0-@\\[-`\\{-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·؅،؛؟ـ۝࣢।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵ-᳷ᳺ -​‎-⁤⁦-⁰⁴-⁾₀-₎₠-⃀℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉-↋←-␦⑀-⑊①-⟿⤀-⭳⭶-⮕⮗-⯿⸀-⹝⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㋿㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹꤮ꧏ꭛꭪꭫﴾﴿︐-︙︰-﹒﹔-﹦﹨-﹫\ufeff!-@[-`{-・ー゙゚¢-₩│-○-�",astral:"\ud800[\udd00-\udd02\udd07-\udd33\udd37-\udd3f\udd90-\udd9c\uddd0-\uddfc\udee1-\udefb]|\ud82f[\udca0-\udca3]|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd66\udd6a-\udd7a\udd83\udd84\udd8c-\udda9\uddae-\uddea\udee0-\udef3\udf00-\udf56\udf60-\udf78]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udfcb\udfce-\udfff]|\ud83b[\udc71-\udcb4\udd01-\udd3d]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd00-\uddad\udde6-\uddff\ude01\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udfff]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca\udff0-\udff9]|\udb40[\udc01\udc20-\udc7f]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc70-\udc74\udc80-\udd43]"},{name:"Cypriot",astral:"\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f]"},{name:"Cypro_Minoan",astral:"\ud80b[\udf90-\udff2]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԯᲀ-ᲈᴫᵸⷠ-ⷿꙀ-ꚟ︮︯"},{name:"Deseret",astral:"\ud801[\udc00-\udc4f]"},{name:"Devanagari",bmp:"ऀ-ॐॕ-ॣ०-ॿ꣠-ꣿ"},{name:"Dives_Akuru",astral:"\ud806[\udd00-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd35\udd37\udd38\udd3b-\udd46\udd50-\udd59]"},{name:"Dogra",astral:"\ud806[\udc00-\udc3b]"},{name:"Duployan",astral:"\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9c-\udc9f]"},{name:"Egyptian_Hieroglyphs",astral:"\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e\udc30-\udc38]"},{name:"Elbasan",astral:"\ud801[\udd00-\udd27]"},{name:"Elymaic",astral:"\ud803[\udfe0-\udff6]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ",astral:"\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿᲐ-ᲺᲽ-Ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-ⱟ",astral:"\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a]"},{name:"Gothic",astral:"\ud800[\udf30-\udf4a]"},{name:"Grantha",astral:"\ud804[\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3c-\udf44\udf47\udf48\udf4b-\udf4d\udf50\udf57\udf5d-\udf63\udf66-\udf6c\udf70-\udf74]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽͿ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ωꭥ",astral:"\ud800[\udd40-\udd8e\udda0]|\ud834[\ude00-\ude45]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱ૹ-૿"},{name:"Gunjala_Gondi",astral:"\ud807[\udd60-\udd65\udd67\udd68\udd6a-\udd8e\udd90\udd91\udd93-\udd98\udda0-\udda9]"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-੶"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶿一-鿿豈-舘並-龎",astral:"\ud81b[\udfe2\udfe3\udff0\udff1]|[\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanifi_Rohingya",astral:"\ud803[\udd00-\udd27\udd30-\udd39]"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hatran",astral:"\ud802[\udce0-\udcf2\udcf4\udcf5\udcfb-\udcff]"},{name:"Hebrew",bmp:"֑-ׇא-תׯ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"\ud82c[\udc01-\udd1f\udd50-\udd52]|🈀"},{name:"Imperial_Aramaic",astral:"\ud802[\udc40-\udc55\udc57-\udc5f]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॑-॔᪰-ᫎ᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿‌‍⃐-〪⃰-゙゚〭︀-️︠-︭",astral:"\ud800[\uddfd\udee0]|𑌻|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad]|\udb40[\udd00-\uddef]"},{name:"Inscriptional_Pahlavi",astral:"\ud802[\udf60-\udf72\udf78-\udf7f]"},{name:"Inscriptional_Parthian",astral:"\ud802[\udf40-\udf55\udf58-\udf5f]"},{name:"Javanese",bmp:"ꦀ-꧍꧐-꧙꧞꧟"},{name:"Kaithi",astral:"\ud804[\udc80-\udcc2\udccd]"},{name:"Kannada",bmp:"ಀ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೝೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00\udd20-\udd22\udd64-\udd67]"},{name:"Kayah_Li",bmp:"꤀-꤭꤯"},{name:"Kharoshthi",astral:"\ud802[\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude35\ude38-\ude3a\ude3f-\ude48\ude50-\ude58]"},{name:"Khitan_Small_Script",astral:"𖿤|\ud822[\udf00-\udfff]|\ud823[\udc00-\udcd5]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Khojki",astral:"\ud804[\ude00-\ude11\ude13-\ude3e]"},{name:"Khudawadi",astral:"\ud804[\udeb0-\udeea\udef0-\udef9]"},{name:"Lao",bmp:"ກຂຄຆ-ຊຌ-ຣລວ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꟿꬰ-ꭚꭜ-ꭤꭦ-ꭩff-stA-Za-z",astral:"\ud801[\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud837[\udf00-\udf1e]"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤞᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_A",astral:"\ud801[\ude00-\udf36\udf40-\udf55\udf60-\udf67]"},{name:"Linear_B",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa]"},{name:"Lisu",bmp:"ꓐ-꓿",astral:"𑾰"},{name:"Lycian",astral:"\ud800[\ude80-\ude9c]"},{name:"Lydian",astral:"\ud802[\udd20-\udd39\udd3f]"},{name:"Mahajani",astral:"\ud804[\udd50-\udd76]"},{name:"Makasar",astral:"\ud807[\udee0-\udef8]"},{name:"Malayalam",bmp:"ഀ-ഌഎ-ഐഒ-ൄെ-ൈൊ-൏ൔ-ൣ൦-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Manichaean",astral:"\ud802[\udec0-\udee6\udeeb-\udef6]"},{name:"Marchen",astral:"\ud807[\udc70-\udc8f\udc92-\udca7\udca9-\udcb6]"},{name:"Masaram_Gondi",astral:"\ud807[\udd00-\udd06\udd08\udd09\udd0b-\udd36\udd3a\udd3c\udd3d\udd3f-\udd47\udd50-\udd59]"},{name:"Medefaidrin",astral:"\ud81b[\ude40-\ude9a]"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Mende_Kikakui",astral:"\ud83a[\udc00-\udcc4\udcc7-\udcd6]"},{name:"Meroitic_Cursive",astral:"\ud802[\udda0-\uddb7\uddbc-\uddcf\uddd2-\uddff]"},{name:"Meroitic_Hieroglyphs",astral:"\ud802[\udd80-\udd9f]"},{name:"Miao",astral:"\ud81b[\udf00-\udf4a\udf4f-\udf87\udf8f-\udf9f]"},{name:"Modi",astral:"\ud805[\ude00-\ude44\ude50-\ude59]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠙ᠠ-ᡸᢀ-ᢪ",astral:"\ud805[\ude60-\ude6c]"},{name:"Mro",astral:"\ud81a[\ude40-\ude5e\ude60-\ude69\ude6e\ude6f]"},{name:"Multani",astral:"\ud804[\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea9]"},{name:"Myanmar",bmp:"က-႟ꧠ-ꧾꩠ-ꩿ"},{name:"Nabataean",astral:"\ud802[\udc80-\udc9e\udca7-\udcaf]"},{name:"Nandinagari",astral:"\ud806[\udda0-\udda7\uddaa-\uddd7\uddda-\udde4]"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Newa",astral:"\ud805[\udc00-\udc5b\udc5d-\udc61]"},{name:"Nko",bmp:"߀-ߺ߽-߿"},{name:"Nushu",astral:"𖿡|\ud82c[\udd70-\udefb]"},{name:"Nyiakeng_Puachue_Hmong",astral:"\ud838[\udd00-\udd2c\udd30-\udd3d\udd40-\udd49\udd4e\udd4f]"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Hungarian",astral:"\ud803[\udc80-\udcb2\udcc0-\udcf2\udcfa-\udcff]"},{name:"Old_Italic",astral:"\ud800[\udf00-\udf23\udf2d-\udf2f]"},{name:"Old_North_Arabian",astral:"\ud802[\ude80-\ude9f]"},{name:"Old_Permic",astral:"\ud800[\udf50-\udf7a]"},{name:"Old_Persian",astral:"\ud800[\udfa0-\udfc3\udfc8-\udfd5]"},{name:"Old_Sogdian",astral:"\ud803[\udf00-\udf27]"},{name:"Old_South_Arabian",astral:"\ud802[\ude60-\ude7f]"},{name:"Old_Turkic",astral:"\ud803[\udc00-\udc48]"},{name:"Old_Uyghur",astral:"\ud803[\udf70-\udf89]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍୕-ୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osage",astral:"\ud801[\udcb0-\udcd3\udcd8-\udcfb]"},{name:"Osmanya",astral:"\ud801[\udc80-\udc9d\udca0-\udca9]"},{name:"Pahawh_Hmong",astral:"\ud81a[\udf00-\udf45\udf50-\udf59\udf5b-\udf61\udf63-\udf77\udf7d-\udf8f]"},{name:"Palmyrene",astral:"\ud802[\udc60-\udc7f]"},{name:"Pau_Cin_Hau",astral:"\ud806[\udec0-\udef8]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"\ud802[\udd00-\udd1b\udd1f]"},{name:"Psalter_Pahlavi",astral:"\ud802[\udf80-\udf91\udf99-\udf9c\udfa9-\udfaf]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛸ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-ꣅ꣎-꣙"},{name:"Sharada",astral:"\ud804[\udd80-\udddf]"},{name:"Shavian",astral:"\ud801[\udc50-\udc7f]"},{name:"Siddham",astral:"\ud805[\udd80-\uddb5\uddb8-\udddd]"},{name:"SignWriting",astral:"\ud836[\udc00-\ude8b\ude9b-\ude9f\udea1-\udeaf]"},{name:"Sinhala",bmp:"ඁ-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-෴",astral:"\ud804[\udde1-\uddf4]"},{name:"Sogdian",astral:"\ud803[\udf30-\udf59]"},{name:"Sora_Sompeng",astral:"\ud804[\udcd0-\udce8\udcf0-\udcf9]"},{name:"Soyombo",astral:"\ud806[\ude50-\udea2]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠬"},{name:"Syriac",bmp:"܀-܍܏-݊ݍ-ݏࡠ-ࡪ"},{name:"Tagalog",bmp:"ᜀ-᜕ᜟ"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"\ud805[\ude80-\udeb9\udec0-\udec9]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺",astral:"\ud807[\udfc0-\udff1\udfff]"},{name:"Tangsa",astral:"\ud81a[\ude70-\udebe\udec0-\udec9]"},{name:"Tangut",astral:"𖿠|[\ud81c-\ud820][\udc00-\udfff]|\ud821[\udc00-\udff7]|\ud822[\udc00-\udeff]|\ud823[\udd00-\udd08]"},{name:"Telugu",bmp:"ఀ-ఌఎ-ఐఒ-నప-హ఼-ౄె-ైొ-్ౕౖౘ-ౚౝౠ-ౣ౦-౯౷-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Tirhuta",astral:"\ud805[\udc80-\udcc7\udcd0-\udcd9]"},{name:"Toto",astral:"\ud838[\ude90-\udeae]"},{name:"Ugaritic",astral:"\ud800[\udf80-\udf9d\udf9f]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Vithkuqi",astral:"\ud801[\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]"},{name:"Wancho",astral:"\ud838[\udec0-\udef9\udeff]"},{name:"Warang_Citi",astral:"\ud806[\udca0-\udcf2\udcff]"},{name:"Yezidi",astral:"\ud803[\ude80-\udea9\udeab-\udead\udeb0\udeb1]"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"},{name:"Zanabazar_Square",astral:"\ud806[\ude00-\ude47]"}]},function(d,e,t){"use strict";function n(d){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},n(d)}Object.defineProperty(e,"__esModule",{value:!0}),e.Xassertion=void 0;var r={assert:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;d||(console.error("".concat(d,": ").concat(e)),this.assert_debugger(e))},assert_equal:function(d,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e!==d&&(console.error("<".concat(d,"> expected but was <").concat(e,">")),this.assert_debugger(t))},assert_kind_of_integer:function(d){this.assert(Number.isInteger(d))},assert_kind_of_string:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert_equal("string",n(d),e)},assert_kind_of_array:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert_equal("array",n(d),e)},assert_kind_of_hash:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert_equal("object",n(d),e)},assert_kind_of_object:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert_equal("object",n(d),e)},assert_nonzero:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"divided by 0";this.assert(0!==d,e)},assert_debugger:function(){var d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null!==(d=e)&&void 0!==d||(e="Assertion failed"),"undefined"==typeof window)throw new Error(e);alert(e)}};e.Xassertion=r}])]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[3,21,58,59,61],Array(415).concat([function(d,e,t){d.exports=function(){"use strict";function d(d,e){return d(e={exports:{}},e.exports),e.exports}var e=d((function(d){var e=d.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),t=d((function(d){var e=d.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)})),n=(t.version,function(d){return"object"==typeof d?null!==d:"function"==typeof d}),r=function(d){if(!n(d))throw TypeError(d+" is not an object!");return d},f=function(d){try{return!!d()}catch(d){return!0}},c=!f((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),D=e.document,o=n(D)&&n(D.createElement),l=function(d){return o?D.createElement(d):{}},F=!c&&!f((function(){return 7!=Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a})),C=function(d,e){if(!n(d))return d;var t,r;if(e&&"function"==typeof(t=d.toString)&&!n(r=t.call(d)))return r;if("function"==typeof(t=d.valueOf)&&!n(r=t.call(d)))return r;if(!e&&"function"==typeof(t=d.toString)&&!n(r=t.call(d)))return r;throw TypeError("Can't convert object to primitive value")},A=Object.defineProperty,E={f:c?Object.defineProperty:function(d,e,t){if(r(d),e=C(e,!0),r(t),F)try{return A(d,e,t)}catch(d){}if("get"in t||"set"in t)throw TypeError("Accessors not supported!");return"value"in t&&(d[e]=t.value),d}},v=function(d,e){return{enumerable:!(1&d),configurable:!(2&d),writable:!(4&d),value:e}},B=c?function(object,d,e){return E.f(object,d,v(1,e))}:function(object,d,e){return object[d]=e,object},h={}.hasOwnProperty,m=function(d,e){return h.call(d,e)},y=0,x=Math.random(),w=function(d){return"Symbol(".concat(void 0===d?"":d,")_",(++y+x).toString(36))},S=!1,_=d((function(d){var n="__core-js_shared__",r=e[n]||(e[n]={});(d.exports=function(d,e){return r[d]||(r[d]=void 0!==e?e:{})})("versions",[]).push({version:t.version,mode:S?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),O=_("native-function-to-string",Function.toString),k=d((function(d){var n=w("src"),r="toString",f=(""+O).split(r);t.inspectSource=function(d){return O.call(d)},(d.exports=function(d,t,r,c){var D="function"==typeof r;D&&(m(r,"name")||B(r,"name",t)),d[t]!==r&&(D&&(m(r,n)||B(r,n,d[t]?""+d[t]:f.join(String(t)))),d===e?d[t]=r:c?d[t]?d[t]=r:B(d,t,r):(delete d[t],B(d,t,r)))})(Function.prototype,r,(function(){return"function"==typeof this&&this[n]||O.call(this)}))})),P=function(d){if("function"!=typeof d)throw TypeError(d+" is not a function!");return d},j=function(d,e,t){if(P(d),void 0===e)return d;switch(t){case 1:return function(a){return d.call(e,a)};case 2:return function(a,b){return d.call(e,a,b)};case 3:return function(a,b,t){return d.call(e,a,b,t)}}return function(){return d.apply(e,arguments)}},N="prototype",I=function(d,n,source){var r,f,c,D,o=d&I.F,l=d&I.G,F=d&I.S,C=d&I.P,A=d&I.B,E=l?e:F?e[n]||(e[n]={}):(e[n]||{})[N],v=l?t:t[n]||(t[n]={}),h=v[N]||(v[N]={});for(r in l&&(source=n),source)c=((f=!o&&E&&void 0!==E[r])?E:source)[r],D=A&&f?j(c,e):C&&"function"==typeof c?j(Function.call,c):c,E&&k(E,r,c,d&I.U),v[r]!=c&&B(v,r,D),C&&h[r]!=c&&(h[r]=c)};e.core=t,I.F=1,I.G=2,I.S=4,I.P=8,I.B=16,I.W=32,I.U=64,I.R=128;var M,T=I,L=Math.ceil,R=Math.floor,U=function(d){return isNaN(d=+d)?0:(d>0?R:L)(d)},$=function(d){if(null==d)throw TypeError("Can't call method on "+d);return d},z=(M=!1,function(d,e){var a,b,s=String($(d)),i=U(e),t=s.length;return i<0||i>=t?M?"":void 0:(a=s.charCodeAt(i))<55296||a>56319||i+1===t||(b=s.charCodeAt(i+1))<56320||b>57343?M?s.charAt(i):a:M?s.slice(i,i+2):b-56320+(a-55296<<10)+65536});T(T.P,"String",{codePointAt:function(d){return z(this,d)}}),t.String.codePointAt;var G=Math.max,H=Math.min,V=function(d,e){return(d=U(d))<0?G(d+e,0):H(d,e)},J=String.fromCharCode,Z=String.fromCodePoint;T(T.S+T.F*(!!Z&&1!=Z.length),"String",{fromCodePoint:function(d){for(var code,e=arguments,t=[],n=arguments.length,i=0;n>i;){if(code=+e[i++],V(code,1114111)!==code)throw RangeError(code+" is not a valid code point");t.push(code<65536?J(code):J(55296+((code-=65536)>>10),code%1024+56320))}return t.join("")}}),t.String.fromCodePoint;var source,K,W,Y,line,X,Q,uu,du,eu,tu,nu,ru,fu,cu={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},au={isSpaceSeparator:function(d){return"string"==typeof d&&cu.Space_Separator.test(d)},isIdStartChar:function(d){return"string"==typeof d&&(d>="a"&&d<="z"||d>="A"&&d<="Z"||"$"===d||"_"===d||cu.ID_Start.test(d))},isIdContinueChar:function(d){return"string"==typeof d&&(d>="a"&&d<="z"||d>="A"&&d<="Z"||d>="0"&&d<="9"||"$"===d||"_"===d||"‌"===d||"‍"===d||cu.ID_Continue.test(d))},isDigit:function(d){return"string"==typeof d&&/[0-9]/.test(d)},isHexDigit:function(d){return"string"==typeof d&&/[0-9A-Fa-f]/.test(d)}},Du=function(text,d){source=String(text),K="start",W=[],Y=0,line=1,X=0,Q=void 0,uu=void 0,du=void 0;do{Q=iu(),vu[K]()}while("eof"!==Q.type);return"function"==typeof d?ou({"":du},"",d):du};function ou(d,e,t){var n=d[e];if(null!=n&&"object"==typeof n)if(Array.isArray(n))for(var i=0;i0;){var t=su();if(!au.isHexDigit(t))throw mu(lu());d+=lu()}return String.fromCodePoint(parseInt(d,16))}var vu={start:function(){if("eof"===Q.type)throw gu();Bu()},beforePropertyName:function(){switch(Q.type){case"identifier":case"string":return uu=Q.value,void(K="afterPropertyName");case"punctuator":return void hu();case"eof":throw gu()}},afterPropertyName:function(){if("eof"===Q.type)throw gu();K="beforePropertyValue"},beforePropertyValue:function(){if("eof"===Q.type)throw gu();Bu()},beforeArrayValue:function(){if("eof"===Q.type)throw gu();"punctuator"!==Q.type||"]"!==Q.value?Bu():hu()},afterPropertyValue:function(){if("eof"===Q.type)throw gu();switch(Q.value){case",":return void(K="beforePropertyName");case"}":hu()}},afterArrayValue:function(){if("eof"===Q.type)throw gu();switch(Q.value){case",":return void(K="beforeArrayValue");case"]":hu()}},end:function(){}};function Bu(){var d;switch(Q.type){case"punctuator":switch(Q.value){case"{":d={};break;case"[":d=[]}break;case"null":case"boolean":case"numeric":case"string":d=Q.value}if(void 0===du)du=d;else{var e=W[W.length-1];Array.isArray(e)?e.push(d):Object.defineProperty(e,uu,{value:d,writable:!0,enumerable:!0,configurable:!0})}if(null!==d&&"object"==typeof d)W.push(d),K=Array.isArray(d)?"beforeArrayValue":"beforePropertyName";else{var t=W[W.length-1];K=null==t?"end":Array.isArray(t)?"afterArrayValue":"afterPropertyValue"}}function hu(){W.pop();var d=W[W.length-1];K=null==d?"end":Array.isArray(d)?"afterArrayValue":"afterPropertyValue"}function mu(d){return Su(void 0===d?"JSON5: invalid end of input at "+line+":"+X:"JSON5: invalid character '"+wu(d)+"' at "+line+":"+X)}function gu(){return Su("JSON5: invalid end of input at "+line+":"+X)}function yu(){return Su("JSON5: invalid identifier character at "+line+":"+(X-=5))}function xu(d){console.warn("JSON5: '"+wu(d)+"' in strings is not valid ECMAScript; consider escaping")}function wu(d){var e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[d])return e[d];if(d<" "){var t=d.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return d}function Su(d){var e=new SyntaxError(d);return e.lineNumber=line,e.columnNumber=X,e}return{parse:Du,stringify:function(d,e,t){var n,r,f,c=[],D="",o="";if(null==e||"object"!=typeof e||Array.isArray(e)||(t=e.space,f=e.quote,e=e.replacer),"function"==typeof e)r=e;else if(Array.isArray(e)){n=[];for(var i=0,l=e;i0&&(t=Math.min(10,Math.floor(t)),o=" ".substr(0,t)):"string"==typeof t&&(o=t.substr(0,10)),A("",{"":d});function A(d,e){var t=e[d];switch(null!=t&&("function"==typeof t.toJSON5?t=t.toJSON5(d):"function"==typeof t.toJSON&&(t=t.toJSON(d))),r&&(t=r.call(e,d,t)),t instanceof Number?t=Number(t):t instanceof String?t=String(t):t instanceof Boolean&&(t=t.valueOf()),t){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof t?E(t,!1):"number"==typeof t?String(t):"object"==typeof t?Array.isArray(t)?h(t):v(t):void 0}function E(d){for(var e={"'":.1,'"':.2},t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},n="",i=0;i=0)throw TypeError("Converting circular structure to JSON5");c.push(d);var e=D;D+=o;for(var t,r,f=[],i=0,l=n||Object.keys(d);i=0)throw TypeError("Converting circular structure to JSON5");c.push(d);var e=D;D+=o;for(var t,n=[],i=0;i1||"".split(/.?/).length?function(d,t){var f=v(F(this)),c=void 0===t?_:t>>>0;if(0===c)return[];if(void 0===d)return[f];if(!l(d))return r(e,f,d,c);for(var D,o,C,output=[],A=(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.unicode?"u":"")+(d.sticky?"y":""),E=0,B=new RegExp(d.source,A+"g");(D=r(y,B,f))&&!((o=B.lastIndex)>E&&(j(output,N(f,E,D.index)),D.length>1&&D.index=c));)B.lastIndex===D.index&&B.lastIndex++;return E===f.length?!C&&P(B,"")||j(output,""):j(output,N(f,E)),output.length>c?h(output,0,c):output}:"0".split(void 0,0).length?function(d,t){return void 0===d&&0===t?[]:r(e,this,d,t)}:e,[function(e,t){var n=F(this),c=o(e)?void 0:B(e,d);return c?r(c,e,n,t):r(f,v(n),e,t)},function(d,n){var r=D(this),c=v(d),o=t(f,r,c,n,f!==e);if(o.done)return o.value;var l=C(r,RegExp),F=r.unicode,B=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(S?"g":"y"),h=new l(S?"^(?:"+r.source+")":r,B),y=void 0===n?_:n>>>0;if(0===y)return[];if(0===c.length)return null===m(h,c)?[c]:[];for(var p=0,q=0,x=[];q(d.forEach((d=>{const t=e[d];if(null!=t){if(t in a)throw new Error([`${this.name}#${d} ${JSON.stringify(t)} is duplicate`,`Existing: ${JSON.stringify(Object.keys(a))}`,`Conflict: ${JSON.stringify(e)}`].join("\n"));a[t]=e}})),a)),{})}static lookup(d){return d instanceof this?d:"number"==typeof d?this.codes_hash[d]:this.keys_hash[d]}static fetch(d){const element=this.lookup(d);if(!element)throw new Error([`${this.name}.fetch(${JSON.stringify(d)}) does not match anything`,`keys: ${JSON.stringify(this.keys)}`,`codes: ${JSON.stringify(this.codes)}`].join("\n"));return element}static fetch_if(d){if(null!=d)return this.fetch(d)}static lookup_or_first(d){return this.lookup(d)||this.values[0]}static get values(){return void 0!==this._values||(this._values=f.default.map(this.__source_records,((d,i)=>("code"in(d=Object.assign({},d,{index:i}))||(d=Object.assign({},d,{code:i})),"key"in d||(d=Object.assign({},d,{key:`_key${i}`})),Object.freeze(new this(d)))))),this._values}static get keys_hash(){return null!=this._keys_hash||(this._keys_hash=this.memory_record_create_index_by(["key"])),this._keys_hash}static get codes_hash(){return null!=this._codes_hash||(this._codes_hash=this.memory_record_create_index_by(["code"])),this._codes_hash}static get keys(){return null!=this._keys||(this._keys=Object.keys(this.keys_hash)),this._keys}static get codes(){return null!=this._codes||(this._codes=this.values.map((d=>d.code))),this._codes}static get names(){return null!=this._names||(this._names=this.values.map((d=>d.name))),this._names}static get count(){return this.values.length}static get __source_records(){return null!=this._records||(this._records=this.define),this._records}constructor(d){Object.defineProperty(this,"attributes",{value:d,writable:!1,enumerable:!1,configurable:!1}),f.default.forIn(d,((d,e)=>{Object.defineProperty(this,e,{value:d,writable:!1,enumerable:!0,configurable:!1})})),"name"in this||Object.defineProperty(this,"name",{value:d.name||d.key.toString(),writable:!1,enumerable:!0,configurable:!1})}}if(e.default=c,void 0!==d&&d.argv[1]===n){class d extends c{static get define(){return[{key:"black",name:"☗"},{key:"white",name:"☖"},{code:7}]}}console.log(d.keys),console.log(d.codes);const e=d.values[0];console.log(e.key),console.log(e.code),console.log(e.name),console.log(d.values),console.log(d.lookup("black").name),console.log(d.lookup("black").code),console.log(d.lookup("_key2").name);let t=d.lookup("black");console.log(t instanceof d),console.log(d.lookup(0)),console.log(d.lookup(1)),console.log(d.lookup(2)),console.log(d.values[0]==d.values[0]),console.log(d.values.map((d=>d.key))),console.log(Object.keys(d.keys_hash)),console.log(d.fetch("unknown"))}}).call(this,t(179),"/index.js")},function(d,e,t){"use strict";var n=t(4),r=t(106).find,f=t(181),c="find",D=!0;c in[]&&Array(1)[c]((function(){D=!1})),n({target:"Array",proto:!0,forced:D},{find:function(d){return r(this,d,arguments.length>1?arguments[1]:void 0)}}),f(c)},function(d,e,t){var n=t(4),r=t(582),f=t(5),c=t(24),D=t(597).onFreeze,o=Object.freeze;n({target:"Object",stat:!0,forced:f((function(){o(1)})),sham:!r},{freeze:function(d){return o&&c(d)?o(D(d)):d}})},,,,,,,,,,,,,,,,,,,,,,,,,,,function(d,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Xinteger=void 0;var n=t(855),r={imodulo:function(d,e){return n.Xassertion.assert_nonzero(e),d%=e,(d=Math.trunc(d))<0&&(d=e+d),d+0},idiv:function(d,e){return n.Xassertion.assert_nonzero(e),Math.floor(d/e)},idivmod:function(d,e){return[this.idiv(d,e),this.imodulo(d,e)]},even_p:function(d){return d%2==0},odd_p:function(d){return!this.even_p(d)},gcd:function(a,b){return 0===a?b:this.gcd(b%a,a)},lcm:function(a,b){return a*b/this.gcd(a,b)},iclamp:function(d,e,t){if(t1&&"undefined"==typeof MSStream};function x(param){var nav={userAgent:"",platform:"",maxTouchPoints:0};param||"undefined"==typeof navigator?"string"==typeof param?nav.userAgent=param:param&¶m.userAgent&&(nav={userAgent:param.userAgent,platform:param.platform,maxTouchPoints:param.maxTouchPoints||0}):nav={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var d=nav.userAgent,e=d.split("[FBAN");void 0!==e[1]&&(d=e[0]),void 0!==(e=d.split("Twitter"))[1]&&(d=e[0]);var t=function(d){return function(e){return e.test(d)}}(d),x={apple:{phone:t(n)&&!t(C),ipod:t(r),tablet:!t(n)&&(t(f)||y(nav))&&!t(C),universal:t(c),device:(t(n)||t(r)||t(f)||t(c)||y(nav))&&!t(C)},amazon:{phone:t(l),tablet:!t(l)&&t(F),device:t(l)||t(F)},android:{phone:!t(C)&&t(l)||!t(C)&&t(D),tablet:!t(C)&&!t(l)&&!t(D)&&(t(F)||t(o)),device:!t(C)&&(t(l)||t(F)||t(D)||t(o))||t(/\bokhttp\b/i)},windows:{phone:t(C),tablet:t(A),device:t(C)||t(A)},other:{blackberry:t(E),blackberry10:t(v),opera:t(B),firefox:t(m),chrome:t(h),device:t(E)||t(v)||t(B)||t(m)||t(h)},any:!1,phone:!1,tablet:!1};return x.any=x.apple.device||x.android.device||x.windows.device||x.other.device,x.phone=x.apple.phone||x.android.phone||x.windows.phone,x.tablet=x.apple.tablet||x.android.tablet||x.windows.tablet,x}},function(d,e,t){"use strict";var n=t(578),r=t(645),f=t(628),c=t(577),D=t(647).f,o=t(694),path=t(584),l=t(634),F=t(604),C=t(579),A=function(d){var e=function(a,b,t){if(this instanceof e){switch(arguments.length){case 0:return new d;case 1:return new d(a);case 2:return new d(a,b)}return new d(a,b,t)}return r(d,this,arguments)};return e.prototype=d.prototype,e};d.exports=function(d,source){var e,t,r,E,v,B,h,m,y,x=d.target,w=d.global,S=d.stat,_=d.proto,O=w?n:S?n[x]:(n[x]||{}).prototype,k=w?path:path[x]||F(path,x,{})[x],P=k.prototype;for(E in source)t=!(e=o(w?E:x+(S?".":"#")+E,d.forced))&&O&&C(O,E),B=k[E],t&&(h=d.dontCallGetSet?(y=D(O,E))&&y.value:O[E]),v=t&&h?h:source[E],t&&typeof B==typeof v||(m=d.bind&&t?l(v,n):d.wrap&&t?A(v):_&&c(v)?f(v):v,(d.sham||v&&v.sham||B&&B.sham)&&F(m,"sham",!0),F(k,E,m),_&&(C(path,r=x+"Prototype")||F(path,r,{}),F(path[r],E,v),d.real&&P&&(e||!P[E])&&F(P,E,v)))}},function(d,e,t){var path=t(584),n=t(579),r=t(674),f=t(585).f;d.exports=function(d){var e=path.Symbol||(path.Symbol={});n(e,d)||f(e,d,{value:r.f(d)})}},function(d,e,t){var n=t(613),r=Function.prototype,f=r.call,c=n&&r.bind.bind(f,f);d.exports=n?c:function(d){return function(){return f.apply(d,arguments)}}},function(d,e){d.exports=function(d){try{return!!d()}catch(d){return!0}}},function(d,e,t){var n=t(578),r=t(603),f=t(579),c=t(633),D=t(601),o=t(649),l=n.Symbol,F=r("wks"),C=o?l.for||l:l&&l.withoutSetter||c;d.exports=function(d){return f(F,d)||(F[d]=D&&f(l,d)?l[d]:C("Symbol."+d)),F[d]}},function(d,e,t){var n=t(646),r=n.all;d.exports=n.IS_HTMLDDA?function(d){return"function"==typeof d||d===r}:function(d){return"function"==typeof d}},function(d,e,t){(function(e){var t=function(d){return d&&d.Math==Math&&d};d.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||function(){return this}()||this||Function("return this")()}).call(this,t(53))},function(d,e,t){var n=t(574),r=t(588),f=n({}.hasOwnProperty);d.exports=Object.hasOwn||function(d,e){return f(r(d),e)}},function(d,e,t){var n=t(575);d.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(d,e,t){var n=t(574);d.exports=n({}.isPrototypeOf)},function(d,e,t){var n=t(5);d.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(d,e,t){var n=t(613),r=Function.prototype.call;d.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},function(d,e){d.exports={}},function(d,e,t){var n=t(580),r=t(650),f=t(652),c=t(589),D=t(615),o=TypeError,l=Object.defineProperty,F=Object.getOwnPropertyDescriptor,C="enumerable",A="configurable",E="writable";e.f=n?f?function(d,e,t){if(c(d),e=D(e),c(t),"function"==typeof d&&"prototype"===e&&"value"in t&&E in t&&!t[E]){var n=F(d,e);n&&n[E]&&(d[e]=t.value,t={configurable:A in t?t[A]:n[A],enumerable:C in t?t[C]:n[C],writable:!1})}return l(d,e,t)}:l:function(d,e,t){if(c(d),e=D(e),c(t),r)try{return l(d,e,t)}catch(d){}if("get"in t||"set"in t)throw o("Accessors not supported");return"value"in t&&(d[e]=t.value),d}},function(d,e,t){var n=t(577),r=t(646),f=r.all;d.exports=r.IS_HTMLDDA?function(d){return"object"==typeof d?null!==d:n(d)||d===f}:function(d){return"object"==typeof d?null!==d:n(d)}},function(d,e,t){var path=t(584),n=t(578),r=t(577),f=function(d){return r(d)?d:void 0};d.exports=function(d,e){return arguments.length<2?f(path[d])||f(n[d]):path[d]&&path[d][e]||n[d]&&n[d][e]}},function(d,e,t){var n=t(614),r=Object;d.exports=function(d){return r(n(d))}},function(d,e,t){var n=t(586),r=String,f=TypeError;d.exports=function(d){if(n(d))return d;throw f(r(d)+" is not an object")}},function(d,e,t){var n=t(701);d.exports=function(d){return n(d.length)}},function(d,e,t){d.exports=t(688)},function(d,e,t){var n=t(629),r=t(614);d.exports=function(d){return n(r(d))}},function(d,e){d.exports=function(d){return d&&d.__esModule?d:{default:d}},d.exports.__esModule=!0,d.exports.default=d.exports},function(d,e,t){var path=t(584);d.exports=function(d){return path[d+"Prototype"]}},function(d,e,t){var n=t(606),r=String;d.exports=function(d){if("Symbol"===n(d))throw TypeError("Cannot convert a Symbol value to a string");return r(d)}},function(d,e,t){"use strict";var n=t(6),r=t(46),f=t(24),c=t(16),D=t(105),o=t(103),l=Function,F=n([].concat),C=n([].join),A={};d.exports=o?l.bind:function(d){var e=r(this),t=e.prototype,n=D(arguments,1),o=function(){var t=F(n,D(arguments));return this instanceof o?function(d,e,t){if(!c(A,e)){for(var n=[],i=0;i0&&n[0]<4?1:+(n[0]+n[1])),!r&&c&&(!(n=c.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=c.match(/Chrome\/(\d+)/))&&(r=+n[1]),d.exports=r},function(d,e){d.exports=!0},function(d,e,t){var n=t(636),r=t(585).f,f=t(604),c=t(579),D=t(709),o=t(576)("toStringTag");d.exports=function(d,e,t,l){if(d){var F=t?d:d.prototype;c(F,o)||r(F,o,{configurable:!0,value:e}),l&&!n&&f(F,"toString",D)}}},function(d,e,t){var n=t(575);d.exports=!n((function(){var d=function(){}.bind();return"function"!=typeof d||d.hasOwnProperty("prototype")}))},function(d,e,t){var n=t(630),r=TypeError;d.exports=function(d){if(n(d))throw r("Can't call method on "+d);return d}},function(d,e,t){var n=t(691),r=t(609);d.exports=function(d){var e=n(d,"string");return r(e)?e:e+""}},function(d,e){d.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(d,e){var t=String;d.exports=function(d){try{return t(d)}catch(d){return"Object"}}},function(d,e,t){d.exports=t(653)},function(d,e,t){"use strict";var n=t(615),r=t(585),f=t(608);d.exports=function(object,d,e){var t=n(d);t in object?r.f(object,t,f(0,e)):object[t]=e}},function(d,e,t){var n=t(603),r=t(633),f=n("keys");d.exports=function(d){return f[d]||(f[d]=r(d))}},function(d,e){d.exports={}},function(d,e,t){var n,r=t(589),f=t(660),c=t(641),D=t(621),html=t(707),o=t(651),l=t(620),F="prototype",C="script",A=l("IE_PROTO"),E=function(){},v=function(content){return"<"+C+">"+content+""},B=function(d){d.write(v("")),d.close();var e=d.parentWindow.Object;return d=null,e},h=function(){try{n=new ActiveXObject("htmlfile")}catch(d){}var d,iframe,e;h="undefined"!=typeof document?document.domain&&n?B(n):(iframe=o("iframe"),e="java"+C+":",iframe.style.display="none",html.appendChild(iframe),iframe.src=String(e),(d=iframe.contentWindow.document).open(),d.write(v("document.F=Object")),d.close(),d.F):B(n);for(var t=c.length;t--;)delete h[F][c[t]];return h()};D[A]=!0,d.exports=Object.create||function(d,e){var t;return null!==d?(E[F]=r(d),t=new E,E[F]=null,t[A]=d):t=h(),void 0===e?t:f.f(t,e)}},function(d,e,t){var n=t(604);d.exports=function(d,e,t,r){return r&&r.enumerable?d[e]=t:n(d,e,t),d}},function(d,e,t){"use strict";var n=t(575);d.exports=function(d,e){var t=[][d];return!!t&&n((function(){t.call(null,e||function(){return 1},1)}))}},function(d,e,t){d.exports=t(818)},function(d,e,t){d.exports=t(831)},function(d,e,t){var n=t(107).PROPER,r=t(5),f=t(350);d.exports=function(d){return r((function(){return!!f[d]()||"​…᠎"!=="​…᠎"[d]()||n&&f[d].name!==d}))}},function(d,e,t){var n=t(600),r=t(574);d.exports=function(d){if("Function"===n(d))return r(d)}},function(d,e,t){var n=t(574),r=t(575),f=t(600),c=Object,D=n("".split);d.exports=r((function(){return!c("z").propertyIsEnumerable(0)}))?function(d){return"String"==f(d)?D(d,""):c(d)}:c},function(d,e){d.exports=function(d){return null==d}},function(d,e,t){var n=t(602),r=t(630);d.exports=function(d,e){var t=d[e];return r(t)?void 0:n(t)}},function(d,e,t){var n=t(578),r=t(693),f="__core-js_shared__",c=n[f]||r(f,{});d.exports=c},function(d,e,t){var n=t(574),r=0,f=Math.random(),c=n(1..toString);d.exports=function(d){return"Symbol("+(void 0===d?"":d)+")_"+c(++r+f,36)}},function(d,e,t){var n=t(628),r=t(602),f=t(613),c=n(n.bind);d.exports=function(d,e){return r(d),void 0===e?d:f?c(d,e):function(){return d.apply(e,arguments)}}},function(d,e,t){var n=t(574),r=t(575),f=t(577),c=t(606),D=t(587),o=t(699),l=function(){},F=[],C=D("Reflect","construct"),A=/^\s*(?:class|function)\b/,E=n(A.exec),v=!A.exec(l),B=function(d){if(!f(d))return!1;try{return C(l,F,d),!0}catch(d){return!1}},h=function(d){if(!f(d))return!1;switch(c(d)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!E(A,o(d))}catch(d){return!0}};h.sham=!0,d.exports=!C||r((function(){var d;return B(B.call)||!B(Object)||!B((function(){d=!0}))||d}))?h:B},function(d,e,t){var n={};n[t(576)("toStringTag")]="z",d.exports="[object z]"===String(n)},function(d,e,t){var n=t(638),r=Math.max,f=Math.min;d.exports=function(d,e){var t=n(d);return t<0?r(t+e,0):f(t,e)}},function(d,e,t){var n=t(700);d.exports=function(d){var e=+d;return e!=e||0===e?0:n(e)}},function(d,e,t){var n=t(575),r=t(576),f=t(610),c=r("species");d.exports=function(d){return f>=51||!n((function(){var e=[];return(e.constructor={})[c]=function(){return{foo:1}},1!==e[d](Boolean).foo}))}},function(d,e,t){var n,r,f,c=t(704),D=t(578),o=t(586),l=t(604),F=t(579),C=t(632),A=t(620),E=t(621),v="Object already initialized",B=D.TypeError,h=D.WeakMap;if(c||C.state){var m=C.state||(C.state=new h);m.get=m.get,m.has=m.has,m.set=m.set,n=function(d,e){if(m.has(d))throw B(v);return e.facade=d,m.set(d,e),e},r=function(d){return m.get(d)||{}},f=function(d){return m.has(d)}}else{var y=A("state");E[y]=!0,n=function(d,e){if(F(d,y))throw B(v);return e.facade=d,l(d,y,e),e},r=function(d){return F(d,y)?d[y]:{}},f=function(d){return F(d,y)}}d.exports={set:n,get:r,has:f,enforce:function(d){return f(d)?r(d):n(d,{})},getterFor:function(d){return function(e){var t;if(!o(e)||(t=r(e)).type!==d)throw B("Incompatible receiver, "+d+" required");return t}}}},function(d,e){d.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(d,e,t){var n=t(606),r=t(631),f=t(630),c=t(607),D=t(576)("iterator");d.exports=function(d){if(!f(d))return r(d,D)||r(d,"@@iterator")||c[n(d)]}},function(d,e,t){var n=t(634),r=t(574),f=t(629),c=t(588),D=t(590),o=t(670),l=r([].push),F=function(d){var e=1==d,t=2==d,r=3==d,F=4==d,C=6==d,A=7==d,E=5==d||C;return function(v,B,h,m){for(var y,x,w=c(v),S=f(w),_=n(B,h),O=D(S),k=0,P=m||o,j=e?P(v,O):t||A?P(v,0):void 0;O>k;k++)if((E||k in S)&&(x=_(y=S[k],k,w),d))if(e)j[k]=x;else if(x)switch(d){case 3:return!0;case 5:return y;case 6:return k;case 2:l(j,y)}else switch(d){case 4:return!1;case 7:l(j,y)}return C?-1:r||F?F:j}};d.exports={forEach:F(0),map:F(1),filter:F(2),some:F(3),every:F(4),find:F(5),findIndex:F(6),filterReject:F(7)}},function(d,e,t){t(677);var n=t(750),r=t(578),f=t(606),c=t(604),D=t(607),o=t(576)("toStringTag");for(var l in n){var F=r[l],C=F&&F.prototype;C&&f(C)!==o&&c(C,o,l),D[l]=D.Array}},function(d,e,t){var n=t(613),r=Function.prototype,f=r.apply,c=r.call;d.exports="object"==typeof Reflect&&Reflect.apply||(n?c.bind(f):function(){return c.apply(f,arguments)})},function(d,e){var t="object"==typeof document&&document.all,n=void 0===t&&void 0!==t;d.exports={all:t,IS_HTMLDDA:n}},function(d,e,t){var n=t(580),r=t(583),f=t(648),c=t(608),D=t(592),o=t(615),l=t(579),F=t(650),C=Object.getOwnPropertyDescriptor;e.f=n?C:function(d,e){if(d=D(d),e=o(e),F)try{return C(d,e)}catch(d){}if(l(d,e))return c(!r(f.f,d,e),d[e])}},function(d,e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,f=r&&!n.call({1:2},1);e.f=f?function(d){var e=r(this,d);return!!e&&e.enumerable}:n},function(d,e,t){var n=t(601);d.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(d,e,t){var n=t(580),r=t(575),f=t(651);d.exports=!n&&!r((function(){return 7!=Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a}))},function(d,e,t){var n=t(578),r=t(586),f=n.document,c=r(f)&&r(f.createElement);d.exports=function(d){return c?f.createElement(d):{}}},function(d,e,t){var n=t(580),r=t(575);d.exports=n&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(d,e,t){var n=t(696);d.exports=n},function(d,e,t){var n=t(574);d.exports=n([].slice)},function(d,e,t){d.exports=t(656)},function(d,e,t){var n=t(702);d.exports=n},function(d,e,t){"use strict";var n=t(703).charAt,r=t(595),f=t(640),c=t(658),D=t(665),o="String Iterator",l=f.set,F=f.getterFor(o);c(String,"String",(function(d){l(this,{type:o,string:r(d),index:0})}),(function(){var d,e=F(this),t=e.string,r=e.index;return r>=t.length?D(void 0,!0):(d=n(t,r),e.index+=d.length,D(d,!1))}))},function(d,e,t){"use strict";var n=t(572),r=t(583),f=t(611),c=t(705),D=t(577),o=t(706),l=t(664),F=t(710),C=t(612),A=t(604),E=t(623),v=t(576),B=t(607),h=t(659),m=c.PROPER,y=c.CONFIGURABLE,x=h.IteratorPrototype,w=h.BUGGY_SAFARI_ITERATORS,S=v("iterator"),_="keys",O="values",k="entries",P=function(){return this};d.exports=function(d,e,t,c,v,h,j){o(t,e,c);var N,I,M,T=function(d){if(d===v&&z)return z;if(!w&&d in U)return U[d];switch(d){case _:case O:case k:return function(){return new t(this,d)}}return function(){return new t(this)}},L=e+" Iterator",R=!1,U=d.prototype,$=U[S]||U["@@iterator"]||v&&U[v],z=!w&&$||T(v),G="Array"==e&&U.entries||$;if(G&&(N=l(G.call(new d)))!==Object.prototype&&N.next&&(f||l(N)===x||(F?F(N,x):D(N[S])||E(N,S,P)),C(N,L,!0,!0),f&&(B[L]=P)),m&&v==O&&$&&$.name!==O&&(!f&&y?A(U,"name",O):(R=!0,z=function(){return r($,this)})),v)if(I={values:T(O),keys:h?z:T(_),entries:T(k)},j)for(M in I)(w||R||!(M in U))&&E(U,M,I[M]);else n({target:e,proto:!0,forced:w||R},I);return f&&!j||U[S]===z||E(U,S,z,{name:v}),B[e]=z,I}},function(d,e,t){"use strict";var n,r,f,c=t(575),D=t(577),o=t(586),l=t(622),F=t(664),C=t(623),A=t(576),E=t(611),v=A("iterator"),B=!1;[].keys&&("next"in(f=[].keys())?(r=F(F(f)))!==Object.prototype&&(n=r):B=!0),!o(n)||c((function(){var d={};return n[v].call(d)!==d}))?n={}:E&&(n=l(n)),D(n[v])||C(n,v,(function(){return this})),d.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:B}},function(d,e,t){var n=t(580),r=t(652),f=t(585),c=t(589),D=t(592),o=t(661);e.f=n&&!r?Object.defineProperties:function(d,e){c(d);for(var t,n=D(e),r=o(e),l=r.length,F=0;l>F;)f.f(d,t=r[F++],n[t]);return d}},function(d,e,t){var n=t(662),r=t(641);d.exports=Object.keys||function(d){return n(d,r)}},function(d,e,t){var n=t(574),r=t(579),f=t(592),c=t(663).indexOf,D=t(621),o=n([].push);d.exports=function(object,d){var e,t=f(object),i=0,n=[];for(e in t)!r(D,e)&&r(t,e)&&o(n,e);for(;d.length>i;)r(t,e=d[i++])&&(~c(n,e)||o(n,e));return n}},function(d,e,t){var n=t(592),r=t(637),f=t(590),c=function(d){return function(e,t,c){var D,o=n(e),l=f(o),F=r(c,l);if(d&&t!=t){for(;l>F;)if((D=o[F++])!=D)return!0}else for(;l>F;F++)if((d||F in o)&&o[F]===t)return d||F||0;return!d&&-1}};d.exports={includes:c(!0),indexOf:c(!1)}},function(d,e,t){var n=t(579),r=t(577),f=t(588),c=t(620),D=t(708),o=c("IE_PROTO"),l=Object,F=l.prototype;d.exports=D?l.getPrototypeOf:function(d){var object=f(d);if(n(object,o))return object[o];var e=object.constructor;return r(e)&&object instanceof e?e.prototype:object instanceof l?F:null}},function(d,e){d.exports=function(d,e){return{value:d,done:e}}},function(d,e,t){d.exports=t(667)},function(d,e,t){var n=t(720);t(644),d.exports=n},function(d,e,t){"use strict";var n=t(572),r=t(575),f=t(605),c=t(586),D=t(588),o=t(590),l=t(669),F=t(619),C=t(670),A=t(639),E=t(576),v=t(610),B=E("isConcatSpreadable"),h=v>=51||!r((function(){var d=[];return d[B]=!1,d.concat()[0]!==d})),m=function(d){if(!c(d))return!1;var e=d[B];return void 0!==e?!!e:f(d)};n({target:"Array",proto:!0,arity:1,forced:!h||!A("concat")},{concat:function(d){var i,e,t,n,r,f=D(this),c=C(f,0),A=0;for(i=-1,t=arguments.length;i9007199254740991)throw t("Maximum allowed index exceeded");return d}},function(d,e,t){var n=t(721);d.exports=function(d,e){return new(n(d))(0===e?0:e)}},function(d,e,t){var n=t(662),r=t(641).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(d){return n(d,r)}},function(d,e,t){var n=t(637),r=t(590),f=t(619),c=Array,D=Math.max;d.exports=function(d,e,t){for(var o=r(d),l=n(e,o),F=n(void 0===t?o:t,o),C=c(D(F-l,0)),A=0;l=e.length?(d.target=void 0,l(void 0,!0)):l("keys"==t?n:"values"==t?e[n]:[n,e[n]],!1)}),"values");var B=f.Arguments=f.Array;if(r("keys"),r("values"),r("entries"),!F&&C&&"values"!==B.name)try{D(B,"name",{value:"values"})}catch(d){}},function(d,e,t){d.exports=t(679)},function(d,e,t){d.exports=t(751)},function(d,e,t){d.exports=t(681)},function(d,e,t){var n=t(755);d.exports=n},function(d,e,t){var n=t(757),r=t(761),f=t(786),c=t(794);d.exports=function(d,i){return n(d)||r(d,i)||f(d,i)||c()},d.exports.__esModule=!0,d.exports.default=d.exports},function(d,e,t){var n=t(587),r=t(574),f=n("Symbol"),c=f.keyFor,D=r(f.prototype.valueOf);d.exports=f.isRegisteredSymbol||function(d){try{return void 0!==c(D(d))}catch(d){return!1}}},function(d,e,t){for(var n=t(603),r=t(587),f=t(574),c=t(609),D=t(576),o=r("Symbol"),l=o.isWellKnownSymbol,F=r("Object","getOwnPropertyNames"),C=f(o.prototype.valueOf),A=n("wks"),i=0,E=F(o),v=E.length;i=d.length?{done:!0}:{done:!1,value:d[i++]}},e:function(d){throw d},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,F=!0,C=!1;return{s:function(){t=t.call(d)},n:function(){var d=t.next();return F=d.done,d},e:function(d){C=!0,l=d},f:function(){try{F||null==t.return||t.return()}finally{if(C)throw l}}}}function w(d,e){(null==e||e>d.length)&&(e=d.length);for(var i=0,t=new Array(e);i]+)>|(\d\d?|[\s\S]?))/g,L=void 0===/()??/.exec("")[1],R=void 0!==(0,C.default)(/x/);function U(d){var e=!0;try{if(new RegExp("",d),"y"===d){".."===".a".replace(new RegExp("a","gy"),".")&&(e=!1)}}catch(d){e=!1}return e}var $=U("d"),z=U("s"),G=U("u"),H=U("y"),V={d:$,g:!0,i:!0,m:!0,s:z,u:G,y:H},J=z?/[^dgimsuy]+/g:/[^dgimuy]+/g;function Z(d,e,t,n,r){var f;if(d[S]={captureNames:e},r)return d;if(d.__proto__)d.__proto__=au.prototype;else for(var p in au.prototype)d[p]=au.prototype[p];return d[S].source=t,d[S].flags=n?(0,A.default)(f=n.split("")).call(f).join(""):n,d}function K(d){return d.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function W(d,e){var t;if(!au.isRegExp(d))throw new TypeError("Type RegExp expected");var n=d[S]||{},r=function(d){return R?(0,C.default)(d):/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(d))[1]}(d),f="",c="",D=null,o=null;return(e=e||{}).removeG&&(c+="g"),e.removeY&&(c+="y"),c&&(r=r.replace(new RegExp("[".concat(c,"]+"),"g"),"")),e.addG&&(f+="g"),e.addY&&(f+="y"),f&&(r=K(r+f)),e.isInternalOnly||(void 0!==n.source&&(D=n.source),null!=(0,C.default)(n)&&(o=f?K((0,C.default)(n)+f):(0,C.default)(n))),d=Z(new RegExp(e.source||d.source,r),function(d){return!(!d[S]||!d[S].captureNames)}(d)?(0,E.default)(t=n.captureNames).call(t,0):null,D,o,e.isInternalOnly)}function Y(d){return(0,v.default)(d,16)}function X(d,e,t){var n=d.index+d[0].length,r=d.input[d.index-1],f=d.input[n];return/^[()|]$/.test(r)||/^[()|]$/.test(f)||0===d.index||n===d.input.length||/\(\?(?:[:=!]|<[=!])$/.test(d.input.substring(d.index-4,d.index))||function(pattern,d,e){var t=-1!==(0,B.default)(e).call(e,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/;return t.test((0,E.default)(pattern).call(pattern,d))}(d.input,n,t)?"":"(?:)"}function Q(d){return(0,v.default)(d,10).toString(16)}function uu(d,e){return Object.prototype.toString.call(d)==="[object ".concat(e,"]")}function du(d){if(null==d)throw new TypeError("Cannot convert null or undefined to object");return d}function eu(d){for(;d.length<4;)d="0".concat(d);return d}function tu(d){var e={};return uu(d,"String")?((0,h.default)(au).call(au,d,/[^\s,]+/,(function(d){e[d]=!0})),e):d}function nu(d){if(!/^[\w$]$/.test(d))throw new Error("Flag must be a single character A-Za-z0-9_$");V[d]=!0}function ru(pattern,d,e,t,n){for(var r,f,i=j.length,c=pattern[e],D=null;i--;)if(!((f=j[i]).leadChar&&f.leadChar!==c||f.scope!==t&&"all"!==f.scope||f.flag&&-1===(0,B.default)(d).call(d,f.flag))&&(r=au.exec(pattern,f.regex,e,"sticky"))){D={matchLength:r[0].length,output:f.handler.call(n,r,t,d),reparse:f.reparse};break}return D}function fu(d){_.astral=d}function cu(d){_.namespacing=d}function au(pattern,d){if(au.isRegExp(pattern)){if(void 0!==d)throw new TypeError("Cannot supply flags when copying a RegExp");return W(pattern)}if(pattern=void 0===pattern?"":String(pattern),d=void 0===d?"":String(d),au.isInstalled("astral")&&-1===(0,B.default)(d).call(d,"A")&&(d+="A"),P[pattern]||(P[pattern]={}),!P[pattern][d]){for(var e,t={hasNamedCapture:!1,captureNames:[]},n=N,output="",r=0,f=function(pattern,d){if(K(d)!==d)throw new SyntaxError("Invalid duplicate regex flag ".concat(d));pattern=pattern.replace(/^\(\?([\w$]+)\)/,(function(e,t){if(/[dgy]/.test(t))throw new SyntaxError("Cannot use flags dgy in mode modifier ".concat(e));return d=K(d+t),""}));var e,t=x(d);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(!V[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(d){t.e(d)}finally{t.f()}return{pattern:pattern,flags:d}}(pattern,d),c=f.pattern,D=(0,C.default)(f);r")}else if(t)return"\\".concat(+t+n);return d}if(!uu(d,"Array")||!d.length)throw new TypeError("Must provide a nonempty array of patterns to merge");var o,l=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,output=[],F=x(d);try{for(F.s();!(o=F.n()).done;){var pattern=o.value;au.isRegExp(pattern)?(n=c,r=pattern[S]&&pattern[S].captureNames||[],output.push(au(pattern.source).source.replace(l,D))):output.push(au.escape(pattern))}}catch(d){F.e(d)}finally{F.f()}var C="none"===f?"":"|";return au(output.join(C),e)},O.exec=function(d){var e=this.lastIndex,t=RegExp.prototype.exec.apply(this,arguments);if(t){if(!L&&t.length>1&&-1!==(0,B.default)(t).call(t,"")){var n,r=W(this,{removeG:!0,isInternalOnly:!0});(0,E.default)(n=String(d)).call(n,t.index).replace(r,(function(){for(var d=arguments.length,i=1;it.index&&(this.lastIndex=t.index)}return this.global||(this.lastIndex=e),t},O.test=function(d){return!!O.exec.call(this,d)},O.match=function(d){if(au.isRegExp(d)){if(d.global){var e=String.prototype.match.apply(this,arguments);return d.lastIndex=0,e}}else d=new RegExp(d);return O.exec.call(d,du(this))},O.replace=function(d,e){var t,n,r,f=au.isRegExp(d);return f?(d[S]&&(n=d[S].captureNames),t=d.lastIndex):d+="",r=uu(e,"Function")?String(this).replace(d,(function(){for(var d=arguments.length,t=new Array(d),r=0;rl)throw new SyntaxError("Backreference to undefined group ".concat(d));return t[f]||""}throw new SyntaxError("Invalid token ".concat(d))}))})),f&&(d.global?d.lastIndex=0:d.lastIndex=t),r},O.split=function(d,e){if(!au.isRegExp(d))return String.prototype.split.apply(this,arguments);var t,n=String(this),output=[],r=d.lastIndex,f=0;return e=(void 0===e?-1:e)>>>0,(0,h.default)(au).call(au,n,d,(function(d){d.index+d[0].length>f&&(output.push((0,E.default)(n).call(n,f,d.index)),d.length>1&&d.indexe?(0,E.default)(output).call(output,0,e):output},au.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(function(d,e){if("B"===d[1]&&e===N)return d[0];throw new SyntaxError("Invalid escape ".concat(d[0]))}),{scope:"all",leadChar:"\\"}),au.addToken(/\\u{([\dA-Fa-f]+)}/,(function(d,e,t){var code=Y(d[1]);if(code>1114111)throw new SyntaxError("Invalid Unicode code point ".concat(d[0]));if(code<=65535)return"\\u".concat(eu(Q(code)));if(G&&-1!==(0,B.default)(t).call(t,"u"))return d[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")}),{scope:"all",leadChar:"\\"}),au.addToken(/\(\?#[^)]*\)/,X,{leadChar:"("}),au.addToken(/\s+|#[^\n]*\n?/,X,{flag:"x"}),z||au.addToken(/\./,(function(){return"[\\s\\S]"}),{flag:"s",leadChar:"."}),au.addToken(/\\k<([^>]+)>/,(function(d){var e,t,n=isNaN(d[1])?(0,B.default)(e=this.captureNames).call(e,d[1])+1:+d[1],r=d.index+d[0].length;if(!n||n>this.captureNames.length)throw new SyntaxError("Backreference to undefined group ".concat(d[0]));return(0,y.default)(t="\\".concat(n)).call(t,r===d.input.length||isNaN(d.input[r])?"":"(?:)")}),{leadChar:"\\"}),au.addToken(/\\(\d+)/,(function(d,e){if(!(e===N&&/^[1-9]/.test(d[1])&&+d[1]<=this.captureNames.length)&&"0"!==d[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(d[0]));return d[0]}),{scope:"all",leadChar:"\\"}),au.addToken(/\(\?P?<((?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])*)>/,(function(d){var e;if(!au.isInstalled("namespacing")&&("length"===d[1]||"__proto__"===d[1]))throw new SyntaxError("Cannot use reserved word as capture name ".concat(d[0]));if(-1!==(0,B.default)(e=this.captureNames).call(e,d[1]))throw new SyntaxError("Cannot use same name for multiple groups ".concat(d[0]));return this.captureNames.push(d[1]),this.hasNamedCapture=!0,"("}),{leadChar:"("}),au.addToken(/\((?!\?)/,(function(d,e,t){return-1!==(0,B.default)(t).call(t,"n")?"(?:":(this.captureNames.push(null),"(")}),{optionalFlags:"n",leadChar:"("});var Du=au;e.default=Du,d.exports=e.default},function(d,e,t){var n=t(581),r=t(697),f=Array.prototype;d.exports=function(d){var e=d.slice;return d===f||n(f,d)&&e===f.slice?r:e}},function(d,e,t){t(698);var n=t(594);d.exports=n("Array").slice},function(d,e,t){"use strict";var n=t(572),r=t(605),f=t(635),c=t(586),D=t(637),o=t(590),l=t(592),F=t(619),C=t(576),A=t(639),E=t(654),v=A("slice"),B=C("species"),h=Array,m=Math.max;n({target:"Array",proto:!0,forced:!v},{slice:function(d,e){var t,n,C,A=l(this),v=o(A),y=D(d,v),x=D(void 0===e?v:e,v);if(r(A)&&(t=A.constructor,(f(t)&&(t===h||r(t.prototype))||c(t)&&null===(t=t[B]))&&(t=void 0),t===h||void 0===t))return E(A,y,x);for(n=new(void 0===t?h:t)(m(x-y,0)),C=0;y0?n:t)(e)}},function(d,e,t){var n=t(638),r=Math.min;d.exports=function(d){return d>0?r(n(d),9007199254740991):0}},function(d,e,t){t(657),t(713);var path=t(584);d.exports=path.Array.from},function(d,e,t){var n=t(574),r=t(638),f=t(595),c=t(614),D=n("".charAt),o=n("".charCodeAt),l=n("".slice),F=function(d){return function(e,t){var n,F,C=f(c(e)),A=r(t),E=C.length;return A<0||A>=E?d?"":void 0:(n=o(C,A))<55296||n>56319||A+1===E||(F=o(C,A+1))<56320||F>57343?d?D(C,A):n:d?l(C,A,A+2):F-56320+(n-55296<<10)+65536}};d.exports={codeAt:F(!1),charAt:F(!0)}},function(d,e,t){var n=t(578),r=t(577),f=n.WeakMap;d.exports=r(f)&&/native code/.test(String(f))},function(d,e,t){var n=t(580),r=t(579),f=Function.prototype,c=n&&Object.getOwnPropertyDescriptor,D=r(f,"name"),o=D&&"something"===function(){}.name,l=D&&(!n||n&&c(f,"name").configurable);d.exports={EXISTS:D,PROPER:o,CONFIGURABLE:l}},function(d,e,t){"use strict";var n=t(659).IteratorPrototype,r=t(622),f=t(608),c=t(612),D=t(607),o=function(){return this};d.exports=function(d,e,t,l){var F=e+" Iterator";return d.prototype=r(n,{next:f(+!l,t)}),c(d,F,!1,!0),D[F]=o,d}},function(d,e,t){var n=t(587);d.exports=n("document","documentElement")},function(d,e,t){var n=t(575);d.exports=!n((function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype}))},function(d,e,t){"use strict";var n=t(636),r=t(606);d.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(d,e,t){var n=t(711),r=t(589),f=t(712);d.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var d,e=!1,t={};try{(d=n(Object.prototype,"__proto__","set"))(t,[]),e=t instanceof Array}catch(d){}return function(t,n){return r(t),f(n),e?d(t,n):t.__proto__=n,t}}():void 0)},function(d,e,t){var n=t(574),r=t(602);d.exports=function(object,d,e){try{return n(r(Object.getOwnPropertyDescriptor(object,d)[e]))}catch(d){}}},function(d,e,t){var n=t(577),r=String,f=TypeError;d.exports=function(d){if("object"==typeof d||n(d))return d;throw f("Can't set "+r(d)+" as a prototype")}},function(d,e,t){var n=t(572),r=t(714);n({target:"Array",stat:!0,forced:!t(719)((function(d){Array.from(d)}))},{from:r})},function(d,e,t){"use strict";var n=t(634),r=t(583),f=t(588),c=t(715),D=t(717),o=t(635),l=t(590),F=t(619),C=t(718),A=t(642),E=Array;d.exports=function(d){var e=f(d),t=o(this),v=arguments.length,B=v>1?arguments[1]:void 0,h=void 0!==B;h&&(B=n(B,v>2?arguments[2]:void 0));var m,y,x,w,S,_,O=A(e),k=0;if(!O||this===E&&D(O))for(m=l(e),y=t?new this(m):E(m);m>k;k++)_=h?B(e[k],k):e[k],F(y,k,_);else for(S=(w=C(e,O)).next,y=t?new this:[];!(x=r(S,w)).done;k++)_=h?c(w,B,[x.value,k],!0):x.value,F(y,k,_);return y.length=k,y}},function(d,e,t){var n=t(589),r=t(716);d.exports=function(d,e,t,f){try{return f?e(n(t)[0],t[1]):e(t)}catch(e){r(d,"throw",e)}}},function(d,e,t){var n=t(583),r=t(589),f=t(631);d.exports=function(d,e,t){var c,D;r(d);try{if(!(c=f(d,"return"))){if("throw"===e)throw t;return t}c=n(c,d)}catch(d){D=!0,c=d}if("throw"===e)throw t;if(D)throw c;return r(c),t}},function(d,e,t){var n=t(576),r=t(607),f=n("iterator"),c=Array.prototype;d.exports=function(d){return void 0!==d&&(r.Array===d||c[f]===d)}},function(d,e,t){var n=t(583),r=t(602),f=t(589),c=t(617),D=t(642),o=TypeError;d.exports=function(d,e){var t=arguments.length<2?D(d):e;if(r(t))return f(n(t,d));throw o(c(d)+" is not iterable")}},function(d,e,t){var n=t(576)("iterator"),r=!1;try{var f=0,c={next:function(){return{done:!!f++}},return:function(){r=!0}};c[n]=function(){return this},Array.from(c,(function(){throw 2}))}catch(d){}d.exports=function(d,e){if(!e&&!r)return!1;var t=!1;try{var object={};object[n]=function(){return{next:function(){return{done:t=!0}}}},d(object)}catch(d){}return t}},function(d,e,t){t(668),t(722),t(723),t(732),t(733),t(734),t(735),t(736),t(737),t(738),t(739),t(740),t(741),t(742),t(743),t(744),t(745),t(746),t(747),t(748);var path=t(584);d.exports=path.Symbol},function(d,e,t){var n=t(605),r=t(635),f=t(586),c=t(576)("species"),D=Array;d.exports=function(d){var e;return n(d)&&(e=d.constructor,(r(e)&&(e===D||n(e.prototype))||f(e)&&null===(e=e[c]))&&(e=void 0)),void 0===e?D:e}},function(d,e){},function(d,e,t){t(724),t(727),t(728),t(729),t(731)},function(d,e,t){"use strict";var n=t(572),r=t(578),f=t(583),c=t(574),D=t(611),o=t(580),l=t(601),F=t(575),C=t(579),A=t(581),E=t(589),v=t(592),B=t(615),h=t(595),m=t(608),y=t(622),x=t(661),w=t(671),S=t(725),_=t(673),O=t(647),k=t(585),P=t(660),j=t(648),N=t(623),I=t(726),M=t(603),T=t(620),L=t(621),R=t(633),U=t(576),$=t(674),z=t(573),G=t(675),H=t(612),V=t(640),J=t(643).forEach,Z=T("hidden"),K="Symbol",W="prototype",Y=V.set,X=V.getterFor(K),Q=Object[W],uu=r.Symbol,du=uu&&uu[W],eu=r.TypeError,tu=r.QObject,nu=O.f,ru=k.f,fu=S.f,cu=j.f,au=c([].push),Du=M("symbols"),ou=M("op-symbols"),iu=M("wks"),su=!tu||!tu[W]||!tu[W].findChild,lu=o&&F((function(){return 7!=y(ru({},"a",{get:function(){return ru(this,"a",{value:7}).a}})).a}))?function(d,e,t){var n=nu(Q,e);n&&delete Q[e],ru(d,e,t),n&&d!==Q&&ru(Q,e,n)}:ru,Fu=function(d,e){var symbol=Du[d]=y(du);return Y(symbol,{type:K,tag:d,description:e}),o||(symbol.description=e),symbol},Cu=function(d,e,t){d===Q&&Cu(ou,e,t),E(d);var n=B(e);return E(t),C(Du,n)?(t.enumerable?(C(d,Z)&&d[Z][n]&&(d[Z][n]=!1),t=y(t,{enumerable:m(0,!1)})):(C(d,Z)||ru(d,Z,m(1,{})),d[Z][n]=!0),lu(d,n,t)):ru(d,n,t)},Au=function(d,e){E(d);var t=v(e),n=x(t).concat(vu(t));return J(n,(function(e){o&&!f(Eu,t,e)||Cu(d,e,t[e])})),d},Eu=function(d){var e=B(d),t=f(cu,this,e);return!(this===Q&&C(Du,e)&&!C(ou,e))&&(!(t||!C(this,e)||!C(Du,e)||C(this,Z)&&this[Z][e])||t)},pu=function(d,e){var t=v(d),n=B(e);if(t!==Q||!C(Du,n)||C(ou,n)){var r=nu(t,n);return!r||!C(Du,n)||C(t,Z)&&t[Z][n]||(r.enumerable=!0),r}},bu=function(d){var e=fu(v(d)),t=[];return J(e,(function(d){C(Du,d)||C(L,d)||au(t,d)})),t},vu=function(d){var e=d===Q,t=fu(e?ou:v(d)),n=[];return J(t,(function(d){!C(Du,d)||e&&!C(Q,d)||au(n,Du[d])})),n};l||(uu=function(){if(A(du,this))throw eu("Symbol is not a constructor");var d=arguments.length&&void 0!==arguments[0]?h(arguments[0]):void 0,e=R(d),t=function(d){this===Q&&f(t,ou,d),C(this,Z)&&C(this[Z],e)&&(this[Z][e]=!1),lu(this,e,m(1,d))};return o&&su&&lu(Q,e,{configurable:!0,set:t}),Fu(e,d)},N(du=uu[W],"toString",(function(){return X(this).tag})),N(uu,"withoutSetter",(function(d){return Fu(R(d),d)})),j.f=Eu,k.f=Cu,P.f=Au,O.f=pu,w.f=S.f=bu,_.f=vu,$.f=function(d){return Fu(U(d),d)},o&&(I(du,"description",{configurable:!0,get:function(){return X(this).description}}),D||N(Q,"propertyIsEnumerable",Eu,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!l,sham:!l},{Symbol:uu}),J(x(iu),(function(d){z(d)})),n({target:K,stat:!0,forced:!l},{useSetter:function(){su=!0},useSimple:function(){su=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!o},{create:function(d,e){return void 0===e?y(d):Au(y(d),e)},defineProperty:Cu,defineProperties:Au,getOwnPropertyDescriptor:pu}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:bu}),G(),H(uu,K),L[Z]=!0},function(d,e,t){var n=t(600),r=t(592),f=t(671).f,c=t(672),D="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(d){return D&&"Window"==n(d)?function(d){try{return f(d)}catch(d){return c(D)}}(d):f(r(d))}},function(d,e,t){var n=t(585);d.exports=function(d,e,t){return n.f(d,e,t)}},function(d,e,t){var n=t(572),r=t(587),f=t(579),c=t(595),D=t(603),o=t(676),l=D("string-to-symbol-registry"),F=D("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!o},{for:function(d){var e=c(d);if(f(l,e))return l[e];var symbol=r("Symbol")(e);return l[e]=symbol,F[symbol]=e,symbol}})},function(d,e,t){var n=t(572),r=t(579),f=t(609),c=t(617),D=t(603),o=t(676),l=D("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!o},{keyFor:function(d){if(!f(d))throw TypeError(c(d)+" is not a symbol");if(r(l,d))return l[d]}})},function(d,e,t){var n=t(572),r=t(587),f=t(645),c=t(583),D=t(574),o=t(575),l=t(577),F=t(609),C=t(654),A=t(730),E=t(601),v=String,B=r("JSON","stringify"),h=D(/./.exec),m=D("".charAt),y=D("".charCodeAt),x=D("".replace),w=D(1..toString),S=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,k=!E||o((function(){var symbol=r("Symbol")();return"[null]"!=B([symbol])||"{}"!=B({a:symbol})||"{}"!=B(Object(symbol))})),P=o((function(){return'"\\udf06\\ud834"'!==B("\udf06\ud834")||'"\\udead"'!==B("\udead")})),j=function(d,e){var t=C(arguments),n=A(e);if(l(n)||void 0!==d&&!F(d))return t[1]=function(d,e){if(l(n)&&(e=c(n,this,v(d),e)),!F(e))return e},f(B,null,t)},N=function(d,e,t){var n=m(t,e-1),r=m(t,e+1);return h(_,d)&&!h(O,r)||h(O,d)&&!h(_,n)?"\\u"+w(y(d,0),16):d};B&&n({target:"JSON",stat:!0,arity:3,forced:k||P},{stringify:function(d,e,t){var n=C(arguments),r=f(k?j:B,null,n);return P&&"string"==typeof r?x(r,S,N):r}})},function(d,e,t){var n=t(574),r=t(605),f=t(577),c=t(600),D=t(595),o=n([].push);d.exports=function(d){if(f(d))return d;if(r(d)){for(var e=d.length,t=[],i=0;id.length)&&(e=d.length);for(var i=0,t=new Array(e);i3)){if(v)return!0;if(h)return h<603;var code,d,e,t,n="";for(code=65;code<76;code++){switch(d=String.fromCharCode(code),code){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(t=0;t<47;t++)m.push({k:d+t,v:e})}for(m.sort((function(a,b){return b.v-a.v})),t=0;tl(t)?1:-1}}(d)),t=D(r),n=0;n0;)d[t]=d[--t];t!==i++&&(d[t]=element)}return d},D=function(d,e,t,n){for(var r=e.length,f=t.length,c=0,D=0;c>>0||(E(A,t)?16:10))}:l},function(d,e,t){var n=t(574),r=t(614),f=t(595),c=t(685),D=n("".replace),o=RegExp("^["+c+"]+"),l=RegExp("(^|[^"+c+"])["+c+"]+$"),F=function(d){return function(e){var t=f(r(e));return 1&d&&(t=D(t,o,"")),2&d&&(t=D(t,l,"$1")),t}};d.exports={start:F(1),end:F(2),trim:F(3)}},function(d,e,t){var n=t(819);d.exports=n},function(d,e,t){var n=t(581),r=t(820),f=Array.prototype;d.exports=function(d){var e=d.indexOf;return d===f||n(f,d)&&e===f.indexOf?r:e}},function(d,e,t){t(821);var n=t(594);d.exports=n("Array").indexOf},function(d,e,t){"use strict";var n=t(572),r=t(628),f=t(663).indexOf,c=t(624),D=r([].indexOf),o=!!D&&1/D([1],1,-0)<0;n({target:"Array",proto:!0,forced:o||!c("indexOf")},{indexOf:function(d){var e=arguments.length>1?arguments[1]:void 0;return o?D(this,d,e)||0:f(this,d,e)}})},function(d,e,t){t(644);var n=t(606),r=t(579),f=t(581),c=t(823),D=Array.prototype,o={DOMTokenList:!0,NodeList:!0};d.exports=function(d){var e=d.forEach;return d===D||f(D,d)&&e===D.forEach||r(o,n(d))?c:e}},function(d,e,t){var n=t(824);d.exports=n},function(d,e,t){t(825);var n=t(594);d.exports=n("Array").forEach},function(d,e,t){"use strict";var n=t(572),r=t(826);n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(d,e,t){"use strict";var n=t(643).forEach,r=t(624)("forEach");d.exports=r?[].forEach:function(d){return n(this,d,arguments.length>1?arguments[1]:void 0)}},function(d,e,t){d.exports=t(828)},function(d,e,t){var n=t(829);d.exports=n},function(d,e,t){t(830);var n=t(584).Object;d.exports=function(d,e){return n.create(d,e)}},function(d,e,t){t(572)({target:"Object",stat:!0,sham:!t(580)},{create:t(622)})},function(d,e,t){var n=t(832);d.exports=n},function(d,e,t){var n=t(581),r=t(833),f=Array.prototype;d.exports=function(d){var e=d.concat;return d===f||n(f,d)&&e===f.concat?r:e}},function(d,e,t){t(668);var n=t(594);d.exports=n("Array").concat},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(835)),c=r(t(842)),D=r(t(625)),o=r(t(626));e.default=function(d){var e="xregexp",t=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,n=d.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,t],"g",{conjunction:"or"});function r(pattern){var d=/^(?:\(\?:\))*\^/,e=/\$(?:\(\?:\))*$/;return d.test(pattern)&&e.test(pattern)&&e.test(pattern.replace(/\\[\s\S]/g,""))?pattern.replace(d,"").replace(e,""):pattern}function l(t,n){var r=n?"x":"";return d.isRegExp(t)?t[e]&&t[e].captureNames?t:d(t.source,r):d(t,r)}function F(e){return e instanceof RegExp?e:d.escape(e)}function C(d,e,t){return d["subpattern".concat(t)]=e,d}function A(d,e,t){return d+(e1?D-1:0),l=1;l")):D="(?:",A=v;var E=data[F].pattern.replace(t,(function(d,e,t){if(e){if(c=data[F].names[v-A],++v,c)return"(?<".concat(c,">")}else if(t)return l=+t-1,data[F].names[l]?"\\k<".concat(data[F].names[l],">"):"\\".concat(+t+A);return d}));return(0,o.default)(C="".concat(D)).call(C,E,")")}if(r){if(c=m[B],h[++B]=++v,c)return"(?<".concat(c,">")}else if(f)return m[l=+f-1]?"\\k<".concat(m[l],">"):"\\".concat(h[+f]);return d}));return d(output,c)}},d.exports=e.default},function(d,e,t){d.exports=t(836)},function(d,e,t){var n=t(837);d.exports=n},function(d,e,t){var n=t(581),r=t(838),f=Array.prototype;d.exports=function(d){var e=d.reduce;return d===f||n(f,d)&&e===f.reduce?r:e}},function(d,e,t){t(839);var n=t(594);d.exports=n("Array").reduce},function(d,e,t){"use strict";var n=t(572),r=t(840).left,f=t(624),c=t(610);n({target:"Array",proto:!0,forced:!t(841)&&c>79&&c<83||!f("reduce")},{reduce:function(d){var e=arguments.length;return r(this,d,e,e>1?arguments[1]:void 0)}})},function(d,e,t){var n=t(602),r=t(588),f=t(629),c=t(590),D=TypeError,o=function(d){return function(e,t,o,l){n(t);var F=r(e),C=f(F),A=c(F),E=d?A-1:0,i=d?-1:1;if(o<2)for(;;){if(E in C){l=C[E],E+=i;break}if(E+=i,d?E<0:A<=E)throw D("Reduce of empty array with no initial value")}for(;d?E>=0:A>E;E+=i)E in C&&(l=t(l,C[E],E,F));return l}};d.exports={left:o(!1),right:o(!0)}},function(d,e,t){(function(e){var n=t(600);d.exports=void 0!==e&&"process"==n(e)}).call(this,t(179))},function(d,e,t){d.exports=t(843)},function(d,e,t){var n=t(844);d.exports=n},function(d,e,t){var n=t(581),r=t(845),f=Array.prototype;d.exports=function(d){var e=d.map;return d===f||n(f,d)&&e===f.map?r:e}},function(d,e,t){t(846);var n=t(594);d.exports=n("Array").map},function(d,e,t){"use strict";var n=t(572),r=t(643).map;n({target:"Array",proto:!0,forced:!t(639)("map")},{map:function(d){return r(this,d,arguments.length>1?arguments[1]:void 0)}})},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(625)),c=r(t(626)),D=r(t(618));e.default=function(d){function e(d,e,t,n){return{name:d,value:e,start:t,end:n}}d.matchRecursive=function(t,n,r,o,l){o=o||"",l=l||{};var F,C=-1!==(0,f.default)(o).call(o,"g"),A=-1!==(0,f.default)(o).call(o,"y"),E=o.replace(/y/g,"");n=d(n,E),r=d(r,E);var v=l.escapeChar;if(v){var B,h;if(v.length>1)throw new Error("Cannot use more than one escape character");v=d.escape(v),F=new RegExp((0,c.default)(B=(0,c.default)(h="(?:".concat(v,"[\\S\\s]|(?:(?!")).call(h,d.union([n,r],"",{conjunction:"or"}).source,")[^")).call(B,v,"])+)+"),o.replace(d._hasNativeFlag("s")?/[^imsu]/g:/[^imu]/g,""))}for(var m,y,x,w,S=0,_=0,O=0,k=0,P=l.valueNames,output=[];;){if(v&&(O+=(d.exec(t,F,O,"sticky")||[""])[0].length),x=d.exec(t,n,O),w=d.exec(t,r,O),x&&w&&(x.index<=w.index?w=null:x=null),x||w)O=(_=(x||w).index)+(x||w)[0].length;else if(!S)break;if(A&&!S&&_>k)break;if(x)S||(m=_,y=O),S+=1;else if(w&&S){if(!(S-=1)&&(P?(P[0]&&m>k&&output.push(e(P[0],(0,D.default)(t).call(t,k,m),k,m)),P[1]&&output.push(e(P[1],(0,D.default)(t).call(t,m,y),m,y)),P[2]&&output.push(e(P[2],(0,D.default)(t).call(t,y,_),y,_)),P[3]&&output.push(e(P[3],(0,D.default)(t).call(t,_,O),_,O))):output.push((0,D.default)(t).call(t,y,_)),k=O,!C))break}else{var j=l.unbalanced||"error";if("skip"!==j&&"skip-lazy"!==j){if("error"===j){var N,I=w?"right":"left",M=w?_:m;throw new Error((0,c.default)(N="Unbalanced ".concat(I," delimiter found in string at position ")).call(N,M))}throw new Error("Unsupported value for unbalanced: ".concat(j))}if(w)w=null;else{if("skip"===j)O=m+(d.exec(t,n,m,"sticky")[0].length||1);else O=m+1;S=0}}_===O&&(O+=1)}return C&&output.length>0&&!A&&P&&P[0]&&t.length>k&&output.push(e(P[0],(0,D.default)(t).call(t,k),k,t.length)),output}},d.exports=e.default},function(d,e,t){"use strict";var n=t(618),r=t(655),f=t(666),c=t(678),D=t(680),o=t(591),l=t(593);o(e,"__esModule",{value:!0}),e.default=void 0;var F=l(t(682)),C=l(t(686)),A=l(t(626)),E=l(t(625));function v(d,e){var t=void 0!==f&&c(d)||d["@@iterator"];if(!t){if(D(d)||(t=function(d,e){var t;if(!d)return;if("string"==typeof d)return B(d,e);var f=n(t=Object.prototype.toString.call(d)).call(t,8,-1);"Object"===f&&d.constructor&&(f=d.constructor.name);if("Map"===f||"Set"===f)return r(d);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return B(d,e)}(d))||e&&d&&"number"==typeof d.length){t&&(d=t);var i=0,o=function(){};return{s:o,n:function(){return i>=d.length?{done:!0}:{done:!1,value:d[i++]}},e:function(d){throw d},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,F=!0,C=!1;return{s:function(){t=t.call(d)},n:function(){var d=t.next();return F=d.done,d},e:function(d){C=!0,l=d},f:function(){try{F||null==t.return||t.return()}finally{if(C)throw l}}}}function B(d,e){(null==e||e>d.length)&&(e=d.length);for(var i=0,t=new Array(e);ic+1&&(output+="\\u".concat(f(r(c+1))),e>c+2&&(output+="-\\u".concat(f(r(e-1))))),c=D(d[2]||d[1])})),c<65535&&(output+="\\u".concat(f(r(c+1))),c<65534&&(output+="-\\uFFFF")),output))}function l(d,t){var n=t?"a!":"a=";return e[d][n]||(e[d][n]=function(d,t){var n,r,f=e[d],c="";return f.bmp&&!f.isBmpLast&&(c=(0,A.default)(n="[".concat(f.bmp,"]")).call(n,f.astral?"|":"")),f.astral&&(c+=f.astral),f.isBmpLast&&f.bmp&&(c+=(0,A.default)(r="".concat(f.astral?"|":"","[")).call(r,f.bmp,"]")),t?"(?:(?!".concat(c,")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-￿]))"):"(?:".concat(c,")")}(d,t))}d.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,(function(d,n,r){var f="Unknown Unicode token ",D=(0,F.default)(d,6),C=D[0],v=D[1],B=D[2],h=D[3],m=D[4],y=D[5],x="P"===v||!!B,w=-1!==(0,E.default)(r).call(r,"A"),S=c(y||m),_=e[S];if("P"===v&&B)throw new SyntaxError("Invalid double negation "+C);if(!e.hasOwnProperty(S))throw new SyntaxError(f+C);if(h&&(!t[h]||!t[h][S]))throw new SyntaxError(f+C);if(_.inverseOf){var O;if(S=c(_.inverseOf),!e.hasOwnProperty(S))throw new ReferenceError((0,A.default)(O="".concat("Unicode token missing data "+C," -> ")).call(O,_.inverseOf));_=e[S],x=!x}if(!_.bmp&&!w)throw new SyntaxError("Astral mode required for Unicode token "+C);if(w){if("class"===n)throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");return l(S,x)}return"class"===n?x?o(S):_.bmp:"".concat((x?"[^":"[")+_.bmp,"]")}),{scope:"all",optionalFlags:"A",leadChar:"\\"}),d.addUnicodeData=function(data,n){n&&(t[n]={});var r,f=v(data);try{for(f.s();!(r=f.n()).done;){var D=r.value;if(!D.name)throw new Error("Unicode token requires name");if(!(D.inverseOf||D.bmp||D.astral))throw new Error("Unicode token has no character data "+D.name);var o=c(D.name);if(e[o]=D,n&&(t[n][o]=!0),D.alias){var l=c(D.alias);e[l]=D,n&&(t[n][l]=!0)}}}catch(d){f.e(d)}finally{f.f()}d.cache.flush("patterns")},d._getUnicodeProperty=function(d){var t=c(d);return e[t]}},d.exports=e.default},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(850));e.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");d.addUnicodeData(f.default)},d.exports=e.default},function(d,e){d.exports=[{name:"C",alias:"Other",isBmpLast:!0,bmp:"\0--Ÿ­͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-؅؜۝܎܏݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏-ࢗ࣢঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠎᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿​-‏‪-‮⁠-⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽-＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￾￿",astral:"\ud800[\udc0c\udc27\udc3b\udc3e\udc4e\udc4f\udc5e-\udc7f\udcfb-\udcff\udd03-\udd06\udd34-\udd36\udd8f\udd9d-\udd9f\udda1-\uddcf\uddfe-\ude7f\ude9d-\ude9f\uded1-\udedf\udefc-\udeff\udf24-\udf2c\udf4b-\udf4f\udf7b-\udf7f\udf9e\udfc4-\udfc7\udfd6-\udfff]|\ud801[\udc9e\udc9f\udcaa-\udcaf\udcd4-\udcd7\udcfc-\udcff\udd28-\udd2f\udd64-\udd6e\udd7b\udd8b\udd93\udd96\udda2\uddb2\uddba\uddbd-\uddff\udf37-\udf3f\udf56-\udf5f\udf68-\udf7f\udf86\udfb1\udfbb-\udfff]|\ud802[\udc06\udc07\udc09\udc36\udc39-\udc3b\udc3d\udc3e\udc56\udc9f-\udca6\udcb0-\udcdf\udcf3\udcf6-\udcfa\udd1c-\udd1e\udd3a-\udd3e\udd40-\udd7f\uddb8-\uddbb\uddd0\uddd1\ude04\ude07-\ude0b\ude14\ude18\ude36\ude37\ude3b-\ude3e\ude49-\ude4f\ude59-\ude5f\udea0-\udebf\udee7-\udeea\udef7-\udeff\udf36-\udf38\udf56\udf57\udf73-\udf77\udf92-\udf98\udf9d-\udfa8\udfb0-\udfff]|\ud803[\udc49-\udc7f\udcb3-\udcbf\udcf3-\udcf9\udd28-\udd2f\udd3a-\ude5f\ude7f\udeaa\udeae\udeaf\udeb2-\udeff\udf28-\udf2f\udf5a-\udf6f\udf8a-\udfaf\udfcc-\udfdf\udff7-\udfff]|\ud804[\udc4e-\udc51\udc76-\udc7e\udcbd\udcc3-\udccf\udce9-\udcef\udcfa-\udcff\udd35\udd48-\udd4f\udd77-\udd7f\udde0\uddf5-\uddff\ude12\ude3f-\ude7f\ude87\ude89\ude8e\ude9e\udeaa-\udeaf\udeeb-\udeef\udefa-\udeff\udf04\udf0d\udf0e\udf11\udf12\udf29\udf31\udf34\udf3a\udf45\udf46\udf49\udf4a\udf4e\udf4f\udf51-\udf56\udf58-\udf5c\udf64\udf65\udf6d-\udf6f\udf75-\udfff]|\ud805[\udc5c\udc62-\udc7f\udcc8-\udccf\udcda-\udd7f\uddb6\uddb7\uddde-\uddff\ude45-\ude4f\ude5a-\ude5f\ude6d-\ude7f\udeba-\udebf\udeca-\udeff\udf1b\udf1c\udf2c-\udf2f\udf47-\udfff]|\ud806[\udc3c-\udc9f\udcf3-\udcfe\udd07\udd08\udd0a\udd0b\udd14\udd17\udd36\udd39\udd3a\udd47-\udd4f\udd5a-\udd9f\udda8\udda9\uddd8\uddd9\udde5-\uddff\ude48-\ude4f\udea3-\udeaf\udef9-\udfff]|\ud807[\udc09\udc37\udc46-\udc4f\udc6d-\udc6f\udc90\udc91\udca8\udcb7-\udcff\udd07\udd0a\udd37-\udd39\udd3b\udd3e\udd48-\udd4f\udd5a-\udd5f\udd66\udd69\udd8f\udd92\udd99-\udd9f\uddaa-\udedf\udef9-\udfaf\udfb1-\udfbf\udff2-\udffe]|\ud808[\udf9a-\udfff]|\ud809[\udc6f\udc75-\udc7f\udd44-\udfff]|[\ud80a\ud80e-\ud810\ud812-\ud819\ud824-\ud82a\ud82d\ud82e\ud830-\ud832\ud83f\ud87b-\ud87d\ud87f\ud885-\udb3f\udb41-\udbff][\udc00-\udfff]|\ud80b[\udc00-\udf8f\udff3-\udfff]|\ud80d[\udc2f-\udfff]|\ud811[\ude47-\udfff]|\ud81a[\ude39-\ude3f\ude5f\ude6a-\ude6d\udebf\udeca-\udecf\udeee\udeef\udef6-\udeff\udf46-\udf4f\udf5a\udf62\udf78-\udf7c\udf90-\udfff]|\ud81b[\udc00-\ude3f\ude9b-\udeff\udf4b-\udf4e\udf88-\udf8e\udfa0-\udfdf\udfe5-\udfef\udff2-\udfff]|\ud821[\udff8-\udfff]|\ud823[\udcd6-\udcff\udd09-\udfff]|\ud82b[\udc00-\udfef\udff4\udffc\udfff]|\ud82c[\udd23-\udd4f\udd53-\udd63\udd68-\udd6f\udefc-\udfff]|\ud82f[\udc6b-\udc6f\udc7d-\udc7f\udc89-\udc8f\udc9a\udc9b\udca0-\udfff]|\ud833[\udc00-\udeff\udf2e\udf2f\udf47-\udf4f\udfc4-\udfff]|\ud834[\udcf6-\udcff\udd27\udd28\udd73-\udd7a\uddeb-\uddff\ude46-\udedf\udef4-\udeff\udf57-\udf5f\udf79-\udfff]|\ud835[\udc55\udc9d\udca0\udca1\udca3\udca4\udca7\udca8\udcad\udcba\udcbc\udcc4\udd06\udd0b\udd0c\udd15\udd1d\udd3a\udd3f\udd45\udd47-\udd49\udd51\udea6\udea7\udfcc\udfcd]|\ud836[\ude8c-\ude9a\udea0\udeb0-\udfff]|\ud837[\udc00-\udeff\udf1f-\udfff]|\ud838[\udc07\udc19\udc1a\udc22\udc25\udc2b-\udcff\udd2d-\udd2f\udd3e\udd3f\udd4a-\udd4d\udd50-\ude8f\udeaf-\udebf\udefa-\udefe\udf00-\udfff]|\ud839[\udc00-\udfdf\udfe7\udfec\udfef\udfff]|\ud83a[\udcc5\udcc6\udcd7-\udcff\udd4c-\udd4f\udd5a-\udd5d\udd60-\udfff]|\ud83b[\udc00-\udc70\udcb5-\udd00\udd3e-\uddff\ude04\ude20\ude23\ude25\ude26\ude28\ude33\ude38\ude3a\ude3c-\ude41\ude43-\ude46\ude48\ude4a\ude4c\ude50\ude53\ude55\ude56\ude58\ude5a\ude5c\ude5e\ude60\ude63\ude65\ude66\ude6b\ude73\ude78\ude7d\ude7f\ude8a\ude9c-\udea0\udea4\udeaa\udebc-\udeef\udef2-\udfff]|\ud83c[\udc2c-\udc2f\udc94-\udc9f\udcaf\udcb0\udcc0\udcd0\udcf6-\udcff\uddae-\udde5\ude03-\ude0f\ude3c-\ude3f\ude49-\ude4f\ude52-\ude5f\ude66-\udeff]|\ud83d[\uded8-\udedc\udeed-\udeef\udefd-\udeff\udf74-\udf7f\udfd9-\udfdf\udfec-\udfef\udff1-\udfff]|\ud83e[\udc0c-\udc0f\udc48-\udc4f\udc5a-\udc5f\udc88-\udc8f\udcae\udcaf\udcb2-\udcff\ude54-\ude5f\ude6e\ude6f\ude75-\ude77\ude7d-\ude7f\ude87-\ude8f\udead-\udeaf\udebb-\udebf\udec6-\udecf\udeda-\udedf\udee8-\udeef\udef7-\udeff\udf93\udfcb-\udfef\udffa-\udfff]|\ud869[\udee0-\udeff]|\ud86d[\udf39-\udf3f]|\ud86e[\udc1e\udc1f]|\ud873[\udea2-\udeaf]|\ud87a[\udfe1-\udfff]|\ud87e[\ude1e-\udfff]|\ud884[\udf4b-\udfff]|\udb40[\udc00-\udcff\uddf0-\udfff]"},{name:"Cc",alias:"Control",bmp:"\0--Ÿ"},{name:"Cf",alias:"Format",bmp:"­؀-؅؜۝܏࢐࢑࣢᠎​-‏‪-‮⁠-⁤⁦-\ufeff-",astral:"\ud804[\udcbd\udccd]|\ud80d[\udc30-\udc38]|\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|\udb40[\udc01\udc20-\udc7f]"},{name:"Cn",alias:"Unassigned",bmp:"͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-׿܎݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏࢒-ࢗ঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿⁥⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-퟿﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽﻾＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￸￾￿",astral:"\ud800[\udc0c\udc27\udc3b\udc3e\udc4e\udc4f\udc5e-\udc7f\udcfb-\udcff\udd03-\udd06\udd34-\udd36\udd8f\udd9d-\udd9f\udda1-\uddcf\uddfe-\ude7f\ude9d-\ude9f\uded1-\udedf\udefc-\udeff\udf24-\udf2c\udf4b-\udf4f\udf7b-\udf7f\udf9e\udfc4-\udfc7\udfd6-\udfff]|\ud801[\udc9e\udc9f\udcaa-\udcaf\udcd4-\udcd7\udcfc-\udcff\udd28-\udd2f\udd64-\udd6e\udd7b\udd8b\udd93\udd96\udda2\uddb2\uddba\uddbd-\uddff\udf37-\udf3f\udf56-\udf5f\udf68-\udf7f\udf86\udfb1\udfbb-\udfff]|\ud802[\udc06\udc07\udc09\udc36\udc39-\udc3b\udc3d\udc3e\udc56\udc9f-\udca6\udcb0-\udcdf\udcf3\udcf6-\udcfa\udd1c-\udd1e\udd3a-\udd3e\udd40-\udd7f\uddb8-\uddbb\uddd0\uddd1\ude04\ude07-\ude0b\ude14\ude18\ude36\ude37\ude3b-\ude3e\ude49-\ude4f\ude59-\ude5f\udea0-\udebf\udee7-\udeea\udef7-\udeff\udf36-\udf38\udf56\udf57\udf73-\udf77\udf92-\udf98\udf9d-\udfa8\udfb0-\udfff]|\ud803[\udc49-\udc7f\udcb3-\udcbf\udcf3-\udcf9\udd28-\udd2f\udd3a-\ude5f\ude7f\udeaa\udeae\udeaf\udeb2-\udeff\udf28-\udf2f\udf5a-\udf6f\udf8a-\udfaf\udfcc-\udfdf\udff7-\udfff]|\ud804[\udc4e-\udc51\udc76-\udc7e\udcc3-\udccc\udcce\udccf\udce9-\udcef\udcfa-\udcff\udd35\udd48-\udd4f\udd77-\udd7f\udde0\uddf5-\uddff\ude12\ude3f-\ude7f\ude87\ude89\ude8e\ude9e\udeaa-\udeaf\udeeb-\udeef\udefa-\udeff\udf04\udf0d\udf0e\udf11\udf12\udf29\udf31\udf34\udf3a\udf45\udf46\udf49\udf4a\udf4e\udf4f\udf51-\udf56\udf58-\udf5c\udf64\udf65\udf6d-\udf6f\udf75-\udfff]|\ud805[\udc5c\udc62-\udc7f\udcc8-\udccf\udcda-\udd7f\uddb6\uddb7\uddde-\uddff\ude45-\ude4f\ude5a-\ude5f\ude6d-\ude7f\udeba-\udebf\udeca-\udeff\udf1b\udf1c\udf2c-\udf2f\udf47-\udfff]|\ud806[\udc3c-\udc9f\udcf3-\udcfe\udd07\udd08\udd0a\udd0b\udd14\udd17\udd36\udd39\udd3a\udd47-\udd4f\udd5a-\udd9f\udda8\udda9\uddd8\uddd9\udde5-\uddff\ude48-\ude4f\udea3-\udeaf\udef9-\udfff]|\ud807[\udc09\udc37\udc46-\udc4f\udc6d-\udc6f\udc90\udc91\udca8\udcb7-\udcff\udd07\udd0a\udd37-\udd39\udd3b\udd3e\udd48-\udd4f\udd5a-\udd5f\udd66\udd69\udd8f\udd92\udd99-\udd9f\uddaa-\udedf\udef9-\udfaf\udfb1-\udfbf\udff2-\udffe]|\ud808[\udf9a-\udfff]|\ud809[\udc6f\udc75-\udc7f\udd44-\udfff]|[\ud80a\ud80e-\ud810\ud812-\ud819\ud824-\ud82a\ud82d\ud82e\ud830-\ud832\ud83f\ud87b-\ud87d\ud87f\ud885-\udb3f\udb41-\udb7f][\udc00-\udfff]|\ud80b[\udc00-\udf8f\udff3-\udfff]|\ud80d[\udc2f\udc39-\udfff]|\ud811[\ude47-\udfff]|\ud81a[\ude39-\ude3f\ude5f\ude6a-\ude6d\udebf\udeca-\udecf\udeee\udeef\udef6-\udeff\udf46-\udf4f\udf5a\udf62\udf78-\udf7c\udf90-\udfff]|\ud81b[\udc00-\ude3f\ude9b-\udeff\udf4b-\udf4e\udf88-\udf8e\udfa0-\udfdf\udfe5-\udfef\udff2-\udfff]|\ud821[\udff8-\udfff]|\ud823[\udcd6-\udcff\udd09-\udfff]|\ud82b[\udc00-\udfef\udff4\udffc\udfff]|\ud82c[\udd23-\udd4f\udd53-\udd63\udd68-\udd6f\udefc-\udfff]|\ud82f[\udc6b-\udc6f\udc7d-\udc7f\udc89-\udc8f\udc9a\udc9b\udca4-\udfff]|\ud833[\udc00-\udeff\udf2e\udf2f\udf47-\udf4f\udfc4-\udfff]|\ud834[\udcf6-\udcff\udd27\udd28\uddeb-\uddff\ude46-\udedf\udef4-\udeff\udf57-\udf5f\udf79-\udfff]|\ud835[\udc55\udc9d\udca0\udca1\udca3\udca4\udca7\udca8\udcad\udcba\udcbc\udcc4\udd06\udd0b\udd0c\udd15\udd1d\udd3a\udd3f\udd45\udd47-\udd49\udd51\udea6\udea7\udfcc\udfcd]|\ud836[\ude8c-\ude9a\udea0\udeb0-\udfff]|\ud837[\udc00-\udeff\udf1f-\udfff]|\ud838[\udc07\udc19\udc1a\udc22\udc25\udc2b-\udcff\udd2d-\udd2f\udd3e\udd3f\udd4a-\udd4d\udd50-\ude8f\udeaf-\udebf\udefa-\udefe\udf00-\udfff]|\ud839[\udc00-\udfdf\udfe7\udfec\udfef\udfff]|\ud83a[\udcc5\udcc6\udcd7-\udcff\udd4c-\udd4f\udd5a-\udd5d\udd60-\udfff]|\ud83b[\udc00-\udc70\udcb5-\udd00\udd3e-\uddff\ude04\ude20\ude23\ude25\ude26\ude28\ude33\ude38\ude3a\ude3c-\ude41\ude43-\ude46\ude48\ude4a\ude4c\ude50\ude53\ude55\ude56\ude58\ude5a\ude5c\ude5e\ude60\ude63\ude65\ude66\ude6b\ude73\ude78\ude7d\ude7f\ude8a\ude9c-\udea0\udea4\udeaa\udebc-\udeef\udef2-\udfff]|\ud83c[\udc2c-\udc2f\udc94-\udc9f\udcaf\udcb0\udcc0\udcd0\udcf6-\udcff\uddae-\udde5\ude03-\ude0f\ude3c-\ude3f\ude49-\ude4f\ude52-\ude5f\ude66-\udeff]|\ud83d[\uded8-\udedc\udeed-\udeef\udefd-\udeff\udf74-\udf7f\udfd9-\udfdf\udfec-\udfef\udff1-\udfff]|\ud83e[\udc0c-\udc0f\udc48-\udc4f\udc5a-\udc5f\udc88-\udc8f\udcae\udcaf\udcb2-\udcff\ude54-\ude5f\ude6e\ude6f\ude75-\ude77\ude7d-\ude7f\ude87-\ude8f\udead-\udeaf\udebb-\udebf\udec6-\udecf\udeda-\udedf\udee8-\udeef\udef7-\udeff\udf93\udfcb-\udfef\udffa-\udfff]|\ud869[\udee0-\udeff]|\ud86d[\udf39-\udf3f]|\ud86e[\udc1e\udc1f]|\ud873[\udea2-\udeaf]|\ud87a[\udfe1-\udfff]|\ud87e[\ude1e-\udfff]|\ud884[\udf4b-\udfff]|\udb40[\udc00\udc02-\udc1f\udc80-\udcff\uddf0-\udfff]|[\udbbf\udbff][\udffe\udfff]"},{name:"Co",alias:"Private_Use",bmp:"-",astral:"[\udb80-\udbbe\udbc0-\udbfe][\udc00-\udfff]|[\udbbf\udbff][\udc00-\udffd]"},{name:"Cs",alias:"Surrogate",bmp:"\ud800-\udfff"},{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf40\udf42-\udf49\udf50-\udf75\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\ude00-\udf36\udf40-\udf55\udf60-\udf67\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00\ude10-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2\udd00-\udd23\ude80-\udea9\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc03-\udc37\udc71\udc72\udc75\udc83-\udcaf\udcd0-\udce8\udd03-\udd26\udd44\udd47\udd50-\udd72\udd76\udd83-\uddb2\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude2b\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udede\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d\udf50\udf5d-\udf61]|\ud805[\udc00-\udc34\udc47-\udc4a\udc5f-\udc61\udc80-\udcaf\udcc4\udcc5\udcc7\udd80-\uddae\uddd8-\udddb\ude00-\ude2f\ude44\ude80-\udeaa\udeb8\udf00-\udf1a\udf40-\udf46]|\ud806[\udc00-\udc2b\udca0-\udcdf\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd2f\udd3f\udd41\udda0-\udda7\uddaa-\uddd0\udde1\udde3\ude00\ude0b-\ude32\ude3a\ude50\ude5c-\ude89\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc2e\udc40\udc72-\udc8f\udd00-\udd06\udd08\udd09\udd0b-\udd30\udd46\udd60-\udd65\udd67\udd68\udd6a-\udd89\udd98\udee0-\udef2\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\ude40-\ude7f\udf00-\udf4a\udf50\udf93-\udf9f\udfe0\udfe1\udfe3]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf1e]|\ud838[\udd00-\udd2c\udd37-\udd3d\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd4b]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"LC",alias:"Cased_Letter",bmp:"A-Za-zµÀ-ÖØ-öø-ƺƼ-ƿDŽ-ʓʕ-ʯͰ-ͳͶͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՠ-ֈႠ-ჅჇჍა-ჺჽ-ჿᎠ-Ᏽᏸ-ᏽᲀ-ᲈᲐ-ᲺᲽ-Ჿᴀ-ᴫᵫ-ᵷᵹ-ᶚḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⱻⱾ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭꙀ-ꙭꚀ-ꚛꜢ-ꝯꝱ-ꞇꞋ-ꞎꞐ-ꟊꟐꟑꟓꟕ-ꟙꟵꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗA-Za-z",astral:"\ud801[\udc00-\udc4f\udcb0-\udcd3\udcd8-\udcfb\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]|\ud803[\udc80-\udcb2\udcc0-\udcf2]|\ud806[\udca0-\udcdf]|\ud81b[\ude40-\ude7f]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd00-\udd43]"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud81b[\ude60-\ude7f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd22-\udd43]"},{name:"Lm",alias:"Modifier_Letter",bmp:"ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨࣉॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꚜꚝꜗ-ꜟꝰꞈꟲ-ꟴꟸꟹꧏꧦꩰꫝꫳꫴꭜ-ꭟꭩー゙゚",astral:"\ud801[\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud81a[\udf40-\udf43]|\ud81b[\udf93-\udf9f\udfe0\udfe1\udfe3]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud838[\udd37-\udd3d]|𞥋"},{name:"Lo",alias:"Other_Letter",bmp:"ªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣈऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳳᳵᳶᳺℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf40\udf42-\udf49\udf50-\udf75\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf]|\ud801[\udc50-\udc9d\udd00-\udd27\udd30-\udd63\ude00-\udf36\udf40-\udf55\udf60-\udf67]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00\ude10-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udd00-\udd23\ude80-\udea9\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc03-\udc37\udc71\udc72\udc75\udc83-\udcaf\udcd0-\udce8\udd03-\udd26\udd44\udd47\udd50-\udd72\udd76\udd83-\uddb2\uddc1-\uddc4\uddda\udddc\ude00-\ude11\ude13-\ude2b\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udede\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d\udf50\udf5d-\udf61]|\ud805[\udc00-\udc34\udc47-\udc4a\udc5f-\udc61\udc80-\udcaf\udcc4\udcc5\udcc7\udd80-\uddae\uddd8-\udddb\ude00-\ude2f\ude44\ude80-\udeaa\udeb8\udf00-\udf1a\udf40-\udf46]|\ud806[\udc00-\udc2b\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd2f\udd3f\udd41\udda0-\udda7\uddaa-\uddd0\udde1\udde3\ude00\ude0b-\ude32\ude3a\ude50\ude5c-\ude89\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc2e\udc40\udc72-\udc8f\udd00-\udd06\udd08\udd09\udd0b-\udd30\udd46\udd60-\udd65\udd67\udd68\udd6a-\udd89\udd98\udee0-\udef2\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf63-\udf77\udf7d-\udf8f]|\ud81b[\udf00-\udf4a\udf50]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99]|𝼊|\ud838[\udd00-\udd2c\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼ"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud81b[\ude40-\ude5f]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]"},{name:"M",alias:"Mark",bmp:"̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣඁ-ඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-ᫎᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯",astral:"\ud800[\uddfd\udee0\udf76-\udf7a]|\ud802[\ude01-\ude03\ude05\ude06\ude0c-\ude0f\ude38-\ude3a\ude3f\udee5\udee6]|\ud803[\udd24-\udd27\udeab\udeac\udf46-\udf50\udf82-\udf85]|\ud804[\udc00-\udc02\udc38-\udc46\udc70\udc73\udc74\udc7f-\udc82\udcb0-\udcba\udcc2\udd00-\udd02\udd27-\udd34\udd45\udd46\udd73\udd80-\udd82\uddb3-\uddc0\uddc9-\uddcc\uddce\uddcf\ude2c-\ude37\ude3e\udedf-\udeea\udf00-\udf03\udf3b\udf3c\udf3e-\udf44\udf47\udf48\udf4b-\udf4d\udf57\udf62\udf63\udf66-\udf6c\udf70-\udf74]|\ud805[\udc35-\udc46\udc5e\udcb0-\udcc3\uddaf-\uddb5\uddb8-\uddc0\udddc\udddd\ude30-\ude40\udeab-\udeb7\udf1d-\udf2b]|\ud806[\udc2c-\udc3a\udd30-\udd35\udd37\udd38\udd3b-\udd3e\udd40\udd42\udd43\uddd1-\uddd7\uddda-\udde0\udde4\ude01-\ude0a\ude33-\ude39\ude3b-\ude3e\ude47\ude51-\ude5b\ude8a-\ude99]|\ud807[\udc2f-\udc36\udc38-\udc3f\udc92-\udca7\udca9-\udcb6\udd31-\udd36\udd3a\udd3c\udd3d\udd3f-\udd45\udd47\udd8a-\udd8e\udd90\udd91\udd93-\udd97\udef3-\udef6]|\ud81a[\udef0-\udef4\udf30-\udf36]|\ud81b[\udf4f\udf51-\udf87\udf8f-\udf92\udfe4\udff0\udff1]|\ud82f[\udc9d\udc9e]|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd65-\udd69\udd6d-\udd72\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44]|\ud836[\ude00-\ude36\ude3b-\ude6c\ude75\ude84\ude9b-\ude9f\udea1-\udeaf]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd30-\udd36\udeae\udeec-\udeef]|\ud83a[\udcd0-\udcd6\udd44-\udd4a]|\udb40[\udd00-\uddef]"},{name:"Mc",alias:"Spacing_Mark",bmp:"ःऻा-ीॉ-ौॎॏংঃা-ীেৈোৌৗਃਾ-ੀઃા-ીૉોૌଂଃାୀେୈୋୌୗாிுூெ-ைொ-ௌௗఁ-ఃు-ౄಂಃಾೀ-ೄೇೈೊೋೕೖംഃാ-ീെ-ൈൊ-ൌൗංඃා-ෑෘ-ෟෲෳ༾༿ཿါာေးျြၖၗၢ-ၤၧ-ၭႃႄႇ-ႌႏႚ-ႜ᜕᜴ាើ-ៅះៈᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸᨙᨚᩕᩗᩡᩣᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ᭄ᮂᮡᮦᮧ᮪ᯧᯪ-ᯬᯮ᯲᯳ᰤ-ᰫᰴᰵ᳡᳷〮〯ꠣꠤꠧꢀꢁꢴ-ꣃꥒ꥓ꦃꦴꦵꦺꦻꦾ-꧀ꨯꨰꨳꨴꩍꩻꩽꫫꫮꫯꫵꯣꯤꯦꯧꯩꯪ꯬",astral:"\ud804[\udc00\udc02\udc82\udcb0-\udcb2\udcb7\udcb8\udd2c\udd45\udd46\udd82\uddb3-\uddb5\uddbf\uddc0\uddce\ude2c-\ude2e\ude32\ude33\ude35\udee0-\udee2\udf02\udf03\udf3e\udf3f\udf41-\udf44\udf47\udf48\udf4b-\udf4d\udf57\udf62\udf63]|\ud805[\udc35-\udc37\udc40\udc41\udc45\udcb0-\udcb2\udcb9\udcbb-\udcbe\udcc1\uddaf-\uddb1\uddb8-\uddbb\uddbe\ude30-\ude32\ude3b\ude3c\ude3e\udeac\udeae\udeaf\udeb6\udf20\udf21\udf26]|\ud806[\udc2c-\udc2e\udc38\udd30-\udd35\udd37\udd38\udd3d\udd40\udd42\uddd1-\uddd3\udddc-\udddf\udde4\ude39\ude57\ude58\ude97]|\ud807[\udc2f\udc3e\udca9\udcb1\udcb4\udd8a-\udd8e\udd93\udd94\udd96\udef5\udef6]|\ud81b[\udf51-\udf87\udff0\udff1]|\ud834[\udd65\udd66\udd6d-\udd72]"},{name:"Me",alias:"Enclosing_Mark",bmp:"҈҉᪾⃝-⃠⃢-⃤꙰-꙲"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৾ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣૺ-૿ଁ଼ିୁ-ୄ୍୕ୖୢୣஂீ்ఀఄ఼ా-ీె-ైొ-్ౕౖౢౣಁ಼ಿೆೌ್ೢೣഀഁ഻഼ു-ൄ്ൢൣඁ්ි-ුූัิ-ฺ็-๎ັິ-ຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲᜳᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᪿ-ᫎᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꠬꣄ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꦽꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯",astral:"\ud800[\uddfd\udee0\udf76-\udf7a]|\ud802[\ude01-\ude03\ude05\ude06\ude0c-\ude0f\ude38-\ude3a\ude3f\udee5\udee6]|\ud803[\udd24-\udd27\udeab\udeac\udf46-\udf50\udf82-\udf85]|\ud804[\udc01\udc38-\udc46\udc70\udc73\udc74\udc7f-\udc81\udcb3-\udcb6\udcb9\udcba\udcc2\udd00-\udd02\udd27-\udd2b\udd2d-\udd34\udd73\udd80\udd81\uddb6-\uddbe\uddc9-\uddcc\uddcf\ude2f-\ude31\ude34\ude36\ude37\ude3e\udedf\udee3-\udeea\udf00\udf01\udf3b\udf3c\udf40\udf66-\udf6c\udf70-\udf74]|\ud805[\udc38-\udc3f\udc42-\udc44\udc46\udc5e\udcb3-\udcb8\udcba\udcbf\udcc0\udcc2\udcc3\uddb2-\uddb5\uddbc\uddbd\uddbf\uddc0\udddc\udddd\ude33-\ude3a\ude3d\ude3f\ude40\udeab\udead\udeb0-\udeb5\udeb7\udf1d-\udf1f\udf22-\udf25\udf27-\udf2b]|\ud806[\udc2f-\udc37\udc39\udc3a\udd3b\udd3c\udd3e\udd43\uddd4-\uddd7\uddda\udddb\udde0\ude01-\ude0a\ude33-\ude38\ude3b-\ude3e\ude47\ude51-\ude56\ude59-\ude5b\ude8a-\ude96\ude98\ude99]|\ud807[\udc30-\udc36\udc38-\udc3d\udc3f\udc92-\udca7\udcaa-\udcb0\udcb2\udcb3\udcb5\udcb6\udd31-\udd36\udd3a\udd3c\udd3d\udd3f-\udd45\udd47\udd90\udd91\udd95\udd97\udef3\udef4]|\ud81a[\udef0-\udef4\udf30-\udf36]|\ud81b[\udf4f\udf8f-\udf92\udfe4]|\ud82f[\udc9d\udc9e]|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44]|\ud836[\ude00-\ude36\ude3b-\ude6c\ude75\ude84\ude9b-\ude9f\udea1-\udeaf]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd30-\udd36\udeae\udeec-\udeef]|\ud83a[\udcd0-\udcd6\udd44-\udd4a]|\udb40[\udd00-\uddef]"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\ud800[\udd07-\udd33\udd40-\udd78\udd8a\udd8b\udee1-\udefb\udf20-\udf23\udf41\udf4a\udfd1-\udfd5]|\ud801[\udca0-\udca9]|\ud802[\udc58-\udc5f\udc79-\udc7f\udca7-\udcaf\udcfb-\udcff\udd16-\udd1b\uddbc\uddbd\uddc0-\uddcf\uddd2-\uddff\ude40-\ude48\ude7d\ude7e\ude9d-\ude9f\udeeb-\udeef\udf58-\udf5f\udf78-\udf7f\udfa9-\udfaf]|\ud803[\udcfa-\udcff\udd30-\udd39\ude60-\ude7e\udf1d-\udf26\udf51-\udf54\udfc5-\udfcb]|\ud804[\udc52-\udc6f\udcf0-\udcf9\udd36-\udd3f\uddd0-\uddd9\udde1-\uddf4\udef0-\udef9]|\ud805[\udc50-\udc59\udcd0-\udcd9\ude50-\ude59\udec0-\udec9\udf30-\udf3b]|\ud806[\udce0-\udcf2\udd50-\udd59]|\ud807[\udc50-\udc6c\udd50-\udd59\udda0-\udda9\udfc0-\udfd4]|\ud809[\udc00-\udc6e]|\ud81a[\ude60-\ude69\udec0-\udec9\udf50-\udf59\udf5b-\udf61]|\ud81b[\ude80-\ude96]|\ud834[\udee0-\udef3\udf60-\udf78]|\ud835[\udfce-\udfff]|\ud838[\udd40-\udd49\udef0-\udef9]|\ud83a[\udcc7-\udccf\udd50-\udd59]|\ud83b[\udc71-\udcab\udcad-\udcaf\udcb1-\udcb4\udd01-\udd2d\udd2f-\udd3d]|\ud83c[\udd00-\udd0c]|\ud83e[\udff0-\udff9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\ud801[\udca0-\udca9]|\ud803[\udd30-\udd39]|\ud804[\udc66-\udc6f\udcf0-\udcf9\udd36-\udd3f\uddd0-\uddd9\udef0-\udef9]|\ud805[\udc50-\udc59\udcd0-\udcd9\ude50-\ude59\udec0-\udec9\udf30-\udf39]|\ud806[\udce0-\udce9\udd50-\udd59]|\ud807[\udc50-\udc59\udd50-\udd59\udda0-\udda9]|\ud81a[\ude60-\ude69\udec0-\udec9\udf50-\udf59]|\ud835[\udfce-\udfff]|\ud838[\udd40-\udd49\udef0-\udef9]|\ud83a[\udd50-\udd59]|\ud83e[\udff0-\udff9]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ",astral:"\ud800[\udd40-\udd74\udf41\udf4a\udfd1-\udfd5]|\ud809[\udc00-\udc6e]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"\ud800[\udd07-\udd33\udd75-\udd78\udd8a\udd8b\udee1-\udefb\udf20-\udf23]|\ud802[\udc58-\udc5f\udc79-\udc7f\udca7-\udcaf\udcfb-\udcff\udd16-\udd1b\uddbc\uddbd\uddc0-\uddcf\uddd2-\uddff\ude40-\ude48\ude7d\ude7e\ude9d-\ude9f\udeeb-\udeef\udf58-\udf5f\udf78-\udf7f\udfa9-\udfaf]|\ud803[\udcfa-\udcff\ude60-\ude7e\udf1d-\udf26\udf51-\udf54\udfc5-\udfcb]|\ud804[\udc52-\udc65\udde1-\uddf4]|\ud805[\udf3a\udf3b]|\ud806[\udcea-\udcf2]|\ud807[\udc5a-\udc6c\udfc0-\udfd4]|\ud81a[\udf5b-\udf61]|\ud81b[\ude80-\ude96]|\ud834[\udee0-\udef3\udf60-\udf78]|\ud83a[\udcc7-\udccf]|\ud83b[\udc71-\udcab\udcad-\udcaf\udcb1-\udcb4\udd01-\udd2d\udd2f-\udd3d]|\ud83c[\udd00-\udd0c]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎⌈-⌋〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⹏⹒-⹝、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・",astral:"\ud800[\udd00-\udd02\udf9f\udfd0]|𐕯|\ud802[\udc57\udd1f\udd3f\ude50-\ude58\ude7f\udef0-\udef6\udf39-\udf3f\udf99-\udf9c]|\ud803[\udead\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb\udcbc\udcbe-\udcc1\udd40-\udd43\udd74\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2]|\ud807[\udc41-\udc45\udc70\udc71\udef7\udef8\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1\udff2]|\ud81a[\ude6e\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|𛲟|\ud836[\ude87-\ude8b]|\ud83a[\udd5e\udd5f]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴﹍-﹏_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\-֊־᐀᠆‐-―⸗⸚⸺⸻⹀⹝〜〰゠︱︲﹘﹣-",astral:"𐺭"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\)\\]\\}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩⹖⹘⹚⹜〉》」』】〕〗〙〛〞〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\*,\\.\\/:;\\?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹏⹒-⹔、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・",astral:"\ud800[\udd00-\udd02\udf9f\udfd0]|𐕯|\ud802[\udc57\udd1f\udd3f\ude50-\ude58\ude7f\udef0-\udef6\udf39-\udf3f\udf99-\udf9c]|\ud803[\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb\udcbc\udcbe-\udcc1\udd40-\udd43\udd74\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2]|\ud807[\udc41-\udc45\udc70\udc71\udef7\udef8\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1\udff2]|\ud81a[\ude6e\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|𛲟|\ud836[\ude87-\ude8b]|\ud83a[\udd5e\udd5f]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\(\\[\\{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂⹕⹗⹙⹛〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「"},{name:"S",alias:"Symbol",bmp:"\\$\\+<->\\^`\\|~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֍-֏؆-؈؋؎؏۞۩۽۾߶߾߿࢈৲৳৺৻૱୰௳-௺౿൏൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-⃀℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏↊↋←-⌇⌌-⌨⌫-␦⑀-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹꭛꭪꭫﬩﮲-﯂﵀-﵏﷏﷼-﷿﹢﹤-﹦﹩$+<->^`|~¢-₩│-○�",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9c\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|𑜿|\ud807[\udfd5-\udff1]|\ud81a[\udf3c-\udf3f\udf45]|𛲜|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\uddea\ude00-\ude41\ude45\udf00-\udf56]|\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|\ud838[\udd4f\udeff]|\ud83b[\udcac\udcb0\udd2e\udef0\udef1]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd0d-\uddad\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udfff]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\$¢-¥֏؋߾߿৲৳৻૱௹฿៛₠-⃀꠸﷼﹩$¢£¥₩",astral:"\ud807[\udfdd-\udfe0]|𞋿|𞲰"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅࢈᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊꭛꭪꭫﮲-﯂^` ̄",astral:"\ud83c[\udffb-\udfff]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\+<->\\|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"\ud835[\udec1\udedb\udefb\udf15\udf35\udf4f\udf6f\udf89\udfa9\udfc3]|\ud83b[\udef0\udef1]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂֍֎؎؏۞۩۽۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↊↋↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭍-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﵀-﵏﷏﷽-﷿¦│■○�",astral:"\ud800[\udd37-\udd3f\udd79-\udd89\udd8c-\udd8e\udd90-\udd9c\udda0\uddd0-\uddfc]|\ud802[\udc77\udc78\udec8]|𑜿|\ud807[\udfd5-\udfdc\udfe1-\udff1]|\ud81a[\udf3c-\udf3f\udf45]|𛲜|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd64\udd6a-\udd6c\udd83\udd84\udd8c-\udda9\uddae-\uddea\ude00-\ude41\ude45\udf00-\udf56]|\ud836[\udc00-\uddff\ude37-\ude3a\ude6d-\ude74\ude76-\ude83\ude85\ude86]|𞅏|\ud83b[\udcac\udd2e]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd0d-\uddad\udde6-\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udffa]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca]"},{name:"Z",alias:"Separator",bmp:"    - \u2028\u2029   "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"    -    "}]},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(852));e.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var e=f.default;e.push({name:"Assigned",inverseOf:"Cn"}),d.addUnicodeData(e)},d.exports=e.default},function(d,e){d.exports=[{name:"ASCII",bmp:"\0-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈְ-ׇֽֿׁׂׅׄא-תׯ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉࣔ-ࣣࣟ-ࣰࣩ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱৼਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣૹ-ૼଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-ౌౕౖౘ-ౚౝౠ-ౣಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೝೞೠ-ೣೱೲഀ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൔ-ൗൟ-ൣൺ-ൿඁ-ඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄຆ-ຊຌ-ຣລວ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ႏႚ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜓᜟ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᪿᫀᫌ-ᫎᬀ-ᬳᬵ-ᭃᭅ-ᭌᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰶᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿᷧ-ᷴḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠅꠇ-ꠧꡀ-ꡳꢀ-ꣃꣅꣲ-ꣷꣻꣽ-ꣿꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꧠ-ꧯꧺ-ꧾꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\udd40-\udd74\ude80-\ude9c\udea0-\uded0\udf00-\udf1f\udf2d-\udf4a\udf50-\udf7a\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf\udfd1-\udfd5]|\ud801[\udc00-\udc9d\udcb0-\udcd3\udcd8-\udcfb\udd00-\udd27\udd30-\udd63\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\ude00-\udf36\udf40-\udf55\udf60-\udf67\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f-\udc55\udc60-\udc76\udc80-\udc9e\udce0-\udcf2\udcf4\udcf5\udd00-\udd15\udd20-\udd39\udd80-\uddb7\uddbe\uddbf\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude35\ude60-\ude7c\ude80-\ude9c\udec0-\udec7\udec9-\udee4\udf00-\udf35\udf40-\udf55\udf60-\udf72\udf80-\udf91]|\ud803[\udc00-\udc48\udc80-\udcb2\udcc0-\udcf2\udd00-\udd27\ude80-\udea9\udeab\udeac\udeb0\udeb1\udf00-\udf1c\udf27\udf30-\udf45\udf70-\udf81\udfb0-\udfc4\udfe0-\udff6]|\ud804[\udc00-\udc45\udc71-\udc75\udc82-\udcb8\udcc2\udcd0-\udce8\udd00-\udd32\udd44-\udd47\udd50-\udd72\udd76\udd80-\uddbf\uddc1-\uddc4\uddce\uddcf\uddda\udddc\ude00-\ude11\ude13-\ude34\ude37\ude3e\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea8\udeb0-\udee8\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3d-\udf44\udf47\udf48\udf4b\udf4c\udf50\udf57\udf5d-\udf63]|\ud805[\udc00-\udc41\udc43-\udc45\udc47-\udc4a\udc5f-\udc61\udc80-\udcc1\udcc4\udcc5\udcc7\udd80-\uddb5\uddb8-\uddbe\uddd8-\udddd\ude00-\ude3e\ude40\ude44\ude80-\udeb5\udeb8\udf00-\udf1a\udf1d-\udf2a\udf40-\udf46]|\ud806[\udc00-\udc38\udca0-\udcdf\udcff-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd35\udd37\udd38\udd3b\udd3c\udd3f-\udd42\udda0-\udda7\uddaa-\uddd7\uddda-\udddf\udde1\udde3\udde4\ude00-\ude32\ude35-\ude3e\ude50-\ude97\ude9d\udeb0-\udef8]|\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc3e\udc40\udc72-\udc8f\udc92-\udca7\udca9-\udcb6\udd00-\udd06\udd08\udd09\udd0b-\udd36\udd3a\udd3c\udd3d\udd3f-\udd41\udd43\udd46\udd47\udd60-\udd65\udd67\udd68\udd6a-\udd8e\udd90\udd91\udd93-\udd96\udd98\udee0-\udef6\udfb0]|\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc80-\udd43]|\ud80b[\udf90-\udff0]|[\ud80c\ud81c-\ud820\ud822\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud80d[\udc00-\udc2e]|\ud811[\udc00-\ude46]|\ud81a[\udc00-\ude38\ude40-\ude5e\ude70-\udebe\uded0-\udeed\udf00-\udf2f\udf40-\udf43\udf63-\udf77\udf7d-\udf8f]|\ud81b[\ude40-\ude7f\udf00-\udf4a\udf4f-\udf87\udf8f-\udf9f\udfe0\udfe1\udfe3\udff0\udff1]|\ud821[\udc00-\udff7]|\ud823[\udc00-\udcd5\udd00-\udd08]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00-\udd22\udd50-\udd52\udd64-\udd67\udd70-\udefb]|\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9e]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udec0\udec2-\udeda\udedc-\udefa\udefc-\udf14\udf16-\udf34\udf36-\udf4e\udf50-\udf6e\udf70-\udf88\udf8a-\udfa8\udfaa-\udfc2\udfc4-\udfcb]|\ud837[\udf00-\udf1e]|\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a\udd00-\udd2c\udd37-\udd3d\udd4e\ude90-\udead\udec0-\udeeb]|\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]|\ud83a[\udc00-\udcc4\udd00-\udd43\udd47\udd4b]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Any",isBmpLast:!0,bmp:"\0-￿",astral:"[\ud800-\udbff][\udc00-\udfff]"},{name:"Default_Ignorable_Code_Point",bmp:"­͏؜ᅟᅠ឴឵᠋-᠏​-‏‪-‮⁠-ㅤ︀-️\ufeffᅠ￰-￸",astral:"\ud82f[\udca0-\udca3]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛ-ꚝꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟸ-ꟺꬰ-ꭚꭜ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\ud801[\udc28-\udc4f\udcd8-\udcfb\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc\udf80\udf83-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud803[\udcc0-\udcf2]|\ud806[\udcc0-\udcdf]|\ud81b[\ude60-\ude7f]|\ud835[\udc1a-\udc33\udc4e-\udc54\udc56-\udc67\udc82-\udc9b\udcb6-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udccf\udcea-\udd03\udd1e-\udd37\udd52-\udd6b\udd86-\udd9f\uddba-\uddd3\uddee-\ude07\ude22-\ude3b\ude56-\ude6f\ude8a-\udea5\udec2-\udeda\udedc-\udee1\udefc-\udf14\udf16-\udf1b\udf36-\udf4e\udf50-\udf55\udf70-\udf88\udf8a-\udf8f\udfaa-\udfc2\udfc4-\udfc9\udfcb]|\ud837[\udf00-\udf09\udf0b-\udf1e]|\ud83a[\udd22-\udd43]"},{name:"Noncharacter_Code_Point",bmp:"﷐-﷯￾￿",astral:"[\ud83f\ud87f\ud8bf\ud8ff\ud93f\ud97f\ud9bf\ud9ff\uda3f\uda7f\udabf\udaff\udb3f\udb7f\udbbf\udbff][\udffe\udfff]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\ud801[\udc00-\udc27\udcb0-\udcd3\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95]|\ud803[\udc80-\udcb2]|\ud806[\udca0-\udcbf]|\ud81b[\ude40-\ude5f]|\ud835[\udc00-\udc19\udc34-\udc4d\udc68-\udc81\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb5\udcd0-\udce9\udd04\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd38\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd6c-\udd85\udda0-\uddb9\uddd4-\udded\ude08-\ude21\ude3c-\ude55\ude70-\ude89\udea8-\udec0\udee2-\udefa\udf1c-\udf34\udf56-\udf6e\udf90-\udfa8\udfca]|\ud83a[\udd00-\udd21]|\ud83c[\udd30-\udd49\udd50-\udd69\udd70-\udd89]"},{name:"White_Space",bmp:"\t-\r …   - \u2028\u2029   "}]},function(d,e,t){"use strict";var n=t(591),r=t(593);n(e,"__esModule",{value:!0}),e.default=void 0;var f=r(t(854));e.default=function(d){if(!d.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");d.addUnicodeData(f.default,"Script")},d.exports=e.default},function(d,e){d.exports=[{name:"Adlam",astral:"\ud83a[\udd00-\udd4b\udd50-\udd59\udd5e\udd5f]"},{name:"Ahom",astral:"\ud805[\udf00-\udf1a\udf1d-\udf2b\udf30-\udf46]"},{name:"Anatolian_Hieroglyphs",astral:"\ud811[\udc00-\ude46]"},{name:"Arabic",bmp:"؀-؄؆-؋؍-ؚ؜-؞ؠ-ؿف-يٖ-ٯٱ-ۜ۞-ۿݐ-ݿࡰ-ࢎ࢐࢑࢘-ࣣ࣡-ࣿﭐ-﯂ﯓ-ﴽ﵀-ﶏﶒ-ﷇ﷏ﷰ-﷿ﹰ-ﹴﹶ-ﻼ",astral:"\ud803[\ude60-\ude7e]|\ud83b[\ude00-\ude03\ude05-\ude1f\ude21\ude22\ude24\ude27\ude29-\ude32\ude34-\ude37\ude39\ude3b\ude42\ude47\ude49\ude4b\ude4d-\ude4f\ude51\ude52\ude54\ude57\ude59\ude5b\ude5d\ude5f\ude61\ude62\ude64\ude67-\ude6a\ude6c-\ude72\ude74-\ude77\ude79-\ude7c\ude7e\ude80-\ude89\ude8b-\ude9b\udea1-\udea3\udea5-\udea9\udeab-\udebb\udef0\udef1]"},{name:"Armenian",bmp:"Ա-Ֆՙ-֊֍-֏ﬓ-ﬗ"},{name:"Avestan",astral:"\ud802[\udf00-\udf35\udf39-\udf3f]"},{name:"Balinese",bmp:"ᬀ-ᭌ᭐-᭾"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"\ud81a[\udc00-\ude38]"},{name:"Bassa_Vah",astral:"\ud81a[\uded0-\udeed\udef0-\udef5]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঀ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৾"},{name:"Bhaiksuki",astral:"\ud807[\udc00-\udc08\udc0a-\udc36\udc38-\udc45\udc50-\udc6c]"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄯㆠ-ㆿ"},{name:"Brahmi",astral:"\ud804[\udc00-\udc4d\udc52-\udc75\udc7f]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ",astral:"\ud806[\udeb0-\udebf]"},{name:"Carian",astral:"\ud800[\udea0-\uded0]"},{name:"Caucasian_Albanian",astral:"\ud801[\udd30-\udd63\udd6f]"},{name:"Chakma",astral:"\ud804[\udd00-\udd34\udd36-\udd47]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏽᏸ-ᏽꭰ-ꮿ"},{name:"Chorasmian",astral:"\ud803[\udfb0-\udfcb]"},{name:"Common",bmp:"\0-@\\[-`\\{-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·؅،؛؟ـ۝࣢।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵ-᳷ᳺ -​‎-⁤⁦-⁰⁴-⁾₀-₎₠-⃀℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉-↋←-␦⑀-⑊①-⟿⤀-⭳⭶-⮕⮗-⯿⸀-⹝⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㋿㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹꤮ꧏ꭛꭪꭫﴾﴿︐-︙︰-﹒﹔-﹦﹨-﹫\ufeff!-@[-`{-・ー゙゚¢-₩│-○-�",astral:"\ud800[\udd00-\udd02\udd07-\udd33\udd37-\udd3f\udd90-\udd9c\uddd0-\uddfc\udee1-\udefb]|\ud82f[\udca0-\udca3]|\ud833[\udf50-\udfc3]|\ud834[\udc00-\udcf5\udd00-\udd26\udd29-\udd66\udd6a-\udd7a\udd83\udd84\udd8c-\udda9\uddae-\uddea\udee0-\udef3\udf00-\udf56\udf60-\udf78]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e\udc9f\udca2\udca5\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udfcb\udfce-\udfff]|\ud83b[\udc71-\udcb4\udd01-\udd3d]|\ud83c[\udc00-\udc2b\udc30-\udc93\udca0-\udcae\udcb1-\udcbf\udcc1-\udccf\udcd1-\udcf5\udd00-\uddad\udde6-\uddff\ude01\ude02\ude10-\ude3b\ude40-\ude48\ude50\ude51\ude60-\ude65\udf00-\udfff]|\ud83d[\udc00-\uded7\udedd-\udeec\udef0-\udefc\udf00-\udf73\udf80-\udfd8\udfe0-\udfeb\udff0]|\ud83e[\udc00-\udc0b\udc10-\udc47\udc50-\udc59\udc60-\udc87\udc90-\udcad\udcb0\udcb1\udd00-\ude53\ude60-\ude6d\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec5\uded0-\uded9\udee0-\udee7\udef0-\udef6\udf00-\udf92\udf94-\udfca\udff0-\udff9]|\udb40[\udc01\udc20-\udc7f]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"\ud808[\udc00-\udf99]|\ud809[\udc00-\udc6e\udc70-\udc74\udc80-\udd43]"},{name:"Cypriot",astral:"\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37\udc38\udc3c\udc3f]"},{name:"Cypro_Minoan",astral:"\ud80b[\udf90-\udff2]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԯᲀ-ᲈᴫᵸⷠ-ⷿꙀ-ꚟ︮︯"},{name:"Deseret",astral:"\ud801[\udc00-\udc4f]"},{name:"Devanagari",bmp:"ऀ-ॐॕ-ॣ०-ॿ꣠-ꣿ"},{name:"Dives_Akuru",astral:"\ud806[\udd00-\udd06\udd09\udd0c-\udd13\udd15\udd16\udd18-\udd35\udd37\udd38\udd3b-\udd46\udd50-\udd59]"},{name:"Dogra",astral:"\ud806[\udc00-\udc3b]"},{name:"Duployan",astral:"\ud82f[\udc00-\udc6a\udc70-\udc7c\udc80-\udc88\udc90-\udc99\udc9c-\udc9f]"},{name:"Egyptian_Hieroglyphs",astral:"\ud80c[\udc00-\udfff]|\ud80d[\udc00-\udc2e\udc30-\udc38]"},{name:"Elbasan",astral:"\ud801[\udd00-\udd27]"},{name:"Elymaic",astral:"\ud803[\udfe0-\udff6]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ",astral:"\ud839[\udfe0-\udfe6\udfe8-\udfeb\udfed\udfee\udff0-\udffe]"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿᲐ-ᲺᲽ-Ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-ⱟ",astral:"\ud838[\udc00-\udc06\udc08-\udc18\udc1b-\udc21\udc23\udc24\udc26-\udc2a]"},{name:"Gothic",astral:"\ud800[\udf30-\udf4a]"},{name:"Grantha",astral:"\ud804[\udf00-\udf03\udf05-\udf0c\udf0f\udf10\udf13-\udf28\udf2a-\udf30\udf32\udf33\udf35-\udf39\udf3c-\udf44\udf47\udf48\udf4b-\udf4d\udf50\udf57\udf5d-\udf63\udf66-\udf6c\udf70-\udf74]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽͿ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ωꭥ",astral:"\ud800[\udd40-\udd8e\udda0]|\ud834[\ude00-\ude45]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱ૹ-૿"},{name:"Gunjala_Gondi",astral:"\ud807[\udd60-\udd65\udd67\udd68\udd6a-\udd8e\udd90\udd91\udd93-\udd98\udda0-\udda9]"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-੶"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶿一-鿿豈-舘並-龎",astral:"\ud81b[\udfe2\udfe3\udff0\udff1]|[\ud840-\ud868\ud86a-\ud86c\ud86f-\ud872\ud874-\ud879\ud880-\ud883][\udc00-\udfff]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf38\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanifi_Rohingya",astral:"\ud803[\udd00-\udd27\udd30-\udd39]"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hatran",astral:"\ud802[\udce0-\udcf2\udcf4\udcf5\udcfb-\udcff]"},{name:"Hebrew",bmp:"֑-ׇא-תׯ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"\ud82c[\udc01-\udd1f\udd50-\udd52]|🈀"},{name:"Imperial_Aramaic",astral:"\ud802[\udc40-\udc55\udc57-\udc5f]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॑-॔᪰-ᫎ᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿‌‍⃐-〪⃰-゙゚〭︀-️︠-︭",astral:"\ud800[\uddfd\udee0]|𑌻|\ud833[\udf00-\udf2d\udf30-\udf46]|\ud834[\udd67-\udd69\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad]|\udb40[\udd00-\uddef]"},{name:"Inscriptional_Pahlavi",astral:"\ud802[\udf60-\udf72\udf78-\udf7f]"},{name:"Inscriptional_Parthian",astral:"\ud802[\udf40-\udf55\udf58-\udf5f]"},{name:"Javanese",bmp:"ꦀ-꧍꧐-꧙꧞꧟"},{name:"Kaithi",astral:"\ud804[\udc80-\udcc2\udccd]"},{name:"Kannada",bmp:"ಀ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೝೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"\ud82b[\udff0-\udff3\udff5-\udffb\udffd\udffe]|\ud82c[\udc00\udd20-\udd22\udd64-\udd67]"},{name:"Kayah_Li",bmp:"꤀-꤭꤯"},{name:"Kharoshthi",astral:"\ud802[\ude00-\ude03\ude05\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude35\ude38-\ude3a\ude3f-\ude48\ude50-\ude58]"},{name:"Khitan_Small_Script",astral:"𖿤|\ud822[\udf00-\udfff]|\ud823[\udc00-\udcd5]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Khojki",astral:"\ud804[\ude00-\ude11\ude13-\ude3e]"},{name:"Khudawadi",astral:"\ud804[\udeb0-\udeea\udef0-\udef9]"},{name:"Lao",bmp:"ກຂຄຆ-ຊຌ-ຣລວ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꟿꬰ-ꭚꭜ-ꭤꭦ-ꭩff-stA-Za-z",astral:"\ud801[\udf80-\udf85\udf87-\udfb0\udfb2-\udfba]|\ud837[\udf00-\udf1e]"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤞᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_A",astral:"\ud801[\ude00-\udf36\udf40-\udf55\udf60-\udf67]"},{name:"Linear_B",astral:"\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa]"},{name:"Lisu",bmp:"ꓐ-꓿",astral:"𑾰"},{name:"Lycian",astral:"\ud800[\ude80-\ude9c]"},{name:"Lydian",astral:"\ud802[\udd20-\udd39\udd3f]"},{name:"Mahajani",astral:"\ud804[\udd50-\udd76]"},{name:"Makasar",astral:"\ud807[\udee0-\udef8]"},{name:"Malayalam",bmp:"ഀ-ഌഎ-ഐഒ-ൄെ-ൈൊ-൏ൔ-ൣ൦-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Manichaean",astral:"\ud802[\udec0-\udee6\udeeb-\udef6]"},{name:"Marchen",astral:"\ud807[\udc70-\udc8f\udc92-\udca7\udca9-\udcb6]"},{name:"Masaram_Gondi",astral:"\ud807[\udd00-\udd06\udd08\udd09\udd0b-\udd36\udd3a\udd3c\udd3d\udd3f-\udd47\udd50-\udd59]"},{name:"Medefaidrin",astral:"\ud81b[\ude40-\ude9a]"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Mende_Kikakui",astral:"\ud83a[\udc00-\udcc4\udcc7-\udcd6]"},{name:"Meroitic_Cursive",astral:"\ud802[\udda0-\uddb7\uddbc-\uddcf\uddd2-\uddff]"},{name:"Meroitic_Hieroglyphs",astral:"\ud802[\udd80-\udd9f]"},{name:"Miao",astral:"\ud81b[\udf00-\udf4a\udf4f-\udf87\udf8f-\udf9f]"},{name:"Modi",astral:"\ud805[\ude00-\ude44\ude50-\ude59]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠙ᠠ-ᡸᢀ-ᢪ",astral:"\ud805[\ude60-\ude6c]"},{name:"Mro",astral:"\ud81a[\ude40-\ude5e\ude60-\ude69\ude6e\ude6f]"},{name:"Multani",astral:"\ud804[\ude80-\ude86\ude88\ude8a-\ude8d\ude8f-\ude9d\ude9f-\udea9]"},{name:"Myanmar",bmp:"က-႟ꧠ-ꧾꩠ-ꩿ"},{name:"Nabataean",astral:"\ud802[\udc80-\udc9e\udca7-\udcaf]"},{name:"Nandinagari",astral:"\ud806[\udda0-\udda7\uddaa-\uddd7\uddda-\udde4]"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Newa",astral:"\ud805[\udc00-\udc5b\udc5d-\udc61]"},{name:"Nko",bmp:"߀-ߺ߽-߿"},{name:"Nushu",astral:"𖿡|\ud82c[\udd70-\udefb]"},{name:"Nyiakeng_Puachue_Hmong",astral:"\ud838[\udd00-\udd2c\udd30-\udd3d\udd40-\udd49\udd4e\udd4f]"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Hungarian",astral:"\ud803[\udc80-\udcb2\udcc0-\udcf2\udcfa-\udcff]"},{name:"Old_Italic",astral:"\ud800[\udf00-\udf23\udf2d-\udf2f]"},{name:"Old_North_Arabian",astral:"\ud802[\ude80-\ude9f]"},{name:"Old_Permic",astral:"\ud800[\udf50-\udf7a]"},{name:"Old_Persian",astral:"\ud800[\udfa0-\udfc3\udfc8-\udfd5]"},{name:"Old_Sogdian",astral:"\ud803[\udf00-\udf27]"},{name:"Old_South_Arabian",astral:"\ud802[\ude60-\ude7f]"},{name:"Old_Turkic",astral:"\ud803[\udc00-\udc48]"},{name:"Old_Uyghur",astral:"\ud803[\udf70-\udf89]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍୕-ୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osage",astral:"\ud801[\udcb0-\udcd3\udcd8-\udcfb]"},{name:"Osmanya",astral:"\ud801[\udc80-\udc9d\udca0-\udca9]"},{name:"Pahawh_Hmong",astral:"\ud81a[\udf00-\udf45\udf50-\udf59\udf5b-\udf61\udf63-\udf77\udf7d-\udf8f]"},{name:"Palmyrene",astral:"\ud802[\udc60-\udc7f]"},{name:"Pau_Cin_Hau",astral:"\ud806[\udec0-\udef8]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"\ud802[\udd00-\udd1b\udd1f]"},{name:"Psalter_Pahlavi",astral:"\ud802[\udf80-\udf91\udf99-\udf9c\udfa9-\udfaf]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛸ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-ꣅ꣎-꣙"},{name:"Sharada",astral:"\ud804[\udd80-\udddf]"},{name:"Shavian",astral:"\ud801[\udc50-\udc7f]"},{name:"Siddham",astral:"\ud805[\udd80-\uddb5\uddb8-\udddd]"},{name:"SignWriting",astral:"\ud836[\udc00-\ude8b\ude9b-\ude9f\udea1-\udeaf]"},{name:"Sinhala",bmp:"ඁ-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-෴",astral:"\ud804[\udde1-\uddf4]"},{name:"Sogdian",astral:"\ud803[\udf30-\udf59]"},{name:"Sora_Sompeng",astral:"\ud804[\udcd0-\udce8\udcf0-\udcf9]"},{name:"Soyombo",astral:"\ud806[\ude50-\udea2]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠬"},{name:"Syriac",bmp:"܀-܍܏-݊ݍ-ݏࡠ-ࡪ"},{name:"Tagalog",bmp:"ᜀ-᜕ᜟ"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"\ud805[\ude80-\udeb9\udec0-\udec9]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺",astral:"\ud807[\udfc0-\udff1\udfff]"},{name:"Tangsa",astral:"\ud81a[\ude70-\udebe\udec0-\udec9]"},{name:"Tangut",astral:"𖿠|[\ud81c-\ud820][\udc00-\udfff]|\ud821[\udc00-\udff7]|\ud822[\udc00-\udeff]|\ud823[\udd00-\udd08]"},{name:"Telugu",bmp:"ఀ-ఌఎ-ఐఒ-నప-హ఼-ౄె-ైొ-్ౕౖౘ-ౚౝౠ-ౣ౦-౯౷-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Tirhuta",astral:"\ud805[\udc80-\udcc7\udcd0-\udcd9]"},{name:"Toto",astral:"\ud838[\ude90-\udeae]"},{name:"Ugaritic",astral:"\ud800[\udf80-\udf9d\udf9f]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Vithkuqi",astral:"\ud801[\udd70-\udd7a\udd7c-\udd8a\udd8c-\udd92\udd94\udd95\udd97-\udda1\udda3-\uddb1\uddb3-\uddb9\uddbb\uddbc]"},{name:"Wancho",astral:"\ud838[\udec0-\udef9\udeff]"},{name:"Warang_Citi",astral:"\ud806[\udca0-\udcf2\udcff]"},{name:"Yezidi",astral:"\ud803[\ude80-\udea9\udeab-\udead\udeb0\udeb1]"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"},{name:"Zanabazar_Square",astral:"\ud806[\ude00-\ude47]"}]},function(d,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Xassertion=void 0;var n,r=(n=t(23))&&n.__esModule?n:{default:n};function f(d){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},f(d)}var c={assert:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;d||(console.error("".concat(d,": ").concat(e)),this.assert_debugger(e))},assert_equal:function(d,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e!==d&&(console.error("<".concat(d,"> expected but was <").concat(e,">")),this.assert_debugger(t))},assert_kind_of_integer:function(d){this.assert(Number.isInteger(d))},assert_kind_of_string:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert_equal("string",f(d),e)},assert_kind_of_array:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert(r.default.isArray(d),e)},assert_kind_of_hash:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert_equal("object",f(d),e)},assert_kind_of_object:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assert_equal("object",f(d),e)},assert_nonzero:function(d){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"divided by 0";this.assert(0!==d,e)},assert_debugger:function(){var d,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null!==(d=e)&&void 0!==d||(e="Assertion failed"),"undefined"==typeof window)throw new Error(e);alert(e)}};e.Xassertion=c}])]); \ No newline at end of file diff --git a/docs/_nuxt/7f67348.js b/docs/_nuxt/7f67348.js new file mode 100644 index 00000000..95f380a9 --- /dev/null +++ b/docs/_nuxt/7f67348.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25,4,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,29,30,31,32,33,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,62,64,65,68,69,70,71],{1:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={inject:["TheSp"]}},100:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);n(12);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"none",name:"none"},{key:"wood_normal",name:"普通の木目"},{key:"wood_bright",name:"明るい木目"}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("wood_normal").key),console.log(d.fetch("wood_normal").name))}).call(this,n(179),"/index.js")},101:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);n(12);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"none",name:"none",format:""},{key:"nureyon",name:"ぬれよん",format:"SVG"},{key:"paper",name:"紙面風",format:"SVG"},{key:"zuan",name:"図案駒",format:"PNG"},{key:"portella",name:"Portella",format:"PNG"}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("a").key),console.log(d.fetch("a").name))}).call(this,n(179),"/index.js")},127:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(21),c=n(177),_=n(178),l=(n(11),n(45),n(98),n(530),n(57),n(74),n(543),n(23),n(180)),f=n(532),h=function(){function e(t){var n,o;if(Object(c.a)(this,e),"string"==typeof t){var _=this.__parse_from_string(t),l=Object(r.a)(_,2);n=l[0],o=l[1]}else{var f=Object(r.a)(t,2);n=f[0],o=f[1]}var h=[n,o];this._x=h[0],this._y=h[1]}return Object(_.a)(e,[{key:"key",get:function(){return[this._x,this._y].toString()}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"to_a",get:function(){return[this.x,this.y]}},{key:"to_h",get:function(){return{x:this.x,y:this.y}}},{key:"human_x",get:function(){return l.a.dimension-this._x}},{key:"kanji_human_x",get:function(){return e.TO_KANJI_REPLACE_TABLE_X[this.human_x]}},{key:"kanji_human_y",get:function(){return e.TO_KANJI_REPLACE_TABLE_Y[this.human_y]}},{key:"yomiage_x",get:function(){return f.a.fetch(this.human_x.toString()).yomiage}},{key:"yomiage_y",get:function(){return f.a.fetch(this.human_y.toString()).yomiage}},{key:"human_y",get:function(){return this._y+1}},{key:"flip_all",get:function(){return e.fetch([l.a.dimension-1-this._x,l.a.dimension-1-this._y])}},{key:"flop",get:function(){return e.fetch([l.a.dimension-1-this._x,this._y])}},{key:"flop_if",value:function(e){return e?this.flop:this}},{key:"sp_flip_if_white",value:function(e){return"white"===e.key?this.flip_all:this}},{key:"to_sfen",get:function(){return[l.a.dimension-this._x,e.TO_SFEN_REPLACE_TABLE_Y[this._y]].join("")}},{key:"css_place_key",get:function(){return["place",this.human_x,this.human_y].join("_")}},{key:"human_xy_ary",get:function(){return[this.human_x,this.human_y]}},{key:"kanji_human",get:function(){return[this.kanji_human_x,this.kanji_human_y].join("")}},{key:"digit_human",get:function(){return[this.human_x,this.human_y].join("")}},{key:"even_p",get:function(){return 0==(this.human_x+this.human_y&1)}},{key:"odd_p",get:function(){return!this.even_p}},{key:"tennozan_p",get:function(){return this.x===Math.trunc(l.a.dimension/2)&&this.y===Math.trunc(l.a.dimension/2)}},{key:"rotate_add",value:function(t,n){var o=this.__new_pos(this._x,t),r=this.__new_pos(this._y,n);return e.fetch([o,r])}},{key:"__new_pos",value:function(e,t){return Math.trunc((e+t+l.a.dimension)%l.a.dimension)}},{key:"__parse_from_string",value:function(s){var t=s.split("").map((function(t){var n;return Number(null!==(n=e.ANY_TO_NUMBER_REPLACE_TABLE[t])&&void 0!==n?n:t)})),n=Object(r.a)(t,2),o=n[0],c=n[1];return[l.a.dimension-o,c-1]}}],[{key:"fetch",value:function(t){return t instanceof this?t:Object.freeze(new e(t))}},{key:"xy_valid_p",value:function(e,t){return 0<=e&&e2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,l=e.place.y+r;return c===t.x&&l===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,l=n[0],_=n[1]*e.location.value_sign,f=r+l,h=c+_,y=!1;!m.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){y=!0;break}if("non_stop"==o.mode);else{var v=m.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return y}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),l.promoted&&(r+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),r+=_}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(k.dimension)}).call(this,n(179),"/index.js")},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));n(11),n(517);var o=n(177),r=n(178),c=n(518),l=n(519),_=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(_.a)(e);if(t){var r=Object(_.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),l=n(178),_=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),y=n(180),m=n(127),v=n(522),k=n(71);function d(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=y.a.dimension-y.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return y.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,y.a.dimension-1),n=h.a.random(0,y.a.dimension-1);e=m.a.fetch([t,n])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:k.a.fetch(h.a.random(0,k.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new m.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:k.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(517);var r=n(177),c=n(178),l=n(526),_=n(518),f=n(519),h=n(516),y=(n(11),n(22),n(520)),m=n(533),v=n(534);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=k(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return m.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(l.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(y.a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("K")),console.log(d.fetch("K")),console.log(d.lookup("")),console.log(d.values),console.log(d.values_map.get("K")),console.log(d.fetch("K").key))}).call(this,n(179),"/index.js")},532:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),l=n(519),_=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(_.a)(e);if(t){var r=Object(_.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"1",yomiage:"1"},{key:"2",yomiage:"にー"},{key:"3",yomiage:"さん"},{key:"4",yomiage:"よん"},{key:"5",yomiage:"ごー"},{key:"6",yomiage:"6"},{key:"7",yomiage:"なな"},{key:"8",yomiage:"8"},{key:"9",yomiage:"きゅー"}]}}]),n}(n(520).a)},533:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),l=n(518),_=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var y=function(e){Object(l.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"once_vectors",value:function(e){var t=null;return t=e?this.promoted_once_vectors:this.basic_once_vectors,this.constructor[t]}},{key:"repeat_vectors",value:function(e){var t=null;return t=e?this.promoted_repeat_vectors:this.basic_repeat_vectors,this.constructor[t]}}],[{key:"define",get:function(){return[{key:"K",basic_once_vectors:"pattern_king",basic_repeat_vectors:null,promoted_once_vectors:null,promoted_repeat_vectors:null,force_promote_length:null},{key:"R",basic_once_vectors:null,basic_repeat_vectors:"pattern_plus",promoted_once_vectors:"pattern_x",promoted_repeat_vectors:"pattern_plus",force_promote_length:null},{key:"B",basic_once_vectors:null,basic_repeat_vectors:"pattern_x",promoted_once_vectors:"pattern_plus",promoted_repeat_vectors:"pattern_x",force_promote_length:null},{key:"G",basic_once_vectors:"pattern_gold",basic_repeat_vectors:null,promoted_once_vectors:null,promoted_repeat_vectors:null,force_promote_length:null},{key:"S",basic_once_vectors:"pattern_silver",basic_repeat_vectors:null,promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:null},{key:"N",basic_once_vectors:"pattern_knight",basic_repeat_vectors:null,promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:1},{key:"L",basic_once_vectors:null,basic_repeat_vectors:"pattern_pawn",promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:0},{key:"P",basic_once_vectors:"pattern_pawn",basic_repeat_vectors:null,promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:0}]}},{key:"pattern_plus",get:function(){return[null,[0,-1],null,[-1,0],[1,0],null,[0,1],null]}},{key:"pattern_x",get:function(){return[[-1,-1],null,[1,-1],null,null,null,[-1,1],null,[1,1]]}},{key:"pattern_silver",get:function(){return[[-1,-1],[0,-1],[1,-1],null,null,null,[-1,1],null,[1,1]]}},{key:"pattern_gold",get:function(){return[[-1,-1],[0,-1],[1,-1],[-1,0],[1,0],null,[0,1],null]}},{key:"pattern_king",get:function(){return[[-1,-1],[0,-1],[1,-1],[-1,0],null,[1,0],[-1,1],[0,1],[1,1]]}},{key:"pattern_knight",get:function(){return[[-1,-2],[1,-2]]}},{key:"pattern_pawn",get:function(){return[[0,-1]]}}]),n}(n(520).a);void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},534:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),l=n(519),_=n(516);n(12);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(_.a)(e);if(t){var r=Object(_.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"yomiage",value:function(e){return e?this.promoted_name:this.name}}],[{key:"define",get:function(){return[{key:"K",prefix_name:"gyoku",name:"gyoku",promoted_name:null},{key:"R",prefix_name:"ひしゃ",name:"ひしゃっ!",promoted_name:"りゅー!"},{key:"B",prefix_name:"かく",name:"かくっ!",promoted_name:"うまっ!"},{key:"G",prefix_name:"きん",name:"きんっ!",promoted_name:null},{key:"S",prefix_name:"ぎん",name:"ぎんっ!",promoted_name:"なりぎんっ!"},{key:"N",prefix_name:"けい",name:"けいっ!",promoted_name:"なりけいっ!"},{key:"L",prefix_name:"きょー",name:"きょー!",promoted_name:"なりきょー!"},{key:"P",prefix_name:"ふ",name:"ふ!",promoted_name:"ときんっ!"}]}}]),n}(n(520).a)},71:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(517);var r=n(177),c=n(178),l=n(518),_=n(519),f=n(516);n(51),n(12),n(11),n(22),n(57);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var y=function(e){Object(l.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"flip",get:function(){return this.constructor.cycle_lookup(this.code+1)}},{key:"any_long_name",value:function(e){return e?this.handicap_long_name:this.long_name}},{key:"advance",value:function(e){return this.constructor.cycle_lookup(this.code+e)}},{key:"flip_if",value:function(e){return this.advance(e?1:0)}}],[{key:"define",get:function(){return[{key:"black",name:"☗",char_key:"b",value_sign:1,position_key:"is_position_south",long_name:"先手",handicap_long_name:"下手"},{key:"white",name:"☖",char_key:"w",value_sign:-1,position_key:"is_position_north",long_name:"後手",handicap_long_name:"上手"}]}},{key:"cycle_lookup",value:function(e){if("number"!=typeof e)throw new Error("ArgumentError: ".concat(this.name,".cycle_lookup(").concat(JSON.stringify(e),")"));return this.lookup(Math.abs(e)%this.values.length)}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(y.cycle_lookup(-1)),console.log(y.fetch("black")),y.values.map((function(e){console.log(e)})),console.log(y.fetch("black").flip),console.log(y.fetch("white").flip))}).call(this,n(179),"/index.js")}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[4,8,9,10,11,12,13,14,15,16,17,18,19,20,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,60,62,64,65],{1:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={inject:["TheSp"]}},127:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(21),c=n(177),l=n(178),_=(n(11),n(45),n(98),n(530),n(57),n(74),n(543),n(23),n(180)),f=n(532),h=function(){function e(t){var n,o;if(Object(c.a)(this,e),"string"==typeof t){var l=this.__parse_from_string(t),_=Object(r.a)(l,2);n=_[0],o=_[1]}else{var f=Object(r.a)(t,2);n=f[0],o=f[1]}var h=[n,o];this._x=h[0],this._y=h[1]}return Object(l.a)(e,[{key:"key",get:function(){return[this._x,this._y].toString()}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"to_a",get:function(){return[this.x,this.y]}},{key:"to_h",get:function(){return{x:this.x,y:this.y}}},{key:"human_x",get:function(){return _.a.dimension-this._x}},{key:"kanji_human_x",get:function(){return e.TO_KANJI_REPLACE_TABLE_X[this.human_x]}},{key:"kanji_human_y",get:function(){return e.TO_KANJI_REPLACE_TABLE_Y[this.human_y]}},{key:"yomiage_x",get:function(){return f.a.fetch(this.human_x.toString()).yomiage}},{key:"yomiage_y",get:function(){return f.a.fetch(this.human_y.toString()).yomiage}},{key:"human_y",get:function(){return this._y+1}},{key:"flip_all",get:function(){return e.fetch([_.a.dimension-1-this._x,_.a.dimension-1-this._y])}},{key:"flop",get:function(){return e.fetch([_.a.dimension-1-this._x,this._y])}},{key:"flop_if",value:function(e){return e?this.flop:this}},{key:"sp_flip_if_white",value:function(e){return"white"===e.key?this.flip_all:this}},{key:"to_sfen",get:function(){return[_.a.dimension-this._x,e.TO_SFEN_REPLACE_TABLE_Y[this._y]].join("")}},{key:"css_place_key",get:function(){return["place",this.human_x,this.human_y].join("_")}},{key:"human_xy_ary",get:function(){return[this.human_x,this.human_y]}},{key:"kanji_human",get:function(){return[this.kanji_human_x,this.kanji_human_y].join("")}},{key:"digit_human",get:function(){return[this.human_x,this.human_y].join("")}},{key:"even_p",get:function(){return 0==(this.human_x+this.human_y&1)}},{key:"odd_p",get:function(){return!this.even_p}},{key:"tennozan_p",get:function(){return this.x===Math.trunc(_.a.dimension/2)&&this.y===Math.trunc(_.a.dimension/2)}},{key:"rotate_add",value:function(t,n){var o=this.__new_pos(this._x,t),r=this.__new_pos(this._y,n);return e.fetch([o,r])}},{key:"__new_pos",value:function(e,t){return Math.trunc((e+t+_.a.dimension)%_.a.dimension)}},{key:"__parse_from_string",value:function(s){var t=s.split("").map((function(t){var n;return Number(null!==(n=e.ANY_TO_NUMBER_REPLACE_TABLE[t])&&void 0!==n?n:t)})),n=Object(r.a)(t,2),o=n[0],c=n[1];return[_.a.dimension-o,c-1]}}],[{key:"fetch",value:function(t){return t instanceof this?t:Object.freeze(new e(t))}},{key:"xy_valid_p",value:function(e,t){return 0<=e&&e<_.a.dimension&&0<=t&&t<_.a.dimension}},{key:"xy_invalid_p",value:function(e,t){return!this.xy_valid_p(e,t)}}]),e}();h.ANY_TO_NUMBER_REPLACE_TABLE={"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,"一":1,"二":2,"三":3,"四":4,"五":5,"六":6,"七":7,"八":8,"九":9,a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:8,i:9},h.TO_KANJI_REPLACE_TABLE_X={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},h.TO_KANJI_REPLACE_TABLE_Y={1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七",8:"八",9:"九"},h.TO_SFEN_REPLACE_TABLE_Y=["a","b","c","d","e","f","g","h","i"],void 0!==e&&e.argv[1]===o&&(console.log(h.fetch("6a").key),console.log(h.fetch([1,2]).key))}).call(this,n(179),"/index.js")},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),l=n(178),_=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(_),h=n(2),y=n(521),m=n(127);function v(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var k=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(l.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,l=e.place.y+r;return c===t.x&&l===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,l=n[0],_=n[1]*e.location.value_sign,f=r+l,h=c+_,y=!1;!m.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){y=!0;break}if("non_stop"==o.mode);else{var v=m.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return y}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),l.promoted&&(r+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),r+=_}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(k.dimension)}).call(this,n(179),"/index.js")},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));n(11),n(517);var o=n(177),r=n(178),c=n(518),l=n(519),_=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(_.a)(e);if(t){var r=Object(_.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),l=n(178),_=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),y=n(180),m=n(127),v=n(522),k=n(71);function d(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=y.a.dimension-y.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return y.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,y.a.dimension-1),n=h.a.random(0,y.a.dimension-1);e=m.a.fetch([t,n])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:k.a.fetch(h.a.random(0,k.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new m.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:k.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(517);var r=n(177),c=n(178),l=n(526),_=n(518),f=n(519),h=n(516),y=(n(11),n(22),n(520)),m=n(533),v=n(534);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=k(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return m.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(l.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(y.a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("K")),console.log(d.fetch("K")),console.log(d.lookup("")),console.log(d.values),console.log(d.values_map.get("K")),console.log(d.fetch("K").key))}).call(this,n(179),"/index.js")},532:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),l=n(519),_=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(_.a)(e);if(t){var r=Object(_.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"1",yomiage:"1"},{key:"2",yomiage:"にー"},{key:"3",yomiage:"さん"},{key:"4",yomiage:"よん"},{key:"5",yomiage:"ごー"},{key:"6",yomiage:"6"},{key:"7",yomiage:"なな"},{key:"8",yomiage:"8"},{key:"9",yomiage:"きゅー"}]}}]),n}(n(520).a)},533:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),l=n(518),_=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var y=function(e){Object(l.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"once_vectors",value:function(e){var t=null;return t=e?this.promoted_once_vectors:this.basic_once_vectors,this.constructor[t]}},{key:"repeat_vectors",value:function(e){var t=null;return t=e?this.promoted_repeat_vectors:this.basic_repeat_vectors,this.constructor[t]}}],[{key:"define",get:function(){return[{key:"K",basic_once_vectors:"pattern_king",basic_repeat_vectors:null,promoted_once_vectors:null,promoted_repeat_vectors:null,force_promote_length:null},{key:"R",basic_once_vectors:null,basic_repeat_vectors:"pattern_plus",promoted_once_vectors:"pattern_x",promoted_repeat_vectors:"pattern_plus",force_promote_length:null},{key:"B",basic_once_vectors:null,basic_repeat_vectors:"pattern_x",promoted_once_vectors:"pattern_plus",promoted_repeat_vectors:"pattern_x",force_promote_length:null},{key:"G",basic_once_vectors:"pattern_gold",basic_repeat_vectors:null,promoted_once_vectors:null,promoted_repeat_vectors:null,force_promote_length:null},{key:"S",basic_once_vectors:"pattern_silver",basic_repeat_vectors:null,promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:null},{key:"N",basic_once_vectors:"pattern_knight",basic_repeat_vectors:null,promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:1},{key:"L",basic_once_vectors:null,basic_repeat_vectors:"pattern_pawn",promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:0},{key:"P",basic_once_vectors:"pattern_pawn",basic_repeat_vectors:null,promoted_once_vectors:"pattern_gold",promoted_repeat_vectors:null,force_promote_length:0}]}},{key:"pattern_plus",get:function(){return[null,[0,-1],null,[-1,0],[1,0],null,[0,1],null]}},{key:"pattern_x",get:function(){return[[-1,-1],null,[1,-1],null,null,null,[-1,1],null,[1,1]]}},{key:"pattern_silver",get:function(){return[[-1,-1],[0,-1],[1,-1],null,null,null,[-1,1],null,[1,1]]}},{key:"pattern_gold",get:function(){return[[-1,-1],[0,-1],[1,-1],[-1,0],[1,0],null,[0,1],null]}},{key:"pattern_king",get:function(){return[[-1,-1],[0,-1],[1,-1],[-1,0],null,[1,0],[-1,1],[0,1],[1,1]]}},{key:"pattern_knight",get:function(){return[[-1,-2],[1,-2]]}},{key:"pattern_pawn",get:function(){return[[0,-1]]}}]),n}(n(520).a);void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},534:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),l=n(519),_=n(516);n(12);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(_.a)(e);if(t){var r=Object(_.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"yomiage",value:function(e){return e?this.promoted_name:this.name}}],[{key:"define",get:function(){return[{key:"K",prefix_name:"gyoku",name:"gyoku",promoted_name:null},{key:"R",prefix_name:"ひしゃ",name:"ひしゃっ!",promoted_name:"りゅー!"},{key:"B",prefix_name:"かく",name:"かくっ!",promoted_name:"うまっ!"},{key:"G",prefix_name:"きん",name:"きんっ!",promoted_name:null},{key:"S",prefix_name:"ぎん",name:"ぎんっ!",promoted_name:"なりぎんっ!"},{key:"N",prefix_name:"けい",name:"けいっ!",promoted_name:"なりけいっ!"},{key:"L",prefix_name:"きょー",name:"きょー!",promoted_name:"なりきょー!"},{key:"P",prefix_name:"ふ",name:"ふ!",promoted_name:"ときんっ!"}]}}]),n}(n(520).a)},71:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(517);var r=n(177),c=n(178),l=n(518),_=n(519),f=n(516);n(51),n(12),n(11),n(22),n(57);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var y=function(e){Object(l.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"flip",get:function(){return this.constructor.cycle_lookup(this.code+1)}},{key:"any_long_name",value:function(e){return e?this.handicap_long_name:this.long_name}},{key:"advance",value:function(e){return this.constructor.cycle_lookup(this.code+e)}},{key:"flip_if",value:function(e){return this.advance(e?1:0)}}],[{key:"define",get:function(){return[{key:"black",name:"☗",char_key:"b",value_sign:1,position_key:"is_position_south",long_name:"先手",handicap_long_name:"下手"},{key:"white",name:"☖",char_key:"w",value_sign:-1,position_key:"is_position_north",long_name:"後手",handicap_long_name:"上手"}]}},{key:"cycle_lookup",value:function(e){if("number"!=typeof e)throw new Error("ArgumentError: ".concat(this.name,".cycle_lookup(").concat(JSON.stringify(e),")"));return this.lookup(Math.abs(e)%this.values.length)}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(y.cycle_lookup(-1)),console.log(y.fetch("black")),y.values.map((function(e){console.log(e)})),console.log(y.fetch("black").flip),console.log(y.fetch("white").flip))}).call(this,n(179),"/index.js")}}]); \ No newline at end of file diff --git a/docs/_nuxt/9ae86c7.js b/docs/_nuxt/9ae86c7.js new file mode 100644 index 00000000..4cccc3af --- /dev/null +++ b/docs/_nuxt/9ae86c7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[30,4,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,25,29,31,32,33,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,62,64,65,68,69,70,71],{1:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={inject:["TheSp"]}},100:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);n(12);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"none",name:"none"},{key:"wood_normal",name:"普通の木目"},{key:"wood_bright",name:"明るい木目"}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("wood_normal").key),console.log(d.fetch("wood_normal").name))}).call(this,n(179),"/index.js")},101:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);n(12);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"none",name:"none",format:""},{key:"nureyon",name:"ぬれよん",format:"SVG"},{key:"paper",name:"紙面風",format:"SVG"},{key:"zuan",name:"図案駒",format:"PNG"},{key:"portella",name:"Portella",format:"PNG"}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("a").key),console.log(d.fetch("a").name))}).call(this,n(179),"/index.js")},127:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(21),c=n(177),_=n(178),l=(n(11),n(45),n(98),n(530),n(57),n(74),n(543),n(23),n(180)),f=n(532),h=function(){function e(t){var n,o;if(Object(c.a)(this,e),"string"==typeof t){var _=this.__parse_from_string(t),l=Object(r.a)(_,2);n=l[0],o=l[1]}else{var f=Object(r.a)(t,2);n=f[0],o=f[1]}var h=[n,o];this._x=h[0],this._y=h[1]}return Object(_.a)(e,[{key:"key",get:function(){return[this._x,this._y].toString()}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"to_a",get:function(){return[this.x,this.y]}},{key:"to_h",get:function(){return{x:this.x,y:this.y}}},{key:"human_x",get:function(){return l.a.dimension-this._x}},{key:"kanji_human_x",get:function(){return e.TO_KANJI_REPLACE_TABLE_X[this.human_x]}},{key:"kanji_human_y",get:function(){return e.TO_KANJI_REPLACE_TABLE_Y[this.human_y]}},{key:"yomiage_x",get:function(){return f.a.fetch(this.human_x.toString()).yomiage}},{key:"yomiage_y",get:function(){return f.a.fetch(this.human_y.toString()).yomiage}},{key:"human_y",get:function(){return this._y+1}},{key:"flip_all",get:function(){return e.fetch([l.a.dimension-1-this._x,l.a.dimension-1-this._y])}},{key:"flop",get:function(){return e.fetch([l.a.dimension-1-this._x,this._y])}},{key:"flop_if",value:function(e){return e?this.flop:this}},{key:"sp_flip_if_white",value:function(e){return"white"===e.key?this.flip_all:this}},{key:"to_sfen",get:function(){return[l.a.dimension-this._x,e.TO_SFEN_REPLACE_TABLE_Y[this._y]].join("")}},{key:"css_place_key",get:function(){return["place",this.human_x,this.human_y].join("_")}},{key:"human_xy_ary",get:function(){return[this.human_x,this.human_y]}},{key:"kanji_human",get:function(){return[this.kanji_human_x,this.kanji_human_y].join("")}},{key:"digit_human",get:function(){return[this.human_x,this.human_y].join("")}},{key:"even_p",get:function(){return 0==(this.human_x+this.human_y&1)}},{key:"odd_p",get:function(){return!this.even_p}},{key:"tennozan_p",get:function(){return this.x===Math.trunc(l.a.dimension/2)&&this.y===Math.trunc(l.a.dimension/2)}},{key:"rotate_add",value:function(t,n){var o=this.__new_pos(this._x,t),r=this.__new_pos(this._y,n);return e.fetch([o,r])}},{key:"__new_pos",value:function(e,t){return Math.trunc((e+t+l.a.dimension)%l.a.dimension)}},{key:"__parse_from_string",value:function(s){var t=s.split("").map((function(t){var n;return Number(null!==(n=e.ANY_TO_NUMBER_REPLACE_TABLE[t])&&void 0!==n?n:t)})),n=Object(r.a)(t,2),o=n[0],c=n[1];return[l.a.dimension-o,c-1]}}],[{key:"fetch",value:function(t){return t instanceof this?t:Object.freeze(new e(t))}},{key:"xy_valid_p",value:function(e,t){return 0<=e&&e2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i + * Released under the MIT License. + */ + +/*! + * vue-no-ssr v1.1.1 + * (c) 2018-present egoist <0x142857@gmail.com> + * Released under the MIT License. + */ + + /** * chroma.js - JavaScript library for color conversions * @@ -97,25 +116,6 @@ */ -/*! - * vue-scrollto v2.20.0 - * (c) 2019 Randjelovic Igor - * @license MIT - */ - -/*! - * vue-client-only v0.0.0-semantic-release - * (c) 2021-present egoist <0x142857@gmail.com> - * Released under the MIT License. - */ - -/*! - * vue-no-ssr v1.1.1 - * (c) 2018-present egoist <0x142857@gmail.com> - * Released under the MIT License. - */ - - /** * @license * Lodash diff --git a/docs/_nuxt/aa8f9f7.js b/docs/_nuxt/aa8f9f7.js new file mode 100644 index 00000000..1ad36a64 --- /dev/null +++ b/docs/_nuxt/aa8f9f7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[27,4,8,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,62,64,65,66,68,69,70,71],{1:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={inject:["TheSp"]}},100:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"none",name:"none"},{key:"wood_normal",name:"普通の木目"},{key:"wood_bright",name:"明るい木目"}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("wood_normal").key),console.log(d.fetch("wood_normal").name))}).call(this,t(179),"/index.js")},101:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"none",name:"none",format:""},{key:"nureyon",name:"ぬれよん",format:"SVG"},{key:"paper",name:"紙面風",format:"SVG"},{key:"zuan",name:"図案駒",format:"PNG"},{key:"portella",name:"Portella",format:"PNG"}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("a").key),console.log(d.fetch("a").name))}).call(this,t(179),"/index.js")},127:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(21),c=t(177),_=t(178),l=(t(11),t(45),t(98),t(530),t(57),t(74),t(543),t(23),t(180)),f=t(532),h=function(){function n(e){var t,o;if(Object(c.a)(this,n),"string"==typeof e){var _=this.__parse_from_string(e),l=Object(r.a)(_,2);t=l[0],o=l[1]}else{var f=Object(r.a)(e,2);t=f[0],o=f[1]}var h=[t,o];this._x=h[0],this._y=h[1]}return Object(_.a)(n,[{key:"key",get:function(){return[this._x,this._y].toString()}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}},{key:"to_a",get:function(){return[this.x,this.y]}},{key:"to_h",get:function(){return{x:this.x,y:this.y}}},{key:"human_x",get:function(){return l.a.dimension-this._x}},{key:"kanji_human_x",get:function(){return n.TO_KANJI_REPLACE_TABLE_X[this.human_x]}},{key:"kanji_human_y",get:function(){return n.TO_KANJI_REPLACE_TABLE_Y[this.human_y]}},{key:"yomiage_x",get:function(){return f.a.fetch(this.human_x.toString()).yomiage}},{key:"yomiage_y",get:function(){return f.a.fetch(this.human_y.toString()).yomiage}},{key:"human_y",get:function(){return this._y+1}},{key:"flip_all",get:function(){return n.fetch([l.a.dimension-1-this._x,l.a.dimension-1-this._y])}},{key:"flop",get:function(){return n.fetch([l.a.dimension-1-this._x,this._y])}},{key:"flop_if",value:function(n){return n?this.flop:this}},{key:"sp_flip_if_white",value:function(n){return"white"===n.key?this.flip_all:this}},{key:"to_sfen",get:function(){return[l.a.dimension-this._x,n.TO_SFEN_REPLACE_TABLE_Y[this._y]].join("")}},{key:"css_place_key",get:function(){return["place",this.human_x,this.human_y].join("_")}},{key:"human_xy_ary",get:function(){return[this.human_x,this.human_y]}},{key:"kanji_human",get:function(){return[this.kanji_human_x,this.kanji_human_y].join("")}},{key:"digit_human",get:function(){return[this.human_x,this.human_y].join("")}},{key:"even_p",get:function(){return 0==(this.human_x+this.human_y&1)}},{key:"odd_p",get:function(){return!this.even_p}},{key:"tennozan_p",get:function(){return this.x===Math.trunc(l.a.dimension/2)&&this.y===Math.trunc(l.a.dimension/2)}},{key:"rotate_add",value:function(e,t){var o=this.__new_pos(this._x,e),r=this.__new_pos(this._y,t);return n.fetch([o,r])}},{key:"__new_pos",value:function(n,e){return Math.trunc((n+e+l.a.dimension)%l.a.dimension)}},{key:"__parse_from_string",value:function(s){var e=s.split("").map((function(e){var t;return Number(null!==(t=n.ANY_TO_NUMBER_REPLACE_TABLE[e])&&void 0!==t?t:e)})),t=Object(r.a)(e,2),o=t[0],c=t[1];return[l.a.dimension-o,c-1]}}],[{key:"fetch",value:function(e){return e instanceof this?e:Object.freeze(new n(e))}},{key:"xy_valid_p",value:function(n,e){return 0<=n&&n2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,r=this.hold_pieces_count(n,e)+t,o=this.hold_pieces[n.key];f.a.delete(o,e.key),r>=1&&f.a.set(o,e.key,r)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var r=this.hold_pieces_count(n,e);return t>r&&(t=r),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r=[];return t&&r.push("location_".concat(t.location.key)),r}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r="";return t&&(r=t.name),r}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return _.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return _()(e).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return _()(n).filter((function(n){var e=Object(r.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;_.a.forIn(this.hold_pieces[n.key],(function(t,r){var o=y.a.fetch(r);e.hold_pieces_add(n,o,-t),e.piece_box_add(o,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;_.a.forIn(this.piece_box,(function(t,r){var o=y.a.fetch(r);e.piece_box_add(o,-t),e.hold_pieces_add(n,o,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),w.a.fetch(n).piece_box.forEach((function(n){var t=Object(r.a)(n,2),o=t[0],c=t[1];e.piece_box_add(y.a.fetch(o),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;w.a.fetch("全部駒箱").piece_box.forEach((function(o){var c=Object(r.a)(o,2),l=c[0],_=c[1],f=y.a.fetch(l),h=_-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return O.a.values.forEach((function(t){_.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var r=t.piece;e.board.delete_at(t.place),"K"===r.key?e.piece_box_add(r):e.hold_pieces_add(O.a.fetch("white"),r)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=O.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,r=null,o=null;return"bottom_left"===n&&(e=0,t=1,r=h.a.dimension-1,o=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,r=h.a.dimension-1,o=-1),[{piece:"K",promoted:!1,location:"black",place:[e,r]},{piece:"P",promoted:!0,location:"white",place:[e,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:O.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return U}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),w=t(549),O=t(550),x=t(551),j=t(552),P=t(553),R=t(554),N=t(555),E=t(556),B=t(557),S=t(558),L=t(559),M=t(560),A=t(561),$=t(562),z=t(563),K=t(564),D=t(565),G=t(566),I=t(567),T=t(568),F=t(569);function C(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var U=function(n){Object(l.a)(t,n);var e=C(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:O.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:N.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:L.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:M.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:z.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:T.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:F.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&(console.log(U.fetch("simple").key),console.log(U.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var o=t(20),c=t(177),l=t(178),_=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(_),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(l.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var r=!1,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,r=!1,o=n.once_vectors;return o&&(r=o.some((function(r){if(r)return t.once_reach_vec(n,e,r)}))),r}},{key:"once_reach_vec",value:function(n,e,t){var r=t[0],o=t[1]*n.location.value_sign,c=n.place.x+r,l=n.place.y+o;return c===e.x&&l===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!1,c=n.repeat_vectors;return c&&(o=c.some((function(o){if(o)return t.repeat_reach_vec(n,e,o,r)}))),o}},{key:"repeat_reach_vec",value:function(n,e,t){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.place.x,c=n.place.y,l=t[0],_=t[1]*n.location.value_sign,f=o+l,h=c+_,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==r.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(o+=c,c=0),l.promoted&&(o+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),o+=_}})),c>=1&&(o+=c),t.push(o)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===r&&console.log(m.dimension)}).call(this,t(179),"/index.js")},187:function(n,e,t){"use strict";t.d(e,"a",(function(){return m}));t(517),t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(11),t(22),t(520));function d(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function y(n){for(var i=1;i\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new w.a;return this.attributes.board.split("/").forEach((function(t,r){var o=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))o+=Number(t.piece);else{var c=new P.a({place:new j.a([o,r]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),o++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var r=x.a.fetch(t.piece_char),o=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);o+=e[c.key][r.key]||0,v.a.set(e[c.key],r.key,o)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var r=N.a.parse(t);if(!r)return!1;r.location=n.location_by_offset(i),e.push(r)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(O.a);void 0!==n&&n.argv[1]===r&&(B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B),B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return v}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var v=function(n){Object(l.a)(t,n);var e=y(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return L}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),w=t(180),O=t(522),x=t(127),j=t(71),P=t(314),R=t(524),N=t(521),E=t(538);function B(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),L=function(n){Object(_.a)(t,n);var e=B(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(l.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?j.a.fetch(this.preset_info.first_location_key):j.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,S);if(t)if(t.key){var r=t.value.trim();if(n.header[t.key]=r,t.key.match(/手の持駒/))if("なし"===r);else{var s=E.a.kanji_to_number_string(r);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,r){var o=O.a.lookup_by_name(e.piece_char),c=Number(e.count||1),l=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[l][o.key]||0,n.hold_pieces[l][o.key]=c}))}}else if(t.comment){var o,c,i=n.move_infos.length;null!==(c=(o=n.comment_lines_hash)[i])&&void 0!==c||(o[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=j.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=j.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var l={};l.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(l.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(l.place=x.a.fetch(t.to),e=l.place):(m()(t.same),m()(e),l.place=e),"成"===t.motion&&(l.promoted_trigger=!0),"打"===t.motion&&(l.drop_piece=O.a.lookup_by_name(t.piece)),n.move_infos.push(l)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new w.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,r){if("・"===e.piece);else{var o="v"===e.arrow?"white":"black",c=O.a.lookup_by_name(e.piece),l=!1;c||(c=O.a.lookup_by_promoted_name(e.piece),m()(c),l=!0);var _=new N.a({place:new x.a([r,t]),piece:c,promoted:l,location:j.a.fetch(o)});n.place_on(_)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===r){var M=new L;M.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",M.parse(),console.log(M.move_infos),console.log(M.comment_lines_hash),console.log(void 0===M.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(23),t(71);var r=t(571),o={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(r.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var r=t(23),o=t.n(r),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!o.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(72),t(73),t(11),t(22);var r=t(71),o={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return r.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=r.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var r=t(523),o=(t(11),t(22),t(71)),c=t(127);function l(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return _(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){l=!0,o=n},f:function(){try{c||null==t.return||t.return()}finally{if(l)throw o}}}}function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var w=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(w),this.move_info_create({type:"put",to:w}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&o){var O=!0;if(this.sp_piece_auto_promote){var x=r.piece.piece_vector.force_promote_length;null!=x&&r.top_spaces<=x&&(this.promotable_piece_moved(r,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=r,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:r,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(r),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new l.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=_.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var r=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&r&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(r.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,r){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(r,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),o=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=o.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=l(l({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(o),l=t(128),_=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(r.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return _.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var r=t(128),o=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return o.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=o.a.fetch(n),this.xcontainer=new r.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return o.a.values},init_preset_sfen:function(){if(this.sp_preset)return o.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(180),o=t(521),c=t(128),l={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(r.a.dimension)},api_random_puton:function(){var n=o.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20);function o(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(523),o=(t(11),t(51),t(23)),c=t.n(o),l={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o0&&r>0){var o=this[n.attr_w],c=this[n.attr_h],l=Math.abs(o-t),_=Math.abs(c-r),f=l>n.threshold||_>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=r),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(o,"x").concat(c," -> ").concat(t,"x").concat(r," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(51),t(11),t(517),t(177)),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),o=this.lp_el_create(["PieceTexture"].concat(Object(r.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(o),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,l=d.fetch(c);if(n.place){var _=this.place_to_cell_info(n.place),f=this.vector_scale(_.radius,this.devise_info.gap*l.sign*-1),h=this.vector_add(_.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(r.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},348:function(n,e,t){"use strict";const r=["red","green","blue","alpha"],o={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"};class c extends Error{constructor(){super("ColorTypeError: type must be hex(a), rgb(a) or hsl(a)")}}class l{constructor(...n){if(n.length>0)return l.parse(...n);this.$channels=new Uint8Array(r.length),r.forEach(((n,e)=>{Object.defineProperty(this,n,{get:()=>this.$channels[e],set:n=>{Number.isNaN(n/1)||(this.$channels[e]=Math.min(255,Math.max(0,n)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((n=>{const e=n.replace(/^./,(n=>n.toUpperCase()));Object.defineProperty(this,n,{get:()=>this[`get${e}`](),set:n=>{Number.isNaN(n/1)||this[`set${e}`](n)},enumerable:!0,configurable:!0})}))}getHue(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;let l=0;if(0===c)return l;for(l=n===o?(e-t)/c%6:e===o?(t-n)/c+2:(n-e)/c+4,l*=60;l!==-1/0&&l<0;)l+=360;return Math.round(l%360)}setHue(n){const e=l.fromHSL(n,this.saturation,this.lightness,this.alpha/255);for(let i=0;in/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;return 0!==c?Math.round(c/(1-Math.abs(2*this.lightness-1))*100)/100:0}setSaturation(n){const e=l.fromHSL(this.hue,n,this.lightness,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}getLightness(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)];return Math.round((o+r)/2*100)/100}setLightness(n){const e=l.fromHSL(this.hue,this.lightness,n,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}clone(){const n=new l;return r.forEach(((e,i)=>n.$channels[i]=this.$channels[i])),n}toString(n="hex"){switch(String(n).toLowerCase()){case"hex":return"#"+r.slice(0,3).map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"hexa":return"#"+r.map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${Math.round(this.alpha/2.55)/100})`;case"hsl":return`hsl(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%)`;case"hsla":return`hsla(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%, ${Math.round(this.alpha/2.55)/100})`;default:throw new c}}get[Symbol.toString](){return this.toString("hex")}static parse(...n){if("object"==typeof n[0])return l.parseObject(n[0]);if(n.every((n=>!Number.isNaN(n/1)))){const e=new l;if(n.length>3)e.red=n[0],e.green=n[1],e.blue=n[2],n[3]&&(e.alpha=n[3]);else if(1===n.length){const e=Number(n[0]);return l.parseIndex(e,e>2**24?3:4)}}else if("string"==typeof n[0]){let e=null;if("string"==typeof o[n[0].toLowerCase()])return l.parseHex(o[n[0].toLowerCase()]);if(null!==(e=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return l.parseHex(e[2]);if(null!==(e=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){const n=[e[1],e[2],e[3],void 0!==e[5]?e[5]:1];return l.fromRGB(...n.map((n=>Number(n))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}static parseObject(object){const n=new l;return null===object||"object"!=typeof object?n:l.isColor(object)?object.clone():(r.forEach((e=>{Number.isNaN(object[e])||(n[e]=object[e])})),n)}static parseHex(n){if("string"!=typeof n)throw new Error("Hex expression must be a string");if(3!==(n=n.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==n.length||(n=n.split("").map((n=>n.repeat(2))).join("")),6!==n.length&&8!==n.length)throw new Error("Incorrect Hex expression length");const e=n.split(/(..)/).filter((n=>n)).map((n=>Number.parseInt(n,16)));return"number"==typeof e[3]&&(e[3]/=255),l.fromRGB(...e)}static parseIndex(n,e=3){const t=new l;for(let i=0;i<4;i++)t[r[i]]=n>>8*(e-i)&&255;return t}static fromRGB(n,e,t,o=1){if([n,e,t,o].some((n=>Number.isNaN(n/1))))throw new Error("Invalid arguments");o*=255;const c=new l;return[n,e,t,o].forEach(((n,e)=>{c[r[e]]=n})),c}static fromHSL(n,e,t,r=1){if([n,e,t,r].some((n=>Number.isNaN(n))))throw new Error("Invalid arguments");for(;n<0&&n!==-1/0;)n+=360;n%=360,e=Math.max(0,Math.min(1,e)),t=Math.max(0,Math.min(1,t)),r=Math.max(0,Math.min(1,r));const o=(1-Math.abs(2*t-1))*e,c=o*(1-Math.abs(n/60%2-1)),_=t-o/2,[f,g,b]=n<60?[o,c,0]:n<120?[c,o,0]:n<180?[0,o,c]:n<240?[0,c,o]:n<300?[c,0,o]:[o,0,c];return l.fromRGB(255*(f+_),255*(g+_),255*(b+_),r)}static isColor(n){return n instanceof l}}e.a=l},351:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(517);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(11),t(31),t(22),t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){var n,e;return[(n={key:"default"},Object(r.a)(n,"key","初期値"),Object(r.a)(n,"func",(function(n){n.SeVariableInfo.values.forEach((function(e){n.$data[e.key]=e.default})),n.data_init()})),n),(e={key:"paper"},Object(r.a)(e,"key","紙面風"),Object(r.a)(e,"func",(function(n){n.se_ws_color="rgb(255,255,255)",n.sp_piece_variant="paper",n.sp_board_radius=0,n.sp_board_padding=0,n.sp_board_color="rgb(255,255,255)",n.sp_board_even_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_board_odd_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_grid_inner_stroke=1,n.sp_grid_outer_stroke=2,n.sp_board_edge_stroke=0,n.sp_stand_gravity="top",n.sp_stand_flip=!1,n.sp_name_direction="vertical",n.sp_balloon=!1,n.sp_location_mark_active_size=1,n.sp_location_mark_inactive_size=1,n.sp_player_info.black.name="先手",n.sp_player_info.white.name="後手",n.sp_coordinate=!0,n.sp_coordinate_variant_v="kanji",n.sp_board_horizontal_gap=.2,n.sp_coordinate_x_push=.05,n.sp_coordinate_y_push=.01,n.user_custom_css=""})),e)]}}]),t}(t(520).a)},352:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"基本"},{key:"背景"},{key:"盤テクスチャ"},{key:"盤のセル"},{key:"盤"},{key:"盤グリッド"},{key:"駒"},{key:"駒台"},{key:"対局者名"},{key:"駒数"},{key:"駒箱"},{key:"成り不成り選択"},{key:"駒を操作中の移動元スタイル"},{key:"座標"},{key:"Transform"},{key:"コントローラー&スライダー"},{key:"その他"},{key:"棋譜"},{key:"カスタムCSS"},{key:"コンポーネント引数確認"},{key:"CSS変数確認"}]}}]),t}(t(520).a)},353:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(43),t(44);var r=t(20),o=(t(11),t(31),t(22),t(531));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(w(w({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var r=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:r,place:n,promoted:r.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===r){var x=new O({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return k}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(_.a)(t,n);var e=m(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(l.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===r&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return h}));var o=t(177),c=t(178),l=(t(11),t(22),t(23)),_=t.n(l),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(o.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return _.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var r=t(20),o=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(r)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=l.a.exec(n,l()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return y}));var o=t(177),c=t(178),l=(t(98),t(57),t(11),t(22),t(23)),_=t.n(l),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(o.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],r=f.a.values.map((function(n){var r=t[n.key]||0,o="";if(0===r)return null;r>=2&&(o+=r);var c=n.key;return o+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return _.a.compact(r).join("")})).join("");return _.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===r){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(20),o=t(523),c=t(177),l=t(178),_=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(_);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),r=Math.pow(10,t),q=Math.trunc(n/r),o=Math.trunc(n%r);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=o}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(o.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(r.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),c=t(177),l=t(178);t(98),t(12);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(l.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;it?t:n},e=n,t=function(n){n._clipped=!1,n._unclipped=n.slice(0);for(var i=0;i<=3;i++)i<3?((n[i]<0||n[i]>255)&&(n._clipped=!0),n[i]=e(n[i],0,255)):3===i&&(n[i]=e(n[i],0,1));return n},r={},o=0,c=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(n):"object"==f(n[0])&&e?e.split("").filter((function(e){return void 0!==n[0][e]})).map((function(e){return n[0][e]})):n[0]},d=_,y=function(n){if(n.length<2)return null;var e=n.length-1;return"string"==d(n[e])?n[e].toLowerCase():null},v=Math.PI,m={clip_rgb:t,limit:n,type:_,unpack:h,last:y,PI:v,TWOPI:2*v,PITHIRD:v/3,DEG2RAD:v/180,RAD2DEG:180/v},k={format:{},autodetect:[]},w=m.last,O=m.clip_rgb,x=m.type,j=k,P=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=this;if("object"===x(n[0])&&n[0].constructor&&n[0].constructor===this.constructor)return n[0];var r=w(n),o=!1;if(!r){o=!0,j.sorted||(j.autodetect=j.autodetect.sort((function(a,b){return b.p-a.p})),j.sorted=!0);for(var i=0,c=j.autodetect;i4?n[4]:1;return 1===c?[0,0,0,l]:[t>=1?0:255*(1-t)*(1-c),r>=1?0:255*(1-r)*(1-c),o>=1?0:255*(1-o)*(1-c),l]},z=$,K=E,D=R,G=k,I=m.unpack,T=m.type,F=M;D.prototype.cmyk=function(){return F(this._rgb)},K.cmyk=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(D,[null].concat(n,["cmyk"])))},G.format.cmyk=z,G.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=I(n,"cmyk"),"array"===T(n)&&4===n.length)return"cmyk"}});var C=m.unpack,U=m.last,J=function(a){return Math.round(100*a)/100},Y=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=C(n,"hsla"),r=U(n)||"lsa";return t[0]=J(t[0]||0),t[1]=J(100*t[1])+"%",t[2]=J(100*t[2])+"%","hsla"===r||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,r="hsla"):t.length=3,r+"("+t.join(",")+")"},V=Y,H=m.unpack,X=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=H(n,"rgba"))[0],g=n[1],b=n[2];t/=255,g/=255,b/=255;var s,r,o=Math.min(t,g,b),c=Math.max(t,g,b),l=(c+o)/2;return c===o?(s=0,r=Number.NaN):s=l<.5?(c-o)/(c+o):(c-o)/(2-c-o),t==c?r=(g-b)/(c-o):g==c?r=2+(b-t)/(c-o):b==c&&(r=4+(t-g)/(c-o)),(r*=60)<0&&(r+=360),n.length>3&&void 0!==n[3]?[r,s,l,n[3]]:[r,s,l]},W=X,Z=m.unpack,Q=m.last,nn=V,en=W,tn=Math.round,rn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Z(n,"rgba"),r=Q(n)||"rgb";return"hsl"==r.substr(0,3)?nn(en(t),r):(t[0]=tn(t[0]),t[1]=tn(t[1]),t[2]=tn(t[2]),("rgba"===r||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,r="rgba"),r+"("+t.slice(0,"rgb"===r?3:4).join(",")+")")},on=rn,an=m.unpack,cn=Math.round,sn=function(){for(var n,e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,g,b,o=(e=an(e,"hsl"))[0],s=e[1],c=e[2];if(0===s)r=g=b=255*c;else{var l=[0,0,0],_=[0,0,0],f=c<.5?c*(1+s):c+s-c*s,h=2*c-f,d=o/360;l[0]=d+1/3,l[1]=d,l[2]=d-1/3;for(var i=0;i<3;i++)l[i]<0&&(l[i]+=1),l[i]>1&&(l[i]-=1),6*l[i]<1?_[i]=h+6*(f-h)*l[i]:2*l[i]<1?_[i]=f:3*l[i]<2?_[i]=h+(f-h)*(2/3-l[i])*6:_[i]=h;r=(n=[cn(255*_[0]),cn(255*_[1]),cn(255*_[2])])[0],g=n[1],b=n[2]}return e.length>3?[r,g,b,e[3]]:[r,g,b,1]},un=sn,ln=un,_n=k,fn=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,hn=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,pn=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,dn=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,yn=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,vn=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,bn=Math.round,mn=function(n){var e;if(n=n.toLowerCase().trim(),_n.format.named)try{return _n.format.named(n)}catch(n){}if(e=n.match(fn)){for(var t=e.slice(1,4),i=0;i<3;i++)t[i]=+t[i];return t[3]=1,t}if(e=n.match(hn)){for(var r=e.slice(1,5),o=0;o<4;o++)r[o]=+r[o];return r}if(e=n.match(pn)){for(var c=e.slice(1,4),l=0;l<3;l++)c[l]=bn(2.55*c[l]);return c[3]=1,c}if(e=n.match(dn)){for(var _=e.slice(1,5),f=0;f<3;f++)_[f]=bn(2.55*_[f]);return _[3]=+_[3],_}if(e=n.match(yn)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=ln(h);return d[3]=1,d}if(e=n.match(vn)){var y=e.slice(1,4);y[1]*=.01,y[2]*=.01;var v=ln(y);return v[3]=+e[4],v}};mn.test=function(s){return fn.test(s)||hn.test(s)||pn.test(s)||dn.test(s)||yn.test(s)||vn.test(s)};var gn=mn,kn=E,wn=R,On=k,xn=m.type,jn=on,Pn=gn;wn.prototype.css=function(n){return jn(this._rgb,n)},kn.css=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(wn,[null].concat(n,["css"])))},On.format.css=Pn,On.autodetect.push({p:5,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===xn(n)&&Pn.test(n))return"css"}});var Rn=R,Nn=E,En=k,Bn=m.unpack;En.format.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Bn(n,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},Nn.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Rn,[null].concat(n,["gl"])))},Rn.prototype.gl=function(){var n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};var Sn=m.unpack,Ln=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=Sn(n,"rgb"),o=r[0],g=r[1],b=r[2],c=Math.min(o,g,b),l=Math.max(o,g,b),_=l-c,f=100*_/255,h=c/(255-_)*100;return 0===_?t=Number.NaN:(o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,f,h]},Mn=Ln,An=m.unpack,$n=Math.floor,zn=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=An(l,"hcg"))[0],d=l[1],y=l[2];y*=255;var v=255*d;if(0===d)f=g=b=y;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$n(h/=60),m=h-i,p=y*(1-d),q=p+v*(1-m),k=p+v*m,w=p+v;switch(i){case 0:f=(n=[w,k,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,w,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,w,k])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,w])[0],g=r[1],b=r[2];break;case 4:f=(o=[k,p,w])[0],g=o[1],b=o[2];break;case 5:f=(c=[w,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Kn=zn,Dn=m.unpack,Gn=m.type,In=E,Tn=R,Fn=k,Cn=Mn;Tn.prototype.hcg=function(){return Cn(this._rgb)},In.hcg=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Tn,[null].concat(n,["hcg"])))},Fn.format.hcg=Kn,Fn.autodetect.push({p:1,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Dn(n,"hcg"),"array"===Gn(n)&&3===n.length)return"hcg"}});var qn=m.unpack,Un=m.last,Jn=Math.round,Yn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=qn(n,"rgba"),r=t[0],g=t[1],b=t[2],a=t[3],o=Un(n)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var c="000000"+((r=Jn(r))<<16|(g=Jn(g))<<8|(b=Jn(b))).toString(16);c=c.substr(c.length-6);var l="0"+Jn(255*a).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},Vn=Yn,Hn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Xn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Wn=function(n){if(n.match(Hn)){4!==n.length&&7!==n.length||(n=n.substr(1)),3===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var u=parseInt(n,16);return[u>>16,u>>8&255,255&u,1]}if(n.match(Xn)){5!==n.length&&9!==n.length||(n=n.substr(1)),4===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);var e=parseInt(n,16);return[e>>24&255,e>>16&255,e>>8&255,Math.round((255&e)/255*100)/100]}throw new Error("unknown hex color: "+n)},Zn=E,Qn=R,ne=m.type,ee=k,te=Vn;Qn.prototype.hex=function(n){return te(this._rgb,n)},Zn.hex=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Qn,[null].concat(n,["hex"])))},ee.format.hex=Wn,ee.autodetect.push({p:4,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===ne(n)&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});var re=m.unpack,oe=m.TWOPI,ie=Math.min,ae=Math.sqrt,ce=Math.acos,se=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=re(n,"rgb"),o=r[0],g=r[1],b=r[2],c=ie(o/=255,g/=255,b/=255),i=(o+g+b)/3,s=i>0?1-c/i:0;return 0===s?t=NaN:(t=(o-g+(o-b))/2,t/=ae((o-g)*(o-g)+(o-b)*(g-b)),t=ce(t),b>g&&(t=oe-t),t/=oe),[360*t,s,i]},ue=se,le=m.unpack,_e=m.limit,fe=m.TWOPI,he=m.PITHIRD,pe=Math.cos,de=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,g,b,r=(n=le(n,"hsi"))[0],s=n[1],i=n[2];return isNaN(r)&&(r=0),isNaN(s)&&(s=0),r>360&&(r-=360),r<0&&(r+=360),(r/=360)<1/3?g=1-((b=(1-s)/3)+(t=(1+s*pe(fe*r)/pe(he-fe*r))/3)):r<2/3?b=1-((t=(1-s)/3)+(g=(1+s*pe(fe*(r-=1/3))/pe(he-fe*r))/3)):t=1-((g=(1-s)/3)+(b=(1+s*pe(fe*(r-=2/3))/pe(he-fe*r))/3)),[255*(t=_e(i*t*3)),255*(g=_e(i*g*3)),255*(b=_e(i*b*3)),n.length>3?n[3]:1]},ye=de,ve=m.unpack,be=m.type,me=E,ge=R,ke=k,we=ue;ge.prototype.hsi=function(){return we(this._rgb)},me.hsi=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(ge,[null].concat(n,["hsi"])))},ke.format.hsi=ye,ke.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ve(n,"hsi"),"array"===be(n)&&3===n.length)return"hsi"}});var Oe=m.unpack,xe=m.type,je=E,Pe=R,Re=k,Ne=W;Pe.prototype.hsl=function(){return Ne(this._rgb)},je.hsl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pe,[null].concat(n,["hsl"])))},Re.format.hsl=un,Re.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Oe(n,"hsl"),"array"===xe(n)&&3===n.length)return"hsl"}});var Ee=m.unpack,Be=Math.min,Se=Math.max,Le=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,s,r,o=(n=Ee(n,"rgb"))[0],g=n[1],b=n[2],c=Be(o,g,b),l=Se(o,g,b),_=l-c;return r=l/255,0===l?(t=Number.NaN,s=0):(s=_/l,o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,s,r]},Me=Le,Ae=m.unpack,$e=Math.floor,ze=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=Ae(l,"hsv"))[0],s=l[1],d=l[2];if(d*=255,0===s)f=g=b=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$e(h/=60),y=h-i,p=d*(1-s),q=d*(1-s*y),v=d*(1-s*(1-y));switch(i){case 0:f=(n=[d,v,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,d,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,d,v])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,d])[0],g=r[1],b=r[2];break;case 4:f=(o=[v,p,d])[0],g=o[1],b=o[2];break;case 5:f=(c=[d,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Ke=ze,De=m.unpack,Ge=m.type,Ie=E,Te=R,Fe=k,Ce=Me;Te.prototype.hsv=function(){return Ce(this._rgb)},Ie.hsv=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Te,[null].concat(n,["hsv"])))},Fe.format.hsv=Ke,Fe.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=De(n,"hsv"),"array"===Ge(n)&&3===n.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ue=qe,Je=m.unpack,Ye=Math.pow,Ve=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Je(n,"rgb"),r=t[0],g=t[1],b=t[2],o=We(r,g,b),c=o[0],l=o[1],_=116*l-16;return[_<0?0:_,500*(c-l),200*(l-o[2])]},He=function(n){return(n/=255)<=.04045?n/12.92:Ye((n+.055)/1.055,2.4)},Xe=function(n){return n>Ue.t3?Ye(n,1/3):n/Ue.t2+Ue.t0},We=function(n,g,b){return n=He(n),g=He(g),b=He(b),[Xe((.4124564*n+.3575761*g+.1804375*b)/Ue.Xn),Xe((.2126729*n+.7151522*g+.072175*b)/Ue.Yn),Xe((.0193339*n+.119192*g+.9503041*b)/Ue.Zn)]},Ze=Ve,Qe=qe,nt=m.unpack,et=Math.pow,tt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r,o,c=(n=nt(n,"lab"))[0],a=n[1],b=n[2];return r=(c+16)/116,t=isNaN(a)?r:r+a/500,o=isNaN(b)?r:r-b/200,r=Qe.Yn*it(r),t=Qe.Xn*it(t),o=Qe.Zn*it(o),[ot(3.2404542*t-1.5371385*r-.4985314*o),ot(-.969266*t+1.8760108*r+.041556*o),ot(.0556434*t-.2040259*r+1.0572252*o),n.length>3?n[3]:1]},ot=function(n){return 255*(n<=.00304?12.92*n:1.055*et(n,1/2.4)-.055)},it=function(n){return n>Qe.t1?n*n*n:Qe.t2*(n-Qe.t0)},at=tt,ct=m.unpack,st=m.type,ut=E,lt=R,_t=k,ft=Ze;lt.prototype.lab=function(){return ft(this._rgb)},ut.lab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(lt,[null].concat(n,["lab"])))},_t.format.lab=at,_t.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ct(n,"lab"),"array"===st(n)&&3===n.length)return"lab"}});var ht=m.unpack,pt=m.RAD2DEG,yt=Math.sqrt,vt=Math.atan2,bt=Math.round,mt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=ht(n,"lab"),r=t[0],a=t[1],b=t[2],o=yt(a*a+b*b),c=(vt(b,a)*pt+360)%360;return 0===bt(1e4*o)&&(c=Number.NaN),[r,o,c]},gt=mt,kt=m.unpack,wt=Ze,Ot=gt,xt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=kt(n,"rgb"),r=t[0],g=t[1],b=t[2],o=wt(r,g,b),c=o[0],a=o[1],l=o[2];return Ot(c,a,l)},jt=xt,Pt=m.unpack,Rt=m.DEG2RAD,Nt=Math.sin,Et=Math.cos,Bt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Pt(n,"lch"),r=t[0],o=t[1],c=t[2];return isNaN(c)&&(c=0),[r,Et(c*=Rt)*o,Nt(c)*o]},St=Bt,Lt=m.unpack,Mt=St,At=at,$t=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Lt(n,"lch"))[0],r=n[1],o=n[2],c=Mt(t,r,o),l=c[0],a=c[1],_=c[2],f=At(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},zt=$t,Kt=m.unpack,Dt=zt,Gt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Kt(n,"hcl").reverse();return Dt.apply(void 0,t)},It=Gt,Tt=m.unpack,Ft=m.type,Ct=E,qt=R,Ut=k,Jt=jt;qt.prototype.lch=function(){return Jt(this._rgb)},qt.prototype.hcl=function(){return Jt(this._rgb).reverse()},Ct.lch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["lch"])))},Ct.hcl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["hcl"])))},Ut.format.lch=zt,Ut.format.hcl=It,["lch","hcl"].forEach((function(n){return Ut.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Tt(e,n),"array"===Ft(e)&&3===e.length)return n}})}));var Yt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Vt=R,Ht=k,Xt=m.type,Wt=Yt,Zt=Wn,Qt=Vn;Vt.prototype.name=function(){for(var n=Qt(this._rgb,"rgb"),i=0,e=Object.keys(Wt);i0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xt(n)&&Wt[n.toLowerCase()])return"named"}});var nr=m.unpack,er=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=nr(n,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},rr=er,or=m.type,ir=function(n){if("number"==or(n)&&n>=0&&n<=16777215)return[n>>16,n>>8&255,255&n,1];throw new Error("unknown num color: "+n)},ar=E,cr=R,sr=k,ur=m.type,lr=rr;cr.prototype.num=function(){return lr(this._rgb)},ar.num=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(n,["num"])))},sr.format.num=ir,sr.autodetect.push({p:5,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(1===n.length&&"number"===ur(n[0])&&n[0]>=0&&n[0]<=16777215)return"num"}});var _r=E,fr=R,pr=k,dr=m.unpack,yr=m.type,vr=Math.round;fr.prototype.rgb=function(n){return void 0===n&&(n=!0),!1===n?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vr)},fr.prototype.rgba=function(n){return void 0===n&&(n=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===n?e:vr(e):e}))},_r.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(fr,[null].concat(n,["rgb"])))},pr.format.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=dr(n,"rgba");return void 0===t[3]&&(t[3]=1),t},pr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=dr(n,"rgba"),"array"===yr(n)&&(3===n.length||4===n.length&&"number"==yr(n[3])&&n[3]>=0&&n[3]<=1))return"rgb"}});var mr=Math.log,gr=function(n){var e,g,b,t=n/100;return t<66?(e=255,g=t<6?0:-155.25485562709179-.44596950469579133*(g=t-2)+104.49216199393888*mr(g),b=t<20?0:.8274096064007395*(b=t-10)-254.76935184120902+115.67994401066147*mr(b)):(e=351.97690566805693+.114206453784165*(e=t-55)-40.25366309332127*mr(e),g=325.4494125711974+.07943456536662342*(g=t-50)-28.0852963507957*mr(g),b=255),[e,g,b,1]},kr=gr,wr=m.unpack,Or=Math.round,xr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];for(var t,r=wr(n,"rgb"),o=r[0],b=r[2],c=1e3,l=4e4,_=.4;l-c>_;){var f=kr(t=.5*(l+c));f[2]/f[0]>=b/o?l=t:c=t}return Or(t)},jr=E,Pr=R,Rr=k,Nr=xr;Pr.prototype.temp=Pr.prototype.kelvin=Pr.prototype.temperature=function(){return Nr(this._rgb)},jr.temp=jr.kelvin=jr.temperature=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pr,[null].concat(n,["temp"])))},Rr.format.temp=Rr.format.kelvin=Rr.format.temperature=gr;var Er=m.unpack,Br=Math.cbrt,Sr=Math.pow,Lr=Math.sign,Mr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Er(n,"rgb"),r=t[0],g=t[1],b=t[2],o=[$r(r/255),$r(g/255),$r(b/255)],c=o[0],l=o[1],_=o[2],f=Br(.4122214708*c+.5363325363*l+.0514459929*_),h=Br(.2119034982*c+.6806995451*l+.1073969566*_),s=Br(.0883024619*c+.2817188376*l+.6299787005*_);return[.2104542553*f+.793617785*h-.0040720468*s,1.9779984951*f-2.428592205*h+.4505937099*s,.0259040371*f+.7827717662*h-.808675766*s]},Ar=Mr;function $r(n){var e=Math.abs(n);return e<.04045?n/12.92:(Lr(n)||1)*Sr((e+.055)/1.055,2.4)}var zr=m.unpack,Kr=Math.pow,Dr=Math.sign,Gr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=zr(n,"lab"))[0],a=n[1],b=n[2],r=Kr(t+.3963377774*a+.2158037573*b,3),o=Kr(t-.1055613458*a-.0638541728*b,3),s=Kr(t-.0894841775*a-1.291485548*b,3);return[255*Tr(4.0767416621*r-3.3077115913*o+.2309699292*s),255*Tr(-1.2684380046*r+2.6097574011*o-.3413193965*s),255*Tr(-.0041960863*r-.7034186147*o+1.707614701*s),n.length>3?n[3]:1]},Ir=Gr;function Tr(n){var e=Math.abs(n);return e>.0031308?(Dr(n)||1)*(1.055*Kr(e,1/2.4)-.055):12.92*n}var Fr=m.unpack,Cr=m.type,qr=E,Ur=R,Jr=k,Yr=Ar;Ur.prototype.oklab=function(){return Yr(this._rgb)},qr.oklab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Ur,[null].concat(n,["oklab"])))},Jr.format.oklab=Ir,Jr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Fr(n,"oklab"),"array"===Cr(n)&&3===n.length)return"oklab"}});var Vr=m.unpack,Hr=Ar,Xr=gt,Wr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Vr(n,"rgb"),r=t[0],g=t[1],b=t[2],o=Hr(r,g,b),c=o[0],a=o[1],l=o[2];return Xr(c,a,l)},Zr=Wr,Qr=m.unpack,no=St,eo=Ir,to=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Qr(n,"lch"))[0],r=n[1],o=n[2],c=no(t,r,o),l=c[0],a=c[1],_=c[2],f=eo(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},ro=to,oo=m.unpack,io=m.type,ao=E,co=R,input=k,so=Zr;co.prototype.oklch=function(){return so(this._rgb)},ao.oklch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(co,[null].concat(n,["oklch"])))},input.format.oklch=ro,input.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=oo(n,"oklch"),"array"===io(n)&&3===n.length)return"oklch"}});var uo=R,lo=m.type;uo.prototype.alpha=function(a,n){return void 0===n&&(n=!1),void 0!==a&&"number"===lo(a)?n?(this._rgb[3]=a,this):new uo([this._rgb[0],this._rgb[1],this._rgb[2],a],"rgb"):this._rgb[3]},R.prototype.clipped=function(){return this._rgb._clipped||!1};var _o=R,fo=qe;_o.prototype.darken=function(n){void 0===n&&(n=1);var e=this,t=e.lab();return t[0]-=fo.Kn*n,new _o(t,"lab").alpha(e.alpha(),!0)},_o.prototype.brighten=function(n){return void 0===n&&(n=1),this.darken(-n)},_o.prototype.darker=_o.prototype.darken,_o.prototype.brighter=_o.prototype.brighten,R.prototype.get=function(n){var e=n.split("."),t=e[0],r=e[1],o=this[t]();if(r){var i=t.indexOf(r)-("ok"===t.substr(0,2)?2:0);if(i>-1)return o[i];throw new Error("unknown channel "+r+" in mode "+t)}return o};var ho=R,po=m.type,yo=Math.pow,vo=1e-7,bo=20;ho.prototype.luminance=function(n){if(void 0!==n&&"number"===po(n)){if(0===n)return new ho([0,0,0,this._rgb[3]],"rgb");if(1===n)return new ho([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",r=bo,o=function(e,c){var l=e.interpolate(c,.5,t),_=l.luminance();return Math.abs(n-_)n?o(e,l):o(l,c)},c=(e>n?o(new ho([0,0,0]),this):o(this,new ho([255,255,255]))).rgb();return new ho(c.concat([this._rgb[3]]))}return mo.apply(void 0,this._rgb.slice(0,3))};var mo=function(n,g,b){return.2126*(n=go(n))+.7152*(g=go(g))+.0722*(b=go(b))},go=function(n){return(n/=255)<=.03928?n/12.92:yo((n+.055)/1.055,2.4)},ko={},wo=R,Oo=m.type,xo=ko,jo=function(n,e,t){void 0===t&&(t=.5);for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var c=r[0]||"lrgb";if(xo[c]||r.length||(c=Object.keys(xo)[0]),!xo[c])throw new Error("interpolation mode "+c+" is not defined");return"object"!==Oo(n)&&(n=new wo(n)),"object"!==Oo(e)&&(e=new wo(e)),xo[c](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))},Po=R,Ro=jo;Po.prototype.mix=Po.prototype.interpolate=function(n,e){void 0===e&&(e=.5);for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];return Ro.apply(void 0,[this,n,e].concat(t))};var No=R;No.prototype.premultiply=function(n){void 0===n&&(n=!1);var e=this._rgb,a=e[3];return n?(this._rgb=[e[0]*a,e[1]*a,e[2]*a,a],this):new No([e[0]*a,e[1]*a,e[2]*a,a],"rgb")};var Eo=R,Bo=qe;Eo.prototype.saturate=function(n){void 0===n&&(n=1);var e=this,t=e.lch();return t[1]+=Bo.Kn*n,t[1]<0&&(t[1]=0),new Eo(t,"lch").alpha(e.alpha(),!0)},Eo.prototype.desaturate=function(n){return void 0===n&&(n=1),this.saturate(-n)};var So=R,Lo=m.type;So.prototype.set=function(n,e,t){void 0===t&&(t=!1);var r=n.split("."),o=r[0],c=r[1],l=this[o]();if(c){var i=o.indexOf(c)-("ok"===o.substr(0,2)?2:0);if(i>-1){if("string"==Lo(e))switch(e.charAt(0)){case"+":case"-":l[i]+=+e;break;case"*":l[i]*=+e.substr(1);break;case"/":l[i]/=+e.substr(1);break;default:l[i]=+e}else{if("number"!==Lo(e))throw new Error("unsupported value for Color.set");l[i]=e}var _=new So(l,o);return t?(this._rgb=_._rgb,this):_}throw new Error("unknown channel "+c+" in mode "+o)}return l};var Mo=R,Ao=function(n,e,t){var r=n._rgb,o=e._rgb;return new Mo(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"rgb")};ko.rgb=Ao;var $o=R,zo=Math.sqrt,Ko=Math.pow,Do=function(n,e,t){var r=n._rgb,o=r[0],c=r[1],l=r[2],_=e._rgb,f=_[0],h=_[1],d=_[2];return new $o(zo(Ko(o,2)*(1-t)+Ko(f,2)*t),zo(Ko(c,2)*(1-t)+Ko(h,2)*t),zo(Ko(l,2)*(1-t)+Ko(d,2)*t),"rgb")};ko.lrgb=Do;var Go=R,Io=function(n,e,t){var r=n.lab(),o=e.lab();return new Go(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"lab")};ko.lab=Io;var To=R,Fo=function(n,e,t,r){var o,c,l,_,f,h,d,y,v,m,k,w,O;return"hsl"===r?(l=n.hsl(),_=e.hsl()):"hsv"===r?(l=n.hsv(),_=e.hsv()):"hcg"===r?(l=n.hcg(),_=e.hcg()):"hsi"===r?(l=n.hsi(),_=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",l=n.hcl(),_=e.hcl()):"oklch"===r&&(l=n.oklch().reverse(),_=e.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(f=(o=l)[0],d=o[1],v=o[2],h=(c=_)[0],y=c[1],m=c[2]),isNaN(f)||isNaN(h)?isNaN(f)?isNaN(h)?w=Number.NaN:(w=h,1!=v&&0!=v||"hsv"==r||(k=y)):(w=f,1!=m&&0!=m||"hsv"==r||(k=d)):w=f+t*(h>f&&h-f>180?h-(f+360):h180?h+360-f:h-f),void 0===k&&(k=d+t*(y-d)),O=v+t*(m-v),new To("oklch"===r?[O,k,w]:[w,k,O],r)},Co=Fo,qo=function(n,e,t){return Co(n,e,t,"lch")};ko.lch=qo,ko.hcl=qo;var Uo=R,Jo=function(n,e,t){var r=n.num(),o=e.num();return new Uo(r+t*(o-r),"num")};ko.num=Jo;var Yo=Fo,Vo=function(n,e,t){return Yo(n,e,t,"hcg")};ko.hcg=Vo;var Ho=Fo,Xo=function(n,e,t){return Ho(n,e,t,"hsi")};ko.hsi=Xo;var Wo=Fo,Zo=function(n,e,t){return Wo(n,e,t,"hsl")};ko.hsl=Zo;var Qo=Fo,ni=function(n,e,t){return Qo(n,e,t,"hsv")};ko.hsv=ni;var ei=R,ti=function(n,e,t){var r=n.oklab(),o=e.oklab();return new ei(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"oklab")};ko.oklab=ti;var ri=Fo,oi=function(n,e,t){return ri(n,e,t,"oklch")};ko.oklch=oi;var ii=R,ai=m.clip_rgb,ci=Math.pow,si=Math.sqrt,ui=Math.PI,_i=Math.cos,fi=Math.sin,hi=Math.atan2,pi=function(n,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var r=n.length;t||(t=Array.from(new Array(r)).map((function(){return 1})));var o=r/t.reduce((function(a,b){return a+b}));if(t.forEach((function(n,i){t[i]*=o})),n=n.map((function(n){return new ii(n)})),"lrgb"===e)return di(n,t);for(var c=n.shift(),l=c.get(e),_=[],f=0,h=0,i=0;i=360;)m-=360;l[v]=m}else l[v]=l[v]/_[v];return y/=r,new ii(l,e).alpha(y>.99999?1:y,!0)},di=function(n,e){for(var t=n.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new ii(ai(r))},yi=E,vi=m.type,bi=Math.pow,mi=function(n){var e="rgb",t=yi("#ccc"),r=0,o=[0,1],c=[],l=[0,0],_=!1,f=[],h=!1,d=0,y=1,v=!1,m={},k=!0,w=1,O=function(n){if((n=n||["#fff","#000"])&&"string"===vi(n)&&yi.brewer&&yi.brewer[n.toLowerCase()]&&(n=yi.brewer[n.toLowerCase()]),"array"===vi(n)){1===n.length&&(n=[n[0],n[0]]),n=n.slice(0);for(var e=0;e=_[i];)i++;return i-1}return 0},j=function(n){return n},P=function(n){return n},R=function(n,r){var col,o;if(null==r&&(r=!1),isNaN(n)||null===n)return t;o=r?n:_&&_.length>2?x(n)/(_.length-2):y!==d?(n-d)/(y-d):1,o=P(o),r||(o=j(o)),1!==w&&(o=bi(o,w)),o=l[0]+o*(1-l[0]-l[1]),o=Math.min(1,Math.max(0,o));var h=Math.floor(1e4*o);if(k&&m[h])col=m[h];else{if("array"===vi(f))for(var i=0;i=p&&i===c.length-1){col=f[i];break}if(o>p&&o2){var _=n.map((function(e,i){return i/(n.length-1)})),h=n.map((function(n){return(n-d)/(y-d)}));h.every((function(n,i){return _[i]===n}))||(P=function(n){if(n<=0||n>=1)return n;for(var i=0;n>=h[i+1];)i++;var e=(n-h[i])/(h[i+1]-h[i]);return _[i]+e*(_[i+1]-_[i])})}}return o=[d,y],E},E.mode=function(n){return arguments.length?(e=n,N(),E):e},E.range=function(n,e){return O(n),E},E.out=function(n){return h=n,E},E.spread=function(n){return arguments.length?(r=n,E):r},E.correctLightness=function(n){return null==n&&(n=!0),v=n,N(),j=v?function(n){for(var e=R(0,!0).lab()[0],t=R(1,!0).lab()[0],r=e>t,o=R(n,!0).lab()[0],c=e+(t-e)*n,l=o-c,_=0,f=1,h=20;Math.abs(l)>.01&&h-- >0;)r&&(l*=-1),l<0?(_=n,n+=.5*(f-n)):(f=n,n+=.5*(_-n)),o=R(n,!0).lab()[0],l=o-c;return n}:function(n){return n},E},E.padding=function(p){return null!=p?("number"===vi(p)&&(p=[p,p]),l=p,E):l},E.colors=function(e,t){arguments.length<2&&(t="hex");var r=[];if(0===arguments.length)r=f.slice(0);else if(1===e)r=[E(.5)];else if(e>1){var c=o[0],dd=o[1]-c;r=gi(0,e,!1).map((function(i){return E(c+i/(e-1)*dd)}))}else{n=[];var l=[];if(_&&_.length>2)for(var i=1,h=_.length,d=1<=h;d?ih;d?i++:i--)l.push(.5*(_[i-1]+_[i]));else l=o;r=l.map((function(n){return E(n)}))}return yi[t]&&(r=r.map((function(n){return n[t]()}))),r},E.cache=function(n){return null!=n?(k=n,E):k},E.gamma=function(g){return null!=g?(w=g,E):w},E.nodata=function(n){return null!=n?(t=yi(n),E):t},E};function gi(n,e,t){for(var r=[],o=nc;o?i++:i--)r.push(i);return r}var ki=R,wi=mi,Oi=function(n){for(var e=[1,1],i=1;i=5))throw new RangeError("No point in running bezier with only one color.");var h,d,y;h=n.map((function(n){return n.lab()})),y=n.length-1,d=Oi(y),o=function(n){var u=1-n,e=[0,1,2].map((function(i){return h.reduce((function(e,t,r){return e+d[r]*Math.pow(u,y-r)*Math.pow(n,r)*t[i]}),0)}));return new ki(e,"lab")}}return o},ji=function(n){var e=xi(n);return e.scale=function(){return wi(e)},e},Pi=E,Ri=function(n,e,t){if(!Ri[t])throw new Error("unknown blend mode "+t);return Ri[t](n,e)},Ni=function(n){return function(e,t){var r=Pi(t).rgb(),o=Pi(e).rgb();return Pi.rgb(n(r,o))}},Ei=function(n){return function(e,t){var r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r}},Bi=function(a){return a},Si=function(a,b){return a*b/255},Li=function(a,b){return a>b?b:a},Mi=function(a,b){return a>b?a:b},Ai=function(a,b){return 255*(1-(1-a/255)*(1-b/255))},$i=function(a,b){return b<128?2*a*b/255:255*(1-2*(1-a/255)*(1-b/255))},zi=function(a,b){return 255*(1-(1-b/255)/(a/255))},Ki=function(a,b){return 255===a||(a=b/255*255/(1-a/255))>255?255:a};Ri.normal=Ni(Ei(Bi)),Ri.multiply=Ni(Ei(Si)),Ri.screen=Ni(Ei(Ai)),Ri.overlay=Ni(Ei($i)),Ri.darken=Ni(Ei(Li)),Ri.lighten=Ni(Ei(Mi)),Ri.dodge=Ni(Ei(Ki)),Ri.burn=Ni(Ei(zi));for(var Di=Ri,Gi=m.type,Ii=m.clip_rgb,Ti=m.TWOPI,Fi=Math.pow,Ci=Math.sin,qi=Math.cos,Ui=E,Ji=function(n,e,t,r,o){void 0===n&&(n=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===r&&(r=1),void 0===o&&(o=[0,1]);var dl,c=0;"array"===Gi(o)?dl=o[1]-o[0]:(dl=0,o=[o,o]);var l=function(l){var a=Ti*((n+120)/360+e*l),_=Fi(o[0]+dl*l,r),f=(0!==c?t[0]+l*c:t)*_*(1-_)/2,h=qi(a),d=Ci(a);return Ui(Ii([255*(_+f*(-.14861*h+1.78277*d)),255*(_+f*(-.29227*h-.90649*d)),255*(_+f*(1.97294*h)),1]))};return l.start=function(s){return null==s?n:(n=s,l)},l.rotations=function(n){return null==n?e:(e=n,l)},l.gamma=function(g){return null==g?r:(r=g,l)},l.hue=function(n){return null==n?t:("array"===Gi(t=n)?0==(c=t[1]-t[0])&&(t=t[1]):c=0,l)},l.lightness=function(n){return null==n?o:("array"===Gi(n)?(o=n,dl=n[1]-n[0]):(o=[n,n],dl=0),l)},l.scale=function(){return Ui.scale(l)},l.hue(t),l},Yi=R,Vi="0123456789abcdef",Hi=Math.floor,Xi=Math.random,Wi=function(){for(var code="#",i=0;i<6;i++)code+=Vi.charAt(Hi(16*Xi()));return new Yi(code,"hex")},Zi=_,Qi=Math.log,na=Math.pow,ea=Math.floor,ta=Math.abs,ra=function(data,n){void 0===n&&(n=null);var e={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Zi(data)&&(data=Object.values(data)),data.forEach((function(t){n&&"object"===Zi(t)&&(t=t[n]),null==t||isNaN(t)||(e.values.push(t),e.sum+=t,te.max&&(e.max=t),e.count+=1)})),e.domain=[e.min,e.max],e.limits=function(n,t){return oa(e,n,t)},e},oa=function(data,n,e){void 0===n&&(n="equal"),void 0===e&&(e=7),"array"==Zi(data)&&(data=ra(data));var t=data.min,r=data.max,o=data.values.sort((function(a,b){return a-b}));if(1===e)return[t,r];var c=[];if("c"===n.substr(0,1)&&(c.push(t),c.push(r)),"e"===n.substr(0,1)){c.push(t);for(var i=1;i 0");var l=Math.LOG10E*Qi(t),_=Math.LOG10E*Qi(r);c.push(t);for(var f=1;f200&&(O=!1)}for(var G={},I=0;Ie?(n+.05)/(e+.05):(e+.05)/(n+.05)},sa=R,ua=Math.sqrt,la=Math.pow,_a=Math.min,fa=Math.max,ha=Math.atan2,pa=Math.abs,da=Math.cos,ya=Math.sin,va=Math.exp,ba=Math.PI,ma=function(a,b,n,e,t){void 0===n&&(n=1),void 0===e&&(e=1),void 0===t&&(t=1);var r=function(n){return 360*n/(2*ba)},o=function(n){return 2*ba*n/360};a=new sa(a),b=new sa(b);var c=Array.from(a.lab()),l=c[0],_=c[1],f=c[2],h=Array.from(b.lab()),d=h[0],y=h[1],v=h[2],m=(l+d)/2,k=(ua(la(_,2)+la(f,2))+ua(la(y,2)+la(v,2)))/2,w=.5*(1-ua(la(k,7)/(la(k,7)+la(25,7)))),O=_*(1+w),x=y*(1+w),j=ua(la(O,2)+la(f,2)),P=ua(la(x,2)+la(v,2)),R=(j+P)/2,N=r(ha(f,O)),E=r(ha(v,x)),B=N>=0?N:N+360,S=E>=0?E:E+360,L=pa(B-S)>180?(B+S+360)/2:(B+S)/2,M=1-.17*da(o(L-30))+.24*da(o(2*L))+.32*da(o(3*L+6))-.2*da(o(4*L-63)),A=S-B;A=pa(A)<=180?A:S<=B?A+360:A-360,A=2*ua(j*P)*ya(o(A)/2);var $=d-l,z=P-j,K=1+.015*la(m-50,2)/ua(20+la(m-50,2)),D=1+.045*R,G=1+.015*R*M,I=30*va(-la((L-275)/25,2)),T=-2*ua(la(R,7)/(la(R,7)+la(25,7)))*ya(2*o(I)),F=ua(la($/(n*K),2)+la(z/(e*D),2)+la(A/(t*G),2)+T*(z/(e*D))*(A/(t*G)));return fa(0,_a(100,F))},ga=R,ka=function(a,b,n){void 0===n&&(n="lab"),a=new ga(a),b=new ga(b);var e=a.get(n),t=b.get(n),r=0;for(var i in e){var o=(e[i]||0)-(t[i]||0);r+=o*o}return Math.sqrt(r)},wa=R,Oa=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];try{return new(Function.prototype.bind.apply(wa,[null].concat(n))),!0}catch(n){return!1}},xa=E,ja=mi,Pa={cool:function(){return ja([xa.hsl(180,1,.9),xa.hsl(250,.7,.4)])},hot:function(){return ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ra={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},i=0,Na=Object.keys(Ra);i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,r=this.hold_pieces_count(n,e)+t,o=this.hold_pieces[n.key];f.a.delete(o,e.key),r>=1&&f.a.set(o,e.key,r)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var r=this.hold_pieces_count(n,e);return t>r&&(t=r),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r=[];return t&&r.push("location_".concat(t.location.key)),r}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r="";return t&&(r=t.name),r}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return _.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return _()(e).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return _()(n).filter((function(n){var e=Object(r.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;_.a.forIn(this.hold_pieces[n.key],(function(t,r){var o=y.a.fetch(r);e.hold_pieces_add(n,o,-t),e.piece_box_add(o,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;_.a.forIn(this.piece_box,(function(t,r){var o=y.a.fetch(r);e.piece_box_add(o,-t),e.hold_pieces_add(n,o,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),w.a.fetch(n).piece_box.forEach((function(n){var t=Object(r.a)(n,2),o=t[0],c=t[1];e.piece_box_add(y.a.fetch(o),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;w.a.fetch("全部駒箱").piece_box.forEach((function(o){var c=Object(r.a)(o,2),l=c[0],_=c[1],f=y.a.fetch(l),h=_-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return O.a.values.forEach((function(t){_.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var r=t.piece;e.board.delete_at(t.place),"K"===r.key?e.piece_box_add(r):e.hold_pieces_add(O.a.fetch("white"),r)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=O.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,r=null,o=null;return"bottom_left"===n&&(e=0,t=1,r=h.a.dimension-1,o=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,r=h.a.dimension-1,o=-1),[{piece:"K",promoted:!1,location:"black",place:[e,r]},{piece:"P",promoted:!0,location:"white",place:[e,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:O.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return U}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),w=t(549),O=t(550),x=t(551),j=t(552),P=t(553),R=t(554),N=t(555),E=t(556),B=t(557),S=t(558),L=t(559),M=t(560),A=t(561),$=t(562),z=t(563),K=t(564),D=t(565),G=t(566),I=t(567),T=t(568),F=t(569);function C(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var U=function(n){Object(l.a)(t,n);var e=C(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:O.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:N.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:L.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:M.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:z.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:T.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:F.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&(console.log(U.fetch("simple").key),console.log(U.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var o=t(20),c=t(177),l=t(178),_=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(_),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(l.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var r=!1,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,r=!1,o=n.once_vectors;return o&&(r=o.some((function(r){if(r)return t.once_reach_vec(n,e,r)}))),r}},{key:"once_reach_vec",value:function(n,e,t){var r=t[0],o=t[1]*n.location.value_sign,c=n.place.x+r,l=n.place.y+o;return c===e.x&&l===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!1,c=n.repeat_vectors;return c&&(o=c.some((function(o){if(o)return t.repeat_reach_vec(n,e,o,r)}))),o}},{key:"repeat_reach_vec",value:function(n,e,t){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.place.x,c=n.place.y,l=t[0],_=t[1]*n.location.value_sign,f=o+l,h=c+_,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==r.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(o+=c,c=0),l.promoted&&(o+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),o+=_}})),c>=1&&(o+=c),t.push(o)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===r&&console.log(m.dimension)}).call(this,t(179),"/index.js")},187:function(n,e,t){"use strict";t.d(e,"a",(function(){return m}));t(517),t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(11),t(22),t(520));function d(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function y(n){for(var i=1;i\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new w.a;return this.attributes.board.split("/").forEach((function(t,r){var o=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))o+=Number(t.piece);else{var c=new P.a({place:new j.a([o,r]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),o++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var r=x.a.fetch(t.piece_char),o=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);o+=e[c.key][r.key]||0,v.a.set(e[c.key],r.key,o)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var r=N.a.parse(t);if(!r)return!1;r.location=n.location_by_offset(i),e.push(r)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(O.a);void 0!==n&&n.argv[1]===r&&(B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B),B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return v}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var v=function(n){Object(l.a)(t,n);var e=y(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return L}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),w=t(180),O=t(522),x=t(127),j=t(71),P=t(314),R=t(524),N=t(521),E=t(538);function B(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),L=function(n){Object(_.a)(t,n);var e=B(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(l.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?j.a.fetch(this.preset_info.first_location_key):j.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,S);if(t)if(t.key){var r=t.value.trim();if(n.header[t.key]=r,t.key.match(/手の持駒/))if("なし"===r);else{var s=E.a.kanji_to_number_string(r);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,r){var o=O.a.lookup_by_name(e.piece_char),c=Number(e.count||1),l=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[l][o.key]||0,n.hold_pieces[l][o.key]=c}))}}else if(t.comment){var o,c,i=n.move_infos.length;null!==(c=(o=n.comment_lines_hash)[i])&&void 0!==c||(o[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=j.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=j.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var l={};l.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(l.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(l.place=x.a.fetch(t.to),e=l.place):(m()(t.same),m()(e),l.place=e),"成"===t.motion&&(l.promoted_trigger=!0),"打"===t.motion&&(l.drop_piece=O.a.lookup_by_name(t.piece)),n.move_infos.push(l)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new w.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,r){if("・"===e.piece);else{var o="v"===e.arrow?"white":"black",c=O.a.lookup_by_name(e.piece),l=!1;c||(c=O.a.lookup_by_promoted_name(e.piece),m()(c),l=!0);var _=new N.a({place:new x.a([r,t]),piece:c,promoted:l,location:j.a.fetch(o)});n.place_on(_)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===r){var M=new L;M.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",M.parse(),console.log(M.move_infos),console.log(M.comment_lines_hash),console.log(void 0===M.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(23),t(71);var r=t(571),o={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(r.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var r=t(23),o=t.n(r),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!o.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(72),t(73),t(11),t(22);var r=t(71),o={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return r.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=r.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var r=t(523),o=(t(11),t(22),t(71)),c=t(127);function l(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return _(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){l=!0,o=n},f:function(){try{c||null==t.return||t.return()}finally{if(l)throw o}}}}function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var w=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(w),this.move_info_create({type:"put",to:w}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&o){var O=!0;if(this.sp_piece_auto_promote){var x=r.piece.piece_vector.force_promote_length;null!=x&&r.top_spaces<=x&&(this.promotable_piece_moved(r,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=r,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:r,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(r),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new l.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=_.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var r=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&r&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(r.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,r){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(r,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),o=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=o.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=l(l({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(o),l=t(128),_=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(r.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return _.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var r=t(128),o=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return o.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=o.a.fetch(n),this.xcontainer=new r.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return o.a.values},init_preset_sfen:function(){if(this.sp_preset)return o.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(180),o=t(521),c=t(128),l={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(r.a.dimension)},api_random_puton:function(){var n=o.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20);function o(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(523),o=(t(11),t(51),t(23)),c=t.n(o),l={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o0&&r>0){var o=this[n.attr_w],c=this[n.attr_h],l=Math.abs(o-t),_=Math.abs(c-r),f=l>n.threshold||_>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=r),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(o,"x").concat(c," -> ").concat(t,"x").concat(r," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(51),t(11),t(517),t(177)),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),o=this.lp_el_create(["PieceTexture"].concat(Object(r.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(o),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,l=d.fetch(c);if(n.place){var _=this.place_to_cell_info(n.place),f=this.vector_scale(_.radius,this.devise_info.gap*l.sign*-1),h=this.vector_add(_.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(r.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},348:function(n,e,t){"use strict";const r=["red","green","blue","alpha"],o={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"};class c extends Error{constructor(){super("ColorTypeError: type must be hex(a), rgb(a) or hsl(a)")}}class l{constructor(...n){if(n.length>0)return l.parse(...n);this.$channels=new Uint8Array(r.length),r.forEach(((n,e)=>{Object.defineProperty(this,n,{get:()=>this.$channels[e],set:n=>{Number.isNaN(n/1)||(this.$channels[e]=Math.min(255,Math.max(0,n)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((n=>{const e=n.replace(/^./,(n=>n.toUpperCase()));Object.defineProperty(this,n,{get:()=>this[`get${e}`](),set:n=>{Number.isNaN(n/1)||this[`set${e}`](n)},enumerable:!0,configurable:!0})}))}getHue(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;let l=0;if(0===c)return l;for(l=n===o?(e-t)/c%6:e===o?(t-n)/c+2:(n-e)/c+4,l*=60;l!==-1/0&&l<0;)l+=360;return Math.round(l%360)}setHue(n){const e=l.fromHSL(n,this.saturation,this.lightness,this.alpha/255);for(let i=0;in/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;return 0!==c?Math.round(c/(1-Math.abs(2*this.lightness-1))*100)/100:0}setSaturation(n){const e=l.fromHSL(this.hue,n,this.lightness,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}getLightness(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)];return Math.round((o+r)/2*100)/100}setLightness(n){const e=l.fromHSL(this.hue,this.lightness,n,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}clone(){const n=new l;return r.forEach(((e,i)=>n.$channels[i]=this.$channels[i])),n}toString(n="hex"){switch(String(n).toLowerCase()){case"hex":return"#"+r.slice(0,3).map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"hexa":return"#"+r.map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${Math.round(this.alpha/2.55)/100})`;case"hsl":return`hsl(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%)`;case"hsla":return`hsla(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%, ${Math.round(this.alpha/2.55)/100})`;default:throw new c}}get[Symbol.toString](){return this.toString("hex")}static parse(...n){if("object"==typeof n[0])return l.parseObject(n[0]);if(n.every((n=>!Number.isNaN(n/1)))){const e=new l;if(n.length>3)e.red=n[0],e.green=n[1],e.blue=n[2],n[3]&&(e.alpha=n[3]);else if(1===n.length){const e=Number(n[0]);return l.parseIndex(e,e>2**24?3:4)}}else if("string"==typeof n[0]){let e=null;if("string"==typeof o[n[0].toLowerCase()])return l.parseHex(o[n[0].toLowerCase()]);if(null!==(e=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return l.parseHex(e[2]);if(null!==(e=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){const n=[e[1],e[2],e[3],void 0!==e[5]?e[5]:1];return l.fromRGB(...n.map((n=>Number(n))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}static parseObject(object){const n=new l;return null===object||"object"!=typeof object?n:l.isColor(object)?object.clone():(r.forEach((e=>{Number.isNaN(object[e])||(n[e]=object[e])})),n)}static parseHex(n){if("string"!=typeof n)throw new Error("Hex expression must be a string");if(3!==(n=n.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==n.length||(n=n.split("").map((n=>n.repeat(2))).join("")),6!==n.length&&8!==n.length)throw new Error("Incorrect Hex expression length");const e=n.split(/(..)/).filter((n=>n)).map((n=>Number.parseInt(n,16)));return"number"==typeof e[3]&&(e[3]/=255),l.fromRGB(...e)}static parseIndex(n,e=3){const t=new l;for(let i=0;i<4;i++)t[r[i]]=n>>8*(e-i)&&255;return t}static fromRGB(n,e,t,o=1){if([n,e,t,o].some((n=>Number.isNaN(n/1))))throw new Error("Invalid arguments");o*=255;const c=new l;return[n,e,t,o].forEach(((n,e)=>{c[r[e]]=n})),c}static fromHSL(n,e,t,r=1){if([n,e,t,r].some((n=>Number.isNaN(n))))throw new Error("Invalid arguments");for(;n<0&&n!==-1/0;)n+=360;n%=360,e=Math.max(0,Math.min(1,e)),t=Math.max(0,Math.min(1,t)),r=Math.max(0,Math.min(1,r));const o=(1-Math.abs(2*t-1))*e,c=o*(1-Math.abs(n/60%2-1)),_=t-o/2,[f,g,b]=n<60?[o,c,0]:n<120?[c,o,0]:n<180?[0,o,c]:n<240?[0,c,o]:n<300?[c,0,o]:[o,0,c];return l.fromRGB(255*(f+_),255*(g+_),255*(b+_),r)}static isColor(n){return n instanceof l}}e.a=l},351:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(517);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(11),t(31),t(22),t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){var n,e;return[(n={key:"default"},Object(r.a)(n,"key","初期値"),Object(r.a)(n,"func",(function(n){n.SeVariableInfo.values.forEach((function(e){n.$data[e.key]=e.default})),n.data_init()})),n),(e={key:"paper"},Object(r.a)(e,"key","紙面風"),Object(r.a)(e,"func",(function(n){n.se_ws_color="rgb(255,255,255)",n.sp_piece_variant="paper",n.sp_board_radius=0,n.sp_board_padding=0,n.sp_board_color="rgb(255,255,255)",n.sp_board_even_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_board_odd_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_grid_inner_stroke=1,n.sp_grid_outer_stroke=2,n.sp_board_edge_stroke=0,n.sp_stand_gravity="top",n.sp_stand_flip=!1,n.sp_name_direction="vertical",n.sp_balloon=!1,n.sp_location_mark_active_size=1,n.sp_location_mark_inactive_size=1,n.sp_player_info.black.name="先手",n.sp_player_info.white.name="後手",n.sp_coordinate=!0,n.sp_coordinate_variant_v="kanji",n.sp_board_horizontal_gap=.2,n.sp_coordinate_x_push=.05,n.sp_coordinate_y_push=.01,n.user_custom_css=""})),e)]}}]),t}(t(520).a)},352:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"基本"},{key:"背景"},{key:"盤テクスチャ"},{key:"盤のセル"},{key:"盤"},{key:"盤グリッド"},{key:"駒"},{key:"駒台"},{key:"対局者名"},{key:"駒数"},{key:"駒箱"},{key:"成り不成り選択"},{key:"駒を操作中の移動元スタイル"},{key:"座標"},{key:"Transform"},{key:"コントローラー&スライダー"},{key:"その他"},{key:"棋譜"},{key:"カスタムCSS"},{key:"コンポーネント引数確認"},{key:"CSS変数確認"}]}}]),t}(t(520).a)},353:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(43),t(44);var r=t(20),o=(t(11),t(31),t(22),t(531));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(w(w({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var r=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:r,place:n,promoted:r.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===r){var x=new O({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return k}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(_.a)(t,n);var e=m(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(l.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===r&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return h}));var o=t(177),c=t(178),l=(t(11),t(22),t(23)),_=t.n(l),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(o.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return _.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var r=t(20),o=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(r)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=l.a.exec(n,l()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return y}));var o=t(177),c=t(178),l=(t(98),t(57),t(11),t(22),t(23)),_=t.n(l),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(o.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],r=f.a.values.map((function(n){var r=t[n.key]||0,o="";if(0===r)return null;r>=2&&(o+=r);var c=n.key;return o+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return _.a.compact(r).join("")})).join("");return _.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===r){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(20),o=t(523),c=t(177),l=t(178),_=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(_);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),r=Math.pow(10,t),q=Math.trunc(n/r),o=Math.trunc(n%r);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=o}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(o.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(r.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),c=t(177),l=t(178);t(98),t(12);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(l.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;it?t:n},e=n,t=function(n){n._clipped=!1,n._unclipped=n.slice(0);for(var i=0;i<=3;i++)i<3?((n[i]<0||n[i]>255)&&(n._clipped=!0),n[i]=e(n[i],0,255)):3===i&&(n[i]=e(n[i],0,1));return n},r={},o=0,c=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(n):"object"==f(n[0])&&e?e.split("").filter((function(e){return void 0!==n[0][e]})).map((function(e){return n[0][e]})):n[0]},d=_,y=function(n){if(n.length<2)return null;var e=n.length-1;return"string"==d(n[e])?n[e].toLowerCase():null},v=Math.PI,m={clip_rgb:t,limit:n,type:_,unpack:h,last:y,PI:v,TWOPI:2*v,PITHIRD:v/3,DEG2RAD:v/180,RAD2DEG:180/v},k={format:{},autodetect:[]},w=m.last,O=m.clip_rgb,x=m.type,j=k,P=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=this;if("object"===x(n[0])&&n[0].constructor&&n[0].constructor===this.constructor)return n[0];var r=w(n),o=!1;if(!r){o=!0,j.sorted||(j.autodetect=j.autodetect.sort((function(a,b){return b.p-a.p})),j.sorted=!0);for(var i=0,c=j.autodetect;i4?n[4]:1;return 1===c?[0,0,0,l]:[t>=1?0:255*(1-t)*(1-c),r>=1?0:255*(1-r)*(1-c),o>=1?0:255*(1-o)*(1-c),l]},z=$,K=E,D=R,G=k,I=m.unpack,T=m.type,F=M;D.prototype.cmyk=function(){return F(this._rgb)},K.cmyk=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(D,[null].concat(n,["cmyk"])))},G.format.cmyk=z,G.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=I(n,"cmyk"),"array"===T(n)&&4===n.length)return"cmyk"}});var C=m.unpack,U=m.last,J=function(a){return Math.round(100*a)/100},Y=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=C(n,"hsla"),r=U(n)||"lsa";return t[0]=J(t[0]||0),t[1]=J(100*t[1])+"%",t[2]=J(100*t[2])+"%","hsla"===r||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,r="hsla"):t.length=3,r+"("+t.join(",")+")"},V=Y,H=m.unpack,X=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=H(n,"rgba"))[0],g=n[1],b=n[2];t/=255,g/=255,b/=255;var s,r,o=Math.min(t,g,b),c=Math.max(t,g,b),l=(c+o)/2;return c===o?(s=0,r=Number.NaN):s=l<.5?(c-o)/(c+o):(c-o)/(2-c-o),t==c?r=(g-b)/(c-o):g==c?r=2+(b-t)/(c-o):b==c&&(r=4+(t-g)/(c-o)),(r*=60)<0&&(r+=360),n.length>3&&void 0!==n[3]?[r,s,l,n[3]]:[r,s,l]},W=X,Z=m.unpack,Q=m.last,nn=V,en=W,tn=Math.round,rn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Z(n,"rgba"),r=Q(n)||"rgb";return"hsl"==r.substr(0,3)?nn(en(t),r):(t[0]=tn(t[0]),t[1]=tn(t[1]),t[2]=tn(t[2]),("rgba"===r||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,r="rgba"),r+"("+t.slice(0,"rgb"===r?3:4).join(",")+")")},on=rn,an=m.unpack,cn=Math.round,sn=function(){for(var n,e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,g,b,o=(e=an(e,"hsl"))[0],s=e[1],c=e[2];if(0===s)r=g=b=255*c;else{var l=[0,0,0],_=[0,0,0],f=c<.5?c*(1+s):c+s-c*s,h=2*c-f,d=o/360;l[0]=d+1/3,l[1]=d,l[2]=d-1/3;for(var i=0;i<3;i++)l[i]<0&&(l[i]+=1),l[i]>1&&(l[i]-=1),6*l[i]<1?_[i]=h+6*(f-h)*l[i]:2*l[i]<1?_[i]=f:3*l[i]<2?_[i]=h+(f-h)*(2/3-l[i])*6:_[i]=h;r=(n=[cn(255*_[0]),cn(255*_[1]),cn(255*_[2])])[0],g=n[1],b=n[2]}return e.length>3?[r,g,b,e[3]]:[r,g,b,1]},un=sn,ln=un,_n=k,fn=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,hn=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,pn=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,dn=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,yn=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,vn=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,bn=Math.round,mn=function(n){var e;if(n=n.toLowerCase().trim(),_n.format.named)try{return _n.format.named(n)}catch(n){}if(e=n.match(fn)){for(var t=e.slice(1,4),i=0;i<3;i++)t[i]=+t[i];return t[3]=1,t}if(e=n.match(hn)){for(var r=e.slice(1,5),o=0;o<4;o++)r[o]=+r[o];return r}if(e=n.match(pn)){for(var c=e.slice(1,4),l=0;l<3;l++)c[l]=bn(2.55*c[l]);return c[3]=1,c}if(e=n.match(dn)){for(var _=e.slice(1,5),f=0;f<3;f++)_[f]=bn(2.55*_[f]);return _[3]=+_[3],_}if(e=n.match(yn)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=ln(h);return d[3]=1,d}if(e=n.match(vn)){var y=e.slice(1,4);y[1]*=.01,y[2]*=.01;var v=ln(y);return v[3]=+e[4],v}};mn.test=function(s){return fn.test(s)||hn.test(s)||pn.test(s)||dn.test(s)||yn.test(s)||vn.test(s)};var gn=mn,kn=E,wn=R,On=k,xn=m.type,jn=on,Pn=gn;wn.prototype.css=function(n){return jn(this._rgb,n)},kn.css=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(wn,[null].concat(n,["css"])))},On.format.css=Pn,On.autodetect.push({p:5,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===xn(n)&&Pn.test(n))return"css"}});var Rn=R,Nn=E,En=k,Bn=m.unpack;En.format.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Bn(n,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},Nn.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Rn,[null].concat(n,["gl"])))},Rn.prototype.gl=function(){var n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};var Sn=m.unpack,Ln=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=Sn(n,"rgb"),o=r[0],g=r[1],b=r[2],c=Math.min(o,g,b),l=Math.max(o,g,b),_=l-c,f=100*_/255,h=c/(255-_)*100;return 0===_?t=Number.NaN:(o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,f,h]},Mn=Ln,An=m.unpack,$n=Math.floor,zn=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=An(l,"hcg"))[0],d=l[1],y=l[2];y*=255;var v=255*d;if(0===d)f=g=b=y;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$n(h/=60),m=h-i,p=y*(1-d),q=p+v*(1-m),k=p+v*m,w=p+v;switch(i){case 0:f=(n=[w,k,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,w,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,w,k])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,w])[0],g=r[1],b=r[2];break;case 4:f=(o=[k,p,w])[0],g=o[1],b=o[2];break;case 5:f=(c=[w,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Kn=zn,Dn=m.unpack,Gn=m.type,In=E,Tn=R,Fn=k,Cn=Mn;Tn.prototype.hcg=function(){return Cn(this._rgb)},In.hcg=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Tn,[null].concat(n,["hcg"])))},Fn.format.hcg=Kn,Fn.autodetect.push({p:1,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Dn(n,"hcg"),"array"===Gn(n)&&3===n.length)return"hcg"}});var qn=m.unpack,Un=m.last,Jn=Math.round,Yn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=qn(n,"rgba"),r=t[0],g=t[1],b=t[2],a=t[3],o=Un(n)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var c="000000"+((r=Jn(r))<<16|(g=Jn(g))<<8|(b=Jn(b))).toString(16);c=c.substr(c.length-6);var l="0"+Jn(255*a).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},Vn=Yn,Hn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Xn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Wn=function(n){if(n.match(Hn)){4!==n.length&&7!==n.length||(n=n.substr(1)),3===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var u=parseInt(n,16);return[u>>16,u>>8&255,255&u,1]}if(n.match(Xn)){5!==n.length&&9!==n.length||(n=n.substr(1)),4===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);var e=parseInt(n,16);return[e>>24&255,e>>16&255,e>>8&255,Math.round((255&e)/255*100)/100]}throw new Error("unknown hex color: "+n)},Zn=E,Qn=R,ne=m.type,ee=k,te=Vn;Qn.prototype.hex=function(n){return te(this._rgb,n)},Zn.hex=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Qn,[null].concat(n,["hex"])))},ee.format.hex=Wn,ee.autodetect.push({p:4,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===ne(n)&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});var re=m.unpack,oe=m.TWOPI,ie=Math.min,ae=Math.sqrt,ce=Math.acos,se=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=re(n,"rgb"),o=r[0],g=r[1],b=r[2],c=ie(o/=255,g/=255,b/=255),i=(o+g+b)/3,s=i>0?1-c/i:0;return 0===s?t=NaN:(t=(o-g+(o-b))/2,t/=ae((o-g)*(o-g)+(o-b)*(g-b)),t=ce(t),b>g&&(t=oe-t),t/=oe),[360*t,s,i]},ue=se,le=m.unpack,_e=m.limit,fe=m.TWOPI,he=m.PITHIRD,pe=Math.cos,de=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,g,b,r=(n=le(n,"hsi"))[0],s=n[1],i=n[2];return isNaN(r)&&(r=0),isNaN(s)&&(s=0),r>360&&(r-=360),r<0&&(r+=360),(r/=360)<1/3?g=1-((b=(1-s)/3)+(t=(1+s*pe(fe*r)/pe(he-fe*r))/3)):r<2/3?b=1-((t=(1-s)/3)+(g=(1+s*pe(fe*(r-=1/3))/pe(he-fe*r))/3)):t=1-((g=(1-s)/3)+(b=(1+s*pe(fe*(r-=2/3))/pe(he-fe*r))/3)),[255*(t=_e(i*t*3)),255*(g=_e(i*g*3)),255*(b=_e(i*b*3)),n.length>3?n[3]:1]},ye=de,ve=m.unpack,be=m.type,me=E,ge=R,ke=k,we=ue;ge.prototype.hsi=function(){return we(this._rgb)},me.hsi=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(ge,[null].concat(n,["hsi"])))},ke.format.hsi=ye,ke.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ve(n,"hsi"),"array"===be(n)&&3===n.length)return"hsi"}});var Oe=m.unpack,xe=m.type,je=E,Pe=R,Re=k,Ne=W;Pe.prototype.hsl=function(){return Ne(this._rgb)},je.hsl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pe,[null].concat(n,["hsl"])))},Re.format.hsl=un,Re.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Oe(n,"hsl"),"array"===xe(n)&&3===n.length)return"hsl"}});var Ee=m.unpack,Be=Math.min,Se=Math.max,Le=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,s,r,o=(n=Ee(n,"rgb"))[0],g=n[1],b=n[2],c=Be(o,g,b),l=Se(o,g,b),_=l-c;return r=l/255,0===l?(t=Number.NaN,s=0):(s=_/l,o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,s,r]},Me=Le,Ae=m.unpack,$e=Math.floor,ze=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=Ae(l,"hsv"))[0],s=l[1],d=l[2];if(d*=255,0===s)f=g=b=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$e(h/=60),y=h-i,p=d*(1-s),q=d*(1-s*y),v=d*(1-s*(1-y));switch(i){case 0:f=(n=[d,v,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,d,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,d,v])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,d])[0],g=r[1],b=r[2];break;case 4:f=(o=[v,p,d])[0],g=o[1],b=o[2];break;case 5:f=(c=[d,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Ke=ze,De=m.unpack,Ge=m.type,Ie=E,Te=R,Fe=k,Ce=Me;Te.prototype.hsv=function(){return Ce(this._rgb)},Ie.hsv=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Te,[null].concat(n,["hsv"])))},Fe.format.hsv=Ke,Fe.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=De(n,"hsv"),"array"===Ge(n)&&3===n.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ue=qe,Je=m.unpack,Ye=Math.pow,Ve=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Je(n,"rgb"),r=t[0],g=t[1],b=t[2],o=We(r,g,b),c=o[0],l=o[1],_=116*l-16;return[_<0?0:_,500*(c-l),200*(l-o[2])]},He=function(n){return(n/=255)<=.04045?n/12.92:Ye((n+.055)/1.055,2.4)},Xe=function(n){return n>Ue.t3?Ye(n,1/3):n/Ue.t2+Ue.t0},We=function(n,g,b){return n=He(n),g=He(g),b=He(b),[Xe((.4124564*n+.3575761*g+.1804375*b)/Ue.Xn),Xe((.2126729*n+.7151522*g+.072175*b)/Ue.Yn),Xe((.0193339*n+.119192*g+.9503041*b)/Ue.Zn)]},Ze=Ve,Qe=qe,nt=m.unpack,et=Math.pow,tt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r,o,c=(n=nt(n,"lab"))[0],a=n[1],b=n[2];return r=(c+16)/116,t=isNaN(a)?r:r+a/500,o=isNaN(b)?r:r-b/200,r=Qe.Yn*it(r),t=Qe.Xn*it(t),o=Qe.Zn*it(o),[ot(3.2404542*t-1.5371385*r-.4985314*o),ot(-.969266*t+1.8760108*r+.041556*o),ot(.0556434*t-.2040259*r+1.0572252*o),n.length>3?n[3]:1]},ot=function(n){return 255*(n<=.00304?12.92*n:1.055*et(n,1/2.4)-.055)},it=function(n){return n>Qe.t1?n*n*n:Qe.t2*(n-Qe.t0)},at=tt,ct=m.unpack,st=m.type,ut=E,lt=R,_t=k,ft=Ze;lt.prototype.lab=function(){return ft(this._rgb)},ut.lab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(lt,[null].concat(n,["lab"])))},_t.format.lab=at,_t.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ct(n,"lab"),"array"===st(n)&&3===n.length)return"lab"}});var ht=m.unpack,pt=m.RAD2DEG,yt=Math.sqrt,vt=Math.atan2,bt=Math.round,mt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=ht(n,"lab"),r=t[0],a=t[1],b=t[2],o=yt(a*a+b*b),c=(vt(b,a)*pt+360)%360;return 0===bt(1e4*o)&&(c=Number.NaN),[r,o,c]},gt=mt,kt=m.unpack,wt=Ze,Ot=gt,xt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=kt(n,"rgb"),r=t[0],g=t[1],b=t[2],o=wt(r,g,b),c=o[0],a=o[1],l=o[2];return Ot(c,a,l)},jt=xt,Pt=m.unpack,Rt=m.DEG2RAD,Nt=Math.sin,Et=Math.cos,Bt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Pt(n,"lch"),r=t[0],o=t[1],c=t[2];return isNaN(c)&&(c=0),[r,Et(c*=Rt)*o,Nt(c)*o]},St=Bt,Lt=m.unpack,Mt=St,At=at,$t=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Lt(n,"lch"))[0],r=n[1],o=n[2],c=Mt(t,r,o),l=c[0],a=c[1],_=c[2],f=At(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},zt=$t,Kt=m.unpack,Dt=zt,Gt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Kt(n,"hcl").reverse();return Dt.apply(void 0,t)},It=Gt,Tt=m.unpack,Ft=m.type,Ct=E,qt=R,Ut=k,Jt=jt;qt.prototype.lch=function(){return Jt(this._rgb)},qt.prototype.hcl=function(){return Jt(this._rgb).reverse()},Ct.lch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["lch"])))},Ct.hcl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["hcl"])))},Ut.format.lch=zt,Ut.format.hcl=It,["lch","hcl"].forEach((function(n){return Ut.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Tt(e,n),"array"===Ft(e)&&3===e.length)return n}})}));var Yt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Vt=R,Ht=k,Xt=m.type,Wt=Yt,Zt=Wn,Qt=Vn;Vt.prototype.name=function(){for(var n=Qt(this._rgb,"rgb"),i=0,e=Object.keys(Wt);i0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xt(n)&&Wt[n.toLowerCase()])return"named"}});var nr=m.unpack,er=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=nr(n,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},rr=er,or=m.type,ir=function(n){if("number"==or(n)&&n>=0&&n<=16777215)return[n>>16,n>>8&255,255&n,1];throw new Error("unknown num color: "+n)},ar=E,cr=R,sr=k,ur=m.type,lr=rr;cr.prototype.num=function(){return lr(this._rgb)},ar.num=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(n,["num"])))},sr.format.num=ir,sr.autodetect.push({p:5,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(1===n.length&&"number"===ur(n[0])&&n[0]>=0&&n[0]<=16777215)return"num"}});var _r=E,fr=R,pr=k,dr=m.unpack,yr=m.type,vr=Math.round;fr.prototype.rgb=function(n){return void 0===n&&(n=!0),!1===n?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vr)},fr.prototype.rgba=function(n){return void 0===n&&(n=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===n?e:vr(e):e}))},_r.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(fr,[null].concat(n,["rgb"])))},pr.format.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=dr(n,"rgba");return void 0===t[3]&&(t[3]=1),t},pr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=dr(n,"rgba"),"array"===yr(n)&&(3===n.length||4===n.length&&"number"==yr(n[3])&&n[3]>=0&&n[3]<=1))return"rgb"}});var mr=Math.log,gr=function(n){var e,g,b,t=n/100;return t<66?(e=255,g=t<6?0:-155.25485562709179-.44596950469579133*(g=t-2)+104.49216199393888*mr(g),b=t<20?0:.8274096064007395*(b=t-10)-254.76935184120902+115.67994401066147*mr(b)):(e=351.97690566805693+.114206453784165*(e=t-55)-40.25366309332127*mr(e),g=325.4494125711974+.07943456536662342*(g=t-50)-28.0852963507957*mr(g),b=255),[e,g,b,1]},kr=gr,wr=m.unpack,Or=Math.round,xr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];for(var t,r=wr(n,"rgb"),o=r[0],b=r[2],c=1e3,l=4e4,_=.4;l-c>_;){var f=kr(t=.5*(l+c));f[2]/f[0]>=b/o?l=t:c=t}return Or(t)},jr=E,Pr=R,Rr=k,Nr=xr;Pr.prototype.temp=Pr.prototype.kelvin=Pr.prototype.temperature=function(){return Nr(this._rgb)},jr.temp=jr.kelvin=jr.temperature=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pr,[null].concat(n,["temp"])))},Rr.format.temp=Rr.format.kelvin=Rr.format.temperature=gr;var Er=m.unpack,Br=Math.cbrt,Sr=Math.pow,Lr=Math.sign,Mr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Er(n,"rgb"),r=t[0],g=t[1],b=t[2],o=[$r(r/255),$r(g/255),$r(b/255)],c=o[0],l=o[1],_=o[2],f=Br(.4122214708*c+.5363325363*l+.0514459929*_),h=Br(.2119034982*c+.6806995451*l+.1073969566*_),s=Br(.0883024619*c+.2817188376*l+.6299787005*_);return[.2104542553*f+.793617785*h-.0040720468*s,1.9779984951*f-2.428592205*h+.4505937099*s,.0259040371*f+.7827717662*h-.808675766*s]},Ar=Mr;function $r(n){var e=Math.abs(n);return e<.04045?n/12.92:(Lr(n)||1)*Sr((e+.055)/1.055,2.4)}var zr=m.unpack,Kr=Math.pow,Dr=Math.sign,Gr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=zr(n,"lab"))[0],a=n[1],b=n[2],r=Kr(t+.3963377774*a+.2158037573*b,3),o=Kr(t-.1055613458*a-.0638541728*b,3),s=Kr(t-.0894841775*a-1.291485548*b,3);return[255*Tr(4.0767416621*r-3.3077115913*o+.2309699292*s),255*Tr(-1.2684380046*r+2.6097574011*o-.3413193965*s),255*Tr(-.0041960863*r-.7034186147*o+1.707614701*s),n.length>3?n[3]:1]},Ir=Gr;function Tr(n){var e=Math.abs(n);return e>.0031308?(Dr(n)||1)*(1.055*Kr(e,1/2.4)-.055):12.92*n}var Fr=m.unpack,Cr=m.type,qr=E,Ur=R,Jr=k,Yr=Ar;Ur.prototype.oklab=function(){return Yr(this._rgb)},qr.oklab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Ur,[null].concat(n,["oklab"])))},Jr.format.oklab=Ir,Jr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Fr(n,"oklab"),"array"===Cr(n)&&3===n.length)return"oklab"}});var Vr=m.unpack,Hr=Ar,Xr=gt,Wr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Vr(n,"rgb"),r=t[0],g=t[1],b=t[2],o=Hr(r,g,b),c=o[0],a=o[1],l=o[2];return Xr(c,a,l)},Zr=Wr,Qr=m.unpack,no=St,eo=Ir,to=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Qr(n,"lch"))[0],r=n[1],o=n[2],c=no(t,r,o),l=c[0],a=c[1],_=c[2],f=eo(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},ro=to,oo=m.unpack,io=m.type,ao=E,co=R,input=k,so=Zr;co.prototype.oklch=function(){return so(this._rgb)},ao.oklch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(co,[null].concat(n,["oklch"])))},input.format.oklch=ro,input.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=oo(n,"oklch"),"array"===io(n)&&3===n.length)return"oklch"}});var uo=R,lo=m.type;uo.prototype.alpha=function(a,n){return void 0===n&&(n=!1),void 0!==a&&"number"===lo(a)?n?(this._rgb[3]=a,this):new uo([this._rgb[0],this._rgb[1],this._rgb[2],a],"rgb"):this._rgb[3]},R.prototype.clipped=function(){return this._rgb._clipped||!1};var _o=R,fo=qe;_o.prototype.darken=function(n){void 0===n&&(n=1);var e=this,t=e.lab();return t[0]-=fo.Kn*n,new _o(t,"lab").alpha(e.alpha(),!0)},_o.prototype.brighten=function(n){return void 0===n&&(n=1),this.darken(-n)},_o.prototype.darker=_o.prototype.darken,_o.prototype.brighter=_o.prototype.brighten,R.prototype.get=function(n){var e=n.split("."),t=e[0],r=e[1],o=this[t]();if(r){var i=t.indexOf(r)-("ok"===t.substr(0,2)?2:0);if(i>-1)return o[i];throw new Error("unknown channel "+r+" in mode "+t)}return o};var ho=R,po=m.type,yo=Math.pow,vo=1e-7,bo=20;ho.prototype.luminance=function(n){if(void 0!==n&&"number"===po(n)){if(0===n)return new ho([0,0,0,this._rgb[3]],"rgb");if(1===n)return new ho([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",r=bo,o=function(e,c){var l=e.interpolate(c,.5,t),_=l.luminance();return Math.abs(n-_)n?o(e,l):o(l,c)},c=(e>n?o(new ho([0,0,0]),this):o(this,new ho([255,255,255]))).rgb();return new ho(c.concat([this._rgb[3]]))}return mo.apply(void 0,this._rgb.slice(0,3))};var mo=function(n,g,b){return.2126*(n=go(n))+.7152*(g=go(g))+.0722*(b=go(b))},go=function(n){return(n/=255)<=.03928?n/12.92:yo((n+.055)/1.055,2.4)},ko={},wo=R,Oo=m.type,xo=ko,jo=function(n,e,t){void 0===t&&(t=.5);for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var c=r[0]||"lrgb";if(xo[c]||r.length||(c=Object.keys(xo)[0]),!xo[c])throw new Error("interpolation mode "+c+" is not defined");return"object"!==Oo(n)&&(n=new wo(n)),"object"!==Oo(e)&&(e=new wo(e)),xo[c](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))},Po=R,Ro=jo;Po.prototype.mix=Po.prototype.interpolate=function(n,e){void 0===e&&(e=.5);for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];return Ro.apply(void 0,[this,n,e].concat(t))};var No=R;No.prototype.premultiply=function(n){void 0===n&&(n=!1);var e=this._rgb,a=e[3];return n?(this._rgb=[e[0]*a,e[1]*a,e[2]*a,a],this):new No([e[0]*a,e[1]*a,e[2]*a,a],"rgb")};var Eo=R,Bo=qe;Eo.prototype.saturate=function(n){void 0===n&&(n=1);var e=this,t=e.lch();return t[1]+=Bo.Kn*n,t[1]<0&&(t[1]=0),new Eo(t,"lch").alpha(e.alpha(),!0)},Eo.prototype.desaturate=function(n){return void 0===n&&(n=1),this.saturate(-n)};var So=R,Lo=m.type;So.prototype.set=function(n,e,t){void 0===t&&(t=!1);var r=n.split("."),o=r[0],c=r[1],l=this[o]();if(c){var i=o.indexOf(c)-("ok"===o.substr(0,2)?2:0);if(i>-1){if("string"==Lo(e))switch(e.charAt(0)){case"+":case"-":l[i]+=+e;break;case"*":l[i]*=+e.substr(1);break;case"/":l[i]/=+e.substr(1);break;default:l[i]=+e}else{if("number"!==Lo(e))throw new Error("unsupported value for Color.set");l[i]=e}var _=new So(l,o);return t?(this._rgb=_._rgb,this):_}throw new Error("unknown channel "+c+" in mode "+o)}return l};var Mo=R,Ao=function(n,e,t){var r=n._rgb,o=e._rgb;return new Mo(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"rgb")};ko.rgb=Ao;var $o=R,zo=Math.sqrt,Ko=Math.pow,Do=function(n,e,t){var r=n._rgb,o=r[0],c=r[1],l=r[2],_=e._rgb,f=_[0],h=_[1],d=_[2];return new $o(zo(Ko(o,2)*(1-t)+Ko(f,2)*t),zo(Ko(c,2)*(1-t)+Ko(h,2)*t),zo(Ko(l,2)*(1-t)+Ko(d,2)*t),"rgb")};ko.lrgb=Do;var Go=R,Io=function(n,e,t){var r=n.lab(),o=e.lab();return new Go(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"lab")};ko.lab=Io;var To=R,Fo=function(n,e,t,r){var o,c,l,_,f,h,d,y,v,m,k,w,O;return"hsl"===r?(l=n.hsl(),_=e.hsl()):"hsv"===r?(l=n.hsv(),_=e.hsv()):"hcg"===r?(l=n.hcg(),_=e.hcg()):"hsi"===r?(l=n.hsi(),_=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",l=n.hcl(),_=e.hcl()):"oklch"===r&&(l=n.oklch().reverse(),_=e.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(f=(o=l)[0],d=o[1],v=o[2],h=(c=_)[0],y=c[1],m=c[2]),isNaN(f)||isNaN(h)?isNaN(f)?isNaN(h)?w=Number.NaN:(w=h,1!=v&&0!=v||"hsv"==r||(k=y)):(w=f,1!=m&&0!=m||"hsv"==r||(k=d)):w=f+t*(h>f&&h-f>180?h-(f+360):h180?h+360-f:h-f),void 0===k&&(k=d+t*(y-d)),O=v+t*(m-v),new To("oklch"===r?[O,k,w]:[w,k,O],r)},Co=Fo,qo=function(n,e,t){return Co(n,e,t,"lch")};ko.lch=qo,ko.hcl=qo;var Uo=R,Jo=function(n,e,t){var r=n.num(),o=e.num();return new Uo(r+t*(o-r),"num")};ko.num=Jo;var Yo=Fo,Vo=function(n,e,t){return Yo(n,e,t,"hcg")};ko.hcg=Vo;var Ho=Fo,Xo=function(n,e,t){return Ho(n,e,t,"hsi")};ko.hsi=Xo;var Wo=Fo,Zo=function(n,e,t){return Wo(n,e,t,"hsl")};ko.hsl=Zo;var Qo=Fo,ni=function(n,e,t){return Qo(n,e,t,"hsv")};ko.hsv=ni;var ei=R,ti=function(n,e,t){var r=n.oklab(),o=e.oklab();return new ei(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"oklab")};ko.oklab=ti;var ri=Fo,oi=function(n,e,t){return ri(n,e,t,"oklch")};ko.oklch=oi;var ii=R,ai=m.clip_rgb,ci=Math.pow,si=Math.sqrt,ui=Math.PI,_i=Math.cos,fi=Math.sin,hi=Math.atan2,pi=function(n,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var r=n.length;t||(t=Array.from(new Array(r)).map((function(){return 1})));var o=r/t.reduce((function(a,b){return a+b}));if(t.forEach((function(n,i){t[i]*=o})),n=n.map((function(n){return new ii(n)})),"lrgb"===e)return di(n,t);for(var c=n.shift(),l=c.get(e),_=[],f=0,h=0,i=0;i=360;)m-=360;l[v]=m}else l[v]=l[v]/_[v];return y/=r,new ii(l,e).alpha(y>.99999?1:y,!0)},di=function(n,e){for(var t=n.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new ii(ai(r))},yi=E,vi=m.type,bi=Math.pow,mi=function(n){var e="rgb",t=yi("#ccc"),r=0,o=[0,1],c=[],l=[0,0],_=!1,f=[],h=!1,d=0,y=1,v=!1,m={},k=!0,w=1,O=function(n){if((n=n||["#fff","#000"])&&"string"===vi(n)&&yi.brewer&&yi.brewer[n.toLowerCase()]&&(n=yi.brewer[n.toLowerCase()]),"array"===vi(n)){1===n.length&&(n=[n[0],n[0]]),n=n.slice(0);for(var e=0;e=_[i];)i++;return i-1}return 0},j=function(n){return n},P=function(n){return n},R=function(n,r){var col,o;if(null==r&&(r=!1),isNaN(n)||null===n)return t;o=r?n:_&&_.length>2?x(n)/(_.length-2):y!==d?(n-d)/(y-d):1,o=P(o),r||(o=j(o)),1!==w&&(o=bi(o,w)),o=l[0]+o*(1-l[0]-l[1]),o=Math.min(1,Math.max(0,o));var h=Math.floor(1e4*o);if(k&&m[h])col=m[h];else{if("array"===vi(f))for(var i=0;i=p&&i===c.length-1){col=f[i];break}if(o>p&&o2){var _=n.map((function(e,i){return i/(n.length-1)})),h=n.map((function(n){return(n-d)/(y-d)}));h.every((function(n,i){return _[i]===n}))||(P=function(n){if(n<=0||n>=1)return n;for(var i=0;n>=h[i+1];)i++;var e=(n-h[i])/(h[i+1]-h[i]);return _[i]+e*(_[i+1]-_[i])})}}return o=[d,y],E},E.mode=function(n){return arguments.length?(e=n,N(),E):e},E.range=function(n,e){return O(n),E},E.out=function(n){return h=n,E},E.spread=function(n){return arguments.length?(r=n,E):r},E.correctLightness=function(n){return null==n&&(n=!0),v=n,N(),j=v?function(n){for(var e=R(0,!0).lab()[0],t=R(1,!0).lab()[0],r=e>t,o=R(n,!0).lab()[0],c=e+(t-e)*n,l=o-c,_=0,f=1,h=20;Math.abs(l)>.01&&h-- >0;)r&&(l*=-1),l<0?(_=n,n+=.5*(f-n)):(f=n,n+=.5*(_-n)),o=R(n,!0).lab()[0],l=o-c;return n}:function(n){return n},E},E.padding=function(p){return null!=p?("number"===vi(p)&&(p=[p,p]),l=p,E):l},E.colors=function(e,t){arguments.length<2&&(t="hex");var r=[];if(0===arguments.length)r=f.slice(0);else if(1===e)r=[E(.5)];else if(e>1){var c=o[0],dd=o[1]-c;r=gi(0,e,!1).map((function(i){return E(c+i/(e-1)*dd)}))}else{n=[];var l=[];if(_&&_.length>2)for(var i=1,h=_.length,d=1<=h;d?ih;d?i++:i--)l.push(.5*(_[i-1]+_[i]));else l=o;r=l.map((function(n){return E(n)}))}return yi[t]&&(r=r.map((function(n){return n[t]()}))),r},E.cache=function(n){return null!=n?(k=n,E):k},E.gamma=function(g){return null!=g?(w=g,E):w},E.nodata=function(n){return null!=n?(t=yi(n),E):t},E};function gi(n,e,t){for(var r=[],o=nc;o?i++:i--)r.push(i);return r}var ki=R,wi=mi,Oi=function(n){for(var e=[1,1],i=1;i=5))throw new RangeError("No point in running bezier with only one color.");var h,d,y;h=n.map((function(n){return n.lab()})),y=n.length-1,d=Oi(y),o=function(n){var u=1-n,e=[0,1,2].map((function(i){return h.reduce((function(e,t,r){return e+d[r]*Math.pow(u,y-r)*Math.pow(n,r)*t[i]}),0)}));return new ki(e,"lab")}}return o},ji=function(n){var e=xi(n);return e.scale=function(){return wi(e)},e},Pi=E,Ri=function(n,e,t){if(!Ri[t])throw new Error("unknown blend mode "+t);return Ri[t](n,e)},Ni=function(n){return function(e,t){var r=Pi(t).rgb(),o=Pi(e).rgb();return Pi.rgb(n(r,o))}},Ei=function(n){return function(e,t){var r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r}},Bi=function(a){return a},Si=function(a,b){return a*b/255},Li=function(a,b){return a>b?b:a},Mi=function(a,b){return a>b?a:b},Ai=function(a,b){return 255*(1-(1-a/255)*(1-b/255))},$i=function(a,b){return b<128?2*a*b/255:255*(1-2*(1-a/255)*(1-b/255))},zi=function(a,b){return 255*(1-(1-b/255)/(a/255))},Ki=function(a,b){return 255===a||(a=b/255*255/(1-a/255))>255?255:a};Ri.normal=Ni(Ei(Bi)),Ri.multiply=Ni(Ei(Si)),Ri.screen=Ni(Ei(Ai)),Ri.overlay=Ni(Ei($i)),Ri.darken=Ni(Ei(Li)),Ri.lighten=Ni(Ei(Mi)),Ri.dodge=Ni(Ei(Ki)),Ri.burn=Ni(Ei(zi));for(var Di=Ri,Gi=m.type,Ii=m.clip_rgb,Ti=m.TWOPI,Fi=Math.pow,Ci=Math.sin,qi=Math.cos,Ui=E,Ji=function(n,e,t,r,o){void 0===n&&(n=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===r&&(r=1),void 0===o&&(o=[0,1]);var dl,c=0;"array"===Gi(o)?dl=o[1]-o[0]:(dl=0,o=[o,o]);var l=function(l){var a=Ti*((n+120)/360+e*l),_=Fi(o[0]+dl*l,r),f=(0!==c?t[0]+l*c:t)*_*(1-_)/2,h=qi(a),d=Ci(a);return Ui(Ii([255*(_+f*(-.14861*h+1.78277*d)),255*(_+f*(-.29227*h-.90649*d)),255*(_+f*(1.97294*h)),1]))};return l.start=function(s){return null==s?n:(n=s,l)},l.rotations=function(n){return null==n?e:(e=n,l)},l.gamma=function(g){return null==g?r:(r=g,l)},l.hue=function(n){return null==n?t:("array"===Gi(t=n)?0==(c=t[1]-t[0])&&(t=t[1]):c=0,l)},l.lightness=function(n){return null==n?o:("array"===Gi(n)?(o=n,dl=n[1]-n[0]):(o=[n,n],dl=0),l)},l.scale=function(){return Ui.scale(l)},l.hue(t),l},Yi=R,Vi="0123456789abcdef",Hi=Math.floor,Xi=Math.random,Wi=function(){for(var code="#",i=0;i<6;i++)code+=Vi.charAt(Hi(16*Xi()));return new Yi(code,"hex")},Zi=_,Qi=Math.log,na=Math.pow,ea=Math.floor,ta=Math.abs,ra=function(data,n){void 0===n&&(n=null);var e={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Zi(data)&&(data=Object.values(data)),data.forEach((function(t){n&&"object"===Zi(t)&&(t=t[n]),null==t||isNaN(t)||(e.values.push(t),e.sum+=t,te.max&&(e.max=t),e.count+=1)})),e.domain=[e.min,e.max],e.limits=function(n,t){return oa(e,n,t)},e},oa=function(data,n,e){void 0===n&&(n="equal"),void 0===e&&(e=7),"array"==Zi(data)&&(data=ra(data));var t=data.min,r=data.max,o=data.values.sort((function(a,b){return a-b}));if(1===e)return[t,r];var c=[];if("c"===n.substr(0,1)&&(c.push(t),c.push(r)),"e"===n.substr(0,1)){c.push(t);for(var i=1;i 0");var l=Math.LOG10E*Qi(t),_=Math.LOG10E*Qi(r);c.push(t);for(var f=1;f200&&(O=!1)}for(var G={},I=0;Ie?(n+.05)/(e+.05):(e+.05)/(n+.05)},sa=R,ua=Math.sqrt,la=Math.pow,_a=Math.min,fa=Math.max,ha=Math.atan2,pa=Math.abs,da=Math.cos,ya=Math.sin,va=Math.exp,ba=Math.PI,ma=function(a,b,n,e,t){void 0===n&&(n=1),void 0===e&&(e=1),void 0===t&&(t=1);var r=function(n){return 360*n/(2*ba)},o=function(n){return 2*ba*n/360};a=new sa(a),b=new sa(b);var c=Array.from(a.lab()),l=c[0],_=c[1],f=c[2],h=Array.from(b.lab()),d=h[0],y=h[1],v=h[2],m=(l+d)/2,k=(ua(la(_,2)+la(f,2))+ua(la(y,2)+la(v,2)))/2,w=.5*(1-ua(la(k,7)/(la(k,7)+la(25,7)))),O=_*(1+w),x=y*(1+w),j=ua(la(O,2)+la(f,2)),P=ua(la(x,2)+la(v,2)),R=(j+P)/2,N=r(ha(f,O)),E=r(ha(v,x)),B=N>=0?N:N+360,S=E>=0?E:E+360,L=pa(B-S)>180?(B+S+360)/2:(B+S)/2,M=1-.17*da(o(L-30))+.24*da(o(2*L))+.32*da(o(3*L+6))-.2*da(o(4*L-63)),A=S-B;A=pa(A)<=180?A:S<=B?A+360:A-360,A=2*ua(j*P)*ya(o(A)/2);var $=d-l,z=P-j,K=1+.015*la(m-50,2)/ua(20+la(m-50,2)),D=1+.045*R,G=1+.015*R*M,I=30*va(-la((L-275)/25,2)),T=-2*ua(la(R,7)/(la(R,7)+la(25,7)))*ya(2*o(I)),F=ua(la($/(n*K),2)+la(z/(e*D),2)+la(A/(t*G),2)+T*(z/(e*D))*(A/(t*G)));return fa(0,_a(100,F))},ga=R,ka=function(a,b,n){void 0===n&&(n="lab"),a=new ga(a),b=new ga(b);var e=a.get(n),t=b.get(n),r=0;for(var i in e){var o=(e[i]||0)-(t[i]||0);r+=o*o}return Math.sqrt(r)},wa=R,Oa=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];try{return new(Function.prototype.bind.apply(wa,[null].concat(n))),!0}catch(n){return!1}},xa=E,ja=mi,Pa={cool:function(){return ja([xa.hsl(180,1,.9),xa.hsl(250,.7,.4)])},hot:function(){return ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ra={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},i=0,Na=Object.keys(Ra);i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,r=this.hold_pieces_count(n,e)+t,o=this.hold_pieces[n.key];f.a.delete(o,e.key),r>=1&&f.a.set(o,e.key,r)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var r=this.hold_pieces_count(n,e);return t>r&&(t=r),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r=[];return t&&r.push("location_".concat(t.location.key)),r}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),r="";return t&&(r=t.name),r}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return _.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return _()(e).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return _()(n).filter((function(n){var e=Object(r.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(r.a)(n,2),t=e[0],o=e[1];return[y.a.fetch(t),o]})).sortBy((function(n){var e=Object(r.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;_.a.forIn(this.hold_pieces[n.key],(function(t,r){var o=y.a.fetch(r);e.hold_pieces_add(n,o,-t),e.piece_box_add(o,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;_.a.forIn(this.piece_box,(function(t,r){var o=y.a.fetch(r);e.piece_box_add(o,-t),e.hold_pieces_add(n,o,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),w.a.fetch(n).piece_box.forEach((function(n){var t=Object(r.a)(n,2),o=t[0],c=t[1];e.piece_box_add(y.a.fetch(o),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;w.a.fetch("全部駒箱").piece_box.forEach((function(o){var c=Object(r.a)(o,2),l=c[0],_=c[1],f=y.a.fetch(l),h=_-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return O.a.values.forEach((function(t){_.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var r=t.piece;e.board.delete_at(t.place),"K"===r.key?e.piece_box_add(r):e.hold_pieces_add(O.a.fetch("white"),r)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=O.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,r=null,o=null;return"bottom_left"===n&&(e=0,t=1,r=h.a.dimension-1,o=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,r=h.a.dimension-1,o=-1),[{piece:"K",promoted:!1,location:"black",place:[e,r]},{piece:"P",promoted:!0,location:"white",place:[e,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r+o]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,r]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:O.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return U}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),w=t(549),O=t(550),x=t(551),j=t(552),P=t(553),R=t(554),N=t(555),E=t(556),B=t(557),S=t(558),L=t(559),M=t(560),A=t(561),$=t(562),z=t(563),K=t(564),D=t(565),G=t(566),I=t(567),T=t(568),F=t(569);function C(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var U=function(n){Object(l.a)(t,n);var e=C(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:O.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:N.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:L.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:M.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:z.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:T.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:F.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&(console.log(U.fetch("simple").key),console.log(U.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var o=t(20),c=t(177),l=t(178),_=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(_),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(l.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var r=!1,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,r=!1,o=n.once_vectors;return o&&(r=o.some((function(r){if(r)return t.once_reach_vec(n,e,r)}))),r}},{key:"once_reach_vec",value:function(n,e,t){var r=t[0],o=t[1]*n.location.value_sign,c=n.place.x+r,l=n.place.y+o;return c===e.x&&l===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!1,c=n.repeat_vectors;return c&&(o=c.some((function(o){if(o)return t.repeat_reach_vec(n,e,o,r)}))),o}},{key:"repeat_reach_vec",value:function(n,e,t){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n.place.x,c=n.place.y,l=t[0],_=t[1]*n.location.value_sign,f=o+l,h=c+_,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==r.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=l,h+=_}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(o+=c,c=0),l.promoted&&(o+="+");var _=l.piece.key;"white"===l.location.key&&(_=_.toLowerCase()),o+=_}})),c>=1&&(o+=c),t.push(o)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===r&&console.log(m.dimension)}).call(this,t(179),"/index.js")},187:function(n,e,t){"use strict";t.d(e,"a",(function(){return m}));t(517),t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(11),t(22),t(520));function d(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function y(n){for(var i=1;i\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new w.a;return this.attributes.board.split("/").forEach((function(t,r){var o=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))o+=Number(t.piece);else{var c=new P.a({place:new j.a([o,r]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),o++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var r=x.a.fetch(t.piece_char),o=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);o+=e[c.key][r.key]||0,v.a.set(e[c.key],r.key,o)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var r=N.a.parse(t);if(!r)return!1;r.location=n.location_by_offset(i),e.push(r)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(O.a);void 0!==n&&n.argv[1]===r&&(B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B),B=S.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(B))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return v}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var v=function(n){Object(l.a)(t,n);var e=y(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===r&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return L}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),w=t(180),O=t(522),x=t(127),j=t(71),P=t(314),R=t(524),N=t(521),E=t(538);function B(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),L=function(n){Object(_.a)(t,n);var e=B(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(l.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?j.a.fetch(this.preset_info.first_location_key):j.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,S);if(t)if(t.key){var r=t.value.trim();if(n.header[t.key]=r,t.key.match(/手の持駒/))if("なし"===r);else{var s=E.a.kanji_to_number_string(r);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,r){var o=O.a.lookup_by_name(e.piece_char),c=Number(e.count||1),l=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[l][o.key]||0,n.hold_pieces[l][o.key]=c}))}}else if(t.comment){var o,c,i=n.move_infos.length;null!==(c=(o=n.comment_lines_hash)[i])&&void 0!==c||(o[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=j.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=j.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var l={};l.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(l.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(l.place=x.a.fetch(t.to),e=l.place):(m()(t.same),m()(e),l.place=e),"成"===t.motion&&(l.promoted_trigger=!0),"打"===t.motion&&(l.drop_piece=O.a.lookup_by_name(t.piece)),n.move_infos.push(l)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new w.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,r){if("・"===e.piece);else{var o="v"===e.arrow?"white":"black",c=O.a.lookup_by_name(e.piece),l=!1;c||(c=O.a.lookup_by_promoted_name(e.piece),m()(c),l=!0);var _=new N.a({place:new x.a([r,t]),piece:c,promoted:l,location:j.a.fetch(o)});n.place_on(_)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===r){var M=new L;M.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",M.parse(),console.log(M.move_infos),console.log(M.comment_lines_hash),console.log(void 0===M.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(23),t(71);var r=t(571),o={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(r.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var r=t(23),o=t.n(r),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!o.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));t(72),t(73),t(11),t(22);var r=t(71),o={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return r.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=r.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var r=t(523),o=(t(11),t(22),t(71)),c=t(127);function l(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return _(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){l=!0,o=n},f:function(){try{c||null==t.return||t.return()}finally{if(l)throw o}}}}function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&o){var w=!0;if(this.sp_piece_auto_promote){var O=r.piece.piece_vector.force_promote_length;null!=O&&r.top_spaces<=O&&(this.promotable_piece_moved(r,!0),w=!1)}w&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=r,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:r,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(r),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new l.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=_.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var r=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&r&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(r.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,r){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(r,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),o=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=o.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=l(l({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(o),l=t(128),_=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(r.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new l.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return _.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));var r={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var r=t(128),o=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return o.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=o.a.fetch(n),this.xcontainer=new r.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return o.a.values},init_preset_sfen:function(){if(this.sp_preset)return o.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(180),o=t(521),c=t(128),l={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(r.a.dimension)},api_random_puton:function(){var n=o.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20);function o(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));var r=t(523),o=(t(11),t(51),t(23)),c=t.n(o),l={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),o=1;o0&&r>0){var o=this[n.attr_w],c=this[n.attr_h],l=Math.abs(o-t),_=Math.abs(c-r),f=l>n.threshold||_>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=r),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(o,"x").concat(c," -> ").concat(t,"x").concat(r," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(523),o=(t(51),t(11),t(517),t(177)),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),o=this.lp_el_create(["PieceTexture"].concat(Object(r.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(o),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,l=d.fetch(c);if(n.place){var _=this.place_to_cell_info(n.place),f=this.vector_scale(_.radius,this.devise_info.gap*l.sign*-1),h=this.vector_add(_.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(r.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},348:function(n,e,t){"use strict";const r=["red","green","blue","alpha"],o={transparent:"#00000000",black:"#000000",silver:"#c0c0c0",gray:"#808080",white:"#ffffff",maroon:"#800000",red:"#ff0000",purple:"#800080",fuchsia:"#ff00ff",green:"#008000",lime:"#00ff00",olive:"#808000",yellow:"#ffff00",navy:"#000080",blue:"#0000ff",teal:"#008080",aqua:"#00ffff",orange:"#ffa500",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",oldlace:"#fdf5e6",olivedrab:"#6b8e23",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",whitesmoke:"#f5f5f5",yellowgreen:"#9acd32",rebeccapurple:"#663399"};class c extends Error{constructor(){super("ColorTypeError: type must be hex(a), rgb(a) or hsl(a)")}}class l{constructor(...n){if(n.length>0)return l.parse(...n);this.$channels=new Uint8Array(r.length),r.forEach(((n,e)=>{Object.defineProperty(this,n,{get:()=>this.$channels[e],set:n=>{Number.isNaN(n/1)||(this.$channels[e]=Math.min(255,Math.max(0,n)))},enumerable:!0,configurable:!0})})),["hue","saturation","lightness"].forEach((n=>{const e=n.replace(/^./,(n=>n.toUpperCase()));Object.defineProperty(this,n,{get:()=>this[`get${e}`](),set:n=>{Number.isNaN(n/1)||this[`set${e}`](n)},enumerable:!0,configurable:!0})}))}getHue(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;let l=0;if(0===c)return l;for(l=n===o?(e-t)/c%6:e===o?(t-n)/c+2:(n-e)/c+4,l*=60;l!==-1/0&&l<0;)l+=360;return Math.round(l%360)}setHue(n){const e=l.fromHSL(n,this.saturation,this.lightness,this.alpha/255);for(let i=0;in/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)],c=o-r;return 0!==c?Math.round(c/(1-Math.abs(2*this.lightness-1))*100)/100:0}setSaturation(n){const e=l.fromHSL(this.hue,n,this.lightness,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}getLightness(){const[n,e,t]=Array.from(this.$channels).map((n=>n/255)),[r,o]=[Math.min(n,e,t),Math.max(n,e,t)];return Math.round((o+r)/2*100)/100}setLightness(n){const e=l.fromHSL(this.hue,this.lightness,n,this.alpha/255);r.forEach(((n,i)=>this.$channels[i]=e.$channels[i]))}clone(){const n=new l;return r.forEach(((e,i)=>n.$channels[i]=this.$channels[i])),n}toString(n="hex"){switch(String(n).toLowerCase()){case"hex":return"#"+r.slice(0,3).map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"hexa":return"#"+r.map((n=>this[n].toString(16).padStart(2,"0"))).join("");case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${Math.round(this.alpha/2.55)/100})`;case"hsl":return`hsl(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%)`;case"hsla":return`hsla(${Math.round(this.hue)}deg, ${Math.round(100*this.saturation)}%, ${Math.round(100*this.lightness)}%, ${Math.round(this.alpha/2.55)/100})`;default:throw new c}}get[Symbol.toString](){return this.toString("hex")}static parse(...n){if("object"==typeof n[0])return l.parseObject(n[0]);if(n.every((n=>!Number.isNaN(n/1)))){const e=new l;if(n.length>3)e.red=n[0],e.green=n[1],e.blue=n[2],n[3]&&(e.alpha=n[3]);else if(1===n.length){const e=Number(n[0]);return l.parseIndex(e,e>2**24?3:4)}}else if("string"==typeof n[0]){let e=null;if("string"==typeof o[n[0].toLowerCase()])return l.parseHex(o[n[0].toLowerCase()]);if(null!==(e=n[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)))return l.parseHex(e[2]);if(null!==(e=n[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i))){const n=[e[1],e[2],e[3],void 0!==e[5]?e[5]:1];return l.fromRGB(...n.map((n=>Number(n))))}if(n[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))throw new Error("Color expression not implemented yet")}throw new Error("Invalid color expression")}static parseObject(object){const n=new l;return null===object||"object"!=typeof object?n:l.isColor(object)?object.clone():(r.forEach((e=>{Number.isNaN(object[e])||(n[e]=object[e])})),n)}static parseHex(n){if("string"!=typeof n)throw new Error("Hex expression must be a string");if(3!==(n=n.trim().replace(/^(0x|&h|#)/i,"")).length&&4!==n.length||(n=n.split("").map((n=>n.repeat(2))).join("")),6!==n.length&&8!==n.length)throw new Error("Incorrect Hex expression length");const e=n.split(/(..)/).filter((n=>n)).map((n=>Number.parseInt(n,16)));return"number"==typeof e[3]&&(e[3]/=255),l.fromRGB(...e)}static parseIndex(n,e=3){const t=new l;for(let i=0;i<4;i++)t[r[i]]=n>>8*(e-i)&&255;return t}static fromRGB(n,e,t,o=1){if([n,e,t,o].some((n=>Number.isNaN(n/1))))throw new Error("Invalid arguments");o*=255;const c=new l;return[n,e,t,o].forEach(((n,e)=>{c[r[e]]=n})),c}static fromHSL(n,e,t,r=1){if([n,e,t,r].some((n=>Number.isNaN(n))))throw new Error("Invalid arguments");for(;n<0&&n!==-1/0;)n+=360;n%=360,e=Math.max(0,Math.min(1,e)),t=Math.max(0,Math.min(1,t)),r=Math.max(0,Math.min(1,r));const o=(1-Math.abs(2*t-1))*e,c=o*(1-Math.abs(n/60%2-1)),_=t-o/2,[f,g,b]=n<60?[o,c,0]:n<120?[c,o,0]:n<180?[0,o,c]:n<240?[0,c,o]:n<300?[c,0,o]:[o,0,c];return l.fromRGB(255*(f+_),255*(g+_),255*(b+_),r)}static isColor(n){return n instanceof l}}e.a=l},351:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(517);var r=t(20),o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);t(11),t(31),t(22),t(12);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){var n,e;return[(n={key:"default"},Object(r.a)(n,"key","初期値"),Object(r.a)(n,"func",(function(n){n.SeVariableInfo.values.forEach((function(e){n.$data[e.key]=e.default})),n.data_init()})),n),(e={key:"paper"},Object(r.a)(e,"key","紙面風"),Object(r.a)(e,"func",(function(n){n.se_ws_color="rgb(255,255,255)",n.sp_piece_variant="paper",n.sp_board_radius=0,n.sp_board_padding=0,n.sp_board_color="rgb(255,255,255)",n.sp_board_even_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_board_odd_cell_color="hsla(0, 0%, 0%, 0.0)",n.sp_grid_inner_stroke=1,n.sp_grid_outer_stroke=2,n.sp_board_edge_stroke=0,n.sp_stand_gravity="top",n.sp_stand_flip=!1,n.sp_name_direction="vertical",n.sp_balloon=!1,n.sp_location_mark_active_size=1,n.sp_location_mark_inactive_size=1,n.sp_player_info.black.name="先手",n.sp_player_info.white.name="後手",n.sp_coordinate=!0,n.sp_coordinate_variant_v="kanji",n.sp_board_horizontal_gap=.2,n.sp_coordinate_x_push=.05,n.sp_coordinate_y_push=.01,n.user_custom_css=""})),e)]}}]),t}(t(520).a)},352:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var r=t(177),o=t(178),c=t(518),l=t(519),_=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(_.a)(n);if(e){var o=Object(_.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(l.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(o.a)(t,null,[{key:"define",get:function(){return[{key:"基本"},{key:"背景"},{key:"盤テクスチャ"},{key:"盤のセル"},{key:"盤"},{key:"盤グリッド"},{key:"駒"},{key:"駒台"},{key:"対局者名"},{key:"駒数"},{key:"駒箱"},{key:"成り不成り選択"},{key:"駒を操作中の移動元スタイル"},{key:"座標"},{key:"Transform"},{key:"コントローラー&スライダー"},{key:"その他"},{key:"棋譜"},{key:"カスタムCSS"},{key:"コンポーネント引数確認"},{key:"CSS変数確認"}]}}]),t}(t(520).a)},353:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(43),t(44);var r=t(20),o=(t(11),t(31),t(22),t(531));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(w(w({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var r=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:r,place:n,promoted:r.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===r){var x=new O({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return k}));t(517);var o=t(177),c=t(178),l=t(526),_=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(h.a)(n);if(e){var o=Object(h.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(_.a)(t,n);var e=m(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(l.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===r&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),c=t(178),l=t(518),_=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=Object(f.a)(n);if(e){var o=Object(f.a)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(l.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===r&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return h}));var o=t(177),c=t(178),l=(t(11),t(22),t(23)),_=t.n(l),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(o.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return _.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var r=t(20),o=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(r)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=l.a.exec(n,l()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return y}));var o=t(177),c=t(178),l=(t(98),t(57),t(11),t(22),t(23)),_=t.n(l),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(o.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],r=f.a.values.map((function(n){var r=t[n.key]||0,o="";if(0===r)return null;r>=2&&(o+=r);var c=n.key;return o+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return _.a.compact(r).join("")})).join("");return _.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===r){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var r=t(20),o=t(523),c=t(177),l=t(178),_=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(_);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),r=Math.pow(10,t),q=Math.trunc(n/r),o=Math.trunc(n%r);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=o}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(o.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(r.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,r){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),c=t(177),l=t(178);t(98),t(12);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(l.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;it?t:n},e=n,t=function(n){n._clipped=!1,n._unclipped=n.slice(0);for(var i=0;i<=3;i++)i<3?((n[i]<0||n[i]>255)&&(n._clipped=!0),n[i]=e(n[i],0,255)):3===i&&(n[i]=e(n[i],0,1));return n},r={},o=0,c=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(n):"object"==f(n[0])&&e?e.split("").filter((function(e){return void 0!==n[0][e]})).map((function(e){return n[0][e]})):n[0]},d=_,y=function(n){if(n.length<2)return null;var e=n.length-1;return"string"==d(n[e])?n[e].toLowerCase():null},v=Math.PI,m={clip_rgb:t,limit:n,type:_,unpack:h,last:y,PI:v,TWOPI:2*v,PITHIRD:v/3,DEG2RAD:v/180,RAD2DEG:180/v},k={format:{},autodetect:[]},w=m.last,O=m.clip_rgb,x=m.type,j=k,P=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=this;if("object"===x(n[0])&&n[0].constructor&&n[0].constructor===this.constructor)return n[0];var r=w(n),o=!1;if(!r){o=!0,j.sorted||(j.autodetect=j.autodetect.sort((function(a,b){return b.p-a.p})),j.sorted=!0);for(var i=0,c=j.autodetect;i4?n[4]:1;return 1===c?[0,0,0,l]:[t>=1?0:255*(1-t)*(1-c),r>=1?0:255*(1-r)*(1-c),o>=1?0:255*(1-o)*(1-c),l]},z=$,K=E,D=R,G=k,I=m.unpack,T=m.type,F=M;D.prototype.cmyk=function(){return F(this._rgb)},K.cmyk=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(D,[null].concat(n,["cmyk"])))},G.format.cmyk=z,G.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=I(n,"cmyk"),"array"===T(n)&&4===n.length)return"cmyk"}});var C=m.unpack,U=m.last,J=function(a){return Math.round(100*a)/100},Y=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=C(n,"hsla"),r=U(n)||"lsa";return t[0]=J(t[0]||0),t[1]=J(100*t[1])+"%",t[2]=J(100*t[2])+"%","hsla"===r||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,r="hsla"):t.length=3,r+"("+t.join(",")+")"},V=Y,H=m.unpack,X=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=H(n,"rgba"))[0],g=n[1],b=n[2];t/=255,g/=255,b/=255;var s,r,o=Math.min(t,g,b),c=Math.max(t,g,b),l=(c+o)/2;return c===o?(s=0,r=Number.NaN):s=l<.5?(c-o)/(c+o):(c-o)/(2-c-o),t==c?r=(g-b)/(c-o):g==c?r=2+(b-t)/(c-o):b==c&&(r=4+(t-g)/(c-o)),(r*=60)<0&&(r+=360),n.length>3&&void 0!==n[3]?[r,s,l,n[3]]:[r,s,l]},W=X,Z=m.unpack,Q=m.last,nn=V,en=W,tn=Math.round,rn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Z(n,"rgba"),r=Q(n)||"rgb";return"hsl"==r.substr(0,3)?nn(en(t),r):(t[0]=tn(t[0]),t[1]=tn(t[1]),t[2]=tn(t[2]),("rgba"===r||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,r="rgba"),r+"("+t.slice(0,"rgb"===r?3:4).join(",")+")")},on=rn,an=m.unpack,cn=Math.round,sn=function(){for(var n,e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,g,b,o=(e=an(e,"hsl"))[0],s=e[1],c=e[2];if(0===s)r=g=b=255*c;else{var l=[0,0,0],_=[0,0,0],f=c<.5?c*(1+s):c+s-c*s,h=2*c-f,d=o/360;l[0]=d+1/3,l[1]=d,l[2]=d-1/3;for(var i=0;i<3;i++)l[i]<0&&(l[i]+=1),l[i]>1&&(l[i]-=1),6*l[i]<1?_[i]=h+6*(f-h)*l[i]:2*l[i]<1?_[i]=f:3*l[i]<2?_[i]=h+(f-h)*(2/3-l[i])*6:_[i]=h;r=(n=[cn(255*_[0]),cn(255*_[1]),cn(255*_[2])])[0],g=n[1],b=n[2]}return e.length>3?[r,g,b,e[3]]:[r,g,b,1]},un=sn,ln=un,_n=k,fn=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,hn=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,pn=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,dn=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,yn=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,vn=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,bn=Math.round,mn=function(n){var e;if(n=n.toLowerCase().trim(),_n.format.named)try{return _n.format.named(n)}catch(n){}if(e=n.match(fn)){for(var t=e.slice(1,4),i=0;i<3;i++)t[i]=+t[i];return t[3]=1,t}if(e=n.match(hn)){for(var r=e.slice(1,5),o=0;o<4;o++)r[o]=+r[o];return r}if(e=n.match(pn)){for(var c=e.slice(1,4),l=0;l<3;l++)c[l]=bn(2.55*c[l]);return c[3]=1,c}if(e=n.match(dn)){for(var _=e.slice(1,5),f=0;f<3;f++)_[f]=bn(2.55*_[f]);return _[3]=+_[3],_}if(e=n.match(yn)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=ln(h);return d[3]=1,d}if(e=n.match(vn)){var y=e.slice(1,4);y[1]*=.01,y[2]*=.01;var v=ln(y);return v[3]=+e[4],v}};mn.test=function(s){return fn.test(s)||hn.test(s)||pn.test(s)||dn.test(s)||yn.test(s)||vn.test(s)};var gn=mn,kn=E,wn=R,On=k,xn=m.type,jn=on,Pn=gn;wn.prototype.css=function(n){return jn(this._rgb,n)},kn.css=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(wn,[null].concat(n,["css"])))},On.format.css=Pn,On.autodetect.push({p:5,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===xn(n)&&Pn.test(n))return"css"}});var Rn=R,Nn=E,En=k,Bn=m.unpack;En.format.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Bn(n,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},Nn.gl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Rn,[null].concat(n,["gl"])))},Rn.prototype.gl=function(){var n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]]};var Sn=m.unpack,Ln=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=Sn(n,"rgb"),o=r[0],g=r[1],b=r[2],c=Math.min(o,g,b),l=Math.max(o,g,b),_=l-c,f=100*_/255,h=c/(255-_)*100;return 0===_?t=Number.NaN:(o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,f,h]},Mn=Ln,An=m.unpack,$n=Math.floor,zn=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=An(l,"hcg"))[0],d=l[1],y=l[2];y*=255;var v=255*d;if(0===d)f=g=b=y;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$n(h/=60),m=h-i,p=y*(1-d),q=p+v*(1-m),k=p+v*m,w=p+v;switch(i){case 0:f=(n=[w,k,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,w,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,w,k])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,w])[0],g=r[1],b=r[2];break;case 4:f=(o=[k,p,w])[0],g=o[1],b=o[2];break;case 5:f=(c=[w,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Kn=zn,Dn=m.unpack,Gn=m.type,In=E,Tn=R,Fn=k,Cn=Mn;Tn.prototype.hcg=function(){return Cn(this._rgb)},In.hcg=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Tn,[null].concat(n,["hcg"])))},Fn.format.hcg=Kn,Fn.autodetect.push({p:1,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Dn(n,"hcg"),"array"===Gn(n)&&3===n.length)return"hcg"}});var qn=m.unpack,Un=m.last,Jn=Math.round,Yn=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=qn(n,"rgba"),r=t[0],g=t[1],b=t[2],a=t[3],o=Un(n)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var c="000000"+((r=Jn(r))<<16|(g=Jn(g))<<8|(b=Jn(b))).toString(16);c=c.substr(c.length-6);var l="0"+Jn(255*a).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},Vn=Yn,Hn=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Xn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Wn=function(n){if(n.match(Hn)){4!==n.length&&7!==n.length||(n=n.substr(1)),3===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]);var u=parseInt(n,16);return[u>>16,u>>8&255,255&u,1]}if(n.match(Xn)){5!==n.length&&9!==n.length||(n=n.substr(1)),4===n.length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);var e=parseInt(n,16);return[e>>24&255,e>>16&255,e>>8&255,Math.round((255&e)/255*100)/100]}throw new Error("unknown hex color: "+n)},Zn=E,Qn=R,ne=m.type,ee=k,te=Vn;Qn.prototype.hex=function(n){return te(this._rgb,n)},Zn.hex=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Qn,[null].concat(n,["hex"])))},ee.format.hex=Wn,ee.autodetect.push({p:4,test:function(n){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===ne(n)&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex"}});var re=m.unpack,oe=m.TWOPI,ie=Math.min,ae=Math.sqrt,ce=Math.acos,se=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r=re(n,"rgb"),o=r[0],g=r[1],b=r[2],c=ie(o/=255,g/=255,b/=255),i=(o+g+b)/3,s=i>0?1-c/i:0;return 0===s?t=NaN:(t=(o-g+(o-b))/2,t/=ae((o-g)*(o-g)+(o-b)*(g-b)),t=ce(t),b>g&&(t=oe-t),t/=oe),[360*t,s,i]},ue=se,le=m.unpack,_e=m.limit,fe=m.TWOPI,he=m.PITHIRD,pe=Math.cos,de=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,g,b,r=(n=le(n,"hsi"))[0],s=n[1],i=n[2];return isNaN(r)&&(r=0),isNaN(s)&&(s=0),r>360&&(r-=360),r<0&&(r+=360),(r/=360)<1/3?g=1-((b=(1-s)/3)+(t=(1+s*pe(fe*r)/pe(he-fe*r))/3)):r<2/3?b=1-((t=(1-s)/3)+(g=(1+s*pe(fe*(r-=1/3))/pe(he-fe*r))/3)):t=1-((g=(1-s)/3)+(b=(1+s*pe(fe*(r-=2/3))/pe(he-fe*r))/3)),[255*(t=_e(i*t*3)),255*(g=_e(i*g*3)),255*(b=_e(i*b*3)),n.length>3?n[3]:1]},ye=de,ve=m.unpack,be=m.type,me=E,ge=R,ke=k,we=ue;ge.prototype.hsi=function(){return we(this._rgb)},me.hsi=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(ge,[null].concat(n,["hsi"])))},ke.format.hsi=ye,ke.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ve(n,"hsi"),"array"===be(n)&&3===n.length)return"hsi"}});var Oe=m.unpack,xe=m.type,je=E,Pe=R,Re=k,Ne=W;Pe.prototype.hsl=function(){return Ne(this._rgb)},je.hsl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pe,[null].concat(n,["hsl"])))},Re.format.hsl=un,Re.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Oe(n,"hsl"),"array"===xe(n)&&3===n.length)return"hsl"}});var Ee=m.unpack,Be=Math.min,Se=Math.max,Le=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,s,r,o=(n=Ee(n,"rgb"))[0],g=n[1],b=n[2],c=Be(o,g,b),l=Se(o,g,b),_=l-c;return r=l/255,0===l?(t=Number.NaN,s=0):(s=_/l,o===l&&(t=(g-b)/_),g===l&&(t=2+(b-o)/_),b===l&&(t=4+(o-g)/_),(t*=60)<0&&(t+=360)),[t,s,r]},Me=Le,Ae=m.unpack,$e=Math.floor,ze=function(){for(var n,e,t,r,o,c,l=[],_=arguments.length;_--;)l[_]=arguments[_];var f,g,b,h=(l=Ae(l,"hsv"))[0],s=l[1],d=l[2];if(d*=255,0===s)f=g=b=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var i=$e(h/=60),y=h-i,p=d*(1-s),q=d*(1-s*y),v=d*(1-s*(1-y));switch(i){case 0:f=(n=[d,v,p])[0],g=n[1],b=n[2];break;case 1:f=(e=[q,d,p])[0],g=e[1],b=e[2];break;case 2:f=(t=[p,d,v])[0],g=t[1],b=t[2];break;case 3:f=(r=[p,q,d])[0],g=r[1],b=r[2];break;case 4:f=(o=[v,p,d])[0],g=o[1],b=o[2];break;case 5:f=(c=[d,p,q])[0],g=c[1],b=c[2]}}return[f,g,b,l.length>3?l[3]:1]},Ke=ze,De=m.unpack,Ge=m.type,Ie=E,Te=R,Fe=k,Ce=Me;Te.prototype.hsv=function(){return Ce(this._rgb)},Ie.hsv=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Te,[null].concat(n,["hsv"])))},Fe.format.hsv=Ke,Fe.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=De(n,"hsv"),"array"===Ge(n)&&3===n.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ue=qe,Je=m.unpack,Ye=Math.pow,Ve=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Je(n,"rgb"),r=t[0],g=t[1],b=t[2],o=We(r,g,b),c=o[0],l=o[1],_=116*l-16;return[_<0?0:_,500*(c-l),200*(l-o[2])]},He=function(n){return(n/=255)<=.04045?n/12.92:Ye((n+.055)/1.055,2.4)},Xe=function(n){return n>Ue.t3?Ye(n,1/3):n/Ue.t2+Ue.t0},We=function(n,g,b){return n=He(n),g=He(g),b=He(b),[Xe((.4124564*n+.3575761*g+.1804375*b)/Ue.Xn),Xe((.2126729*n+.7151522*g+.072175*b)/Ue.Yn),Xe((.0193339*n+.119192*g+.9503041*b)/Ue.Zn)]},Ze=Ve,Qe=qe,nt=m.unpack,et=Math.pow,tt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t,r,o,c=(n=nt(n,"lab"))[0],a=n[1],b=n[2];return r=(c+16)/116,t=isNaN(a)?r:r+a/500,o=isNaN(b)?r:r-b/200,r=Qe.Yn*it(r),t=Qe.Xn*it(t),o=Qe.Zn*it(o),[ot(3.2404542*t-1.5371385*r-.4985314*o),ot(-.969266*t+1.8760108*r+.041556*o),ot(.0556434*t-.2040259*r+1.0572252*o),n.length>3?n[3]:1]},ot=function(n){return 255*(n<=.00304?12.92*n:1.055*et(n,1/2.4)-.055)},it=function(n){return n>Qe.t1?n*n*n:Qe.t2*(n-Qe.t0)},at=tt,ct=m.unpack,st=m.type,ut=E,lt=R,_t=k,ft=Ze;lt.prototype.lab=function(){return ft(this._rgb)},ut.lab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(lt,[null].concat(n,["lab"])))},_t.format.lab=at,_t.autodetect.push({p:2,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=ct(n,"lab"),"array"===st(n)&&3===n.length)return"lab"}});var ht=m.unpack,pt=m.RAD2DEG,yt=Math.sqrt,vt=Math.atan2,bt=Math.round,mt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=ht(n,"lab"),r=t[0],a=t[1],b=t[2],o=yt(a*a+b*b),c=(vt(b,a)*pt+360)%360;return 0===bt(1e4*o)&&(c=Number.NaN),[r,o,c]},gt=mt,kt=m.unpack,wt=Ze,Ot=gt,xt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=kt(n,"rgb"),r=t[0],g=t[1],b=t[2],o=wt(r,g,b),c=o[0],a=o[1],l=o[2];return Ot(c,a,l)},jt=xt,Pt=m.unpack,Rt=m.DEG2RAD,Nt=Math.sin,Et=Math.cos,Bt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Pt(n,"lch"),r=t[0],o=t[1],c=t[2];return isNaN(c)&&(c=0),[r,Et(c*=Rt)*o,Nt(c)*o]},St=Bt,Lt=m.unpack,Mt=St,At=at,$t=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Lt(n,"lch"))[0],r=n[1],o=n[2],c=Mt(t,r,o),l=c[0],a=c[1],_=c[2],f=At(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},zt=$t,Kt=m.unpack,Dt=zt,Gt=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Kt(n,"hcl").reverse();return Dt.apply(void 0,t)},It=Gt,Tt=m.unpack,Ft=m.type,Ct=E,qt=R,Ut=k,Jt=jt;qt.prototype.lch=function(){return Jt(this._rgb)},qt.prototype.hcl=function(){return Jt(this._rgb).reverse()},Ct.lch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["lch"])))},Ct.hcl=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(qt,[null].concat(n,["hcl"])))},Ut.format.lch=zt,Ut.format.hcl=It,["lch","hcl"].forEach((function(n){return Ut.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Tt(e,n),"array"===Ft(e)&&3===e.length)return n}})}));var Yt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Vt=R,Ht=k,Xt=m.type,Wt=Yt,Zt=Wn,Qt=Vn;Vt.prototype.name=function(){for(var n=Qt(this._rgb,"rgb"),i=0,e=Object.keys(Wt);i0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xt(n)&&Wt[n.toLowerCase()])return"named"}});var nr=m.unpack,er=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=nr(n,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},rr=er,or=m.type,ir=function(n){if("number"==or(n)&&n>=0&&n<=16777215)return[n>>16,n>>8&255,255&n,1];throw new Error("unknown num color: "+n)},ar=E,cr=R,sr=k,ur=m.type,lr=rr;cr.prototype.num=function(){return lr(this._rgb)},ar.num=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(n,["num"])))},sr.format.num=ir,sr.autodetect.push({p:5,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(1===n.length&&"number"===ur(n[0])&&n[0]>=0&&n[0]<=16777215)return"num"}});var _r=E,fr=R,pr=k,dr=m.unpack,yr=m.type,vr=Math.round;fr.prototype.rgb=function(n){return void 0===n&&(n=!0),!1===n?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vr)},fr.prototype.rgba=function(n){return void 0===n&&(n=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===n?e:vr(e):e}))},_r.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(fr,[null].concat(n,["rgb"])))},pr.format.rgb=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=dr(n,"rgba");return void 0===t[3]&&(t[3]=1),t},pr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=dr(n,"rgba"),"array"===yr(n)&&(3===n.length||4===n.length&&"number"==yr(n[3])&&n[3]>=0&&n[3]<=1))return"rgb"}});var mr=Math.log,gr=function(n){var e,g,b,t=n/100;return t<66?(e=255,g=t<6?0:-155.25485562709179-.44596950469579133*(g=t-2)+104.49216199393888*mr(g),b=t<20?0:.8274096064007395*(b=t-10)-254.76935184120902+115.67994401066147*mr(b)):(e=351.97690566805693+.114206453784165*(e=t-55)-40.25366309332127*mr(e),g=325.4494125711974+.07943456536662342*(g=t-50)-28.0852963507957*mr(g),b=255),[e,g,b,1]},kr=gr,wr=m.unpack,Or=Math.round,xr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];for(var t,r=wr(n,"rgb"),o=r[0],b=r[2],c=1e3,l=4e4,_=.4;l-c>_;){var f=kr(t=.5*(l+c));f[2]/f[0]>=b/o?l=t:c=t}return Or(t)},jr=E,Pr=R,Rr=k,Nr=xr;Pr.prototype.temp=Pr.prototype.kelvin=Pr.prototype.temperature=function(){return Nr(this._rgb)},jr.temp=jr.kelvin=jr.temperature=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Pr,[null].concat(n,["temp"])))},Rr.format.temp=Rr.format.kelvin=Rr.format.temperature=gr;var Er=m.unpack,Br=Math.cbrt,Sr=Math.pow,Lr=Math.sign,Mr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Er(n,"rgb"),r=t[0],g=t[1],b=t[2],o=[$r(r/255),$r(g/255),$r(b/255)],c=o[0],l=o[1],_=o[2],f=Br(.4122214708*c+.5363325363*l+.0514459929*_),h=Br(.2119034982*c+.6806995451*l+.1073969566*_),s=Br(.0883024619*c+.2817188376*l+.6299787005*_);return[.2104542553*f+.793617785*h-.0040720468*s,1.9779984951*f-2.428592205*h+.4505937099*s,.0259040371*f+.7827717662*h-.808675766*s]},Ar=Mr;function $r(n){var e=Math.abs(n);return e<.04045?n/12.92:(Lr(n)||1)*Sr((e+.055)/1.055,2.4)}var zr=m.unpack,Kr=Math.pow,Dr=Math.sign,Gr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=zr(n,"lab"))[0],a=n[1],b=n[2],r=Kr(t+.3963377774*a+.2158037573*b,3),o=Kr(t-.1055613458*a-.0638541728*b,3),s=Kr(t-.0894841775*a-1.291485548*b,3);return[255*Tr(4.0767416621*r-3.3077115913*o+.2309699292*s),255*Tr(-1.2684380046*r+2.6097574011*o-.3413193965*s),255*Tr(-.0041960863*r-.7034186147*o+1.707614701*s),n.length>3?n[3]:1]},Ir=Gr;function Tr(n){var e=Math.abs(n);return e>.0031308?(Dr(n)||1)*(1.055*Kr(e,1/2.4)-.055):12.92*n}var Fr=m.unpack,Cr=m.type,qr=E,Ur=R,Jr=k,Yr=Ar;Ur.prototype.oklab=function(){return Yr(this._rgb)},qr.oklab=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(Ur,[null].concat(n,["oklab"])))},Jr.format.oklab=Ir,Jr.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=Fr(n,"oklab"),"array"===Cr(n)&&3===n.length)return"oklab"}});var Vr=m.unpack,Hr=Ar,Xr=gt,Wr=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=Vr(n,"rgb"),r=t[0],g=t[1],b=t[2],o=Hr(r,g,b),c=o[0],a=o[1],l=o[2];return Xr(c,a,l)},Zr=Wr,Qr=m.unpack,no=St,eo=Ir,to=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];var t=(n=Qr(n,"lch"))[0],r=n[1],o=n[2],c=no(t,r,o),l=c[0],a=c[1],_=c[2],f=eo(l,a,_);return[f[0],f[1],f[2],n.length>3?n[3]:1]},ro=to,oo=m.unpack,io=m.type,ao=E,co=R,input=k,so=Zr;co.prototype.oklch=function(){return so(this._rgb)},ao.oklch=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return new(Function.prototype.bind.apply(co,[null].concat(n,["oklch"])))},input.format.oklch=ro,input.autodetect.push({p:3,test:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];if(n=oo(n,"oklch"),"array"===io(n)&&3===n.length)return"oklch"}});var uo=R,lo=m.type;uo.prototype.alpha=function(a,n){return void 0===n&&(n=!1),void 0!==a&&"number"===lo(a)?n?(this._rgb[3]=a,this):new uo([this._rgb[0],this._rgb[1],this._rgb[2],a],"rgb"):this._rgb[3]},R.prototype.clipped=function(){return this._rgb._clipped||!1};var _o=R,fo=qe;_o.prototype.darken=function(n){void 0===n&&(n=1);var e=this,t=e.lab();return t[0]-=fo.Kn*n,new _o(t,"lab").alpha(e.alpha(),!0)},_o.prototype.brighten=function(n){return void 0===n&&(n=1),this.darken(-n)},_o.prototype.darker=_o.prototype.darken,_o.prototype.brighter=_o.prototype.brighten,R.prototype.get=function(n){var e=n.split("."),t=e[0],r=e[1],o=this[t]();if(r){var i=t.indexOf(r)-("ok"===t.substr(0,2)?2:0);if(i>-1)return o[i];throw new Error("unknown channel "+r+" in mode "+t)}return o};var ho=R,po=m.type,yo=Math.pow,vo=1e-7,bo=20;ho.prototype.luminance=function(n){if(void 0!==n&&"number"===po(n)){if(0===n)return new ho([0,0,0,this._rgb[3]],"rgb");if(1===n)return new ho([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",r=bo,o=function(e,c){var l=e.interpolate(c,.5,t),_=l.luminance();return Math.abs(n-_)n?o(e,l):o(l,c)},c=(e>n?o(new ho([0,0,0]),this):o(this,new ho([255,255,255]))).rgb();return new ho(c.concat([this._rgb[3]]))}return mo.apply(void 0,this._rgb.slice(0,3))};var mo=function(n,g,b){return.2126*(n=go(n))+.7152*(g=go(g))+.0722*(b=go(b))},go=function(n){return(n/=255)<=.03928?n/12.92:yo((n+.055)/1.055,2.4)},ko={},wo=R,Oo=m.type,xo=ko,jo=function(n,e,t){void 0===t&&(t=.5);for(var r=[],o=arguments.length-3;o-- >0;)r[o]=arguments[o+3];var c=r[0]||"lrgb";if(xo[c]||r.length||(c=Object.keys(xo)[0]),!xo[c])throw new Error("interpolation mode "+c+" is not defined");return"object"!==Oo(n)&&(n=new wo(n)),"object"!==Oo(e)&&(e=new wo(e)),xo[c](n,e,t).alpha(n.alpha()+t*(e.alpha()-n.alpha()))},Po=R,Ro=jo;Po.prototype.mix=Po.prototype.interpolate=function(n,e){void 0===e&&(e=.5);for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];return Ro.apply(void 0,[this,n,e].concat(t))};var No=R;No.prototype.premultiply=function(n){void 0===n&&(n=!1);var e=this._rgb,a=e[3];return n?(this._rgb=[e[0]*a,e[1]*a,e[2]*a,a],this):new No([e[0]*a,e[1]*a,e[2]*a,a],"rgb")};var Eo=R,Bo=qe;Eo.prototype.saturate=function(n){void 0===n&&(n=1);var e=this,t=e.lch();return t[1]+=Bo.Kn*n,t[1]<0&&(t[1]=0),new Eo(t,"lch").alpha(e.alpha(),!0)},Eo.prototype.desaturate=function(n){return void 0===n&&(n=1),this.saturate(-n)};var So=R,Lo=m.type;So.prototype.set=function(n,e,t){void 0===t&&(t=!1);var r=n.split("."),o=r[0],c=r[1],l=this[o]();if(c){var i=o.indexOf(c)-("ok"===o.substr(0,2)?2:0);if(i>-1){if("string"==Lo(e))switch(e.charAt(0)){case"+":case"-":l[i]+=+e;break;case"*":l[i]*=+e.substr(1);break;case"/":l[i]/=+e.substr(1);break;default:l[i]=+e}else{if("number"!==Lo(e))throw new Error("unsupported value for Color.set");l[i]=e}var _=new So(l,o);return t?(this._rgb=_._rgb,this):_}throw new Error("unknown channel "+c+" in mode "+o)}return l};var Mo=R,Ao=function(n,e,t){var r=n._rgb,o=e._rgb;return new Mo(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"rgb")};ko.rgb=Ao;var $o=R,zo=Math.sqrt,Ko=Math.pow,Do=function(n,e,t){var r=n._rgb,o=r[0],c=r[1],l=r[2],_=e._rgb,f=_[0],h=_[1],d=_[2];return new $o(zo(Ko(o,2)*(1-t)+Ko(f,2)*t),zo(Ko(c,2)*(1-t)+Ko(h,2)*t),zo(Ko(l,2)*(1-t)+Ko(d,2)*t),"rgb")};ko.lrgb=Do;var Go=R,Io=function(n,e,t){var r=n.lab(),o=e.lab();return new Go(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"lab")};ko.lab=Io;var To=R,Fo=function(n,e,t,r){var o,c,l,_,f,h,d,y,v,m,k,w,O;return"hsl"===r?(l=n.hsl(),_=e.hsl()):"hsv"===r?(l=n.hsv(),_=e.hsv()):"hcg"===r?(l=n.hcg(),_=e.hcg()):"hsi"===r?(l=n.hsi(),_=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",l=n.hcl(),_=e.hcl()):"oklch"===r&&(l=n.oklch().reverse(),_=e.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(f=(o=l)[0],d=o[1],v=o[2],h=(c=_)[0],y=c[1],m=c[2]),isNaN(f)||isNaN(h)?isNaN(f)?isNaN(h)?w=Number.NaN:(w=h,1!=v&&0!=v||"hsv"==r||(k=y)):(w=f,1!=m&&0!=m||"hsv"==r||(k=d)):w=f+t*(h>f&&h-f>180?h-(f+360):h180?h+360-f:h-f),void 0===k&&(k=d+t*(y-d)),O=v+t*(m-v),new To("oklch"===r?[O,k,w]:[w,k,O],r)},Co=Fo,qo=function(n,e,t){return Co(n,e,t,"lch")};ko.lch=qo,ko.hcl=qo;var Uo=R,Jo=function(n,e,t){var r=n.num(),o=e.num();return new Uo(r+t*(o-r),"num")};ko.num=Jo;var Yo=Fo,Vo=function(n,e,t){return Yo(n,e,t,"hcg")};ko.hcg=Vo;var Ho=Fo,Xo=function(n,e,t){return Ho(n,e,t,"hsi")};ko.hsi=Xo;var Wo=Fo,Zo=function(n,e,t){return Wo(n,e,t,"hsl")};ko.hsl=Zo;var Qo=Fo,ni=function(n,e,t){return Qo(n,e,t,"hsv")};ko.hsv=ni;var ei=R,ti=function(n,e,t){var r=n.oklab(),o=e.oklab();return new ei(r[0]+t*(o[0]-r[0]),r[1]+t*(o[1]-r[1]),r[2]+t*(o[2]-r[2]),"oklab")};ko.oklab=ti;var ri=Fo,oi=function(n,e,t){return ri(n,e,t,"oklch")};ko.oklch=oi;var ii=R,ai=m.clip_rgb,ci=Math.pow,si=Math.sqrt,ui=Math.PI,_i=Math.cos,fi=Math.sin,hi=Math.atan2,pi=function(n,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var r=n.length;t||(t=Array.from(new Array(r)).map((function(){return 1})));var o=r/t.reduce((function(a,b){return a+b}));if(t.forEach((function(n,i){t[i]*=o})),n=n.map((function(n){return new ii(n)})),"lrgb"===e)return di(n,t);for(var c=n.shift(),l=c.get(e),_=[],f=0,h=0,i=0;i=360;)m-=360;l[v]=m}else l[v]=l[v]/_[v];return y/=r,new ii(l,e).alpha(y>.99999?1:y,!0)},di=function(n,e){for(var t=n.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new ii(ai(r))},yi=E,vi=m.type,bi=Math.pow,mi=function(n){var e="rgb",t=yi("#ccc"),r=0,o=[0,1],c=[],l=[0,0],_=!1,f=[],h=!1,d=0,y=1,v=!1,m={},k=!0,w=1,O=function(n){if((n=n||["#fff","#000"])&&"string"===vi(n)&&yi.brewer&&yi.brewer[n.toLowerCase()]&&(n=yi.brewer[n.toLowerCase()]),"array"===vi(n)){1===n.length&&(n=[n[0],n[0]]),n=n.slice(0);for(var e=0;e=_[i];)i++;return i-1}return 0},j=function(n){return n},P=function(n){return n},R=function(n,r){var col,o;if(null==r&&(r=!1),isNaN(n)||null===n)return t;o=r?n:_&&_.length>2?x(n)/(_.length-2):y!==d?(n-d)/(y-d):1,o=P(o),r||(o=j(o)),1!==w&&(o=bi(o,w)),o=l[0]+o*(1-l[0]-l[1]),o=Math.min(1,Math.max(0,o));var h=Math.floor(1e4*o);if(k&&m[h])col=m[h];else{if("array"===vi(f))for(var i=0;i=p&&i===c.length-1){col=f[i];break}if(o>p&&o2){var _=n.map((function(e,i){return i/(n.length-1)})),h=n.map((function(n){return(n-d)/(y-d)}));h.every((function(n,i){return _[i]===n}))||(P=function(n){if(n<=0||n>=1)return n;for(var i=0;n>=h[i+1];)i++;var e=(n-h[i])/(h[i+1]-h[i]);return _[i]+e*(_[i+1]-_[i])})}}return o=[d,y],E},E.mode=function(n){return arguments.length?(e=n,N(),E):e},E.range=function(n,e){return O(n),E},E.out=function(n){return h=n,E},E.spread=function(n){return arguments.length?(r=n,E):r},E.correctLightness=function(n){return null==n&&(n=!0),v=n,N(),j=v?function(n){for(var e=R(0,!0).lab()[0],t=R(1,!0).lab()[0],r=e>t,o=R(n,!0).lab()[0],c=e+(t-e)*n,l=o-c,_=0,f=1,h=20;Math.abs(l)>.01&&h-- >0;)r&&(l*=-1),l<0?(_=n,n+=.5*(f-n)):(f=n,n+=.5*(_-n)),o=R(n,!0).lab()[0],l=o-c;return n}:function(n){return n},E},E.padding=function(p){return null!=p?("number"===vi(p)&&(p=[p,p]),l=p,E):l},E.colors=function(e,t){arguments.length<2&&(t="hex");var r=[];if(0===arguments.length)r=f.slice(0);else if(1===e)r=[E(.5)];else if(e>1){var c=o[0],dd=o[1]-c;r=gi(0,e,!1).map((function(i){return E(c+i/(e-1)*dd)}))}else{n=[];var l=[];if(_&&_.length>2)for(var i=1,h=_.length,d=1<=h;d?ih;d?i++:i--)l.push(.5*(_[i-1]+_[i]));else l=o;r=l.map((function(n){return E(n)}))}return yi[t]&&(r=r.map((function(n){return n[t]()}))),r},E.cache=function(n){return null!=n?(k=n,E):k},E.gamma=function(g){return null!=g?(w=g,E):w},E.nodata=function(n){return null!=n?(t=yi(n),E):t},E};function gi(n,e,t){for(var r=[],o=nc;o?i++:i--)r.push(i);return r}var ki=R,wi=mi,Oi=function(n){for(var e=[1,1],i=1;i=5))throw new RangeError("No point in running bezier with only one color.");var h,d,y;h=n.map((function(n){return n.lab()})),y=n.length-1,d=Oi(y),o=function(n){var u=1-n,e=[0,1,2].map((function(i){return h.reduce((function(e,t,r){return e+d[r]*Math.pow(u,y-r)*Math.pow(n,r)*t[i]}),0)}));return new ki(e,"lab")}}return o},ji=function(n){var e=xi(n);return e.scale=function(){return wi(e)},e},Pi=E,Ri=function(n,e,t){if(!Ri[t])throw new Error("unknown blend mode "+t);return Ri[t](n,e)},Ni=function(n){return function(e,t){var r=Pi(t).rgb(),o=Pi(e).rgb();return Pi.rgb(n(r,o))}},Ei=function(n){return function(e,t){var r=[];return r[0]=n(e[0],t[0]),r[1]=n(e[1],t[1]),r[2]=n(e[2],t[2]),r}},Bi=function(a){return a},Si=function(a,b){return a*b/255},Li=function(a,b){return a>b?b:a},Mi=function(a,b){return a>b?a:b},Ai=function(a,b){return 255*(1-(1-a/255)*(1-b/255))},$i=function(a,b){return b<128?2*a*b/255:255*(1-2*(1-a/255)*(1-b/255))},zi=function(a,b){return 255*(1-(1-b/255)/(a/255))},Ki=function(a,b){return 255===a||(a=b/255*255/(1-a/255))>255?255:a};Ri.normal=Ni(Ei(Bi)),Ri.multiply=Ni(Ei(Si)),Ri.screen=Ni(Ei(Ai)),Ri.overlay=Ni(Ei($i)),Ri.darken=Ni(Ei(Li)),Ri.lighten=Ni(Ei(Mi)),Ri.dodge=Ni(Ei(Ki)),Ri.burn=Ni(Ei(zi));for(var Di=Ri,Gi=m.type,Ii=m.clip_rgb,Ti=m.TWOPI,Fi=Math.pow,Ci=Math.sin,qi=Math.cos,Ui=E,Ji=function(n,e,t,r,o){void 0===n&&(n=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===r&&(r=1),void 0===o&&(o=[0,1]);var dl,c=0;"array"===Gi(o)?dl=o[1]-o[0]:(dl=0,o=[o,o]);var l=function(l){var a=Ti*((n+120)/360+e*l),_=Fi(o[0]+dl*l,r),f=(0!==c?t[0]+l*c:t)*_*(1-_)/2,h=qi(a),d=Ci(a);return Ui(Ii([255*(_+f*(-.14861*h+1.78277*d)),255*(_+f*(-.29227*h-.90649*d)),255*(_+f*(1.97294*h)),1]))};return l.start=function(s){return null==s?n:(n=s,l)},l.rotations=function(n){return null==n?e:(e=n,l)},l.gamma=function(g){return null==g?r:(r=g,l)},l.hue=function(n){return null==n?t:("array"===Gi(t=n)?0==(c=t[1]-t[0])&&(t=t[1]):c=0,l)},l.lightness=function(n){return null==n?o:("array"===Gi(n)?(o=n,dl=n[1]-n[0]):(o=[n,n],dl=0),l)},l.scale=function(){return Ui.scale(l)},l.hue(t),l},Yi=R,Vi="0123456789abcdef",Hi=Math.floor,Xi=Math.random,Wi=function(){for(var code="#",i=0;i<6;i++)code+=Vi.charAt(Hi(16*Xi()));return new Yi(code,"hex")},Zi=_,Qi=Math.log,na=Math.pow,ea=Math.floor,ta=Math.abs,ra=function(data,n){void 0===n&&(n=null);var e={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Zi(data)&&(data=Object.values(data)),data.forEach((function(t){n&&"object"===Zi(t)&&(t=t[n]),null==t||isNaN(t)||(e.values.push(t),e.sum+=t,te.max&&(e.max=t),e.count+=1)})),e.domain=[e.min,e.max],e.limits=function(n,t){return oa(e,n,t)},e},oa=function(data,n,e){void 0===n&&(n="equal"),void 0===e&&(e=7),"array"==Zi(data)&&(data=ra(data));var t=data.min,r=data.max,o=data.values.sort((function(a,b){return a-b}));if(1===e)return[t,r];var c=[];if("c"===n.substr(0,1)&&(c.push(t),c.push(r)),"e"===n.substr(0,1)){c.push(t);for(var i=1;i 0");var l=Math.LOG10E*Qi(t),_=Math.LOG10E*Qi(r);c.push(t);for(var f=1;f200&&(O=!1)}for(var G={},I=0;Ie?(n+.05)/(e+.05):(e+.05)/(n+.05)},sa=R,ua=Math.sqrt,la=Math.pow,_a=Math.min,fa=Math.max,ha=Math.atan2,pa=Math.abs,da=Math.cos,ya=Math.sin,va=Math.exp,ba=Math.PI,ma=function(a,b,n,e,t){void 0===n&&(n=1),void 0===e&&(e=1),void 0===t&&(t=1);var r=function(n){return 360*n/(2*ba)},o=function(n){return 2*ba*n/360};a=new sa(a),b=new sa(b);var c=Array.from(a.lab()),l=c[0],_=c[1],f=c[2],h=Array.from(b.lab()),d=h[0],y=h[1],v=h[2],m=(l+d)/2,k=(ua(la(_,2)+la(f,2))+ua(la(y,2)+la(v,2)))/2,w=.5*(1-ua(la(k,7)/(la(k,7)+la(25,7)))),O=_*(1+w),x=y*(1+w),j=ua(la(O,2)+la(f,2)),P=ua(la(x,2)+la(v,2)),R=(j+P)/2,N=r(ha(f,O)),E=r(ha(v,x)),B=N>=0?N:N+360,S=E>=0?E:E+360,L=pa(B-S)>180?(B+S+360)/2:(B+S)/2,M=1-.17*da(o(L-30))+.24*da(o(2*L))+.32*da(o(3*L+6))-.2*da(o(4*L-63)),A=S-B;A=pa(A)<=180?A:S<=B?A+360:A-360,A=2*ua(j*P)*ya(o(A)/2);var $=d-l,z=P-j,K=1+.015*la(m-50,2)/ua(20+la(m-50,2)),D=1+.045*R,G=1+.015*R*M,I=30*va(-la((L-275)/25,2)),T=-2*ua(la(R,7)/(la(R,7)+la(25,7)))*ya(2*o(I)),F=ua(la($/(n*K),2)+la(z/(e*D),2)+la(A/(t*G),2)+T*(z/(e*D))*(A/(t*G)));return fa(0,_a(100,F))},ga=R,ka=function(a,b,n){void 0===n&&(n="lab"),a=new ga(a),b=new ga(b);var e=a.get(n),t=b.get(n),r=0;for(var i in e){var o=(e[i]||0)-(t[i]||0);r+=o*o}return Math.sqrt(r)},wa=R,Oa=function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];try{return new(Function.prototype.bind.apply(wa,[null].concat(n))),!0}catch(n){return!1}},xa=E,ja=mi,Pa={cool:function(){return ja([xa.hsl(180,1,.9),xa.hsl(250,.7,.4)])},hot:function(){return ja(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ra={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},i=0,Na=Object.keys(Ra);i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return w.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),w=t(551),x=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:w.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:x.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),w=t(522),x=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new x.a([r,o]),piece:w.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=w.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),w=t(127),x=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?x.a.fetch(this.preset_info.first_location_key):x.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=x.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=x.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=w.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=w.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new w.a([o,t]),piece:c,promoted:_,location:x.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var k=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(k),this.move_info_create({type:"put",to:k}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var O=!0;if(this.sp_piece_auto_promote){var j=o.piece.piece_vector.force_promote_length;null!=j&&o.top_spaces<=j&&(this.promotable_piece_moved(o,!0),O=!1)}O&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var w=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(w.name),console.log(w.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(e,t)+n,r=this.hold_pieces[e.key];f.a.delete(r,t.key),o>=1&&f.a.set(r,t.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(e,t,n){var o=this.hold_pieces_count(e,t);return n>o&&(n=o),n}},{key:"board_safe_delete_on",value:function(e){this.board.delete_at(e)}},{key:"board_piece_fore_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t);return n?n.css_class_list:[]}},{key:"cell_piece_class",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o=[];return n&&o.push("location_".concat(n.location.key)),o}},{key:"cell_view",value:function(e){var t=d.a.fetch(e),n=this.board.lookup(t),o="";return n&&(o=n.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var e=Number(this.current_turn);return e<0&&(e+=this.turn_offset_max+1),this.turn_clamp(e)}},{key:"turn_clamp",value:function(e){return l.a.clamp(Number(e),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(e){return x.Xinteger.imodulo(Number(e),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(e){var t=Object.entries(this.hold_pieces[e.key]);return l()(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(e){return this.piece_box[e.key]||0}},{key:"piece_box_add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.piece_box_count(e)+t;f.a.delete(this.piece_box,e.key),n>=1&&f.a.set(this.piece_box,e.key,n)}},{key:"piece_box_can_be_reduced_count",value:function(e,t){var n=this.piece_box_count(e);return t>n&&(t=n),t}},{key:"piece_box_realize",get:function(){var e=Object.entries(this.piece_box);return l()(e).filter((function(e){var t=Object(o.a)(e,2);t[0];return t[1]>=1})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[v.a.fetch(n),r]})).sortBy((function(e){var t=Object(o.a)(e,2),n=t[0];t[1];return n.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(e){var t=this;l.a.forIn(this.hold_pieces[e.key],(function(n,o){var r=v.a.fetch(o);t.hold_pieces_add(e,r,-n),t.piece_box_add(r,n)}))}},{key:"piece_box_to_hold_pieces",value:function(e){var t=this;l.a.forIn(this.piece_box,(function(n,o){var r=v.a.fetch(o);t.piece_box_add(r,-n),t.hold_pieces_add(e,r,n)}))}},{key:"piece_box_reset_by_preset",value:function(e){var t=this;this.piece_box_clear(),O.a.fetch(e).piece_box.forEach((function(e){var n=Object(o.a)(e,2),r=n[0],c=n[1];t.piece_box_add(v.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var e=this;this.piece_box_clear();var t=this.hold_piece_all_counts_hash,n=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=v.a.fetch(_),h=l-((t[f.key]||0)+(n[f.key]||0));e.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var e=this,t={};return j.a.values.forEach((function(n){l.a.forIn(e.hold_pieces[n.key],(function(e,n){t[n]=(t[n]||0)+e}))})),t}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(e){return e?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var e=!1;return e||(e=this.king_formation_set("bottom_left")),e||(e=this.king_formation_set("bottom_right")),e}},{key:"king_formation_auto_unset",value:function(){var e=!1;return e||(e=this.king_formation_unset("bottom_left")),e||(e=this.king_formation_unset("bottom_right")),e}},{key:"king_formation_set",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return t.board.lookup(e.place)})))return n.forEach((function(e){return t.piece_search_and_place_on(e)})),!0}},{key:"king_formation_unset",value:function(e){var t=this,n=this.king_formation_soldiers(e);if(!n.some((function(e){return!t.board.lookup(e.place)})))return n.forEach((function(e){var n=t.board.lookup(e.place);if(n){var o=n.piece;t.board.delete_at(n.place),"K"===o.key?t.piece_box_add(o):t.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(e){if(!this.board.lookup(e.place)){if("K"===e.piece.key)this.piece_search_and_decrement(e.piece);else if(!this.piece_search_and_decrement(e.piece))return;this.board.place_on(e)}}},{key:"piece_search_and_decrement",value:function(e){var t=!1;return t||(t=this.piece_search_on_hold_pieces_and_decrement("white",e)),t||this.piece_box_count(e)>=1&&(this.piece_box_add(e,-1),t=!0),t}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(e,t){var n=j.a.fetch(e);if(this.hold_pieces_count(n,t)>=1)return this.hold_pieces_add(n,t,-1),!0}},{key:"king_formation_soldiers",value:function(e){var t=null,n=null,o=null,r=null;return"bottom_left"===e&&(t=0,n=1,o=h.a.dimension-1,r=-1),"bottom_right"===e&&(t=h.a.dimension-1,n=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[t,o]},{piece:"P",promoted:!0,location:"white",place:[t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o+r]},{piece:"P",promoted:!0,location:"white",place:[t+n+n,o]}].map((function(e){return new y.a({piece:v.a.fetch(e.piece),promoted:e.promoted,location:j.a.fetch(e.location),place:d.a.fetch(e.place)})}))}},{key:"slide_xy",value:function(e,t){this.board=this.board.slide_xy(e,t)}},{key:"shuffle_apply",value:function(e){var t=this.board.shuffle_apply(e);if(t)return this.board=t,!0}}]),e}()},180:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return m}));n(37),n(32),n(43),n(44);var r=n(20),c=n(177),_=n(178),l=(n(11),n(542),n(529),n(36),n(31),n(98),n(23)),f=n.n(l),h=n(2),d=n(521),v=n(127);function y(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var m=function(){function e(){Object(c.a)(this,e),this._surface={}}return Object(_.a)(e,[{key:"delete_at",value:function(e){h.a.delete(this._surface,e.key)}},{key:"place_on",value:function(e){this.delete_at(e.place),h.a.set(this._surface,e.place.key,e)}},{key:"move_m1",value:function(e,t){this.delete_at(e.place),this.place_on(t)}},{key:"move_m2",value:function(e,t){this.move_m1(e,e.clone_with_attrs({place:t}))}},{key:"lookup",value:function(e){return this._surface[e.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(t,n){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(e,t)||this.repeat_reach(e,t,n)}},{key:"once_reach",value:function(e,t){var n=this,o=!1,r=e.once_vectors;return r&&(o=r.some((function(o){if(o)return n.once_reach_vec(e,t,o)}))),o}},{key:"once_reach_vec",value:function(e,t,n){var o=n[0],r=n[1]*e.location.value_sign,c=e.place.x+o,_=e.place.y+r;return c===t.x&&_===t.y}},{key:"repeat_reach",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=e.repeat_vectors;return c&&(r=c.some((function(r){if(r)return n.repeat_reach_vec(e,t,r,o)}))),r}},{key:"repeat_reach_vec",value:function(e,t,n){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=e.place.x,c=e.place.y,_=n[0],l=n[1]*e.location.value_sign,f=r+_,h=c+l,d=!1;!v.a.xy_invalid_p(f,h);){if(f===t.x&&h===t.y){d=!0;break}if("non_stop"==o.mode);else{var y=v.a.fetch([f,h]);if(this.lookup(y))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(e,t){var n=this.shallow_clone;return n.move_m2(e,t),n.king_capture_p(e.location)}},{key:"puton_then_king_capture_p",value:function(e){var t=this.shallow_clone;return t.place_on(e),t.king_capture_p(e.location)}},{key:"king_capture_p",value:function(e){var t=this,n=this.king_find_by_location(e);if(n)return this.soldiers_by_location(e.flip).some((function(e){return t.reach_p(e,n.place)}))}},{key:"king_find_by_location",value:function(e){return this.soldiers.find((function(t){return"K"==t.piece.key&&t.location.key==e.key}))}},{key:"shallow_clone",get:function(){var t=new e;return t._surface=function(e){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),n.push(r)})),n.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(e,t){return[this.dimension-e-1,this.dimension-t-1]}}]),e}();void 0!==e&&e.argv[1]===o&&console.log(m.dimension)}).call(this,n(179),"/index.js")},314:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return L}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(33),n(75),n(11),n(31),n(74),n(527),n(98),n(57),n(525)),v=n.n(d),y=n(2),m=n(23),k=n.n(m),O=n(180),j=n(528),x=n(522),w=n(127),P=n(521),R=n(71),B=n(536);n(128);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var S,L=function(e){Object(l.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var e=v()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=v.a.exec(this.raw_body,e)}},{key:"board",get:function(){var e=this,t=new O.a;return this.attributes.board.split("/").forEach((function(n,o){var r=0;v.a.forEach(n,v()("(?\\+?)(?\\S)"),(function(n,i){if(/\d+/.test(n.piece))r+=Number(n.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(n.piece),promoted:"+"===n.promoted,location:e.__location_by_upper_or_lower_case(n.piece)});t.place_on(c),r++}}))})),t}},{key:"base_location",get:function(){var e=null;return e="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(e)}},{key:"hold_pieces",get:function(){var e=this,t=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&v.a.forEach(this.attributes.hold_pieces,v()("(?\\d+)?(?\\S)"),(function(n,i){var o=x.a.fetch(n.piece_char),r=Number(n.count||1),c=e.__location_by_upper_or_lower_case(n.piece_char);r+=t[c.key][o.key]||0,y.a.set(t[c.key],o.key,r)})),t}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var e=this,t=[];return k.a.forEach(this.moves,(function(n,i){var o=B.a.parse(n);if(!o)return!1;o.location=e.location_by_offset(i),t.push(o)})),t}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(1),e.join(" ")}},{key:"init_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.init_sfen_strip),e.join(" ")}},{key:"init_sfen_strip",get:function(){var e=[];return e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),e.join(" ")}},{key:"to_sfen",get:function(){var e=[];return e.push("position"),e.push("sfen"),e.push(this.attributes.board),e.push(this.attributes.b_or_w),e.push(this.attributes.hold_pieces),e.push(this.attributes.turn_counter_next),this.moves_exist_p&&(e.push("moves"),e.push(this.attributes.moves)),e.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(e){var t=null;return t=/[A-Z]/.test(e)?"black":"white",R.a.fetch(t)}}],[{key:"sfen_flop",value:function(e){var source=this.parse(e);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(e){return e.to_flop_sfen})).join(" "),source.to_sfen}}]),n}(j.a);void 0!==e&&e.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,n(179),"/index.js")},315:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return y}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516),h=(n(57),n(520)),d=n(71);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var y=function(e){Object(_.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"locations",get:function(){return this.location_keys.map((function(e){return d.a.fetch(e)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),n}(h.a);void 0!==e&&e.argv[1]===o&&console.log(y.fetch("both").locations)}).call(this,n(179),"/index.js")},316:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),n}(n(520).a)},323:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return N}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(98),n(529),n(11),n(31),n(33),n(527),n(498),n(320),n(75),n(74),n(525)),v=n.n(d),y=n(535),m=n.n(y),k=n(528),O=n(180),j=n(522),x=n(127),w=n(71),P=n(314),R=n(524),B=n(521),E=n(538);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}v.a.uninstall("namespacing");var L=v()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(e){Object(l.a)(n,e);var t=S(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(n.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var e=new P.a;return e.raw_body=this.preset_info.sfen,e.parse(),e.board}},{key:"preset_key",get:function(){var e=this.header["手合割"];return"その他"===e?null:e||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var e=this,t=null;this.raw_body.split(/\n/).forEach((function(line){var n=v.a.exec(line,L);if(n)if(n.key){var o=n.value.trim();if(e.header[n.key]=o,n.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),v.a.forEach(s,v()("(?\\D)(?\\d*)"),(function(t,o){var r=j.a.lookup_by_name(t.piece_char),c=Number(t.count||1),_=n.key.match(/[上後]/)?"white":"black";c+=e.hold_pieces[_][r.key]||0,e.hold_pieces[_][r.key]=c}))}}else if(n.comment){var r,c,i=e.move_infos.length;null!==(c=(r=e.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),e.comment_lines_hash[i].push(n.comment)}else if(n.board)e.board_lines.push(n.board);else if(n.direct_location)e.direct_location=w.a.fetch(n.direct_location.match(/[上後]/)?"white":"black");else if(n.latest_triangle)e.direct_location=w.a.fetch("▲"===n.latest_triangle?"white":"black");else if(n.number){var _={};_.location=e.location_by_offset(Number(n.number)-1),n.origin_place&&(_.origin_place=x.a.fetch(n.origin_place)),m()(n.to||n.same),n.to?(_.place=x.a.fetch(n.to),t=_.place):(m()(n.same),m()(t),_.place=t),"成"===n.motion&&(_.promoted_trigger=!0),"打"===n.motion&&(_.drop_piece=j.a.lookup_by_name(n.piece)),e.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(e){this._move_infos=e}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(e){this._comment_lines_hash=e}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var e=new O.a;return this.board_lines.forEach((function(t,n){v.a.forEach(t,v()("(?.)(?\\S)"),(function(t,o){if("・"===t.piece);else{var r="v"===t.arrow?"white":"black",c=j.a.lookup_by_name(t.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(t.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,n]),piece:c,promoted:_,location:w.a.fetch(r)});e.place_on(l)}}))})),e}}]),n}(k.a);if(void 0!==e&&e.argv[1]===o){var A=new N;A.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",A.parse(),console.log(A.move_infos),console.log(A.comment_lines_hash),console.log(void 0===A.init_sfen)}}).call(this,n(179),"/index.js")},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),n}(n(520).a)},325:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(23),n(71);var o=n(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName)return!0},nav_focus_to:function(e){if(this.focus_disable_p)return!1;var t=this.__navigate_block_element_refs(e);return!!t&&(t.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs("SpSlider");return!!e&&e.focus_to_self()},__navigate_block_element_refs:function(e){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[e]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(319),n(72),n(73);var o=n(23),r=n.n(o),c=(n(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(e){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(e.shiftKey,e.ctrlKey,e.altKey,e.metaKey),this.log("e",e),this.log("key",e.key),this.log("code",e.code),this.log("repeat",e.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(e)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var t=document.activeElement;if(this.$NavigateBlock){var n=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==t&&"BODY"!==t.tagName&&!r.a.includes(n,t))return}"Backspace"!==e.code&&"ArrowUp"!==e.code&&"ArrowLeft"!==e.code&&"k"!==e.key&&"p"!==e.key&&"b"!==e.key||(this.api_turn_add(-1,{interactive:e}),e.preventDefault()),"Space"!==e.code&&"Enter"!==e.code&&"ArrowDown"!==e.code&&"ArrowRight"!==e.code&&"j"!==e.key&&"n"!==e.key&&"f"!==e.key||(this.api_turn_add(1,{interactive:e}),e.preventDefault())}},api_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(e,t),this.turn_slider_focus()||(e>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,e),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,e),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+e,t)},current_turn_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;n=t.cycle?this.xcontainer.turn_cycle(e):this.xcontainer.turn_clamp(e),this.turn_offset!==n&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(n),this.play_p&&this.play_mode_xcontainer_seek_to(n),this.event_call("update:sp_turn",this.turn_offset),t.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(72),n(73),n(11),n(22);var o=n(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(e){return o.a.keys.includes(e)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(e){this.mut_viewpoint=e},mut_viewpoint:function(e){this.event_call("update:sp_viewpoint",e)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={components:{ShortcutViewer:n(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n(58),n(45),n(12),n(76),n(52),n(33),n(32),n(77),n(78);var o=n(523),r=(n(11),n(22),n(71)),c=n(127);function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){_=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(_)throw r}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i ").concat(y)),y)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t)}}if(c.a.isEqual(this.place_from,n))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(t)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(n,t);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(n,t);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,n)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,n))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:n}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(n);if(this.xcontainer.board.puton_then_king_capture_p(k,n)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:n}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(n.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(n);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(e){this.promotable_piece_moved(this.dialog_soldier,e)},promotable_piece_moved:function(e,t){e=e.clone_with_attrs({promoted:t}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:e}),this.moves_set(),this.xcontainer.board.place_on(e),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(e){this.last_move_info=new _.a(y(y({},e),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(e,t){this.log("盤のセルを右クリック");var n=l.a.fetch(e);if(n.tennozan_p&&t.shiftKey&&t.altKey&&(t.metaKey||t.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(n);this.hold_cancel(t)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(n,t))}},membership_click_handle:function(e,t){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===e?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(t,e),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(e),!0)},piece_stand_piece_click:function(e,t,n,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(e,t)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&e!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=t,this.have_piece_location=e,this.have_piece_promoted=n,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(e){return c.a.isNil(this.have_piece_location)&&this.have_piece===e},piece_box_other_click:function(e){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var t=this.hold_piece_source_cut(e);return this.xcontainer.piece_box_add(this.have_piece,t),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(e,t){this.piece_box_other_click(t)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=e,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(t,this.origin_soldier2))},hold_cancel:function(e){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(e){this.xcontainer.hold_pieces_add(e,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(e,t){this.log("相手の持駒を自分の駒台に移動");var n=this.hold_piece_source_cut(e);this.xcontainer.hold_pieces_add(t,this.have_piece,n),this.lifted_piece_cancel()},hold_piece_source_cut:function(e){var t=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),t=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,t),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-t)):(this.log("駒箱から移動"),this.meta_p(e)&&(this.log("シフトが押されていたので全部移動"),t=this.xcontainer.piece_box_count(this.have_piece)),t=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,t),this.xcontainer.piece_box_add(this.have_piece,-t)),t},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(e){if(this.lifted_p&&e&&e.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,e.place))return!0},soldier_hold:function(e,t){this.place_from=e,this.lp_create(t,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(e,t){this.lifted_piece_cancel()},fn_flip_all:function(){var e=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,t){return a[t.key]=e.xcontainer.hold_pieces[t.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(e){return new f.a({piece:this.have_piece,place:e,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(e){return e.shiftKey|e.ctrlKey|e.altKey|e.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20),r=(n(12),n(540));function c(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function _(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},n=r.a.fetch(e);if(this.log("反則: ".concat(n.name)),t=_(_({},n),t),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",t),"__cancel__";this.illegal_list.push(t)}}}},332:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(72),n(73),n(11),n(22),n(51),n(98),n(23)),c=n.n(r),_=n(128),l=n(71),f=n(315),h=n(535),d=n.n(h),v={props:{sp_human_side:{type:String,default:"both",validator:function(e){return f.a.keys.includes(e)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var e=this;this.$watch((function(){return[e.xcontainer,e.init_location_key]}),(function(){e.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(e){this.event_call("ev_edit_mode_short_sfen2_change",e)},"xcontainer.to_short_sfen":{handler:function(e){this.event_call("ev_short_sfen_change",e)}},turn_offset:function(e){this.event_call("ev_turn_offset_change",e)},moves_take_turn_offset:function(e){this.event_call("ev_play_mode_moves_change",e)},current_comments:function(e){this.event_call("ev_comment_change",e)}},methods:{play_mode_setup_from:function(e){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===e&&this.play_mode_setup(),"edit"===e&&this.init_sfen_set()):("view"===e&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(e){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=e,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var e=this.xcontainer.sfen_serializer;return["position sfen",e.to_board_sfen,this.init_location.key[0],e.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(72),n(73),n(11),n(22);var o=n(128),r=n(524),c={props:{sp_preset:{type:String,default:null,validator:function(e){return r.a.keys.includes(e)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(e){this.mut_preset_key=e},mut_preset_key:function(e){this.xcontainer_setup_by_preset(e)}},methods:{xcontainer_setup_by_preset:function(e){null!=e&&(e=r.a.fetch(e),this.xcontainer=new o.a,e.sfen&&(this.xcontainer.data_source=this.data_source_by(e.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(180),r=n(521),c=n(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var e=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(e),e},api_place_on:function(e){this.xcontainer.board.place_on(e)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(e){this.xcontainer_setup(e)},api_play_mode_seek_to:function(e){this.play_mode_xcontainer_seek_to(e)},api_viewpoint_set:function(e){this.mut_viewpoint=e},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var e=this.turn_offset-2;e<0&&(e=0),this.api_board_turn_set(e)},api_sfen_or_kif_set:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(e),this.xcontainer.current_turn=t.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var o=n(20);function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(t=c({container:this.root_container_query,message:e,position:"is-bottom",type:"is-primary",duration:2,queue:!1},t)).duration=1e3*t.duration,this.$buefy.toast.open(t)},dialog_call:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=c({container:this.root_container_query,message:e,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},t),this.$buefy.dialog.prompt(t)}}}},337:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(523),r=(n(11),n(51),n(23)),c=n.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(e){this.mut_debug=e},sp_event_log:function(e){this.mut_event_log=e},sp_layer:function(e){this.mut_layer=e}},methods:{log:function(){var e;this.debug_or_development_p&&(e=console).log.apply(e,arguments)},event_call:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&o>0){var r=this[e.attr_w],c=this[e.attr_h],_=Math.abs(r-n),l=Math.abs(c-o),f=_>e.threshold||l>e.threshold;f&&(this[e.attr_w]=n,this[e.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(e.key,"] ").concat(r,"x").concat(c," -> ").concat(n,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(523),r=(n(51),n(11),n(517),n(177)),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),n}(n(520).a),v={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var e=this.$data._lp_latest_mouse_event.clientX,t=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:e,y:t})}},lp_create:function(e,t){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(t),this.lp_mouse_stick_p=!0,e&&(this.$data._lp_latest_mouse_event=e,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(e){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var t=this.lp_el_create(["PieceTap"]),n=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(e.css_class_list)));t.classList.add(e.location.flip_if(this.fliped).position_key),n.appendChild(r),t.appendChild(n),this.$data._LiftedPieceElement.appendChild(t);var c=e.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(e.place){var l=this.place_to_cell_info(e.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(e){var t=this;this.$data._lp_latest_mouse_event=e,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){t.lp_pos_update(),t.lp_pos_update_need_p=!1})))},lp_click_hook:function(e){1!==e.which&&this.lifted_piece_cancel()},lp_el_create:function(e){var t,n=document.createElement("div");return(t=n.classList).add.apply(t,Object(o.a)(e)),n}}}},343:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(72),n(73),n(11),n(22),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var h=function(e){Object(c.a)(n,e);var t=f(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),n}(n(520).a),d={props:{sp_device:{type:String,default:null,validator:function(e){return h.keys.includes(e)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(e){this.detected_real_device="changedTouches"in e?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(e,t,n){"use strict"},520:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));n(11),n(517);var o=n(177),r=n(178),c=n(518),_=n(519),l=n(516),f=(n(98),n(12),n(541));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(l.a)(e);if(t){var r=Object(l.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(_.a)(this,n)}}var d=function(e){Object(c.a)(n,e);var t=h(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(r.a)(n,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),n}(n.n(f).a)},521:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return j}));n(37),n(32),n(36),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178),l=(n(12),n(51),n(11),n(22),n(2)),f=n(23),h=n.n(f),d=n(180),v=n(127),y=n(522),m=n(71);function k(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function O(e){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new e(O(O({},this.attributes),t))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var e=[];return e.push("location_".concat(this.location.key)),e.push("promoted_".concat(this.promoted)),e=h.a.concat(e,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!e){var t=h.a.random(0,d.a.dimension-1),n=h.a.random(0,d.a.dimension-1);e=v.a.fetch([t,n])}var o=y.a.fetch(h.a.random(0,y.a.values.length-1));return new this({piece:o,place:e,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),e}();if(void 0!==e&&e.argv[1]===o){var x=new j({place:new v.a([1,7]),piece:y.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,n(179),"/index.js")},522:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return k}));n(517);var r=n(177),c=n(178),_=n(526),l=n(518),f=n(519),h=n(516),d=(n(11),n(22),n(520)),v=n(533),y=n(534);function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(h.a)(e);if(t){var r=Object(h.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(f.a)(this,n)}}var k=function(e){Object(l.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return v.a.fetch(this.key)}},{key:"once_vectors",value:function(e){return this.piece_vector.once_vectors(e)}},{key:"repeat_vectors",value:function(e){return this.piece_vector.repeat_vectors(e)}},{key:"piece_yomiage",get:function(){return y.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(e){return"string"==typeof e&&(e=e.toUpperCase()),Object(_.a)(Object(h.a)(n),"lookup",this).call(this,e)}},{key:"lookup_by_name",value:function(e){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[e]}},{key:"lookup_by_promoted_name",value:function(e){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[e]}}]),n}(d.a);void 0!==e&&e.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,n(179),"/index.js")},524:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return d}));n(11),n(517);var r=n(177),c=n(178),_=n(518),l=n(519),f=n(516);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(f.a)(e);if(t){var r=Object(f.a)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Object(l.a)(this,n)}}var d=function(e){Object(_.a)(n,e);var t=h(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),n}(n(520).a);void 0!==e&&e.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,n(179),"/index.js")},528:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return h}));var r=n(177),c=n(178),_=(n(11),n(22),n(23)),l=n.n(_),f=n(71),h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,e),this.reset(),this.raw_body=t}return Object(c.a)(e,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,e){return a[e.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(e){return this.base_location.advance(e)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(e){var t=new this(e);return t.parse(),t}}]),e}();void 0!==e&&e.argv[1]}).call(this,n(179),"/index.js")},531:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(20),r=n(177),c=n(178);n(51),n(37),n(12),n(98),n(11),n(22),n(32),n(36),n(43),n(31),n(44);function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var i=1;i ").concat(JSON.stringify(t));console.error(n),alert(n),console.error(o)}}}},{key:"get",value:function(e){return this.lookup(e)}},{key:"fetch",value:function(e){var t=this.lookup(e);if(!t)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(e),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return t}},{key:"keys",get:function(){var e=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(e.flop).to_sfen),a.push(this.place.flop_if(e.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(e){return this.parse_line(e).map((function(e){return e.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(e){var t=this.parse(e);if(t)return t.to_flop_sfen}},{key:"parse_line",value:function(line){var e=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(t){return e.parse(t)}))}},{key:"parse",value:function(e){var t=_.a.exec(e,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return t?new this(t):null}}]),e}()},537:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return v}));var r=n(177),c=n(178),_=(n(98),n(57),n(11),n(22),n(23)),l=n.n(_),f=n(522),h=(n(127),n(128)),d=n(71),v=(n(180),function(){function e(t){Object(r.a)(this,e),this.xcontainer=t}return Object(c.a)(e,[{key:"to_s",get:function(){var e=this.__base_parts;return e.push(this.xcontainer.display_turn+1),e.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var e=this,t=d.a.values.map((function(t){var n=e.xcontainer.hold_pieces[t.key],o=f.a.values.map((function(e){var o=n[e.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=e.key;return r+=c="white"===t.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(t)&&(t="-"),t}},{key:"__base_parts",get:function(){var e=[];return e.push(this.to_board_sfen),e.push(this.xcontainer.current_location.key[0]),e.push(this.to_hold_pieces),e}}]),e}());if(void 0!==e&&e.argv[1]===o){var y=new h.a;y.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",y.current_turn=1,y.run();var m=new v(y);console.log(m.to_s)}}).call(this,n(179),"/index.js")},538:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(20),r=n(523),c=n(177),_=n(178),l=(n(33),n(75),n(318),n(45),n(74),n(530),n(98),n(51),n(11),n(31),n(37),n(32),n(36),n(43),n(44),n(525)),f=n.n(l);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i\\d+)?(?[".concat(e.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,t,(function(e){var t,n;return Number(null!==(t=e.number)&&void 0!==t?t:1)*Math.pow(10,i+1)+Number(null!==(n=e.rest)&&void 0!==n?n:0)}))},i=0;i=1;n--){var s=this.UNIT_TABLE.charAt(n-1),o=Math.pow(10,n),q=Math.trunc(e/o),r=Math.trunc(e%o);1===q?n>=this.one_number_insert_level?t.push(this.KANJI_TABLE.charAt(q)+s):t.push(s):q>=2&&t.push(this.KANJI_TABLE.charAt(q)+s),e=r}return(0===e&&0===t.length||e>=1)&&t.push(this.KANJI_TABLE.charAt(e)),t.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var e=[];return f.a.forEach(s,this.regexp,(function(t){e.push(t[0])})),e}}]),e}();v.unit_size=6,v.one_number_insert_level=4,v.KANJI_TABLE="〇一二三四五六七八九",v.UNIT_TABLE="十百千万憶兆",v.NUMBER_TABLE="0123456789",v.TRANSRATE_TABLE=Object(r.a)(v.KANJI_TABLE).reduce((function(a,e,i){return d(d({},a),{},Object(o.a)({},e,v.NUMBER_TABLE.charAt(i)))}),{})},539:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return f}));n(37),n(32),n(36),n(11),n(43),n(31),n(44);var r=n(20),c=n(177),_=n(178);n(98),n(12);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}var f=function(){function e(t){Object(c.a)(this,e),Object.assign(this,t)}return Object(_.a)(e,[{key:"to_sfen",get:function(){var e=null;if("move"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)e=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.key+"*"+this.to.place.to_sfen}return e}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var e=null;if("move"===this.type)e=this.from.yomiage_name;else if("promotable"===this.type)e=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");e=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,e].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:1,o=this.hold_pieces_count(n,e)+t,r=this.hold_pieces[n.key];f.a.delete(r,e.key),o>=1&&f.a.set(r,e.key,o)}},{key:"hold_pieces_can_be_reduced_count",value:function(n,e,t){var o=this.hold_pieces_count(n,e);return t>o&&(t=o),t}},{key:"board_safe_delete_on",value:function(n){this.board.delete_at(n)}},{key:"board_piece_fore_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e);return t?t.css_class_list:[]}},{key:"cell_piece_class",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o=[];return t&&o.push("location_".concat(t.location.key)),o}},{key:"cell_view",value:function(n){var e=d.a.fetch(n),t=this.board.lookup(e),o="";return t&&(o=t.name),o}},{key:"dimension",get:function(){return h.a.dimension}},{key:"turn_offset",get:function(){var n=Number(this.current_turn);return n<0&&(n+=this.turn_offset_max+1),this.turn_clamp(n)}},{key:"turn_clamp",value:function(n){return l.a.clamp(Number(n),this.turn_offset_min,this.turn_offset_max)}},{key:"turn_cycle",value:function(n){return x.Xinteger.imodulo(Number(n),this.turn_offset_max+1)}},{key:"previous_location",get:function(){return this.data_source.location_by_offset(this.turn_offset-1)}},{key:"current_location",get:function(){return this.data_source.location_by_offset(this.turn_offset)}},{key:"current_comments",get:function(){if(this.data_source.comment_lines_hash)return this.data_source.comment_lines_hash[this.turn_offset]}},{key:"turn_offset_min",get:function(){return this.data_source.turn_offset_min}},{key:"turn_offset_max",get:function(){return this.data_source.turn_offset_max}},{key:"current_turn_label",get:function(){return this.turn_offset===this.turn_offset_max?"まで".concat(this.display_turn,"手で").concat(this.previous_location.name,"の勝ち"):"".concat(this.display_turn,"手")}},{key:"display_turn",get:function(){return this.turn_base+this.turn_offset}},{key:"turn_base",get:function(){return this.data_source.turn_base}},{key:"realized_hold_pieces_of",value:function(n){var e=Object.entries(this.hold_pieces[n.key]);return l()(e).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"to_simple_sfen",get:function(){return this.sfen_serializer.to_s}},{key:"to_sfen_without_turn",get:function(){return this.sfen_serializer.to_s_without_turn}},{key:"to_short_sfen",get:function(){return"position sfen ".concat(this.to_simple_sfen)}},{key:"sfen_serializer",get:function(){return new k.a(this)}},{key:"piece_box_count",value:function(n){return this.piece_box[n.key]||0}},{key:"piece_box_add",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=this.piece_box_count(n)+e;f.a.delete(this.piece_box,n.key),t>=1&&f.a.set(this.piece_box,n.key,t)}},{key:"piece_box_can_be_reduced_count",value:function(n,e){var t=this.piece_box_count(n);return e>t&&(e=t),e}},{key:"piece_box_realize",get:function(){var n=Object.entries(this.piece_box);return l()(n).filter((function(n){var e=Object(o.a)(n,2);e[0];return e[1]>=1})).map((function(n){var e=Object(o.a)(n,2),t=e[0],r=e[1];return[y.a.fetch(t),r]})).sortBy((function(n){var e=Object(o.a)(n,2),t=e[0];e[1];return t.code})).value()}},{key:"hold_pieces_to_piece_box",value:function(n){var e=this;l.a.forIn(this.hold_pieces[n.key],(function(t,o){var r=y.a.fetch(o);e.hold_pieces_add(n,r,-t),e.piece_box_add(r,t)}))}},{key:"piece_box_to_hold_pieces",value:function(n){var e=this;l.a.forIn(this.piece_box,(function(t,o){var r=y.a.fetch(o);e.piece_box_add(r,-t),e.hold_pieces_add(n,r,t)}))}},{key:"piece_box_reset_by_preset",value:function(n){var e=this;this.piece_box_clear(),O.a.fetch(n).piece_box.forEach((function(n){var t=Object(o.a)(n,2),r=t[0],c=t[1];e.piece_box_add(y.a.fetch(r),c)}))}},{key:"piece_box_piece_counts_adjust",value:function(){var n=this;this.piece_box_clear();var e=this.hold_piece_all_counts_hash,t=this.board.piece_counts_hash;O.a.fetch("全部駒箱").piece_box.forEach((function(r){var c=Object(o.a)(r,2),_=c[0],l=c[1],f=y.a.fetch(_),h=l-((e[f.key]||0)+(t[f.key]||0));n.piece_box_add(f,h)}))}},{key:"hold_piece_all_counts_hash",get:function(){var n=this,e={};return j.a.values.forEach((function(t){l.a.forIn(n.hold_pieces[t.key],(function(n,t){e[t]=(e[t]||0)+n}))})),e}},{key:"piece_box_clear",value:function(){this.piece_box={}}},{key:"king_formation_auto_set_on_off",value:function(n){return n?this.king_formation_auto_set():this.king_formation_auto_unset()}},{key:"king_formation_auto_set",value:function(){var n=!1;return n||(n=this.king_formation_set("bottom_left")),n||(n=this.king_formation_set("bottom_right")),n}},{key:"king_formation_auto_unset",value:function(){var n=!1;return n||(n=this.king_formation_unset("bottom_left")),n||(n=this.king_formation_unset("bottom_right")),n}},{key:"king_formation_set",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return e.board.lookup(n.place)})))return t.forEach((function(n){return e.piece_search_and_place_on(n)})),!0}},{key:"king_formation_unset",value:function(n){var e=this,t=this.king_formation_soldiers(n);if(!t.some((function(n){return!e.board.lookup(n.place)})))return t.forEach((function(n){var t=e.board.lookup(n.place);if(t){var o=t.piece;e.board.delete_at(t.place),"K"===o.key?e.piece_box_add(o):e.hold_pieces_add(j.a.fetch("white"),o)}})),!0}},{key:"piece_search_and_place_on",value:function(n){if(!this.board.lookup(n.place)){if("K"===n.piece.key)this.piece_search_and_decrement(n.piece);else if(!this.piece_search_and_decrement(n.piece))return;this.board.place_on(n)}}},{key:"piece_search_and_decrement",value:function(n){var e=!1;return e||(e=this.piece_search_on_hold_pieces_and_decrement("white",n)),e||this.piece_box_count(n)>=1&&(this.piece_box_add(n,-1),e=!0),e}},{key:"piece_search_on_hold_pieces_and_decrement",value:function(n,e){var t=j.a.fetch(n);if(this.hold_pieces_count(t,e)>=1)return this.hold_pieces_add(t,e,-1),!0}},{key:"king_formation_soldiers",value:function(n){var e=null,t=null,o=null,r=null;return"bottom_left"===n&&(e=0,t=1,o=h.a.dimension-1,r=-1),"bottom_right"===n&&(e=h.a.dimension-1,t=-1,o=h.a.dimension-1,r=-1),[{piece:"K",promoted:!1,location:"black",place:[e,o]},{piece:"P",promoted:!0,location:"white",place:[e,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o+r]},{piece:"P",promoted:!0,location:"white",place:[e+t+t,o]}].map((function(n){return new v.a({piece:y.a.fetch(n.piece),promoted:n.promoted,location:j.a.fetch(n.location),place:d.a.fetch(n.place)})}))}},{key:"slide_xy",value:function(n,e){this.board=this.board.slide_xy(n,e)}},{key:"shuffle_apply",value:function(n){var e=this.board.shuffle_apply(n);if(e)return this.board=e,!0}}]),n}()},14:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return J}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(51),t(12),t(520)),d=t(544),y=t(545),v=t(546),m=t(547),k=t(548),O=t(549),j=t(550),x=t(551),w=t(552),P=t(553),R=t(554),B=t(555),E=t(556),S=t(557),L=t(558),N=t(559),K=t(560),A=t(561),D=t(562),G=t(563),I=t(564),$=t(565),T=t(566),F=t(567),C=t(568),z=t(569);function M(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var J=function(n){Object(_.a)(t,n);var e=M(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"name",get:function(){return"".concat(this.black," vs ").concat(this.white)}}],[{key:"define",get:function(){return[{name:"平手",black:"先手",white:"後手",sp_body:"position startpos"},{key:"KIF_27479",kif_code:"27479",generation:1,name:"1709-10-10 宗銀印達57番指し1局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:k.a},{key:"KIF_27480",kif_code:"27480",generation:2,name:"1709-10-11 宗銀印達57番指し2局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:O.a},{key:"KIF_27481",kif_code:"27481",generation:3,name:"1709-10-18 宗銀印達57番指し3局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:j.a},{key:"KIF_27584",kif_code:"27584",generation:null,name:"1709-10-22 御城将棋 将棋絶妙第6番",black:"伊藤印達",white:"三代大橋宗与",sp_body:d.a},{key:"KIF_27482",kif_code:"27482",generation:4,name:"1709-10-29 宗銀印達57番指し4局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:x.a},{key:"KIF_16216",kif_code:"16216",generation:5,name:"1709-11-01 宗銀印達57番指し5局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:w.a},{key:"KIF_15732",kif_code:"15732",generation:6,name:"1709-11-02 宗銀印達57番指し6局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:P.a},{key:"KIF_39801",kif_code:"39801",generation:7,name:"1709-11-03 宗銀印達57番指し7局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:R.a},{key:"KIF_27483",kif_code:"27483",generation:8,name:"1709-11-05 宗銀印達57番指し8局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:B.a},{key:"KIF_27484",kif_code:"27484",generation:9,name:"1709-11-07 宗銀印達57番指し9局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:E.a},{key:"KIF_08731",kif_code:"08731",generation:10,name:"1709-11-08 宗銀印達57番指し10局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:S.a},{key:"KIF_27485",kif_code:"27485",generation:12,name:"1709-11-12 宗銀印達57番指し12局",black:"伊藤印達",white:"六代大橋宗銀",sp_body:L.a},{key:"KIF_27486",kif_code:"27486",generation:13,name:"1709-11-13 宗銀印達57番指し13局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:N.a},{key:"KIF_27487",kif_code:"27487",generation:24,name:"1709-11-25 宗銀印達57番指し24局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:K.a},{key:"KIF_27488",kif_code:"27488",generation:25,name:"1709-11-25 宗銀印達57番指し25局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:A.a},{key:"KIF_16020",kif_code:"16020",generation:37,name:"1709-12-13 宗銀印達57番指し37局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:D.a},{key:"KIF_27489",kif_code:"27489",generation:41,name:"1710-01-16 宗銀印達57番指し41局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:G.a},{key:"KIF_27637",kif_code:"27637",generation:44,name:"1710-01-18 宗銀印達57番指し44局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:I.a},{key:"KIF_27490",kif_code:"27490",generation:54,name:"1710-03-19 宗銀印達57番指し54局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:$.a},{key:"KIF_27585",kif_code:"27585",generation:null,name:"1710-11-03 御城将棋 将棋絶妙第7番",black:"伊藤印達",white:"三代大橋宗与",sp_body:m.a},{key:"KIF_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:T.a},{key:"SFEN_15733",kif_code:"15733",generation:57,name:"1711-02-28 宗銀印達57番指し57局",black:"六代大橋宗銀",white:"伊藤印達",sp_body:F.a},{key:"KIF_37368",kif_code:"37368",generation:null,name:"1711-03-00 将棋絶妙第8番",black:"宮本印佐",white:"伊藤印達",sp_body:y.a},{key:"KIF_16217",kif_code:"16217",generation:null,name:"1711-11-21 御城将棋 (印達の絶局)",black:"六代大橋宗銀",white:"伊藤印達",sp_body:v.a},{key:"KIF_BOD_LIKE_SAMPLE1",kif_code:"BOD_LIKE_SAMPLE1",generation:null,name:"BOD形式を含むKIF",black:null,white:null,sp_body:C.a},{key:"illegal_check",kif_code:"illegal_check",generation:null,name:"反則判定用",black:null,white:null,sp_body:z.a}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&(console.log(J.fetch("simple").key),console.log(J.fetch("simple").name))}).call(this,t(179),"/index.js")},180:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return m}));t(37),t(32),t(43),t(44);var r=t(20),c=t(177),_=t(178),l=(t(11),t(542),t(529),t(36),t(31),t(98),t(23)),f=t.n(l),h=t(2),d=t(521),y=t(127);function v(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var m=function(){function n(){Object(c.a)(this,n),this._surface={}}return Object(_.a)(n,[{key:"delete_at",value:function(n){h.a.delete(this._surface,n.key)}},{key:"place_on",value:function(n){this.delete_at(n.place),h.a.set(this._surface,n.place.key,n)}},{key:"move_m1",value:function(n,e){this.delete_at(n.place),this.place_on(e)}},{key:"move_m2",value:function(n,e){this.move_m1(n,n.clone_with_attrs({place:e}))}},{key:"lookup",value:function(n){return this._surface[n.key]}},{key:"clear",value:function(){this._surface={}}},{key:"pawn_exist_by_x",value:function(e,t){for(var o=!1,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return this.once_reach(n,e)||this.repeat_reach(n,e,t)}},{key:"once_reach",value:function(n,e){var t=this,o=!1,r=n.once_vectors;return r&&(o=r.some((function(o){if(o)return t.once_reach_vec(n,e,o)}))),o}},{key:"once_reach_vec",value:function(n,e,t){var o=t[0],r=t[1]*n.location.value_sign,c=n.place.x+o,_=n.place.y+r;return c===e.x&&_===e.y}},{key:"repeat_reach",value:function(n,e){var t=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=!1,c=n.repeat_vectors;return c&&(r=c.some((function(r){if(r)return t.repeat_reach_vec(n,e,r,o)}))),r}},{key:"repeat_reach_vec",value:function(n,e,t){for(var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.place.x,c=n.place.y,_=t[0],l=t[1]*n.location.value_sign,f=r+_,h=c+l,d=!1;!y.a.xy_invalid_p(f,h);){if(f===e.x&&h===e.y){d=!0;break}if("non_stop"==o.mode);else{var v=y.a.fetch([f,h]);if(this.lookup(v))break}f+=_,h+=l}return d}},{key:"move_then_king_capture_p",value:function(n,e){var t=this.shallow_clone;return t.move_m2(n,e),t.king_capture_p(n.location)}},{key:"puton_then_king_capture_p",value:function(n){var e=this.shallow_clone;return e.place_on(n),e.king_capture_p(n.location)}},{key:"king_capture_p",value:function(n){var e=this,t=this.king_find_by_location(n);if(t)return this.soldiers_by_location(n.flip).some((function(n){return e.reach_p(n,t.place)}))}},{key:"king_find_by_location",value:function(n){return this.soldiers.find((function(e){return"K"==e.piece.key&&e.location.key==n.key}))}},{key:"shallow_clone",get:function(){var e=new n;return e._surface=function(n){for(var i=1;i=1&&(r+=c,c=0),_.promoted&&(r+="+");var l=_.piece.key;"white"===_.location.key&&(l=l.toLowerCase()),r+=l}})),c>=1&&(r+=c),t.push(r)})),t.join("/")}}],[{key:"dimension",get:function(){return 9}},{key:"danger_zone_size",get:function(){return 3}},{key:"vector_flip",value:function(n,e){return[this.dimension-n-1,this.dimension-e-1]}}]),n}();void 0!==n&&n.argv[1]===o&&console.log(m.dimension)}).call(this,t(179),"/index.js")},314:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return L}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(33),t(75),t(11),t(31),t(74),t(527),t(98),t(57),t(525)),y=t.n(d),v=t(2),m=t(23),k=t.n(m),O=t(180),j=t(528),x=t(522),w=t(127),P=t(521),R=t(71),B=t(536);t(128);function E(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var S,L=function(n){Object(l.a)(t,n);var e=E(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.attributes={}}},{key:"parse",value:function(){this.raw_body=this.raw_body.replace(/startpos/,"sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1");var n=y()("sfen\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\S+)\\s+(?\\d+)(\\s+moves\\s+(?.*))?");this.attributes=y.a.exec(this.raw_body,n)}},{key:"board",get:function(){var n=this,e=new O.a;return this.attributes.board.split("/").forEach((function(t,o){var r=0;y.a.forEach(t,y()("(?\\+?)(?\\S)"),(function(t,i){if(/\d+/.test(t.piece))r+=Number(t.piece);else{var c=new P.a({place:new w.a([r,o]),piece:x.a.fetch(t.piece),promoted:"+"===t.promoted,location:n.__location_by_upper_or_lower_case(t.piece)});e.place_on(c),r++}}))})),e}},{key:"base_location",get:function(){var n=null;return n="b"===this.attributes.b_or_w?"black":"white",R.a.fetch(n)}},{key:"hold_pieces",get:function(){var n=this,e=this.hold_pieces_empty_hash();return"-"!==this.attributes.hold_pieces&&y.a.forEach(this.attributes.hold_pieces,y()("(?\\d+)?(?\\S)"),(function(t,i){var o=x.a.fetch(t.piece_char),r=Number(t.count||1),c=n.__location_by_upper_or_lower_case(t.piece_char);r+=e[c.key][o.key]||0,v.a.set(e[c.key],o.key,r)})),e}},{key:"turn_base",get:function(){return Number(this.attributes.turn_counter_next)-1}},{key:"move_infos",get:function(){var n=this,e=[];return k.a.forEach(this.moves,(function(t,i){var o=B.a.parse(t);if(!o)return!1;o.location=n.location_by_offset(i),e.push(o)})),e}},{key:"moves",get:function(){return this.moves_exist_p?this.attributes.moves.split(/\s+/):[]}},{key:"moves_exist_p",get:function(){return""!==(this.attributes.moves||"")}},{key:"init_sfen_from_one",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(1),n.join(" ")}},{key:"init_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.init_sfen_strip),n.join(" ")}},{key:"init_sfen_strip",get:function(){var n=[];return n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),n.join(" ")}},{key:"to_sfen",get:function(){var n=[];return n.push("position"),n.push("sfen"),n.push(this.attributes.board),n.push(this.attributes.b_or_w),n.push(this.attributes.hold_pieces),n.push(this.attributes.turn_counter_next),this.moves_exist_p&&(n.push("moves"),n.push(this.attributes.moves)),n.join(" ")}},{key:"__location_by_upper_or_lower_case",value:function(n){var e=null;return e=/[A-Z]/.test(n)?"black":"white",R.a.fetch(e)}}],[{key:"sfen_flop",value:function(n){var source=this.parse(n);return source.attributes.board=source.board.flop.to_sfen,source.attributes.moves=source.move_infos.map((function(n){return n.to_flop_sfen})).join(" "),source.to_sfen}}]),t}(j.a);void 0!==n&&n.argv[1]===o&&(S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S),S=L.parse("position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d"),console.log(S))}).call(this,t(179),"/index.js")},315:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return v}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516),h=(t(57),t(520)),d=t(71);function y(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var v=function(n){Object(_.a)(t,n);var e=y(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"locations",get:function(){return this.location_keys.map((function(n){return d.a.fetch(n)}))}}],[{key:"define",get:function(){return[{key:"none",name:"none",location_keys:[]},{key:"both",name:"☗☖",location_keys:["black","white"]},{key:"black",name:"☗",location_keys:["black"]},{key:"white",name:"☖",location_keys:["white"]}]}}]),t}(h.a);void 0!==n&&n.argv[1]===o&&console.log(v.fetch("both").locations)}).call(this,t(179),"/index.js")},316:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"standard",name:"無効な場所をタップで駒を離す",radio_button_name:"別駒",smooth_cancel:!0},{key:"reality",name:"移動元をタップしたときに駒を離す",radio_button_name:"元位置",smooth_cancel:!1},{key:"rehold",name:"移動元をタップしたときに駒を離して持つ",radio_button_name:"持ち替え",smooth_cancel:!0}]}}]),t}(t(520).a)},323:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return N}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(98),t(529),t(11),t(31),t(33),t(527),t(498),t(320),t(75),t(74),t(525)),y=t.n(d),v=t(535),m=t.n(v),k=t(528),O=t(180),j=t(522),x=t(127),w=t(71),P=t(314),R=t(524),B=t(521),E=t(538);function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}y.a.uninstall("namespacing");var L=y()(Object.values({header:"(?.*):s*(?.*)",board:"\\|(?.*)\\|",direct_location:"(?^[上下先後]手番)",latest_triangle:"^手数=.*(?[▲△])",comment:"^\\*(?.*)",hand:"^\\s*(?\\d+)\\s+ # 1 ; 手数\n (?[1-91-9一二三四五六七八九]+)? # 76 ; 移動先\n (?同)?\\s* # 同 ; 座標を書いてくれ\n (?成[銀桂香]|[王玉金銀全桂圭香杏角馬飛龍竜歩と]) # 歩 ; 駒\n (?[左右直]?[寄引上]?) # 上 ; KI2っぽい表記は読み捨てる\n (?不?成|打|合|生)? # 打 ; 成や打\n (\\((?\\d+)\\))? # (77) ; 移動元"}).join("|"),"x"),N=function(n){Object(l.a)(t,n);var e=S(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"reset",value:function(){Object(_.a)(Object(h.a)(t.prototype),"reset",this).call(this),this.move_infos=[],this.comment_lines_hash={},this.board_lines=[],this.direct_location=null,this.hold_pieces=this.hold_pieces_empty_hash()}},{key:"board",get:function(){if(this.board_lines.length>=1)return this.board_setup_from_board_lines();var n=new P.a;return n.raw_body=this.preset_info.sfen,n.parse(),n.board}},{key:"preset_key",get:function(){var n=this.header["手合割"];return"その他"===n?null:n||"平手"}},{key:"preset_info",get:function(){return R.a.lookup(this.preset_key)}},{key:"base_location",get:function(){return this.direct_location?this.direct_location:this.preset_key?w.a.fetch(this.preset_info.first_location_key):w.a.fetch("black")}},{key:"parse",value:function(){var n=this,e=null;this.raw_body.split(/\n/).forEach((function(line){var t=y.a.exec(line,L);if(t)if(t.key){var o=t.value.trim();if(n.header[t.key]=o,t.key.match(/手の持駒/))if("なし"===o);else{var s=E.a.kanji_to_number_string(o);s=s.replace(/\s+/g,""),y.a.forEach(s,y()("(?\\D)(?\\d*)"),(function(e,o){var r=j.a.lookup_by_name(e.piece_char),c=Number(e.count||1),_=t.key.match(/[上後]/)?"white":"black";c+=n.hold_pieces[_][r.key]||0,n.hold_pieces[_][r.key]=c}))}}else if(t.comment){var r,c,i=n.move_infos.length;null!==(c=(r=n.comment_lines_hash)[i])&&void 0!==c||(r[i]=[]),n.comment_lines_hash[i].push(t.comment)}else if(t.board)n.board_lines.push(t.board);else if(t.direct_location)n.direct_location=w.a.fetch(t.direct_location.match(/[上後]/)?"white":"black");else if(t.latest_triangle)n.direct_location=w.a.fetch("▲"===t.latest_triangle?"white":"black");else if(t.number){var _={};_.location=n.location_by_offset(Number(t.number)-1),t.origin_place&&(_.origin_place=x.a.fetch(t.origin_place)),m()(t.to||t.same),t.to?(_.place=x.a.fetch(t.to),e=_.place):(m()(t.same),m()(e),_.place=e),"成"===t.motion&&(_.promoted_trigger=!0),"打"===t.motion&&(_.drop_piece=j.a.lookup_by_name(t.piece)),n.move_infos.push(_)}}))}},{key:"move_infos",get:function(){return this._move_infos},set:function(n){this._move_infos=n}},{key:"comment_lines_hash",get:function(){return this._comment_lines_hash},set:function(n){this._comment_lines_hash=n}},{key:"board_setup_from_board_lines",value:function(){m()(this.board_lines.length>=1);var n=new O.a;return this.board_lines.forEach((function(e,t){y.a.forEach(e,y()("(?.)(?\\S)"),(function(e,o){if("・"===e.piece);else{var r="v"===e.arrow?"white":"black",c=j.a.lookup_by_name(e.piece),_=!1;c||(c=j.a.lookup_by_promoted_name(e.piece),m()(c),_=!0);var l=new B.a({place:new x.a([o,t]),piece:c,promoted:_,location:w.a.fetch(r)});n.place_on(l)}}))})),n}}]),t}(k.a);if(void 0!==n&&n.argv[1]===o){var K=new N;K.raw_body="\n 1 2六歩(27) ( 0:16/00:00:16)\n 2 3四歩(33) ( 0:22/00:00:22)\n 3 7六歩(77) ( 0:06/00:00:22)\n 4 8四歩(83) ( 0:13/00:00:35)\n 5 2五歩(26) ( 0:09/00:00:31)\n 6 8五歩(84) ( 0:16/00:00:51)\n 7 7八金(69) ( 0:04/00:00:35)\n 8 3二金(41) ( 0:09/00:01:00)\n 9 2四歩(25) ( 0:04/00:00:39)\n 10 同 歩(23) ( 0:10/00:01:10)\n",K.parse(),console.log(K.move_infos),console.log(K.comment_lines_hash),console.log(void 0===K.init_sfen)}}).call(this,t(179),"/index.js")},324:function(n,e,t){"use strict";t.d(e,"a",(function(){return h}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"vertical",name:"縦"},{key:"horizontal",name:"横"}]}}]),t}(t(520).a)},325:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(23),t(71);var o=t(571),r={props:{sp_mounted_focus_to_slider:{type:Boolean,default:!1}},beforeMount:function(){this.debug_or_development_p&&(console.log("sp_mobile_p: ".concat(this.sp_mobile_p)),console.log("devise_info.key: ".concat(this.devise_info.key)),console.log("focus_disable_p: ".concat(this.focus_disable_p)))},mounted:function(){this.sp_mounted_focus_to_slider&&this.turn_slider_focus()},methods:{focus_on_input_tag_p:function(){var n=document.activeElement;if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return!0},nav_focus_to:function(n){if(this.focus_disable_p)return!1;var e=this.__navigate_block_element_refs(n);return!!e&&(e.focus(),!0)},turn_slider_focus:function(){if(this.focus_disable_p)return!1;var n=this.__navigate_block_element_refs("SpSlider");return!!n&&n.focus_to_self()},__navigate_block_element_refs:function(n){if(this.$NavigateBlock)return this.$NavigateBlock.$refs[n]}},computed:{focus_enable_p:function(){return!this.focus_disable_p},focus_disable_p:function(){return this.sp_mobile_p||"touch"===this.devise_info.key},sp_mobile_p:function(){return Object(o.a)(window.navigator).any}}}},326:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(319),t(72),t(73);var o=t(23),r=t.n(o),c=(t(71),{props:{sp_turn_show:{type:Boolean,default:!1},sp_slider:{type:Boolean,default:!1},sp_controller:{type:Boolean,default:!1},sp_operation_disabled:{type:Boolean,default:!1},sp_piece_stand_blank_then_hidden:{type:Boolean,default:!1},sp_key_event_capture:{type:Boolean,default:!1}},mounted:function(){window.addEventListener("keydown",this.keydown_hook,!1)},beforeDestroy:function(){window.removeEventListener("keydown",this.keydown_hook)},methods:{keydown_hook:function(n){if(this.debug_or_development_p&&(this.log(document.activeElement),this.log(n.shiftKey,n.ctrlKey,n.altKey,n.metaKey),this.log("e",n),this.log("key",n.key),this.log("code",n.code),this.log("repeat",n.repeat)),!this.sp_operation_disabled&&!this.focus_on_input_tag_p()&&!this.shortcut_hook(n)&&this.sp_key_event_capture&&(this.view_p||this.play_p)){var e=document.activeElement;if(this.$NavigateBlock){var t=[this.$NavigateBlock.$refs.first,this.$NavigateBlock.$refs.previous,this.$NavigateBlock.$refs.next,this.$NavigateBlock.$refs.last];if(void 0!==e&&"BODY"!==e.tagName&&!r.a.includes(t,e))return}"Backspace"!==n.code&&"ArrowUp"!==n.code&&"ArrowLeft"!==n.code&&"k"!==n.key&&"p"!==n.key&&"b"!==n.key||(this.api_turn_add(-1,{interactive:n}),n.preventDefault()),"Space"!==n.code&&"Enter"!==n.code&&"ArrowDown"!==n.code&&"ArrowRight"!==n.code&&"j"!==n.key&&"n"!==n.key&&"f"!==n.key||(this.api_turn_add(1,{interactive:n}),n.preventDefault())}},api_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_add(n,e),this.turn_slider_focus()||(n>0?this.nav_focus_to("next"):this.nav_focus_to("previous"))},api_turn_set_to_min:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_min,n),this.turn_slider_focus()||this.nav_focus_to("first")},api_turn_set_to_max:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.current_turn_set(this.turn_offset_max,n),this.turn_slider_focus()||this.nav_focus_to("last")},current_turn_add:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current_turn_set(this.xcontainer.turn_offset+n,e)},current_turn_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null;t=e.cycle?this.xcontainer.turn_cycle(n):this.xcontainer.turn_clamp(n),this.turn_offset!==t&&(this.lifted_piece_cancel(),this.view_p&&this.view_mode_xcontainer_update(t),this.play_p&&this.play_mode_xcontainer_seek_to(t),this.event_call("update:sp_turn",this.turn_offset),e.interactive&&(this.log("局面を人が故意に変更"),this.event_call("ev_action_turn_change",this.turn_offset)))}},computed:{inside_controller_p:function(){return this.sp_controller&&(this.view_p||this.play_p)},inside_slider_p:function(){return this.sp_slider&&(this.view_p||this.play_p)},inside_navigate_p:function(){return this.inside_controller_p||this.inside_slider_p}}})},327:function(n,e,t){"use strict";t.d(e,"a",(function(){return r}));t(72),t(73),t(11),t(22);var o=t(71),r={props:{sp_viewpoint:{type:String,default:"black",validator:function(n){return o.a.keys.includes(n)}},sp_active_side_viewpoint:{type:Boolean,default:!1}},data:function(){return{mut_viewpoint:this.sp_viewpoint}},watch:{sp_viewpoint:function(n){this.mut_viewpoint=n},mut_viewpoint:function(n){this.event_call("update:sp_viewpoint",n)}},methods:{viewpoint_flip_handle:function(){this.viewpoint_flip(),this.event_call("ev_action_viewpoint_flip"),this.turn_slider_focus()},viewpoint_flip:function(){this.mut_viewpoint=o.a.fetch(this.mut_viewpoint).flip.key}},computed:{fliped:function(){return"white"===this.mut_viewpoint}}}},328:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={components:{ShortcutViewer:t(322).default},data:function(){return{shortcut_viewer_p:!1}},methods:{shortcut_viewer_toggle_handle:function(){this.shortcut_viewer_p?this.shortcut_viewer_close_handle():this.shortcut_viewer_open_handle()},shortcut_viewer_open_handle:function(){this.shortcut_viewer_p=!0},shortcut_viewer_close_handle:function(){this.shortcut_viewer_p=!1}}}},329:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));t(58),t(45),t(12),t(76),t(52),t(33),t(32),t(77),t(78);var o=t(523),r=(t(11),t(22),t(71)),c=t(127);function _(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return l(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var i=0,o=function(){};return{s:o,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,c=!0,_=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return c=n.done,n},e:function(n){_=!0,r=n},f:function(){try{c||null==t.return||t.return()}finally{if(_)throw r}}}}function l(n,e){(null==e||e>n.length)&&(e=n.length);for(var i=0,t=new Array(e);i ").concat(v)),v)return this.log("操作モードで盤上の駒を持って同じ位置に戻したときに盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e)}}if(c.a.isEqual(this.place_from,t))return this.log("盤上の駒を持って同じ位置に戻したので状況キャンセル"),this.event_call("ev_action_piece_cancel"),void this.lifted_piece_cancel();if(this.edit_p&&(this.log("lifted_from_p: ".concat(this.lifted_p)),this.meta_p(e)&&!this.lifted_p&&this.killed_soldier))return this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(this.killed_soldier.transform_clone),void this.piece_hold_and_put_for_bug(t,e);if(!this.lifted_p)return this.log("盤上の駒を持ちあげる"),void this.soldier_hold(t,e);if(this.sp_legal_move_only&&this.play_p&&this.place_from){var m=!1;if(m||(m=this.xcontainer.board.once_reach(this.origin_soldier1,t)),!m)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t,{mode:"non_stop"})){if(this.log("障害物を素通りすれば目的地に行ける"),this.sp_illegal_validate)if(this.xcontainer.board.repeat_reach(this.origin_soldier1,t))this.log("障害物なく目的地に行ける");else if(this.log("障害物を飛び越えれば目的地に行ける"),"__cancel__"===this.illegal_add("illegal_piece_warp",{soldier:this.origin_soldier1}))return;m=!0}else this.log("目的地に対して効きがずれている");if(!m)return this.log("操作モードで盤上の駒を動かし中だが動けないセルをタップしたので無効"),void this.if_standard_then_unhold();if(this.sp_illegal_validate&&this.xcontainer.board.move_then_king_capture_p(this.origin_soldier1,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:this.origin_soldier1,place:t}))return}if(!this.place_from){if(this.have_piece){if(this.log("持駒を置く"),this.sp_illegal_validate&&this.play_p){var k=this.soldier_create_from_stand_or_box_on(t);if(this.xcontainer.board.puton_then_king_capture_p(k,t)&&"__cancel__"===this.illegal_add("illegal_death_king",{soldier:k,place:t}))return}if(this.sp_illegal_validate&&this.play_p&&"P"===this.have_piece.key&&this.have_piece_location&&this.xcontainer.board.pawn_exist_by_x(t.x,this.have_piece_location)&&"__cancel__"===this.illegal_add("illegal_two_pawn"))return;this.killed_soldier&&(this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.killed_soldier.piece):this.xcontainer.hold_pieces_add(h.a.fetch("black"),this.killed_soldier.piece));var O=this.soldier_create_from_stand_or_box_on(t);return this.piece_decriment(),this.xcontainer.board.place_on(O),this.move_info_create({type:"put",to:O}),this.moves_set(),this.lifted_piece_cancel(),void this.turn_next()}throw new Error("must not happen")}if(this.log("盤上から移動"),this.killed_soldier&&this.xcontainer.hold_pieces_add(this.origin_soldier1.location,this.killed_soldier.piece),(this.view_p||this.play_p)&&r){var j=!0;if(this.sp_piece_auto_promote){var x=o.piece.piece_vector.force_promote_length;null!=x&&o.top_spaces<=x&&(this.promotable_piece_moved(o,!0),j=!1)}j&&(this.lp_mouse_stick_p=!1,this.dialog_soldier=o,this.lp_destroy())}else this.play_p&&(this.move_info_create({type:"move",from:this.origin_soldier1,to:o,killed_soldier:this.killed_soldier}),this.moves_set()),this.xcontainer.board.place_on(o),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()}else this.log("持たずに何もないところをクリックしたので無効とする")}},promotable_piece_moved2:function(n){this.promotable_piece_moved(this.dialog_soldier,n)},promotable_piece_moved:function(n,e){n=n.clone_with_attrs({promoted:e}),this.move_info_create({type:"promotable",from:this.origin_soldier1,to:n}),this.moves_set(),this.xcontainer.board.place_on(n),this.xcontainer.board.delete_at(this.place_from),this.lifted_piece_cancel(),this.turn_next()},move_info_create:function(n){this.last_move_info=new _.a(v(v({},n),{},{next_turn_offset:this.turn_offset+1,player_location:this.xcontainer.current_location,killed_soldier:this.killed_soldier,illegal_list:this.illegal_list}))},board_cell_right_click:function(n,e){this.log("盤のセルを右クリック");var t=l.a.fetch(n);if(t.tennozan_p&&e.shiftKey&&e.altKey&&(e.metaKey||e.ctrlKey))this.dev_tools_toggle_handle();else if(!this.break_if_view_mode){var o=this.xcontainer.board.lookup(t);this.hold_cancel(e)||this.edit_p&&!this.lifted_p&&o&&(this.log("盤上の駒を裏返す"),this.xcontainer.board.place_on(o.transform_clone),this.piece_hold_and_put_for_bug(t,e))}},membership_click_handle:function(n,e){if(!this.break_if_view_mode)return this.have_piece&&this.have_piece_location===n?(this.log("自分の駒台から駒を持ち上げているならキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel(),!0):this.edit_p&&this.have_piece?(this.hold_pieces_move_to_my_hold_pieces(e,n),!0):this.play_p&&this.origin_soldier1?(this.log("play では盤上の駒を駒台に置くことはできない"),this.if_standard_then_unhold(),!0):!!this.origin_soldier1&&(this.log("盤上の駒を駒台に置く"),this.board_soldir_to_hold_pieces(n),!0)},piece_stand_piece_click:function(n,e,t,o){if(this.log("駒台の駒をクリック"),!this.break_if_view_mode)if(this.xcontainer.hold_pieces_count(n,e)<=0)this.log("クリックしたけど持駒がない");else if(this.sp_my_piece_only_move&&this.play_p&&n!==this.xcontainer.current_location)this.log("相手の持駒を持とうとしたときは無効");else{if(this.cpu_location_p)return this.log("片方の手番だけを操作できるようにする sp_human_side の指定があってCPU側なので無効とする"),void this.event_call("ev_illegal_click_but_self_is_not_turn");this.log("駒台の駒を持つ"),this.have_piece=e,this.have_piece_location=n,this.have_piece_promoted=t,this.lp_create(o,this.origin_soldier2)}},piece_box_have_p:function(n){return c.a.isNil(this.have_piece_location)&&this.have_piece===n},piece_box_other_click:function(n){if(this.log("piece_box_other_click:駒箱クリック"),c.a.isNil(this.have_piece_location)&&this.have_piece)return this.log("持っているならキャンセル"),this.lifted_piece_cancel(),!0;if(this.have_piece_location&&this.have_piece){this.log("駒台から駒箱に移動");var e=this.hold_piece_source_cut(n);return this.xcontainer.piece_box_add(this.have_piece,e),this.lifted_piece_cancel(),!0}return!!this.origin_soldier1&&(this.log("盤上の駒を駒箱に移動"),this.xcontainer.piece_box_add(this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel(),!0)},piece_box_piece_click:function(n,e){this.piece_box_other_click(e)||(this.log("piece_box_piece_click:駒箱の駒を持つ"),this.have_piece=n,this.have_piece_location=null,this.have_piece_promoted=!1,this.lp_create(e,this.origin_soldier2))},hold_cancel:function(n){return!(this.dialog_soldier||!this.lifted_p)&&(this.log("持ち上げた駒を元に戻す"),this.lifted_piece_cancel(),!0)},board_soldir_to_hold_pieces:function(n){this.xcontainer.hold_pieces_add(n,this.origin_soldier1.piece),this.xcontainer.board.delete_at(this.origin_soldier1.place),this.lifted_piece_cancel()},hold_pieces_move_to_my_hold_pieces:function(n,e){this.log("相手の持駒を自分の駒台に移動");var t=this.hold_piece_source_cut(n);this.xcontainer.hold_pieces_add(e,this.have_piece,t),this.lifted_piece_cancel()},hold_piece_source_cut:function(n){var e=1;return this.have_piece_location?(this.log("相手の駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.hold_pieces_count(this.have_piece_location,this.have_piece)),e=this.xcontainer.hold_pieces_can_be_reduced_count(this.have_piece_location,this.have_piece,e),this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-e)):(this.log("駒箱から移動"),this.meta_p(n)&&(this.log("シフトが押されていたので全部移動"),e=this.xcontainer.piece_box_count(this.have_piece)),e=this.xcontainer.piece_box_can_be_reduced_count(this.have_piece,e),this.xcontainer.piece_box_add(this.have_piece,-e)),e},piece_decriment:function(){this.have_piece_location?this.xcontainer.hold_pieces_add(this.have_piece_location,this.have_piece,-1):this.xcontainer.piece_box_add(this.have_piece,-1)},put_on_my_soldier_p:function(n){if(this.lifted_p&&n&&n.location===this.xcontainer.current_location&&!c.a.isEqual(this.place_from,n.place))return!0},soldier_hold:function(n,e){this.place_from=n,this.lp_create(e,this.origin_soldier1)},lifted_piece_cancel:function(){this.log("lifted_piece_cancel"),this.dialog_soldier=null,this.place_from=null,this.have_piece=null,this.have_piece_location=null,this.have_piece_promoted=null,this.killed_soldier=null,this.illegal_clear(),this.lp_destroy()},if_standard_then_unhold:function(){this.lift_cancel_action_info.smooth_cancel&&(this.log("持った状態で自分の非合法セルタップでキャンセル"),this.event_call("ev_action_piece_cancel"),this.lifted_piece_cancel())},piece_hold_and_put_for_bug:function(n,e){this.lifted_piece_cancel()},fn_flip_all:function(){var n=this;this.xcontainer.board=this.xcontainer.board.flip_all,this.xcontainer.hold_pieces=c.a.reduce(h.a.values,(function(a,e){return a[e.key]=n.xcontainer.hold_pieces[e.flip.key],a}),{})},fn_flop:function(){this.xcontainer.board=this.xcontainer.board.flop},init_location_toggle:function(){this.init_location_key=this.init_location.flip.key},soldier_create_from_stand_or_box_on:function(n){return new f.a({piece:this.have_piece,place:n,promoted:this.have_piece_promoted||!1,location:this.have_piece_location||h.a.fetch("black")})},meta_p:function(n){return n.shiftKey|n.ctrlKey|n.altKey|n.metaKey}},computed:{LiftCancelActionInfo:function(){return d.a},lift_cancel_action_info:function(){return d.a.fetch(this.sp_lift_cancel_action)},origin_soldier1:function(){if(this.place_from)return this.xcontainer.board.lookup(this.place_from)},origin_soldier2:function(){if(this.have_piece){return this.soldier_create_from_stand_or_box_on(null)}},soldier_or_stand_p:function(){return this.place_from||this.have_piece_location},lifted_p:function(){return!c.a.isNil(this.place_from)||!c.a.isNil(this.have_piece)},cpu_location_p:function(){if(this.play_p)return!c.a.includes(this.human_locations,this.xcontainer.current_location)},break_if_view_mode:function(){if(this.view_p&&!this.sp_view_mode_piece_movable)return!0}}}},331:function(n,e,t){"use strict";t.d(e,"a",(function(){return l}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20),r=(t(12),t(540));function c(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function _(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{},t=r.a.fetch(n);if(this.log("反則: ".concat(t.name)),e=_(_({},t),e),this.sp_illegal_cancel)return this.event_call("ev_illegal_illegal_accident",e),"__cancel__";this.illegal_list.push(e)}}}},332:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(72),t(73),t(11),t(22),t(51),t(98),t(23)),c=t.n(r),_=t(128),l=t(71),f=t(315),h=t(535),d=t.n(h),y={props:{sp_human_side:{type:String,default:"both",validator:function(n){return f.a.keys.includes(n)}}},data:function(){return{moves:[],init_sfen:null,init_location_key:"black"}},created:function(){var n=this;this.$watch((function(){return[n.xcontainer,n.init_location_key]}),(function(){n.emit_update_edit_mode_short_sfen()}),{deep:!0})},mounted:function(){},watch:{edit_mode_short_sfen2:function(n){this.event_call("ev_edit_mode_short_sfen2_change",n)},"xcontainer.to_short_sfen":{handler:function(n){this.event_call("ev_short_sfen_change",n)}},turn_offset:function(n){this.event_call("ev_turn_offset_change",n)},moves_take_turn_offset:function(n){this.event_call("ev_play_mode_moves_change",n)},current_comments:function(n){this.event_call("ev_comment_change",n)}},methods:{play_mode_setup_from:function(n){this.log("play_mode_setup_from"),void 0!==this.xcontainer.data_source.init_sfen?("view"===n&&this.play_mode_setup(),"edit"===n&&this.init_sfen_set()):("view"===n&&(this.init_location_key=this.xcontainer.current_location.key),this.init_sfen_set()),this.play_mode_xcontainer_seek_to(this.turn_offset)},play_mode_setup:function(){d()(this.xcontainer.data_source.init_sfen),this.init_sfen=this.xcontainer.data_source.init_sfen,this.moves=this.xcontainer.data_source.moves},init_sfen_set:function(){this.init_sfen=this.edit_mode_short_sfen(),this.moves=[]},play_mode_xcontainer_seek_to:function(n){this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=n,this.xcontainer.run(),this.flip_if_white_run()},moves_set:function(){this.moves=[].concat(Object(o.a)(this.moves_take_turn_offset),[this.last_move_info.to_sfen])},turn_next:function(){this.play_p&&(this.xcontainer=new _.a,this.xcontainer.data_source=this.data_source_by(this.play_mode_full_moves_sfen),this.xcontainer.current_turn=-1,this.xcontainer.run(),this.event_call("ev_play_mode_move",{sfen:this.play_mode_full_moves_sfen,turn:this.turn_offset,last_move_info:this.last_move_info,snapshot_hash:this.xcontainer.to_sfen_without_turn}),this.event_call("ev_play_mode_next_moves",this.moves),this.turn_slider_focus())},edit_mode_short_sfen:function(){if(this.xcontainer){var n=this.xcontainer.sfen_serializer;return["position sfen",n.to_board_sfen,this.init_location.key[0],n.to_hold_pieces,1].join(" ")}},emit_update_edit_mode_short_sfen:function(){this.edit_p&&this.event_call("ev_edit_mode_short_sfen_change",this.edit_mode_short_sfen())}},computed:{play_mode_full_moves_sfen:function(){if(this.init_sfen)return this.init_sfen+" moves "+this.moves.join(" ")},init_location:function(){return l.a.fetch(this.init_location_key)},human_locations:function(){return f.a.fetch(this.sp_human_side).locations},moves_take_turn_offset:function(){return c.a.take(this.moves,this.turn_offset)},edit_mode_short_sfen2:function(){return this.edit_mode_short_sfen()}}}},333:function(n,e,t){"use strict";t.d(e,"a",(function(){return o}));var o={data:function(){return{_ShogiPlayerRenderCount:0,_MainBoardRenderCount:0}},beforeUpdate:function(){this.$data._ShogiPlayerRenderCount+=1}}},334:function(n,e,t){"use strict";t.d(e,"a",(function(){return c}));t(72),t(73),t(11),t(22);var o=t(128),r=t(524),c={props:{sp_preset:{type:String,default:null,validator:function(n){return r.a.keys.includes(n)}}},data:function(){return{mut_preset_key:this.sp_preset}},watch:{sp_preset:function(n){this.mut_preset_key=n},mut_preset_key:function(n){this.xcontainer_setup_by_preset(n)}},methods:{xcontainer_setup_by_preset:function(n){null!=n&&(n=r.a.fetch(n),this.xcontainer=new o.a,n.sfen&&(this.xcontainer.data_source=this.data_source_by(n.sfen)),this.xcontainer.run(),this.xcontainer.piece_box_piece_counts_adjust(),this.init_location_key=this.xcontainer.current_location.key)}},computed:{preset_info_values:function(){return r.a.values},init_preset_sfen:function(){if(this.sp_preset)return r.a.fetch(this.sp_preset).sfen}}}},335:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(180),r=t(521),c=t(128),_={methods:{api_board_shuffle:function(){this.xcontainer.shuffle_apply(o.a.dimension)},api_random_puton:function(){var n=r.a.random();return this.xcontainer.board.clear(),this.xcontainer.board.place_on(n),n},api_place_on:function(n){this.xcontainer.board.place_on(n)},api_board_clear:function(){this.xcontainer.board.clear()},api_board_turn_set:function(n){this.xcontainer_setup(n)},api_play_mode_seek_to:function(n){this.play_mode_xcontainer_seek_to(n)},api_viewpoint_set:function(n){this.mut_viewpoint=n},api_viewpoint_flip:function(){this.viewpoint_flip()},api_retract_a_move:function(){var n=this.turn_offset-2;n<0&&(n=0),this.api_board_turn_set(n)},api_sfen_or_kif_set:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.xcontainer=new c.a,this.xcontainer.data_source=this.data_source_by(n),this.xcontainer.current_turn=e.turn||0,this.xcontainer.run()},api_play_mode_setup:function(){this.play_mode_setup()},api_lifted_piece_cancel:function(){this.lifted_piece_cancel()},api_turn_slider_focus:function(){this.turn_slider_focus()},api_moves_take_turn_offset:function(){return this.moves_take_turn_offset}}}},336:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var o=t(20);function r(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function c(n){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:{};(e=c({container:this.root_container_query,message:n,position:"is-bottom",type:"is-primary",duration:2,queue:!1},e)).duration=1e3*e.duration,this.$buefy.toast.open(e)},dialog_call:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=c({container:this.root_container_query,message:n,confirmText:"実行",cancelText:"キャンセル",trapFocus:!0,animation:""},e),this.$buefy.dialog.prompt(e)}}}},337:function(n,e,t){"use strict";t.d(e,"a",(function(){return _}));var o=t(523),r=(t(11),t(51),t(23)),c=t.n(r),_={props:{sp_debug:{type:Boolean,default:!1},sp_event_log:{type:Boolean,default:!1},sp_layer:{type:Boolean,default:!1}},data:function(){return{mut_debug:this.sp_debug,mut_event_log:this.sp_event_log,mut_layer:this.sp_layer,event_logs:[]}},watch:{sp_debug:function(n){this.mut_debug=n},sp_event_log:function(n){this.mut_event_log=n},sp_layer:function(n){this.mut_layer=n}},methods:{log:function(){var n;this.debug_or_development_p&&(n=console).log.apply(n,arguments)},event_call:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r0&&o>0){var r=this[n.attr_w],c=this[n.attr_h],_=Math.abs(r-t),l=Math.abs(c-o),f=_>n.threshold||l>n.threshold;f&&(this[n.attr_w]=t,this[n.attr_h]=o),this.debug_or_development_p&&this.log("ResizeObserver[".concat(n.key,"] ").concat(r,"x").concat(c," -> ").concat(t,"x").concat(o," ").concat(f?"(update)":"(skip)"))}}}},computed:{ro_css_variables_hash:function(){return{"--sp_board_w":"".concat(this.sp_board_w,"px"),"--sp_board_h":"".concat(this.sp_board_h,"px"),"--sp_cell_w":"".concat(this.sp_cell_w,"px"),"--sp_cell_h":"".concat(this.sp_cell_h,"px")}}}})},342:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(523),r=(t(51),t(11),t(517),t(177)),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"is_position_north",name:"北",sign:-1},{key:"is_position_south",name:"南",sign:1}]}}]),t}(t(520).a),y={data:function(){return{lp_pos_update_need_p:!1,_lp_latest_mouse_event:null,_LiftedPieceElement:null,lp_mouse_stick_p:!1}},beforeDestroy:function(){this.lp_destroy()},methods:{lp_pos_update:function(){if(this.$data._LiftedPieceElement&&this.$data._lp_latest_mouse_event&&this.lp_mouse_stick_p){var n=this.$data._lp_latest_mouse_event.clientX,e=this.$data._lp_latest_mouse_event.clientY;this.element_vector_set(this.$data._LiftedPieceElement,{x:n,y:e})}},lp_create:function(n,e){this.event_call("ev_action_piece_lift"),this.lp_destroy(),this.lp_element_create(e),this.lp_mouse_stick_p=!0,n&&(this.$data._lp_latest_mouse_event=n,this.lp_pos_update()),this.$el.addEventListener("mousemove",this.lp_mousemove_hook),this.$el.addEventListener("click",this.lp_click_hook)},lp_element_create:function(n){this.$data._LiftedPieceElement=this.lp_el_create(["LiftedPieceElement"]);var e=this.lp_el_create(["PieceTap"]),t=this.lp_el_create(["PieceObject"]),r=this.lp_el_create(["PieceTexture"].concat(Object(o.a)(n.css_class_list)));e.classList.add(n.location.flip_if(this.fliped).position_key),t.appendChild(r),e.appendChild(t),this.$data._LiftedPieceElement.appendChild(e);var c=n.location.flip_if(this.fliped).position_key,_=d.fetch(c);if(n.place){var l=this.place_to_cell_info(n.place),f=this.vector_scale(l.radius,this.devise_info.gap*_.sign*-1),h=this.vector_add(l.center,f);this.element_vector_set(this.$data._LiftedPieceElement,h)}else this.$data._LiftedPieceElement.style.left="-50%",this.$data._LiftedPieceElement.style.top="-50%";this.$el.appendChild(this.$data._LiftedPieceElement)},lp_destroy:function(){this.$data._LiftedPieceElement&&(this.$el.removeChild(this.$data._LiftedPieceElement),this.$data._LiftedPieceElement=null,this.lp_mouse_stick_p=!1,this.$el.removeEventListener("mousemove",this.lp_mousemove_hook),this.$el.removeEventListener("click",this.lp_click_hook))},lp_mousemove_hook:function(n){var e=this;this.$data._lp_latest_mouse_event=n,this.lp_pos_update_need_p||(this.lp_pos_update_need_p=!0,window.requestAnimationFrame((function(){e.lp_pos_update(),e.lp_pos_update_need_p=!1})))},lp_click_hook:function(n){1!==n.which&&this.lifted_piece_cancel()},lp_el_create:function(n){var e,t=document.createElement("div");return(e=t.classList).add.apply(e,Object(o.a)(n)),t}}}},343:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(72),t(73),t(11),t(22),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516);function f(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var h=function(n){Object(c.a)(t,n);var e=f(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,null,[{key:"define",get:function(){return[{key:"mouse",name:"マウス操作",gap:0,description:"タップも可能な端末であっても先にマウス操作したらマウス"},{key:"touch",name:"タップ操作",gap:0,description:"基本的にスマホはこちら"}]}}]),t}(t(520).a),d={props:{sp_device:{type:String,default:null,validator:function(n){return h.keys.includes(n)}}},data:function(){return{detected_real_device:null}},beforeMount:function(){this.device_detect_create()},beforeDestroy:function(){this.device_detect_destroy()},methods:{device_detect_create:function(){document.addEventListener("touchstart",this.device_detect_hook),document.addEventListener("mousemove",this.device_detect_hook)},device_detect_destroy:function(){document.removeEventListener("touchstart",this.device_detect_hook),document.removeEventListener("mousemove",this.device_detect_hook)},device_detect_hook:function(n){this.detected_real_device="changedTouches"in n?"touch":"mouse",this.device_detect_destroy()}},computed:{any_devise_key:function(){return this.sp_device||this.detected_real_device||"mouse"},devise_info:function(){return h.fetch(this.any_devise_key)}}}},499:function(n,e,t){"use strict"},520:function(n,e,t){"use strict";t.d(e,"a",(function(){return d}));t(11),t(517);var o=t(177),r=t(178),c=t(518),_=t(519),l=t(516),f=(t(98),t(12),t(541));function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(l.a)(n);if(e){var r=Object(l.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(_.a)(this,t)}}var d=function(n){Object(c.a)(t,n);var e=h(t);function t(){return Object(o.a)(this,t),e.apply(this,arguments)}return Object(r.a)(t,[{key:"unique_key",get:function(){return[this.constructor.name,this.key].join("/")}}]),t}(t.n(f).a)},521:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return j}));t(37),t(32),t(36),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178),l=(t(12),t(51),t(11),t(22),t(2)),f=t(23),h=t.n(f),d=t(180),y=t(127),v=t(522),m=t(71);function k(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function O(n){for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return new n(O(O({},this.attributes),e))}},{key:"promotable_p",get:function(){if(this.piece.promotable_p&&!this.promoted)return this.danger_zone_p}},{key:"danger_zone_p",get:function(){return"black"===this.location.key?this.place.y=d.a.dimension-d.a.danger_zone_size}},{key:"css_class_list",get:function(){var n=[];return n.push("location_".concat(this.location.key)),n.push("promoted_".concat(this.promoted)),n=h.a.concat(n,this.piece.css_class_list)}},{key:"bottom_spaces",get:function(){return d.a.dimension-1-this.top_spaces}},{key:"top_spaces",get:function(){return this.place.sp_flip_if_white(this.location).y}},{key:"once_vectors",get:function(){return this.piece.once_vectors(this.promoted)}},{key:"repeat_vectors",get:function(){return this.piece.repeat_vectors(this.promoted)}}],[{key:"random",value:function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).place;if(!n){var e=h.a.random(0,d.a.dimension-1),t=h.a.random(0,d.a.dimension-1);n=y.a.fetch([e,t])}var o=v.a.fetch(h.a.random(0,v.a.values.length-1));return new this({piece:o,place:n,promoted:o.promotable_p&&0===h.a.random(0,1),location:m.a.fetch(h.a.random(0,m.a.values.length-1))})}}]),n}();if(void 0!==n&&n.argv[1]===o){var x=new j({place:new y.a([1,7]),piece:v.a.fetch("P"),promoted:!0,location:m.a.fetch("white")});console.log(x.name),console.log(x.top_spaces)}}).call(this,t(179),"/index.js")},522:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return k}));t(517);var r=t(177),c=t(178),_=t(526),l=t(518),f=t(519),h=t(516),d=(t(11),t(22),t(520)),y=t(533),v=t(534);function m(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(h.a)(n);if(e){var r=Object(h.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(f.a)(this,t)}}var k=function(n){Object(l.a)(t,n);var e=m(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,[{key:"css_class_list",get:function(){return["piece_name","piece_".concat(this.key)]}},{key:"promotable_p",get:function(){return!!this.promoted_name}},{key:"piece_vector",get:function(){return y.a.fetch(this.key)}},{key:"once_vectors",value:function(n){return this.piece_vector.once_vectors(n)}},{key:"repeat_vectors",value:function(n){return this.piece_vector.repeat_vectors(n)}},{key:"piece_yomiage",get:function(){return v.a.fetch(this.key)}}],[{key:"define",get:function(){return[{key:"K",name:"玉",alias_name:"王",promoted_name:null,promoted_alias_name:null},{key:"R",name:"飛",alias_name:null,promoted_name:"龍",promoted_alias_name:"竜"},{key:"B",name:"角",alias_name:null,promoted_name:"馬",promoted_alias_name:null},{key:"G",name:"金",alias_name:null,promoted_name:null,promoted_alias_name:null},{key:"S",name:"銀",alias_name:null,promoted_name:"全",promoted_alias_name:null},{key:"N",name:"桂",alias_name:null,promoted_name:"圭",promoted_alias_name:null},{key:"L",name:"香",alias_name:null,promoted_name:"杏",promoted_alias_name:null},{key:"P",name:"歩",alias_name:null,promoted_name:"と",promoted_alias_name:null}]}},{key:"lookup",value:function(n){return"string"==typeof n&&(n=n.toUpperCase()),Object(_.a)(Object(h.a)(t),"lookup",this).call(this,n)}},{key:"lookup_by_name",value:function(n){return null==this._lookup_by_name&&(this._lookup_by_name=this.memory_record_create_index_by(["name","alias_name"])),this._lookup_by_name[n]}},{key:"lookup_by_promoted_name",value:function(n){return null==this._lookup_by_promoted_name&&(this._lookup_by_promoted_name=this.memory_record_create_index_by(["promoted_name","promoted_alias_name"])),this._lookup_by_promoted_name[n]}}]),t}(d.a);void 0!==n&&n.argv[1]===o&&(console.log(k.fetch("K")),console.log(k.fetch("K")),console.log(k.lookup("")),console.log(k.values),console.log(k.values_map.get("K")),console.log(k.fetch("K").key))}).call(this,t(179),"/index.js")},524:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return d}));t(11),t(517);var r=t(177),c=t(178),_=t(518),l=t(519),f=t(516);function h(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,o=Object(f.a)(n);if(e){var r=Object(f.a)(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return Object(l.a)(this,t)}}var d=function(n){Object(_.a)(t,n);var e=h(t);function t(){return Object(r.a)(this,t),e.apply(this,arguments)}return Object(c.a)(t,null,[{key:"define",get:function(){return[{key:"詰将棋",sfen:"position sfen 4k4/9/9/9/9/9/9/9/9 b 2r2b4g4s4n4l18p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 美濃",sfen:"position sfen ln1g5/1ks6/1ppp5/p8/9/9/9/9/9 b BGSNL2rb2g2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"詰将棋 - 矢倉",sfen:"position sfen 7nl/6gk1/5gspp/5pp2/9/9/9/9/9 b BGSNL2rbg2s2n2l14p 1",first_location_key:"black",piece_box:[["K",1]]},{key:"戦型 - 右四間 vs 四間飛車",sfen:"position sfen ln1g1g1nl/1ks2r3/1pppp1bpp/p3spp2/9/P1P1SP1PP/1P1PP1P2/1BK1GR3/LNSG3NL b - 1",first_location_key:"black",piece_box:[]},{key:"戦型 - 角換わり",sfen:"position sfen lr5nl/3g1kg2/2n1ppsp1/pppps1p1p/9/P1PPSPPPP/1PS1P1N2/2GK1G3/LN5RL b Bb 1",first_location_key:"black",piece_box:[]},{key:"全部駒箱",sfen:"position sfen 9/9/9/9/9/9/9/9/9 b - 1",first_location_key:"black",piece_box:[["B",2],["R",2],["L",4],["N",4],["S",4],["G",4],["P",18],["K",2]]},{key:"平手",sfen:"position sfen lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]},{key:"香落ち",sfen:"position sfen lnsgkgsn1/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"右香落ち",sfen:"position sfen 1nsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["L",1]]},{key:"角落ち",sfen:"position sfen lnsgkgsnl/1r7/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1]]},{key:"飛車落ち",sfen:"position sfen lnsgkgsnl/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1]]},{key:"飛香落ち",sfen:"position sfen lnsgkgsn1/7b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["R",1],["L",1]]},{key:"二枚落ち",sfen:"position sfen lnsgkgsnl/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1]]},{key:"三枚落ち",sfen:"position sfen lnsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",1]]},{key:"四枚落ち",sfen:"position sfen 1nsgkgsn1/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2]]},{key:"六枚落ち",sfen:"position sfen 2sgkgs2/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2]]},{key:"八枚落ち",sfen:"position sfen 3gkg3/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2]]},{key:"十枚落ち",sfen:"position sfen 4k4/9/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2]]},{key:"十九枚落ち",sfen:"position sfen 4k4/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9]]},{key:"二十枚落ち",sfen:"position sfen 9/9/9/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL w - 1",first_location_key:"white",piece_box:[["B",1],["R",1],["L",2],["N",2],["S",2],["G",2],["P",9],["K",1]]},{key:"青空将棋",sfen:"position sfen lnsgkgsnl/1r5b1/9/9/9/9/9/1B5R1/LNSGKGSNL b - 1",first_location_key:"black",piece_box:[]}]}}]),t}(t(520).a);void 0!==n&&n.argv[1]===o&&(console.log(d.fetch("平手")),console.log(d.fetch("香落ち").first_location_key))}).call(this,t(179),"/index.js")},528:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return h}));var r=t(177),c=t(178),_=(t(11),t(22),t(23)),l=t.n(_),f=t(71),h=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,n),this.reset(),this.raw_body=e}return Object(c.a)(n,[{key:"reset",value:function(){this.raw_body="",this.header={}}},{key:"parse",value:function(){}},{key:"board",get:function(){console.warn("not implemented")}},{key:"hold_pieces_empty_hash",value:function(){return l.a.reduce(f.a.values,(function(a,n){return a[n.key]={},a}),{})}},{key:"turn_offset_min",get:function(){return 0}},{key:"turn_offset_max",get:function(){return this.move_infos.length}},{key:"turn_base",get:function(){return 0}},{key:"location_by_offset",value:function(n){return this.base_location.advance(n)}},{key:"last_location",get:function(){return this.location_by_offset(this.turn_offset_max-1)}},{key:"next_location",get:function(){return this.location_by_offset(this.turn_offset_max)}},{key:"move_infos",get:function(){console.warn("not implemented")}},{key:"comment_lines_hash",get:function(){return null}}],[{key:"parse",value:function(n){var e=new this(n);return e.parse(),e}}]),n}();void 0!==n&&n.argv[1]}).call(this,t(179),"/index.js")},531:function(n,e,t){"use strict";t.d(e,"a",(function(){return f}));var o=t(20),r=t(177),c=t(178);t(51),t(37),t(12),t(98),t(11),t(22),t(32),t(36),t(43),t(31),t(44);function _(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function l(n){for(var i=1;i ").concat(JSON.stringify(e));console.error(t),alert(t),console.error(o)}}}},{key:"get",value:function(n){return this.lookup(n)}},{key:"fetch",value:function(n){var e=this.lookup(n);if(!e)throw new Error(["".concat(this.name,".fetch(").concat(JSON.stringify(n),") does not match anything"),"keys: ".concat(JSON.stringify(this.keys))].join("\n"));return e}},{key:"keys",get:function(){var n=[];if(this.core)for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},a=[];return this.drop_piece?(a.push(this.drop_piece.key),a.push("*")):a.push(this.origin_place.flop_if(n.flop).to_sfen),a.push(this.place.flop_if(n.flop).to_sfen),this.promoted_trigger&&a.push("+"),a.join("")}}],[{key:"line_flop",value:function(n){return this.parse_line(n).map((function(n){return n.to_flop_sfen})).join(" ")}},{key:"str_flop",value:function(n){var e=this.parse(n);if(e)return e.to_flop_sfen}},{key:"parse_line",value:function(line){var n=this,s=line||"";return""===s?[]:s.split(/\s+/).map((function(e){return n.parse(e)}))}},{key:"parse",value:function(n){var e=_.a.exec(n,_()("(?\\S)(?\\S)(?\\S)(?\\S)(?\\+?)?"));return e?new this(e):null}}]),n}()},537:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return y}));var r=t(177),c=t(178),_=(t(98),t(57),t(11),t(22),t(23)),l=t.n(_),f=t(522),h=(t(127),t(128)),d=t(71),y=(t(180),function(){function n(e){Object(r.a)(this,n),this.xcontainer=e}return Object(c.a)(n,[{key:"to_s",get:function(){var n=this.__base_parts;return n.push(this.xcontainer.display_turn+1),n.join(" ")}},{key:"to_s_without_turn",get:function(){return this.__base_parts.join(" ")}},{key:"to_board_sfen",get:function(){return this.xcontainer.board.to_sfen}},{key:"to_hold_pieces",get:function(){var n=this,e=d.a.values.map((function(e){var t=n.xcontainer.hold_pieces[e.key],o=f.a.values.map((function(n){var o=t[n.key]||0,r="";if(0===o)return null;o>=2&&(r+=o);var c=n.key;return r+=c="white"===e.key?c.toLowerCase():c.toUpperCase()}));return l.a.compact(o).join("")})).join("");return l.a.isEmpty(e)&&(e="-"),e}},{key:"__base_parts",get:function(){var n=[];return n.push(this.to_board_sfen),n.push(this.xcontainer.current_location.key[0]),n.push(this.to_hold_pieces),n}}]),n}());if(void 0!==n&&n.argv[1]===o){var v=new h.a;v.source="position sfen +lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b S2s 1 moves 7i6h S*2d",v.current_turn=1,v.run();var m=new y(v);console.log(m.to_s)}}).call(this,t(179),"/index.js")},538:function(n,e,t){"use strict";t.d(e,"a",(function(){return y}));var o=t(20),r=t(523),c=t(177),_=t(178),l=(t(33),t(75),t(318),t(45),t(74),t(530),t(98),t(51),t(11),t(31),t(37),t(32),t(36),t(43),t(44),t(525)),f=t.n(l);function h(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}function d(n){for(var i=1;i\\d+)?(?[".concat(n.UNIT_TABLE.charAt(i),"])(?\\d+)?"),"g");s=f.a.replace(s,e,(function(n){var e,t;return Number(null!==(e=n.number)&&void 0!==e?e:1)*Math.pow(10,i+1)+Number(null!==(t=n.rest)&&void 0!==t?t:0)}))},i=0;i=1;t--){var s=this.UNIT_TABLE.charAt(t-1),o=Math.pow(10,t),q=Math.trunc(n/o),r=Math.trunc(n%o);1===q?t>=this.one_number_insert_level?e.push(this.KANJI_TABLE.charAt(q)+s):e.push(s):q>=2&&e.push(this.KANJI_TABLE.charAt(q)+s),n=r}return(0===n&&0===e.length||n>=1)&&e.push(this.KANJI_TABLE.charAt(n)),e.join("")}},{key:"regexp",get:function(){return f()("[".concat(this.KANJI_TABLE).concat(this.UNIT_TABLE,"]+"))}},{key:"extract",value:function(s){var n=[];return f.a.forEach(s,this.regexp,(function(e){n.push(e[0])})),n}}]),n}();y.unit_size=6,y.one_number_insert_level=4,y.KANJI_TABLE="〇一二三四五六七八九",y.UNIT_TABLE="十百千万憶兆",y.NUMBER_TABLE="0123456789",y.TRANSRATE_TABLE=Object(r.a)(y.KANJI_TABLE).reduce((function(a,n,i){return d(d({},a),{},Object(o.a)({},n,y.NUMBER_TABLE.charAt(i)))}),{})},539:function(n,e,t){"use strict";(function(n,o){t.d(e,"a",(function(){return f}));t(37),t(32),t(36),t(11),t(43),t(31),t(44);var r=t(20),c=t(177),_=t(178);t(98),t(12);function l(object,n){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(object);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(object,n).enumerable}))),e.push.apply(e,t)}return e}var f=function(){function n(e){Object(c.a)(this,n),Object.assign(this,e)}return Object(_.a)(n,[{key:"to_sfen",get:function(){var n=null;if("move"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen;else if("promotable"===this.type)n=this.from.place.to_sfen+this.to.place.to_sfen+(this.to.promoted?"+":"");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.key+"*"+this.to.place.to_sfen}return n}},{key:"to_kif",get:function(){return this.to_custom_kif()}},{key:"to_kif_without_from",get:function(){return this.to_custom_kif({from:!1})}},{key:"to_yomiage",get:function(){var n=null;if("move"===this.type)n=this.from.yomiage_name;else if("promotable"===this.type)n=this.from.piece.piece_yomiage.prefix_name+"、"+(this.to.promoted?"なりっ!":"ならずっ!");else{if("put"!==this.type)throw new Error("must not happen");n=this.to.piece.piece_yomiage.prefix_name+"、うつ!"}return[this.to.place.yomiage_x,this.to.place.yomiage_y,n].join(" ")}},{key:"effect_key",get:function(){if(this.killed_soldier)return"kill_attack";if("move"===this.type)return"move_or_appear";if("promotable"===this.type)return this.to.promoted,"move_or_appear";if("put"===this.type)return"move_or_appear";throw new Error("must not happen")}},{key:"to_custom_kif",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=function(n){for(var i=1;i - shogi-player - shogi-player + shogi-player - shogi-player -
Loading...
- +
Loading...
+ diff --git a/docs/style-editor.html b/docs/style-editor.html index 9ff06731..093aead4 100644 --- a/docs/style-editor.html +++ b/docs/style-editor.html @@ -1,9 +1,9 @@ - shogi-player - shogi-player + shogi-player - shogi-player -
Loading...
- +
Loading...
+ diff --git a/docs/test/sp_device.html b/docs/test/sp_device.html index 9ff06731..093aead4 100644 --- a/docs/test/sp_device.html +++ b/docs/test/sp_device.html @@ -1,9 +1,9 @@ - shogi-player - shogi-player + shogi-player - shogi-player -
Loading...
- +
Loading...
+ diff --git a/docs/test/test_bod_parse.html b/docs/test/test_bod_parse.html index 9ff06731..093aead4 100644 --- a/docs/test/test_bod_parse.html +++ b/docs/test/test_bod_parse.html @@ -1,9 +1,9 @@ - shogi-player - shogi-player + shogi-player - shogi-player -
Loading...
- +
Loading...
+ diff --git a/docs/test/test_illegal.html b/docs/test/test_illegal.html index 9ff06731..093aead4 100644 --- a/docs/test/test_illegal.html +++ b/docs/test/test_illegal.html @@ -1,9 +1,9 @@ - shogi-player - shogi-player + shogi-player - shogi-player -
Loading...
- +
Loading...
+ diff --git a/docs/test/test_sound_timing.html b/docs/test/test_sound_timing.html index 9ff06731..093aead4 100644 --- a/docs/test/test_sound_timing.html +++ b/docs/test/test_sound_timing.html @@ -1,9 +1,9 @@ - shogi-player - shogi-player + shogi-player - shogi-player -
Loading...
- +
Loading...
+