sprof 0.0.60 → 0.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,4 +4,5 @@ export default class Inn {
4
4
  num: string;
5
5
  fileInfoId?: string;
6
6
  fileInfo: FileInfo;
7
+ constructor(i?: Inn);
7
8
  }
@@ -4,4 +4,5 @@ export default class Snils {
4
4
  num: string;
5
5
  fileInfoId?: string;
6
6
  fileInfo: FileInfo;
7
+ constructor(i?: Snils);
7
8
  }
package/dist/sprof.js CHANGED
@@ -11555,11 +11555,12 @@ class M {
11555
11555
  }
11556
11556
  u(M, "Auth", st(Lr)), u(M, "UI", st(_p)), u(M, "Paginator", st(Lp)), u(M, "S", xg), u(M, "H", Op), u(M, "C", If);
11557
11557
  class wo {
11558
- constructor() {
11558
+ constructor(e) {
11559
11559
  u(this, "id");
11560
11560
  u(this, "num", "");
11561
11561
  u(this, "fileInfoId");
11562
11562
  u(this, "fileInfo", new Ge());
11563
+ M.H.Classes.BuildClass(this, e);
11563
11564
  }
11564
11565
  }
11565
11566
  class ni {
@@ -11599,11 +11600,12 @@ kg([
11599
11600
  M.H.Classes.GetClassConstructor(ni)
11600
11601
  ], Qn.prototype, "passportScans");
11601
11602
  class bo {
11602
- constructor() {
11603
+ constructor(e) {
11603
11604
  u(this, "id");
11604
11605
  u(this, "num", "");
11605
11606
  u(this, "fileInfoId");
11606
11607
  u(this, "fileInfo", new Ge());
11608
+ M.H.Classes.BuildClass(this, e);
11607
11609
  }
11608
11610
  }
11609
11611
  const Rg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -39,4 +39,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
39
39
  * vue-router v4.4.5
40
40
  * (c) 2024 Eduardo San Martin Morote
41
41
  * @license MIT
42
- */function Ds(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var Ls;(function(t){t.pop="pop",t.push="push"})(Ls||(Ls={}));var Hs;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Hs||(Hs={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var _s;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_s||(_s={}));const vh=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function xh(t,e,n){const r=()=>{t[e].delete(n)};i.onUnmounted(r),i.onDeactivated(r),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function Bh(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){Ds("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(vh,{}).value;if(!e){process.env.NODE_ENV!=="production"&&Ds("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}xh(e,"leaveGuards",t)}function qs(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?s():a()}}}const Mh=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Ae.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ae.GetDefault()),Ae.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ae.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=qs(),r=s=>Bh((a,c,l)=>{n((s||o)(),l)}),o=s=>async()=>{e.value=!0;try{s&&await s(),S.UI.Notify.Success("Сохранено")}catch(a){S.UI.Notify.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:r,submit:o}})(),Rh=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Ih{static GetRandColor(e){return De.GetRandEL(e??Rh)}}let $h=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",wt.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Yt[wt.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Yt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return De.GenerateNumsRange(this.startHour,this.endHour)}};const pi=t=>t===8||t===46,Ah=t=>t>46&&t<58,Nh=t=>t>34&&t<41,Ph=t=>t+".",Th=(t,e,n)=>{pi(e)||Nh(e)||(!Ah(e)||n>9)&&t.preventDefault()};function zh(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let r=t.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let o=t.substring(6,10).replace(".","1");Number(o)>2100&&(o="2100"),t=n+"."+r+"."+o}return t}function Vh(t){const e=t.keyCode;let n=t.srcElement.value;const r=n.length;Th(t,e,r),!pi(e)&&(r===2||r===5)&&(n=Ph(n));const o=t.srcElement.value+String.fromCharCode(t.which);if(pi(e)){t.srcElement.value=n;return}n.length===0&&Number(o)>3&&(n="3",t.preventDefault()),n.length===1&&Number(o)>31&&(n="31",t.preventDefault()),o.length===5&&Number(o.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=zh(n,r),t.srcElement.value=n}class Fh{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Oh{static Get(e){const n=e.split(".");return n[n.length-1]}}const Dh=(()=>{function t(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function n(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){t(s,[a]);return}const l=c.split(",");l.push(a),t(s,l)}function r(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);t(s,l)}function o(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:n,removeFromFavourite:r,setFavourite:t,isFavourite:e,clearFavourite:o}})(),wn=class wn{static Format(e){let n=e;if(!n)e=n;else{(n[0]==="7"||n[0]==="8")&&n.length!==1&&(n=n.slice(1));const r=n.replace(/\+7|[^\d]/g,""),o=r.length;switch(!0){case o===0:e="";break;case(o===1&&n.length===1&&r==="7"):case(o===1&&n.length===1&&r==="8"):e="+7 (";break;case o<4:e=`+7 (${r}`;break;case o<7:e=`+7 (${r.slice(0,3)}) ${r.slice(3)}`;break;case o<9:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}`;break;default:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}-${r.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(wn,"validatePhone",(e,n,r)=>{wn.getPhoneRegExp().test(n)||!n?r():r(new Error("Пожалуйста, введите корректный номер телефона"))});let gi=wn;class Lh{static Count(e){const n=e.filter(s=>s.rating!==0);let r=0;n.forEach(s=>r=r+s.rating);const o=r/n.length;return isNaN(o)?0:Number((r/n.length).toFixed(2))}}class Hh{static async Auth(e){e&&e()}static Dev(){}}class _h{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",wt.FiveMinutes);d(this,"timelines",Yt[wt.FiveMinutes])}periodIsCorrect(e,n){return H.GtOrEq(e,this.startHM)&&H.GtOrEq(this.endHM,n)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Yt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return De.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,n,r,o){return o.filter(s=>s.id!==r).every(s=>!H.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,r)=>H.HMtoM(n.startTime)-H.HMtoM(r.startTime))}}const qh=-68;function Uh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),r=e??qh;let o=0;n&&(o=n.getBoundingClientRect().top+r+document.body.scrollTop),o&&document.body.scrollTo({top:o,behavior:"smooth"})}class Wh{static Sort(e){e.forEach((n,r)=>n.order=r)}}function jh(t,e){let n=!0;return t.value.validate(r=>(r||(n=!1),n)),n}const Gh=t=>new Promise(e=>{if(document.querySelector(t))return e(document.querySelector(t));const n=new MutationObserver(()=>{document.querySelector(t)&&(n.disconnect(),e(document.querySelector(t)))});n.observe(document.body,{childList:!0,subtree:!0})});class mn{constructor(e){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");P.BuildClass(this,e)}static Create(e,n,r,o){const s=new mn;return s.id=ze(),s.chatId=e,s.message=r,s.userName=o,s}static CreatePingMessage(){const e=new mn;return e.type="ping",e.id=ze(),e}isMessage(){return this.type==="message"||this.type===""}}const Zh="";class Xh{constructor(e="",n="",r="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);P.BuildClass(this,{endpoint:e,query:n,mutation:r}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(mn.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Zh.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}const Jh=Object.freeze(Object.defineProperty({__proto__:null,Arrays:De,Axios:It,BaseStore:Z,Button:je,Cache:fn,CarouselSwipe:Eh,Classes:P,Color:Ih,Contact:Yo,CreateSortModels:No,Cursor:$h,DateMask:Vh,Dates:Pe,Dragger:Fh,Email:He,Extension:Oh,FTSP:Qo,Favourite:Dh,FilterModel:xn,Hooks:Mh,HttpClient:ae,MakeCarousel:tr,Period:Gn,PhoneService:gi,Rating:Lh,Router:ct,RouterGuard:Hh,Scheduler:_h,Scroll:Uh,Sizes:kn,SortModel:tn,Sorter:Wh,Static:_n,Statuses:le,Strings:te,Time:H,Timer:bt,Token:Rt,ValueType:Jn,WaitElement:Gh,WebSocketClient:Xh,useConfirmLeavePage:qs,validate:jh},Symbol.toStringTag,{value:"Module"}));class Yh{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Qh=new Yh;class Kh{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const ef=new Kh;class tf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return te.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(r=>te.SearchIn(r.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var n;return this.filterString?(n=e.children)==null?void 0:n.filter(r=>te.SearchIn(r.name,this.filterString)):e.children}}const nf=new tf;class rf{constructor(){d(this,"Menu",i.reactive(nf));d(this,"Head",i.reactive(ef))}}const of=new rf;class sf extends Wo{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((r,o)=>{this.resolve=r,this.reject=o})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const af=new sf;class lf extends Uo{Show(){super.show()}Hide(){super.hide()}}const cf=new lf,df=Object.freeze(Object.defineProperty({__proto__:null,Admin:of,Dialog:af,Loading:cf,Notify:Ct},Symbol.toStringTag,{value:"Module"}));let uf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),r=await ae.Post({query:"auth/login",payload:n});if(!r)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(r)}async LoginAs(e){if(!await ae.Post({query:"auth/login-as",payload:{email:e}})){S.UI.Notify.Error("Ошибка авторизации");return}}async Register(){}async RestorePassword(){}async passwordChange(){await ae.Put({query:"auth/password-change"})}async RefreshToken(){await ae.Post({query:"auth/refresh-token",payload:{refreshToken:Rt.getRefreshToken()}})}async CheckUuid(e){await ae.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}};const hf=new uf;let ff=class extends Z{constructor(){super(Yo,"contacts")}};const mf=new ff;let pf=class{constructor(){d(this,"cropper",new Gt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const gf=new pf;let yf=class extends Z{constructor(){super(He,"emails")}};const wf=new yf;let bf=class extends Z{constructor(){super(ve,"file-infos")}};const Cf=new bf;class yi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");P.BuildClass(this,e)}static Create(e){const n=new yi;return n.id=P.CreateUUID(),n.ftsp=JSON.stringify(e),n}}let Sf=class extends Z{constructor(){super(yi,"ftsp-presets")}};const kf=new Sf;let Ef=class extends Z{constructor(){super(Xo,"humans")}};const vf=new Ef;let xf=class extends Z{constructor(){super(ot,"phones")}};const Bf=new xf;class Mf{constructor(e){d(this,"id");d(this,"nameRus","");P.BuildClass(this,e)}}var Rf=Object.defineProperty,If=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Rf(e,n,o),o};class Us{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);P.BuildClass(this,e)}}If([P.GetClassConstructor(Mf)],Us.prototype,"fields");let $f=class extends Z{constructor(){super(Us,"schemas")}};const Af=new $f;class Ws{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);P.BuildClass(this,e)}}class Nf{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");P.BuildClass(this,e)}}var Pf=Object.defineProperty,js=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Pf(e,n,o),o};class dt{constructor(e){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);P.BuildClass(this,e)}}js([P.GetClassConstructor(Ws)],dt.prototype,"options"),js([P.GetClassConstructor(Nf)],dt.prototype,"searchGroupMetaColumns");class wi{constructor(e){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new dt);d(this,"searchObjects",[]);d(this,"pagination",new Kt);d(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(n=>new dt(n))),e.searchGroup&&(this.searchGroup=new dt(e.searchGroup)),e.options&&(this.options=e.options.map(n=>new Ws(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(r=>r.id===e);n?this.searchGroup=n:this.searchGroup=new dt}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(ct.Route().query.groupId)}setQuery(){const e=ct.Route().query.query;e&&(this.query=e)}}let Tf=class{constructor(){d(this,"isSearchDrawerOpen",i.ref(!1));d(this,"searchModel",i.reactive(new wi));d(this,"searchGroups",i.reactive([]));d(this,"count",0)}async Search(e){const n=await ae.Get({query:`?key=${e.key}&query=${e.query}`});n&&n.searchGroup&&n.searchGroup.options.forEach(r=>{e.searchObjects.push({id:r.id,value:r.value,label:r.label,description:r.description})})}async mainSearch(e){this.SetSearchModel(await ae.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(r=>{r.options=[]});const n=await ae.Get({query:`main?searchModel=${e.toUrl()}`});this.SetSearchModel(n)}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new wi}SetSearchModel(e){e&&(this.searchModel=new wi(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const zf=new Tf;class bi{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");P.BuildClass(this,e)}static Create(){const e=new bi;return e.id=P.CreateUUID(),e}}let Vf=class extends Z{constructor(){super(bi,"users-accounts")}};const Ff=new Vf;let Of=class extends Z{constructor(){super(Jn,"value-types")}};const Df=new Of,Lf=Object.freeze(Object.defineProperty({__proto__:null,Auth:hf,Contacts:mf,Cropper:gf,Emails:wf,FTSPPresets:kf,FileInfos:Cf,Humans:vf,Phones:Bf,Schemas:Af,Search:zf,UserAccounts:Ff,ValueTypes:Df},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Zo)),d(S,"UI",i.reactive(df)),d(S,"Paginator",i.reactive(Qh)),d(S,"S",Lf),d(S,"H",Jh),d(S,"C",Xd);class Gs{constructor(){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new ve)}}class $t{constructor(e){d(this,"id");d(this,"passportId");d(this,"fileInfoId");d(this,"fileInfo",new ve);d(this,"order",0);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new $t;return n.id=S.H.Classes.CreateUUID(),n.passportId=e,n}}var Hf=Object.defineProperty,_f=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Hf(e,n,o),o};class Ci{constructor(e){d(this,"id");d(this,"num","");d(this,"seria","");d(this,"division","");d(this,"divisionCode","");d(this,"citzenship","");d(this,"date",new Date);d(this,"address","");d(this,"passportScans",[]);S.H.Classes.BuildClass(this,e)}}_f([S.H.Classes.GetClassConstructor($t)],Ci.prototype,"passportScans");class Zs{constructor(){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new ve)}}const qf=Object.freeze(Object.defineProperty({__proto__:null,Inn:Gs,Passport:Ci,PassportScan:$t,Snils:Zs},Symbol.toStringTag,{value:"Module"}));let Uf=class extends Z{constructor(){super(Gs,"inns")}};const Wf=new Uf;let jf=class extends Z{constructor(){super($t,"passport-scans")}};const Gf=new jf;let Zf=class extends Z{constructor(){super(Ci,"passports")}};const Xf=new Zf;let Jf=class extends Z{constructor(){super(Zs,"snilss")}};const Yf=new Jf,Qf=Object.freeze(Object.defineProperty({__proto__:null,C:qf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Wf,PassportScans:Gf,Passports:Xf,Snilss:Yf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Je{constructor(e){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Je;return n.id=S.H.Classes.CreateUUID(),n.fieldId=e,n}}class Xs{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");S.H.Classes.BuildClass(this,e)}}class Si{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);S.H.Classes.BuildClass(this,e)}}class ut{constructor(e){d(this,"id");d(this,"name","");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ut;return n.id=S.H.Classes.CreateUUID(),n.fieldId=e,n}}var Kf=Object.defineProperty,At=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Kf(e,n,o),o};const Ye=class Sn{constructor(e){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new Jn);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);S.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new Sn;return n.id=S.H.Classes.CreateUUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(r=>r.id===e);return n?n.name:""}addRadioItem(e){const n=new Je(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(r=>r.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new Si(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new ut)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=Je.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=Sn.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=ut.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new Sn(this);return e.id=S.H.Classes.CreateUUID(),e.answerVariants.forEach(n=>{n.id=S.H.Classes.CreateUUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const r=n.copy();return r.parentId=e.id,r}),e}};At([S.H.Classes.GetClassConstructor(Je)],Ye.prototype,"answerVariants"),At([S.H.Classes.GetClassConstructor(Xs)],Ye.prototype,"fieldExamples"),At([S.H.Classes.GetClassConstructor(ut)],Ye.prototype,"fieldVariants"),At([S.H.Classes.GetClassConstructor(Si)],Ye.prototype,"fieldMeasures"),At([S.H.Classes.GetClassConstructor(Ye)],Ye.prototype,"children");let pn=Ye;class ki{constructor(e){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new ve);S.H.Classes.BuildClass(this,e)}}class Qe{constructor(e){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new Qe;return r.id=ze(),r.fieldFillId=e,r.answerVariantId=n,r}static GetClassName(){return"selectedAnswerVariant"}}var em=Object.defineProperty,Js=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&em(e,n,o),o};const Ei=class Ri{constructor(e){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new ve);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);S.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,n){const r=new Ri;return r.id=ze(),r.fieldId=e.id,r.formFillId=n,r.order=e.order,r.valueNumber=0,r.valueString="",r.valueDate=new Date,r}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(r=>Ri.Create(r,n))}addFile(){const e=new ki;return e.id=ze(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const r=Qe.Create(this.id,e);return r.answerVariantIdY=n,this.selectedAnswerVariants.push(r),this.filled=!0,r}getMatrixValue(e,n){return this.selectedAnswerVariants.find(r=>r.answerVariantId===e&&r.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=Qe.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(r=>r.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(r=>r.answerVariantId===n.id):!1}};Js([S.H.Classes.GetClassConstructor(Qe)],Ei.prototype,"selectedAnswerVariants"),Js([S.H.Classes.GetClassConstructor(ki)],Ei.prototype,"answerFiles");let ht=Ei;class tm{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var nm=Object.defineProperty,im=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&nm(e,n,o),o};const Ys=class ba{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new ba;return n.id=S.H.Classes.CreateUUID(),n.formId=e,n}addField(){const e=pn.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};im([S.H.Classes.GetClassConstructor(pn)],Ys.prototype,"fields");let gn=Ys;var rm=Object.defineProperty,om=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&rm(e,n,o),o};const Qs=class Ca{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);S.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Ca;return e.id=S.H.Classes.CreateUUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=gn.Create(this.id);return this.formSections.push(e),S.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(r=>r.fields).flat(),n=e.map(r=>r.children).flat();return e.concat(n).filter(r=>r.children.length===0)}};om([S.H.Classes.GetClassConstructor(gn)],Qs.prototype,"formSections");let Ks=Qs;var sm=Object.defineProperty,am=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&sm(e,n,o),o};const ea=class Sa{constructor(e){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Sa;return n.id=S.H.Classes.CreateUUID(),n.formId=e.id,n.fieldFills.push(...ht.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(r=>r.fieldId===e)}pushRegisterProperty(e){const n=new ht;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=ht.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(r=>r.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.answerVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(r=>{var o;if(r.code){const s=(o=this.getFieldFillByFieldId(r.id))==null?void 0:o.valueNumber;n[r.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};am([S.H.Classes.GetClassConstructor(ht)],ea.prototype,"fieldFills");let ta=ea;const lm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:Je,Field:pn,FieldExample:Xs,FieldFill:ht,FieldFillFile:ki,FieldFilter:tm,FieldMeasure:Si,FieldVariant:ut,Form:Ks,FormFill:ta,FormSection:gn,SelectedAnswerVariant:Qe},Symbol.toStringTag,{value:"Module"}));let cm=class extends Z{constructor(){super(Je,"answer-variants")}};const dm=new cm;let um=class extends Z{constructor(){super(ht,"field-fills")}};const hm=new um;let fm=class extends Z{constructor(){super(pn,"fields")}};const mm=new fm;let pm=class extends Z{constructor(){super(ta,"form-fills")}};const gm=new pm;let ym=class extends Z{constructor(){super(gn,"form-sections")}};const wm=new ym;let bm=class extends Z{constructor(){super(Ks,"forms")}};const Cm=new bm;let Sm=class extends Z{constructor(){super(Qe,"selected-answer-variants")}};const km=new Sm,Em=Object.freeze(Object.defineProperty({__proto__:null,C:lm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:dm,FieldFills:hm,Fields:mm,FormFills:gm,FormSections:wm,Forms:Cm,SelectedAnswerVariants:km},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class yn{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new yn;return r.id=S.H.Classes.CreateUUID(),r.name=e,r.label=n,r}}const vm=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:yn},Symbol.toStringTag,{value:"Module"}));class xm extends Z{constructor(){super(yn,"color-themes")}}const Bm=new xm,Mm=Object.freeze(Object.defineProperty({__proto__:null,Docs:Qf,Forms:Em,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:vm,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Bm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Rm={install:function(t){t.component("PButton",Ni),t.component("PCheckBox",Pi),t.component("PDatePicker",Ti),t.component("PFlex",zi),t.component("PInput",Hi),t.component("PInputDate",_i),t.component("PInputNumber",qi),t.component("PLeftSlider",Ui),t.component("PList",Wi),t.component("PListItem",ji),t.component("PRadio",Gi),t.component("PRightSlider",Zi),t.component("PSelect",Xi),t.component("PSticky",Ji),t.component("PString",Yi),t.component("PTextarea",Qi),t.component("PTopSlider",Ki),t.component("IconDownload",gr),t.component("IconFilter",yr),t.component("ArrowLeft",Br),t.component("ArrowRight",Mr),t.component("DoubleArrowLeft",Rr),t.component("DoubleArrowRight",Ir),t.component("EllipsisSvg",$r),t.component("IconArrowLeft",wr),t.component("IconCheckDefault",br),t.component("IconClose",zt),t.component("IconEdit",Cr),t.component("IconEmail",Sr),t.component("IconMove",kr),t.component("IconPhone",Er),t.component("IconSearch",vr),t.component("IconSelectArrow",xr),t.component("CollapseContainer",lo),t.component("CollapseItem",co),t.component("VerticalCollapseContainer",uo),t.component("PAdd",ho),t.component("PContainer",fo),t.component("PContainerStickyHead",mo),t.component("PDel",po),t.component("PTabs",wo),t.component("UploaderFile",bo),t.component("AuthForm",go),t.component("PModal",yo),t.component("AuthPage",qn),t.component("PageNotFound",Un),t.component("AdaptiveContainer",Ii),t.component("AdaptiveContainerHorizontal",$i),t.component("AdminGallery",Ai),t.component("AuthModal",er),t.component("CarouselImages",nr),t.component("ContextWindow",ir),t.component("DateInputRangeV2",or),t.component("DateInputRange",rr),t.component("DropList",sr),t.component("FilterCheckbox",ur),t.component("FiltersButtonsSelect",hr),t.component("FilterSelect",fr),t.component("FTSPPanel",mr),t.component("GeneralItem",pr),t.component("GridContainer",vn),t.component("ImageCropper",ro),t.component("InfoItem",jt),t.component("InfoItemSelectButtons",oo),t.component("LeftRightContainer",so),t.component("MessageBody",ao),t.component("PAutocomplete",Co),t.component("PDialog",So),t.component("PhoneForm",ko),t.component("PLoader",Eo),t.component("PNotification",vo),t.component("PPagination",xo),t.component("RemoteSearch",Bo),t.component("ResearcheContainer",Mo),t.component("RightSliderContainer",Ro),t.component("RightTabsContainer",Io),t.component("SelectValueType",$o),t.component("SingleNameToggleForm",Ao),t.component("SortList",Po),t.component("SortSelect",To),t.component("Switch3Pos",zo),t.component("ThemeWrapper",Vo),t.component("ToggleInfoItem",Fo),t.component("TopSliderContainer",Oo),t.component("UploaderImage",Do)}},Im=["PF","PFM"];v.AdaptiveContainer=Ii,v.AdaptiveContainerHorizontal=$i,v.AdminGallery=Ai,v.ArrowLeft=Br,v.ArrowRight=Mr,v.AuthForm=go,v.AuthModal=er,v.AuthPage=qn,v.CarouselImages=nr,v.CollapseContainer=lo,v.CollapseItem=co,v.ContextWindow=ir,v.DateInputRange=rr,v.DateInputRange_v2=or,v.DoubleArrowLeft=Rr,v.DoubleArrowRight=Ir,v.DropList=sr,v.EllipsisSvg=$r,v.FTSPPanel=mr,v.FilterCheckbox=ur,v.FilterSelect=fr,v.FiltersButtonsSelect=hr,v.GeneralItem=pr,v.GridContainer=vn,v.IconArrowLeft=wr,v.IconCheckDefault=br,v.IconClose=zt,v.IconDownload=gr,v.IconEdit=Cr,v.IconEmail=Sr,v.IconFilter=yr,v.IconMove=kr,v.IconPhone=Er,v.IconSearch=vr,v.IconSelectArrow=xr,v.ImageCropper=ro,v.InfoItem=jt,v.InfoItemSelectButtons=oo,v.LeftRightContainer=so,v.MessageBody=ao,v.PAdd=ho,v.PAutocomplete=Co,v.PButton=Ni,v.PCheckBox=Pi,v.PContainer=fo,v.PContainerStickyHead=mo,v.PDatePicker=Ti,v.PDel=po,v.PDialog=So,v.PF=S,v.PFM=Mm,v.PFlex=zi,v.PInput=Hi,v.PInputDate=_i,v.PInputNumber=qi,v.PLeftSlider=Ui,v.PList=Wi,v.PListItem=ji,v.PLoader=Eo,v.PModal=yo,v.PNotification=vo,v.PPagination=xo,v.PRadio=Gi,v.PRightSlider=Zi,v.PSelect=Xi,v.PSticky=Ji,v.PString=Yi,v.PTabs=wo,v.PTextarea=Qi,v.PTopSlider=Ki,v.PageNotFound=Un,v.PhoneForm=ko,v.RemoteSearch=Bo,v.ResearcheContainer=Mo,v.RightSliderContainer=Ro,v.RightTabsContainer=Io,v.SelectValueType=$o,v.SingleNameToggleForm=Ao,v.SortList=Po,v.SortSelect=To,v.Switch3Pos=zo,v.ThemeWrapper=Vo,v.ToggleInfoItem=Fo,v.TopSliderContainer=Oo,v.UploaderFile=bo,v.UploaderImage=Do,v.VerticalCollapseContainer=uo,v.pfName=Im,v.servicesComponents=Rm,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
42
+ */function Ds(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var Ls;(function(t){t.pop="pop",t.push="push"})(Ls||(Ls={}));var Hs;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Hs||(Hs={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var _s;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_s||(_s={}));const vh=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function xh(t,e,n){const r=()=>{t[e].delete(n)};i.onUnmounted(r),i.onDeactivated(r),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function Bh(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){Ds("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(vh,{}).value;if(!e){process.env.NODE_ENV!=="production"&&Ds("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}xh(e,"leaveGuards",t)}function qs(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?s():a()}}}const Mh=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Ae.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ae.GetDefault()),Ae.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ae.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=qs(),r=s=>Bh((a,c,l)=>{n((s||o)(),l)}),o=s=>async()=>{e.value=!0;try{s&&await s(),S.UI.Notify.Success("Сохранено")}catch(a){S.UI.Notify.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:r,submit:o}})(),Rh=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Ih{static GetRandColor(e){return De.GetRandEL(e??Rh)}}let $h=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",wt.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Yt[wt.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Yt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return De.GenerateNumsRange(this.startHour,this.endHour)}};const pi=t=>t===8||t===46,Ah=t=>t>46&&t<58,Nh=t=>t>34&&t<41,Ph=t=>t+".",Th=(t,e,n)=>{pi(e)||Nh(e)||(!Ah(e)||n>9)&&t.preventDefault()};function zh(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let r=t.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let o=t.substring(6,10).replace(".","1");Number(o)>2100&&(o="2100"),t=n+"."+r+"."+o}return t}function Vh(t){const e=t.keyCode;let n=t.srcElement.value;const r=n.length;Th(t,e,r),!pi(e)&&(r===2||r===5)&&(n=Ph(n));const o=t.srcElement.value+String.fromCharCode(t.which);if(pi(e)){t.srcElement.value=n;return}n.length===0&&Number(o)>3&&(n="3",t.preventDefault()),n.length===1&&Number(o)>31&&(n="31",t.preventDefault()),o.length===5&&Number(o.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=zh(n,r),t.srcElement.value=n}class Fh{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Oh{static Get(e){const n=e.split(".");return n[n.length-1]}}const Dh=(()=>{function t(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function e(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function n(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){t(s,[a]);return}const l=c.split(",");l.push(a),t(s,l)}function r(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);t(s,l)}function o(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:n,removeFromFavourite:r,setFavourite:t,isFavourite:e,clearFavourite:o}})(),wn=class wn{static Format(e){let n=e;if(!n)e=n;else{(n[0]==="7"||n[0]==="8")&&n.length!==1&&(n=n.slice(1));const r=n.replace(/\+7|[^\d]/g,""),o=r.length;switch(!0){case o===0:e="";break;case(o===1&&n.length===1&&r==="7"):case(o===1&&n.length===1&&r==="8"):e="+7 (";break;case o<4:e=`+7 (${r}`;break;case o<7:e=`+7 (${r.slice(0,3)}) ${r.slice(3)}`;break;case o<9:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}`;break;default:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}-${r.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(wn,"validatePhone",(e,n,r)=>{wn.getPhoneRegExp().test(n)||!n?r():r(new Error("Пожалуйста, введите корректный номер телефона"))});let gi=wn;class Lh{static Count(e){const n=e.filter(s=>s.rating!==0);let r=0;n.forEach(s=>r=r+s.rating);const o=r/n.length;return isNaN(o)?0:Number((r/n.length).toFixed(2))}}class Hh{static async Auth(e){e&&e()}static Dev(){}}class _h{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",wt.FiveMinutes);d(this,"timelines",Yt[wt.FiveMinutes])}periodIsCorrect(e,n){return H.GtOrEq(e,this.startHM)&&H.GtOrEq(this.endHM,n)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Yt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return De.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,n,r,o){return o.filter(s=>s.id!==r).every(s=>!H.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,r)=>H.HMtoM(n.startTime)-H.HMtoM(r.startTime))}}const qh=-68;function Uh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),r=e??qh;let o=0;n&&(o=n.getBoundingClientRect().top+r+document.body.scrollTop),o&&document.body.scrollTo({top:o,behavior:"smooth"})}class Wh{static Sort(e){e.forEach((n,r)=>n.order=r)}}function jh(t,e){let n=!0;return t.value.validate(r=>(r||(n=!1),n)),n}const Gh=t=>new Promise(e=>{if(document.querySelector(t))return e(document.querySelector(t));const n=new MutationObserver(()=>{document.querySelector(t)&&(n.disconnect(),e(document.querySelector(t)))});n.observe(document.body,{childList:!0,subtree:!0})});class mn{constructor(e){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");P.BuildClass(this,e)}static Create(e,n,r,o){const s=new mn;return s.id=ze(),s.chatId=e,s.message=r,s.userName=o,s}static CreatePingMessage(){const e=new mn;return e.type="ping",e.id=ze(),e}isMessage(){return this.type==="message"||this.type===""}}const Zh="";class Xh{constructor(e="",n="",r="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);P.BuildClass(this,{endpoint:e,query:n,mutation:r}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(mn.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Zh.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}const Jh=Object.freeze(Object.defineProperty({__proto__:null,Arrays:De,Axios:It,BaseStore:Z,Button:je,Cache:fn,CarouselSwipe:Eh,Classes:P,Color:Ih,Contact:Yo,CreateSortModels:No,Cursor:$h,DateMask:Vh,Dates:Pe,Dragger:Fh,Email:He,Extension:Oh,FTSP:Qo,Favourite:Dh,FilterModel:xn,Hooks:Mh,HttpClient:ae,MakeCarousel:tr,Period:Gn,PhoneService:gi,Rating:Lh,Router:ct,RouterGuard:Hh,Scheduler:_h,Scroll:Uh,Sizes:kn,SortModel:tn,Sorter:Wh,Static:_n,Statuses:le,Strings:te,Time:H,Timer:bt,Token:Rt,ValueType:Jn,WaitElement:Gh,WebSocketClient:Xh,useConfirmLeavePage:qs,validate:jh},Symbol.toStringTag,{value:"Module"}));class Yh{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Qh=new Yh;class Kh{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const ef=new Kh;class tf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return te.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(r=>te.SearchIn(r.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var n;return this.filterString?(n=e.children)==null?void 0:n.filter(r=>te.SearchIn(r.name,this.filterString)):e.children}}const nf=new tf;class rf{constructor(){d(this,"Menu",i.reactive(nf));d(this,"Head",i.reactive(ef))}}const of=new rf;class sf extends Wo{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((r,o)=>{this.resolve=r,this.reject=o})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const af=new sf;class lf extends Uo{Show(){super.show()}Hide(){super.hide()}}const cf=new lf,df=Object.freeze(Object.defineProperty({__proto__:null,Admin:of,Dialog:af,Loading:cf,Notify:Ct},Symbol.toStringTag,{value:"Module"}));let uf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),r=await ae.Post({query:"auth/login",payload:n});if(!r)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(r)}async LoginAs(e){if(!await ae.Post({query:"auth/login-as",payload:{email:e}})){S.UI.Notify.Error("Ошибка авторизации");return}}async Register(){}async RestorePassword(){}async passwordChange(){await ae.Put({query:"auth/password-change"})}async RefreshToken(){await ae.Post({query:"auth/refresh-token",payload:{refreshToken:Rt.getRefreshToken()}})}async CheckUuid(e){await ae.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}};const hf=new uf;let ff=class extends Z{constructor(){super(Yo,"contacts")}};const mf=new ff;let pf=class{constructor(){d(this,"cropper",new Gt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const gf=new pf;let yf=class extends Z{constructor(){super(He,"emails")}};const wf=new yf;let bf=class extends Z{constructor(){super(ve,"file-infos")}};const Cf=new bf;class yi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");P.BuildClass(this,e)}static Create(e){const n=new yi;return n.id=P.CreateUUID(),n.ftsp=JSON.stringify(e),n}}let Sf=class extends Z{constructor(){super(yi,"ftsp-presets")}};const kf=new Sf;let Ef=class extends Z{constructor(){super(Xo,"humans")}};const vf=new Ef;let xf=class extends Z{constructor(){super(ot,"phones")}};const Bf=new xf;class Mf{constructor(e){d(this,"id");d(this,"nameRus","");P.BuildClass(this,e)}}var Rf=Object.defineProperty,If=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Rf(e,n,o),o};class Us{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);P.BuildClass(this,e)}}If([P.GetClassConstructor(Mf)],Us.prototype,"fields");let $f=class extends Z{constructor(){super(Us,"schemas")}};const Af=new $f;class Ws{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);P.BuildClass(this,e)}}class Nf{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");P.BuildClass(this,e)}}var Pf=Object.defineProperty,js=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Pf(e,n,o),o};class dt{constructor(e){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);P.BuildClass(this,e)}}js([P.GetClassConstructor(Ws)],dt.prototype,"options"),js([P.GetClassConstructor(Nf)],dt.prototype,"searchGroupMetaColumns");class wi{constructor(e){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new dt);d(this,"searchObjects",[]);d(this,"pagination",new Kt);d(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(n=>new dt(n))),e.searchGroup&&(this.searchGroup=new dt(e.searchGroup)),e.options&&(this.options=e.options.map(n=>new Ws(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(r=>r.id===e);n?this.searchGroup=n:this.searchGroup=new dt}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(ct.Route().query.groupId)}setQuery(){const e=ct.Route().query.query;e&&(this.query=e)}}let Tf=class{constructor(){d(this,"isSearchDrawerOpen",i.ref(!1));d(this,"searchModel",i.reactive(new wi));d(this,"searchGroups",i.reactive([]));d(this,"count",0)}async Search(e){const n=await ae.Get({query:`?key=${e.key}&query=${e.query}`});n&&n.searchGroup&&n.searchGroup.options.forEach(r=>{e.searchObjects.push({id:r.id,value:r.value,label:r.label,description:r.description})})}async mainSearch(e){this.SetSearchModel(await ae.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(r=>{r.options=[]});const n=await ae.Get({query:`main?searchModel=${e.toUrl()}`});this.SetSearchModel(n)}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new wi}SetSearchModel(e){e&&(this.searchModel=new wi(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const zf=new Tf;class bi{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");P.BuildClass(this,e)}static Create(){const e=new bi;return e.id=P.CreateUUID(),e}}let Vf=class extends Z{constructor(){super(bi,"users-accounts")}};const Ff=new Vf;let Of=class extends Z{constructor(){super(Jn,"value-types")}};const Df=new Of,Lf=Object.freeze(Object.defineProperty({__proto__:null,Auth:hf,Contacts:mf,Cropper:gf,Emails:wf,FTSPPresets:kf,FileInfos:Cf,Humans:vf,Phones:Bf,Schemas:Af,Search:zf,UserAccounts:Ff,ValueTypes:Df},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Zo)),d(S,"UI",i.reactive(df)),d(S,"Paginator",i.reactive(Qh)),d(S,"S",Lf),d(S,"H",Jh),d(S,"C",Xd);class Gs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new ve);S.H.Classes.BuildClass(this,e)}}class $t{constructor(e){d(this,"id");d(this,"passportId");d(this,"fileInfoId");d(this,"fileInfo",new ve);d(this,"order",0);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new $t;return n.id=S.H.Classes.CreateUUID(),n.passportId=e,n}}var Hf=Object.defineProperty,_f=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Hf(e,n,o),o};class Ci{constructor(e){d(this,"id");d(this,"num","");d(this,"seria","");d(this,"division","");d(this,"divisionCode","");d(this,"citzenship","");d(this,"date",new Date);d(this,"address","");d(this,"passportScans",[]);S.H.Classes.BuildClass(this,e)}}_f([S.H.Classes.GetClassConstructor($t)],Ci.prototype,"passportScans");class Zs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new ve);S.H.Classes.BuildClass(this,e)}}const qf=Object.freeze(Object.defineProperty({__proto__:null,Inn:Gs,Passport:Ci,PassportScan:$t,Snils:Zs},Symbol.toStringTag,{value:"Module"}));let Uf=class extends Z{constructor(){super(Gs,"inns")}};const Wf=new Uf;let jf=class extends Z{constructor(){super($t,"passport-scans")}};const Gf=new jf;let Zf=class extends Z{constructor(){super(Ci,"passports")}};const Xf=new Zf;let Jf=class extends Z{constructor(){super(Zs,"snilss")}};const Yf=new Jf,Qf=Object.freeze(Object.defineProperty({__proto__:null,C:qf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Wf,PassportScans:Gf,Passports:Xf,Snilss:Yf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Je{constructor(e){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Je;return n.id=S.H.Classes.CreateUUID(),n.fieldId=e,n}}class Xs{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");S.H.Classes.BuildClass(this,e)}}class Si{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);S.H.Classes.BuildClass(this,e)}}class ut{constructor(e){d(this,"id");d(this,"name","");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ut;return n.id=S.H.Classes.CreateUUID(),n.fieldId=e,n}}var Kf=Object.defineProperty,At=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Kf(e,n,o),o};const Ye=class Sn{constructor(e){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new Jn);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);S.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new Sn;return n.id=S.H.Classes.CreateUUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(r=>r.id===e);return n?n.name:""}addRadioItem(e){const n=new Je(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(r=>r.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new Si(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new ut)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=Je.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=Sn.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=ut.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new Sn(this);return e.id=S.H.Classes.CreateUUID(),e.answerVariants.forEach(n=>{n.id=S.H.Classes.CreateUUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const r=n.copy();return r.parentId=e.id,r}),e}};At([S.H.Classes.GetClassConstructor(Je)],Ye.prototype,"answerVariants"),At([S.H.Classes.GetClassConstructor(Xs)],Ye.prototype,"fieldExamples"),At([S.H.Classes.GetClassConstructor(ut)],Ye.prototype,"fieldVariants"),At([S.H.Classes.GetClassConstructor(Si)],Ye.prototype,"fieldMeasures"),At([S.H.Classes.GetClassConstructor(Ye)],Ye.prototype,"children");let pn=Ye;class ki{constructor(e){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new ve);S.H.Classes.BuildClass(this,e)}}class Qe{constructor(e){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new Qe;return r.id=ze(),r.fieldFillId=e,r.answerVariantId=n,r}static GetClassName(){return"selectedAnswerVariant"}}var em=Object.defineProperty,Js=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&em(e,n,o),o};const Ei=class Ri{constructor(e){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new ve);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);S.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,n){const r=new Ri;return r.id=ze(),r.fieldId=e.id,r.formFillId=n,r.order=e.order,r.valueNumber=0,r.valueString="",r.valueDate=new Date,r}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(r=>Ri.Create(r,n))}addFile(){const e=new ki;return e.id=ze(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const r=Qe.Create(this.id,e);return r.answerVariantIdY=n,this.selectedAnswerVariants.push(r),this.filled=!0,r}getMatrixValue(e,n){return this.selectedAnswerVariants.find(r=>r.answerVariantId===e&&r.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=Qe.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(r=>r.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(r=>r.answerVariantId===n.id):!1}};Js([S.H.Classes.GetClassConstructor(Qe)],Ei.prototype,"selectedAnswerVariants"),Js([S.H.Classes.GetClassConstructor(ki)],Ei.prototype,"answerFiles");let ht=Ei;class tm{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var nm=Object.defineProperty,im=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&nm(e,n,o),o};const Ys=class ba{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new ba;return n.id=S.H.Classes.CreateUUID(),n.formId=e,n}addField(){const e=pn.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};im([S.H.Classes.GetClassConstructor(pn)],Ys.prototype,"fields");let gn=Ys;var rm=Object.defineProperty,om=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&rm(e,n,o),o};const Qs=class Ca{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);S.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Ca;return e.id=S.H.Classes.CreateUUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=gn.Create(this.id);return this.formSections.push(e),S.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(r=>r.fields).flat(),n=e.map(r=>r.children).flat();return e.concat(n).filter(r=>r.children.length===0)}};om([S.H.Classes.GetClassConstructor(gn)],Qs.prototype,"formSections");let Ks=Qs;var sm=Object.defineProperty,am=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&sm(e,n,o),o};const ea=class Sa{constructor(e){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Sa;return n.id=S.H.Classes.CreateUUID(),n.formId=e.id,n.fieldFills.push(...ht.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(r=>r.fieldId===e)}pushRegisterProperty(e){const n=new ht;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=ht.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(r=>r.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.answerVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(r=>{var o;if(r.code){const s=(o=this.getFieldFillByFieldId(r.id))==null?void 0:o.valueNumber;n[r.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};am([S.H.Classes.GetClassConstructor(ht)],ea.prototype,"fieldFills");let ta=ea;const lm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:Je,Field:pn,FieldExample:Xs,FieldFill:ht,FieldFillFile:ki,FieldFilter:tm,FieldMeasure:Si,FieldVariant:ut,Form:Ks,FormFill:ta,FormSection:gn,SelectedAnswerVariant:Qe},Symbol.toStringTag,{value:"Module"}));let cm=class extends Z{constructor(){super(Je,"answer-variants")}};const dm=new cm;let um=class extends Z{constructor(){super(ht,"field-fills")}};const hm=new um;let fm=class extends Z{constructor(){super(pn,"fields")}};const mm=new fm;let pm=class extends Z{constructor(){super(ta,"form-fills")}};const gm=new pm;let ym=class extends Z{constructor(){super(gn,"form-sections")}};const wm=new ym;let bm=class extends Z{constructor(){super(Ks,"forms")}};const Cm=new bm;let Sm=class extends Z{constructor(){super(Qe,"selected-answer-variants")}};const km=new Sm,Em=Object.freeze(Object.defineProperty({__proto__:null,C:lm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:dm,FieldFills:hm,Fields:mm,FormFills:gm,FormSections:wm,Forms:Cm,SelectedAnswerVariants:km},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class yn{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new yn;return r.id=S.H.Classes.CreateUUID(),r.name=e,r.label=n,r}}const vm=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:yn},Symbol.toStringTag,{value:"Module"}));class xm extends Z{constructor(){super(yn,"color-themes")}}const Bm=new xm,Mm=Object.freeze(Object.defineProperty({__proto__:null,Docs:Qf,Forms:Em,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:vm,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Bm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Rm={install:function(t){t.component("PButton",Ni),t.component("PCheckBox",Pi),t.component("PDatePicker",Ti),t.component("PFlex",zi),t.component("PInput",Hi),t.component("PInputDate",_i),t.component("PInputNumber",qi),t.component("PLeftSlider",Ui),t.component("PList",Wi),t.component("PListItem",ji),t.component("PRadio",Gi),t.component("PRightSlider",Zi),t.component("PSelect",Xi),t.component("PSticky",Ji),t.component("PString",Yi),t.component("PTextarea",Qi),t.component("PTopSlider",Ki),t.component("IconDownload",gr),t.component("IconFilter",yr),t.component("ArrowLeft",Br),t.component("ArrowRight",Mr),t.component("DoubleArrowLeft",Rr),t.component("DoubleArrowRight",Ir),t.component("EllipsisSvg",$r),t.component("IconArrowLeft",wr),t.component("IconCheckDefault",br),t.component("IconClose",zt),t.component("IconEdit",Cr),t.component("IconEmail",Sr),t.component("IconMove",kr),t.component("IconPhone",Er),t.component("IconSearch",vr),t.component("IconSelectArrow",xr),t.component("CollapseContainer",lo),t.component("CollapseItem",co),t.component("VerticalCollapseContainer",uo),t.component("PAdd",ho),t.component("PContainer",fo),t.component("PContainerStickyHead",mo),t.component("PDel",po),t.component("PTabs",wo),t.component("UploaderFile",bo),t.component("AuthForm",go),t.component("PModal",yo),t.component("AuthPage",qn),t.component("PageNotFound",Un),t.component("AdaptiveContainer",Ii),t.component("AdaptiveContainerHorizontal",$i),t.component("AdminGallery",Ai),t.component("AuthModal",er),t.component("CarouselImages",nr),t.component("ContextWindow",ir),t.component("DateInputRangeV2",or),t.component("DateInputRange",rr),t.component("DropList",sr),t.component("FilterCheckbox",ur),t.component("FiltersButtonsSelect",hr),t.component("FilterSelect",fr),t.component("FTSPPanel",mr),t.component("GeneralItem",pr),t.component("GridContainer",vn),t.component("ImageCropper",ro),t.component("InfoItem",jt),t.component("InfoItemSelectButtons",oo),t.component("LeftRightContainer",so),t.component("MessageBody",ao),t.component("PAutocomplete",Co),t.component("PDialog",So),t.component("PhoneForm",ko),t.component("PLoader",Eo),t.component("PNotification",vo),t.component("PPagination",xo),t.component("RemoteSearch",Bo),t.component("ResearcheContainer",Mo),t.component("RightSliderContainer",Ro),t.component("RightTabsContainer",Io),t.component("SelectValueType",$o),t.component("SingleNameToggleForm",Ao),t.component("SortList",Po),t.component("SortSelect",To),t.component("Switch3Pos",zo),t.component("ThemeWrapper",Vo),t.component("ToggleInfoItem",Fo),t.component("TopSliderContainer",Oo),t.component("UploaderImage",Do)}},Im=["PF","PFM"];v.AdaptiveContainer=Ii,v.AdaptiveContainerHorizontal=$i,v.AdminGallery=Ai,v.ArrowLeft=Br,v.ArrowRight=Mr,v.AuthForm=go,v.AuthModal=er,v.AuthPage=qn,v.CarouselImages=nr,v.CollapseContainer=lo,v.CollapseItem=co,v.ContextWindow=ir,v.DateInputRange=rr,v.DateInputRange_v2=or,v.DoubleArrowLeft=Rr,v.DoubleArrowRight=Ir,v.DropList=sr,v.EllipsisSvg=$r,v.FTSPPanel=mr,v.FilterCheckbox=ur,v.FilterSelect=fr,v.FiltersButtonsSelect=hr,v.GeneralItem=pr,v.GridContainer=vn,v.IconArrowLeft=wr,v.IconCheckDefault=br,v.IconClose=zt,v.IconDownload=gr,v.IconEdit=Cr,v.IconEmail=Sr,v.IconFilter=yr,v.IconMove=kr,v.IconPhone=Er,v.IconSearch=vr,v.IconSelectArrow=xr,v.ImageCropper=ro,v.InfoItem=jt,v.InfoItemSelectButtons=oo,v.LeftRightContainer=so,v.MessageBody=ao,v.PAdd=ho,v.PAutocomplete=Co,v.PButton=Ni,v.PCheckBox=Pi,v.PContainer=fo,v.PContainerStickyHead=mo,v.PDatePicker=Ti,v.PDel=po,v.PDialog=So,v.PF=S,v.PFM=Mm,v.PFlex=zi,v.PInput=Hi,v.PInputDate=_i,v.PInputNumber=qi,v.PLeftSlider=Ui,v.PList=Wi,v.PListItem=ji,v.PLoader=Eo,v.PModal=yo,v.PNotification=vo,v.PPagination=xo,v.PRadio=Gi,v.PRightSlider=Zi,v.PSelect=Xi,v.PSticky=Ji,v.PString=Yi,v.PTabs=wo,v.PTextarea=Qi,v.PTopSlider=Ki,v.PageNotFound=Un,v.PhoneForm=ko,v.RemoteSearch=Bo,v.ResearcheContainer=Mo,v.RightSliderContainer=Ro,v.RightTabsContainer=Io,v.SelectValueType=$o,v.SingleNameToggleForm=Ao,v.SortList=Po,v.SortSelect=To,v.Switch3Pos=zo,v.ThemeWrapper=Vo,v.ToggleInfoItem=Fo,v.TopSliderContainer=Oo,v.UploaderFile=bo,v.UploaderImage=Do,v.VerticalCollapseContainer=uo,v.pfName=Im,v.servicesComponents=Rm,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "sprof",
3
3
  "description": "components for the designer and uikit",
4
4
  "author": "Stanislav Lushnikov, Daniil Gaivoronskiy",
5
- "version": "0.0.60",
5
+ "version": "0.0.62",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "./dist/sprof.umd.cjs",