1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5525],{5525:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var r=n(6599),o=n(7469);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},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}var h=function(e){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(s,e);var t,n,r,i=u(s);function s(){return a(this,s),i.apply(this,arguments)}return t=s,(n=[{key:"connect",value:function(){this.loadPeriodicList()}},{key:"loadPeriodicList",value:function(){var e=this;new o.Ajax({url:this.listUrlValue,method:"GET",format:"json",successCallback:function(t){e.populateMonthlySelect(t.monthly||[]),e.populateAnnualSelect(t.annual||[])}})}},{key:"populateMonthlySelect",value:function(e){var t=this;e.forEach((function(e){var n=document.createElement("option");n.value=JSON.stringify({cashRegisterId:e.cashRegister.id,date:e.period,cashRegisterIdentifier:e.cashRegister.identifier});var r=e.period.split("-"),o=e.cashRegisterLabel||e.cashRegister.identifier;n.textContent="".concat(r[1],"/").concat(r[0]," - ").concat(o),t.monthlySelectTarget.appendChild(n)}))}},{key:"populateAnnualSelect",value:function(e){var t=this;e.forEach((function(e){var n=document.createElement("option");n.value=JSON.stringify({cashRegisterId:e.cashRegister.id,date:e.period,cashRegisterIdentifier:e.cashRegister.identifier});var r=e.cashRegisterLabel||e.cashRegister.identifier;n.textContent="".concat(e.period," - ").concat(r),t.annualSelectTarget.appendChild(n)}))}},{key:"downloadMonthly",value:function(){var e=this.monthlySelectTarget.value;if(e){var t=JSON.parse(e),n=t.cashRegisterId,r=t.date,o=this.monthlyUrlPatternValue.replace("CASH_REGISTER_ID",n).replace("DATE",r);this.triggerDownload(o,this.monthlyLoaderTarget),this.monthlySelectTarget.value=""}}},{key:"downloadAnnual",value:function(){var e=this.annualSelectTarget.value;if(e){var t=JSON.parse(e),n=t.cashRegisterId,r=t.date,o=this.annualUrlPatternValue.replace("CASH_REGISTER_ID",n).replace("DATE",r);this.triggerDownload(o,this.annualLoaderTarget),this.annualSelectTarget.value=""}}},{key:"triggerDownload",value:function(e,t){t.classList.remove("hidden");var n=document.createElement("a");n.href=e,n.download="ticketz.pdf",document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout((function(){t.classList.add("hidden")}),1e3)}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Qr);d(h,"values",{listUrl:String,monthlyUrlPattern:String,annualUrlPattern:String}),d(h,"targets",["monthlySelect","annualSelect","monthlyLoader","annualLoader"])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.