Files
core/hwe/js/recruitCrewForm.js
T
2021-08-21 00:30:05 +09:00

2 lines
6.1 KiB
JavaScript

(()=>{"use strict";var e,t={3904:(e,t,r)=>{r(1058),r(9826),r(4678);var n=r(9755),o=r.n(n);function i(e){return(i="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)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(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&&b(e,t)}function l(e){var t=d();return function(){var r,n=v(e);if(t){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){var t="function"==typeof Map?new Map:void 0;return(p=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return h(e,arguments,v(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),b(n,e)})(e)}function h(e,t,r){return(h=d()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&b(o,r.prototype),o}).apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r(2222),r(8304),r(489),r(2772),r(1539),r(9714),r(2419),r(6992),r(1532),r(8783),r(3948),r(2526),r(1817),r(2165);var m=function(e){c(r,e);var t=l(r);function r(){var e;a(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return y(s(e=t.call.apply(t,[this].concat(o))),"name","NotNullExpected"),e}return r}(function(e){c(o,e);var t,r,n=l(o);function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return a(this,o),y(s(e=n.call(this,t)),"name","RuntimeError"),e.message=t,e}return t=o,(r=[{key:"toString",value:function(){return this.message?this.name+": "+this.message:this.name}}])&&u(t.prototype,r),o}(p(Error)));function w(e){if(null==e)throw new m;return e}o()((function(){var e=o()("#amount"),t=o()("#crewType");o()(".form_double").on("keyup change",(function(r){var n,i,a,u,c,l,f=o()(this),s=f.parents(".input_form"),p=parseInt(s.data("crewtype"));return n=p,i=o()("#crewType{0}".format(n)),a=parseInt(w(i.find(".form_double").val())),u=i.data("cost"),c=i.find(".form_cost"),l=a*u,is모병&&(l*=2),c.val(Math.round(l)),t.val(p),e.val(100*parseFloat(w(f.val()))),13===r.which&&window.submitAction(),!1})),o()(".btn_half").on("click",(function(){var e=o()(this).closest(".input_form"),r=parseInt(e.data("crewtype")),n=e.find(".form_double:eq(0)"),i=Math.round(leadership/2);return t.val(r),n.val(i).change(),!1})),o()(".btn_fill").on("click",(function(){var e=o()(this).closest(".input_form"),r=parseInt(e.data("crewtype")),n=e.find(".form_double:eq(0)"),i=Math.ceil((100*leadership-currentCrew)/100);return r!=currentCrewType&&(i=leadership),t.val(r),n.val(i).change(),!1})),o()(".btn_full").on("click",(function(){var e=o()(this).closest(".input_form"),r=parseInt(e.data("crewtype")),n=e.find(".form_double:eq(0)"),i=fullLeadership+15;return t.val(r),n.val(i).change(),!1})),o()(".submit_btn").on("click",(function(){var r=o()(this).closest("tr").find(".input_form"),n=parseInt(r.data("crewtype")),i=r.find(".form_double");t.val(n),e.val(100*parseFloat(w(i.val()))),window.submitAction()})),o()(".btn_fill").click(),o()("#show_unavailable_troops").change((function(){o()("#show_unavailable_troops").is(":checked")?o()(".show_default_false").show():o()(".show_default_false").hide()})),o()(".show_default_false").hide()}))}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,e=[],n.O=(t,r,o,i)=>{if(!r){var a=1/0;for(f=0;f<e.length;f++){for(var[r,o,i]=e[f],u=!0,c=0;c<r.length;c++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(u=!1,i<a&&(a=i));if(u){e.splice(f--,1);var l=o();void 0!==l&&(t=l)}}return t}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[r,o,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=796,(()=>{var e={796:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[a,u,c]=r,l=0;for(o in u)n.o(u,o)&&(n.m[o]=u[o]);if(c)var f=c(n);for(t&&t(r);l<a.length;l++)i=a[l],n.o(e,i)&&e[i]&&e[i][0](),e[a[l]]=0;return n.O(f)},r=self.webpackChunkhidche_lib=self.webpackChunkhidche_lib||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o=n.O(void 0,[216],(()=>n(3904)));o=n.O(o)})();
//# sourceMappingURL=recruitCrewForm.js.map