phantasmal-world/7.8d167ff95415c20eca6f.js

1 line
337 KiB
JavaScript
Raw Normal View History

2020-01-03 01:36:18 +08:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"4aaK":function(e,t,i){"use strict";i.r(t);var o=i("nN8q"),s=i("xGNL"),n=i.n(s),r=i("xs7i"),a=i("PE7g"),d=i("Tpfs"),c=i("0Xme");class l extends c.a{constructor(e="",t){if(super(e,"core_TextInput","text","core_TextInput_inner",t),this.preferred_label_position="left",t){const{max_length:e}=t;this.set_attr("maxLength",e)}this.set_value(e),this.finalize_construction()}get_value(){return this.input_element.value}set_value(e){this.input_element.value=e}}var _=i("sDu+"),u=(i("C5oP"),i("4VsB")),v=i("FXpb");class h extends _.a{constructor(e="",t){super(t),this.element=Object(v.i)({className:"core_TextArea"}),this.preferred_label_position="left",this.text_element=Object(v.v)({className:"core_TextArea_inner"}),this._value=new u.a(this,"",this.set_value),t&&(null!=t.max_length&&(this.text_element.maxLength=t.max_length),null!=t.font_family&&(this.text_element.style.fontFamily=t.font_family),null!=t.rows&&(this.text_element.rows=t.rows),null!=t.cols&&(this.text_element.cols=t.cols)),this.value=this._value,this.set_value(e),this.text_element.onchange=()=>this._value.set_val(this.text_element.value,{silent:!1}),this.element.append(this.text_element),this.finalize_construction()}set_value(e){this.text_element.value=e}}i("ObFr");var p=i("TRid"),g=i("7ZX1");i("7YJZ");class b extends p.a{constructor(e){super(),this.element=Object(v.i)({className:"quest_editor_UnavailableView"}),this.label=this.disposable(new g.a(e,{enabled:!1})),this.element.append(this.label.element),this.finalize_construction()}}class f extends o.a{constructor(e){super(),this.element=Object(v.i)({className:"quest_editor_QuestInfoView",tabIndex:-1}),this.table_element=Object(v.s)(),this.id_input=this.disposable(new a.a(0,{min:0,step:1})),this.name_input=this.disposable(new l("",{max_length:32})),this.short_description_input=this.disposable(new h("",{max_length:128,font_family:'"Courier New", monospace',cols:25,rows:5})),this.long_description_input=this.disposable(new h("",{max_length:288,font_family:'"Courier New", monospace',cols:25,rows:10})),this.unavailable_view=new b("No quest loaded."),this.quest_disposer=this.disposable(new d.a);const t=e.current_quest;this.table_element.append(Object(v.z)(Object(v.x)("Episode:"),this.episode_element=Object(v.u)()),Object(v.z)(Object(v.x)("ID:"),Object(v.u)(this.id_input.element)),Object(v.z)(Object(v.x)("Name:"),Object(v.u)(this.name_input.element)),Object(v.z)(Object(v.x)({colSpan:2},"Short description:")),Object(v.z)(Object(v.u)({colSpan:2},this.short_description_input.element)),Object(v.z)(Object(v.x)({colSpan:2},"Long description:")),Object(v.z)(Object(v.u)({colSpan:2},this.long_description_input.element))),this.bind_hidden(this.table_element,e.unavailable),this.element.append(this.table_element,this.unavailable_view.element),this.element.addEventListener("focus",e.focused,!0),this.disposables(this.unavailable_view.visible.bind_to(e.unavailable),t.observe(({value:t})=>{this.quest_disposer.dispose_all(),this.episode_element.textContent=t?r.b[t.episode]:"",t&&this.quest_disposer.add_all(this.id_input.value.bind_to(t.id),this.id_input.value.observe(({value:t})=>e.set_id(t)),this.name_input.value.bind_to(t.name),this.name_input.value.observe(({value:t})=>e.set_name(t)),this.short_description_input.value.bind_to(t.short_description),this.short_description_input.value.observe(({value:t})=>e.set_short_description(t)),this.long_description_input.value.bind_to(t.long_description),this.long_description_input.value.observe(({value:t})=>e.set_long_description(t)),this.enabled.bind_to(e.enabled))})),this.finalize_construction()}set_enabled(e){super.set_enabled(e),this.id_input.enabled.val=e,this.name_input.enabled.val=e,this.short_description_input.enabled.val=e,this.long_description_input.enabled.val=e}}i("88+i"),i("UrNz"),i("5sDa");class m extends o.a{constructor(e){super(),this.element=Object(v.i)({className:"quest_editor_NpcCountsView"}),this.table_element=Object(v.s)(),this.unavailable_view=new b("No quest loaded."),this.element.append(this.table_element,this.unavailable_view.e