assayo/build/static/index.js

3 lines
1.5 MiB
JavaScript
Raw Normal View History

2024-12-03 22:12:10 +00:00
/*! For license information please see main.5722e2cf.js.LICENSE.txt */
(()=>{var __webpack_modules__={122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var a=n(98),o=n(289);class s{constructor(){this.timer=null,this.limit=6,this.messages=[],(0,a.rC)(this,{messages:a.LO,show:a.aD,startClearTimer:a.aD})}static getTime(){return(new Date).getTime()}show(e){this.messages.push({id:s.getTime(),title:o.Z.get((null===e||void 0===e?void 0:e.title)||e||"common.notifications.save"),description:(null===e||void 0===e?void 0:e.description)||"",type:(null===e||void 0===e?void 0:e.type)||"success"}),this.messages.length>this.limit&&this.messages.shift(),this.startClearTimer()}startClearTimer(){this.timer||(this.timer=setInterval((()=>{const e=s.getTime()-3500;this.messages=this.messages.filter((t=>(null===t||void 0===t?void 0:t.id)>e)),this.messages.length||(clearInterval(this.timer),this.timer=null)}),500))}}const i=new s},289:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p,t:()=>u});var a=n(274),o=n(359),s=(0,o.Z)("addInTranslate"),i=(0,o.Z)("createPathByKey"),r=(0,o.Z)("addInObject");function l(e,t){const n=e.split(".");let a=this.translations;for(let o=0,s=n.length;o<s;o++)a[n[o]]=o===s-1?t:a[n[o]]||{},a=a[n[o]]}function c(e){const t=e.split(".");let n=this.translations;for(let a=0,o=t.length;a<o;a++)n[t[a]]=n[t[a]]||{},n=n[t[a]];return n}function m(e,t){for(let n in t)e[n]||(e[n]={}),"object"===typeof t[n]?(0,a.Z)(this,r)[r](e[n],t[n]):e[n]=t[n]}const d=new class{constructor(){Object.defineProperty(this,r,{value:m}),Object.defineProperty(this,i,{value:c}),Object.defineProperty(this,s,{value:l}),this.language="ru",this.translations={}}insertArguments(e,t){if(!t)return e;return(Array.isArray(t)?t:[t]).forEach(((t,n)=>{e=e.replace("$".concat(n+1),t||"_")})),e}get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=this.translations[this.language];if(!t)return e||"";let n=t[e];for(var a=arguments.length,o=new Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];if(n)return this.insertArguments(n,o);const i=e.split(".");n=t;for(let r=0,l=i.length;r<l;r++)if(n=n[i[r]],!n)return e||"";return this.insertArguments(n,o)}parse(e,t){t.split("\xa7 ").slice(1).forEach((t=>{let n=t.indexOf("\n");n===t.length-1&&(n=t.indexOf(":"));const o=e+"."+t.slice(0,n),i=t.slice(n+1).trim();(0,a.Z)(this,s)[s](o,i)}))}add(e,t){t?(0,a.Z)(this,r)[r]((0,a.Z)(this,i)[i](e),t):(0,a.Z)(this,r)[r](this.translations,e)}};window.localization=d;const p=d;function u(e){return d.get(e)}},575:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C:()=>applicationHasCustom,Z:()=>applyUrlCommands});var ts_helpers_Localization__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(289),ts_components_Notifications_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(122);function getParametersFromString(e){return Object.fromEntries((e||"").substring(1,1/0).split("&").map((e=>e.split("="))))}function getParametersFromURL(){const e={...getParametersFromString(location.search),...getParametersFromString(location.hash)};return delete e[""],e}function loadJsLocal(e,t){const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,n.onerror=()=>{ts_components_Notifications_store__WEBPACK_IMPORTED_MODULE_1__.Z.show("common.fileLoader.notification")},document.body.appendChild(n)}function loadJsLGlobal(url,callback){fetch(url).then((e=>e.text())).then((text=>text?"r"===text[0]?(eval(text),callback()):(window.report=text.split("\n"),void callback()):callback()))}function loadJsDump(e,t){"."===(null===e||void 0===e?void 0:e[0])?loadJsLocal(e,t):loadJsLGlobal(e,t)}function loadCssFile(e){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.body.appendChild(t)}let applicationHasCustom={theme:!1,title:!1};function applyUrlCommands(e){const t=getParametersFromURL(),n=t.style||t.theme;n&&(loadCssFile(n),applicationHasCustom.theme=!0);const a=t.title;a&&(document.title=decodeURIComponent(a),applicationHasCustom.title=!0);const o=t.lang||t.language;o&&(ts_helpers_Localization__WEBPACK_IMPORTED_MODULE_0__.Z.language=o);const s=t.dump||t
//# sourceMappingURL=main.5722e2cf.js.map