1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/assets/DE47Qign.js","/assets/CPzLrubv.js","/assets/fWYCr6o0.js","/assets/DAD6CFn-.js","/assets/D1KcagSz.js","/assets/TmSZSC_3.js","/assets/DzzGKGrl.js","/assets/BjAQM_Oc.js","/assets/BSy9dhwe.css","/assets/CX6T4B_G.js","/assets/74XfGxkq.css","/assets/merged-4-0669f24f.css","/assets/7jQXQgy3.js","/assets/B9_06ocz.js","/assets/BnjDe4k1.js","/assets/BCtBJrji.js","/assets/iCgt5_o4.js","/assets/BHfckxVT.js","/assets/CWMZE_q4.js","/assets/CzXJs3IN.js","/assets/Ba8ehXid.js","/assets/CcI5nlVs.js","/assets/DrwvEtWe.js","/assets/BxMIElt2.js","/assets/2bt8kL8y.js","/assets/BoPi8K6r.js","/assets/BfFmuS9Y.js","/assets/D4u8vew7.js","/assets/merged-12-df17c005.css","/assets/DTUyPo_0.js","/assets/BJM5k-9L.js","/assets/BrUFhSo8.js","/assets/CaXvjVlq.js","/assets/B777T2L2.js","/assets/merged-6-75492a32.css","/assets/Dt031rcg.js","/assets/CcUQjyiR.js","/assets/DhnlnOpd.js","/assets/BrG1OBn9.js","/assets/BZ47PvFn.js","/assets/mYe7MclG.js","/assets/BxnOWp1A.js","/assets/iK4Eml5a.js","/assets/CzOQ7xef.js","/assets/merged-0-b3d29777.css","/assets/Cqqbw6HO.css","/assets/BYK3kNo8.js","/assets/merged-7-99ca876d.css","/assets/DOSOHfZR.js","/assets/DhiTV1FR.js","/assets/DKAS6LL7.css","/assets/Qblu3fNP.js","/assets/CZBoeYDo.js","/assets/BZkjSKWQ.js","/assets/4v27lhl5.js","/assets/wbwEhK3x.css","/assets/DhOVrcTb.js","/assets/C4PdtzO6.js","/assets/BvKXj9Ed.js","/assets/DGRdI-Ya.js","/assets/merged-1-a9576b18.css","/assets/B9sD0zfl.js","/assets/DfscFyPB.css","/assets/CUyeKxDl.js","/assets/CumiLU1e.css","/assets/B8jNsxw4.
1js","/assets/Bgppw4Dk.js","/assets/j8ArfQcW.css","/assets/BIYw2wuB.js","/assets/DLuxFkgo.js","/assets/DnKNWj5D.css","/assets/DRoznhe0.css","/assets/AiKVr3mh.js","/assets/SldZBVjI.js","/assets/Bn0Q7GpC.js","/assets/C3_Y8HK8.js","/assets/CztM6xI-.js","/assets/merged-13-f9454e7f.css","/assets/BIK3Veun.js","/assets/C066RLIE.js","/assets/DBtnoi2-.js","/assets/Bhqw0RQK.js","/assets/qwdaqbu9.js","/assets/DPwNfIDw.js","/assets/zdS51YWs.js","/assets/gjmHT5KH.js","/assets/DlVl1vOo.js","/assets/BA-sEa70.js","/assets/DodOSNc7.js","/assets/C_zm6AZY.js","/assets/Ro3LmGm3.js","/assets/at75JsMB.js","/assets/Ql8tRhAt.js","/assets/merged-3-99ea50da.css","/assets/CCN_8-oh.js","/assets/BEiO14iQ.js","/assets/merged-2-00deb6ed.css","/assets/Z-hR36P7.js","/assets/BTlyGwiw.css","/assets/438t0Uq0.js","/assets/DamE8Nlx.js","/assets/Dv4gM5a_.js","/assets/DzGsHfY5.js","/assets/D9KBIuOx.js","/assets/DNxp896F.js","/assets/Dl1TD3ak.js","/assets/CYupx4zP.js","/assets/BrhUeeXc.js","/assets/CC3nuvr2.js","/assets/merged-10-de9a522c.css","/assets/Cfb-eEEp.js","/assets/BLdlaTsh.js","/assets/KYE7Dy3I.js","/assets/DCvx3kuc.js","/assets/merged-8-d2f24981.css","/assets/C4Wq1zjT.js","/assets/merged-9-fbbb3801.css","/assets/jnfnn0OW.js","/assets/CkSRgjjV.js","/assets/7-6A5Der.js","/assets/lF71ZNe2.js","/assets/merged-11-b518ea7d.css","/assets/CRf2n35s.js","/assets/C6_RgnCe.js","/assets/DeKGJEV2.js","/assets/CSbAa86V.js","/assets/kTKPMrSl.js","/assets/k10IlcCr.css","/assets/ZVwSRUh2.js","/assets/CV2fjfpf.js","/assets/BBW7VmMX.js","/assets/jh_AY7Zq.js","/assets/CBBq_G_1.js","/assets/CBetyKg2.js","/assets/BI9UmW6N.js","/assets/CqVRUyyO.css","/assets/3PnqyoMz.js","/assets/CgWf07Je.js","/assets/BgpqLfPu.js","/assets/RTpY0Ugp.js","/assets/Sf2H_nZO.js","/assets/CSZpCt8z.js","/assets/CUpcubmG.js","/assets/BX64j0Cd.js","/assets/wP2MhrG9.js","/assets/4YOclRWr.js","/assets/merged-5-1af3e8b2.css","/assets/TEv6ZGpy.js","/assets/B6tlA8F3.js","/assets/B7V6JFzz.js","/assets/D0D324DO.js","/assets/6BaeEnXL.js","/assets/CKYMnPFb.js","/assets/Bs3HVKNV.js","/assets/BYosU2RP.js","/assets/BJEsCcqg.js","/assets/DgyT9DfB.js","/assets/CBQoHkwu.js","/assets/UhVR6va6.js","/assets/CwwBB20x.js","/assets/Du9u0cNI.css","/assets/2tYQkLaM.js","/assets/DbnqxAHT.js","/assets/BlQEDPHP.js","/assets/CRqFCJEA.js","/assets/CX9oKQBY.js","/assets/0CcD42O6.js","/assets/CVLHIrsr.js","/assets/DYvlk3Wt.js","/assets/YQlSM3ZW.js","/assets/C4z2AWFx.js","/assets/B4VLoIkF.js","/assets/wsPvIVN_.js","/assets/CdfSpY4-.js","/assets/EYQk1CBx.js","/assets/C5PYXlOK.js","/assets/rA8ermPK.js","/assets/DOU40yI-.js","/assets/DGW-V9fp.js","/assets/cUj9h9u0.js","/assets/BH8mQo1l.js","/assets/DXtt8lhZ.js","/assets/BRqEt0CK.js","/assets/B5LCOHhz.js","/assets/DxzKQrq2.js","/assets/Ba9w0k2e.js","/assets/DzmA26AW.js","/assets/D0l42NBi.js","/assets/C0ODRTI6.js","/assets/BeR373lq.js","/assets/BAb4zySf.js","/assets/1H-sh7Et.js","/assets/DRy2L5nh.js","/assets/QGtI_Ck1.js","/assets/DYSn1CDn.js","/assets/DPkNNK-c.css","/assets/RN8bdn88.js","/assets/BxeoQGZ9.js","/assets/BP47QVOS.js","/assets/gdq2pxZ3.js","/assets/Bg30GhIE.js","/assets/BCLOk1Gx.js","/assets/DyM5qlL5.js","/assets/CC2RWs4w.js","/assets/BRYbPM-K.js","/assets/GOzgUyNz.js","/assets/CShvJgml.js","/assets/Dium6u_3.js","/assets/DHG2q68J.js","/assets/nvy6UY39.js","/assets/DXGsQqey.css","/assets/D7RI1FUZ.js","/assets/M-TDRp2L.js","/assets/D7j4vORE.js","/assets/CE3f4_2n.js","/assets/ieGyj-_T.js","/assets/BTFiRrN-.js","/assets/CLa2XaY3.js","/assets/C2KoBjEt.js","/assets/3lA5PioO.js","/assets/AtOWi2QR.js","/assets/B2kCMwbs.js","/assets/u3zchi_d.js","/assets/C83rr2C4.js","/assets/Ch9VuTTL.js","/assets/7ii7R8NG.js","/assets/SY8Nsbor.js","/assets/CfzCuxjA.css","/assets/CGpNmf6z.js","/assets/B1z5GRbi.js","/assets/C6ZvYhGW.js","/assets/BeCncc_Q.css","/assets/9_hsHpAR.css","/assets/DgjzEwjc.js","/assets/CgonF4Zr.js","/assets/DxybnlyB.js","/assets/BtrxRUq0.js","/assets/BZMaiqR7.js","/assets/Drxybl_b.js","/assets/Bq1shcpk.js","/assets/DR3RIzcV.js","/assets/B5EJ0ZPk.js","/assets/BOFsejDX.js","/assets/C2pqY8C7.js","/assets/CDw382_q.js","/assets/DLchV3Q_.js","/assets/CiTjjeXJ.js","/assets/EUAZY-7S.js","/assets/CmpCjDnx.js","/assets/DjRrZj1r.js","/assets/DtS5ZdNc.js","/assets/Y9LinjGX.js","/assets/merged-14-6241a91b.css","/assets/D8zFEmZO.js","/assets/D1a0WGIg.css","/assets/CFPcNL2O.js","/assets/DGhO2Zgm.js","/assets/CbxJ92e7.js","/assets/DfflHWpb.js","/assets/yzXLyv56.js","/assets/CDno2dlI.js","/assets/BHrvVQgh.js","/assets/BzsDWFq_.js","/assets/io6b2778.js","/assets/Bnh1ONiu.js","/assets/CRtsw_0c.js","/assets/B0EIrTy2.js","/assets/CfsdpHL9.js","/assets/CoY2j7yf.js","/assets/n1fZeNfH.css","/assets/Xq0A3FxQ.js","/assets/CETQyqIN.js","/assets/BQNc0nor.js","/assets/BfeF0DyG.js","/assets/CnMb9hpc.js","/assets/Ca7kz9iA.js","/assets/CDBx-M8U.js","/assets/BwOG8mkX.js","/assets/ByacrL73.js","/assets/BZx0bWHe.js","/assets/CAYOlX4M.js","/assets/-CbMZf33.js","/assets/BWQV_0v1.js","/assets/Bg7sSqy4.js","/assets/46rjUvhd.js","/assets/BWGdM66Q.js","/assets/BuGEbh4J.js","/assets/DARQp25h.js","/assets/CWrbyS0A.js","/assets/DV5gpcCi.js","/assets/CIR63Rn_.js","/assets/CfYHmUYG.js","/assets/BMuACbtq.js","/assets/Q0jwFIm3.js","/assets/Ci
1pt1LmA.js","/assets/CRKOxZ-f.js","/assets/Cq0ic9XY.js","/assets/CaC7uqeD.js","/assets/Ds1Unji2.js","/assets/CiuiG0zT.js","/assets/DTQUmL2L.js","/assets/DieRVaNj.js","/assets/CAgwimYC.js","/assets/BlhpJKE3.js","/assets/DDd0WHNI.js","/assets/CgXw9Ssd.js","/assets/MB7AJsqy.js","/assets/CAq_mJ7n.js","/assets/Bf5FkA7r.js","/assets/F_zINl4P.js","/assets/Bhq_0o7n.js","/assets/B663YEn7.css","/assets/C63e_qG3.js","/assets/BS1K6ss_.js","/assets/DPPyel1E.js","/assets/mQKCS3d_.js","/assets/wEktwhXY.css","/assets/CUYp4cMO.js","/assets/CD4hEQig.js","/assets/DsITLKCV.js","/assets/CehziY04.js","/assets/DUOyd734.js","/assets/CRfsJKb3.js","/assets/BkxQtXjX.js","/assets/CVhac3Wn.js","/assets/RVgJmyV7.js","/assets/BpG8yoZ8.js","/assets/DgU2xQfN.js","/assets/BTBiyCT4.js","/assets/Ciz5TVPT.js","/assets/DZrWrkgt.js","/assets/DvOGtV9m.js","/assets/DFnzrpNY.js","/assets/B5LA8G81.js","/assets/CtKA8ATk.js","/assets/DNTlBzFC.js","/assets/ChB3nzO7.js","/assets/CG9ubVeT.js","/assets/CEWd0vww.js","/assets/CZK3qRHP.js","/assets/CAwOQG3h.js","/assets/NOY4OJff.js","/assets/BZC33GPu.js","/assets/vVeevWbI.js","/assets/BZo2wMTJ.js","/assets/B1rcrzGR.js","/assets/CR8oWlsR.js","/assets/BQA8aUJ_.css","/assets/B74clE7D.js","/assets/DKAsquPT.js","/assets/Bc_2XPpL.js","/assets/D4ajAFNg.js","/assets/Ba2aaMJa.js","/assets/BXt7ckv5.js","/assets/BSaJUKYY.css","/assets/qNu3OxFS.css","/assets/BAL6zNK9.js","/assets/DHsabA5J.js","/assets/-811D8z9.js","/assets/DKjqngqD.css","/assets/DXQjY_sz.js","/assets/SUGcyx6Z.js","/assets/C483lQ7H.css","/assets/CCF0-5vG.js","/assets/BbYs8WFy.js","/assets/Co7_0nbE.js","/assets/CSZS_Wd7.js","/assets/B-G_86oa.js","/assets/Bmkbfuyg.js","/assets/C-C8-o5w.js","/assets/DRMkR2zE.js","/assets/BOD5_nVs.js","/assets/CP_pqkd8.js","/assets/DHFJO1dl.js","/assets/8sKRfUqX.js","/assets/DnF7W4i-.js","/assets/BQxfb_vB.js","/assets/B0z-TZff.js","/assets/Bh6qWB42.js","/assets/CrhFl_gt.js","/assets/BCZeECum.js","/assets/DV14c0tO.js","/assets/DWs-bpbY.js","/assets/obrnGJW6.js","/assets/DT1coZIS.js","/assets/CAj7AgC7.js","/assets/BpumJuiT.js","/assets/Dj71eMtU.js","/assets/vKaK4oKi.js","/assets/DT_YGPBC.js","/assets/D6dYEHYk.js","/assets/CpJbi-7D.js","/assets/CHfsh4nH.js","/assets/DIRmhD34.js","/assets/BK-mghnn.js","/assets/D-9aPe_9.js","/assets/rS26u2Ab.js","/assets/IrPKEp4b.js","/assets/CHq0MIzi.js","/assets/CtDd-cbU.js","/assets/CbuEGVVL.js","/assets/BYX2XB3z.js","/assets/iS6OgVhe.js","/assets/C1bgx-iB.js","/assets/C8Ok45yv.js","/assets/BOvHYU7q.js","/assets/D_kXWTzO.js","/assets/tcqOk9wk.js","/assets/BIf3Mguc.js","/assets/BmNCga95.js","/assets/CMhkZN_Y.js","/assets/DC2AYwgn.js","/assets/C3hm195e.js","/assets/Bnu3VBsp.js","/assets/BKJJ0s1E.js","/assets/DopnQW3w.js","/assets/DEsIPHvR.js","/assets/x53Pmw3e.js","/assets/DRq5kAL_.js","/assets/BuE5Ob7T.js","/assets/CIYuU7s-.js","/assets/BYG4afPo.js","/assets/CYSQONfo.js","/assets/CPDbrB6k.js","/assets/Bt6dC1xc.js","/assets/B3bbGTM_.js","/assets/DEsPo7gE.js","/assets/DTQZmvbh.js","/assets/C8LRcU12.js","/assets/zz3JRCSd.js","/assets/5kcLEOB2.css","/assets/D4-SKvr2.js","/assets/BJvCBtUZ.js","/assets/B1UX_FV5.js","/assets/CWj84h9T.js","/assets/DHjJnHnO.js","/assets/BbefP-zi.js","/assets/DaRTv84s.js","/assets/BaZVLRos.js","/assets/eirT8eVA.js","/assets/DJexGasd.js","/assets/B9eVS4_B.js","/assets/BxPxsv2J.js","/assets/DbQeU0AW.js","/assets/BSFhLs54.js","/assets/BfmKneE1.js","/assets/CIOek0_z.js","/assets/1WoTWxDp.js","/assets/Dpv-JfKz.js","/assets/D99Eyqml.js","/assets/McKmrgrr.js","/assets/BkxMnyuv.js","/assets/ErDryKkT.js","/assets/CKTG_PKY.js","/assets/DtqWCeYD.js","/assets/JVoty41Q.js","/assets/CyTDDz4P.js","/assets/DOIzLP8e.js","/assets/CIdEEt_T.js","/assets/DBA5LaHx.js","/assets/Ce2jRhTo.js","/assets/SCnQ70i8.js","/assets/DIbBHVA-.js","/assets/BUe3NXIw.js","/assets/DsAmd2o6.js","/assets/B__PrgDv.js","/assets/D5fiwYxh.js","/assets/CMwhuSyv.js","/assets/V3_3zwDF.js","/assets/DgLsyqrt.js","/assets/CsLAyzO0.js","/assets/BSPHK4ff.js","/assets/Cv0w0Azn.js","/assets/C3sb4LYb.js","/assets/ZpsnMhsD.js","/assets/TWJlQlJ0.js","/assets/CeIhMMJ8.js","/assets/B7ZTWPP8.js","/assets/FqiDHFTz.js","/assets/DiHplV4s.js","/assets/BnVGrTqn.js","/assets/CP8z3IIx.js","/assets/BaS4z8Mb.js","/assets/Bw8B6pKl.js","/assets/NABqSP4v.js","/assets/xwPVXcYM.js","/assets/BX-hVE62.js","/assets/B0SxMOFB.js","/assets/CeNhNKsI.js","/assets/Fa2MxcIO.js","/assets/D1NSaYIp.js","/assets/Dk1JBegE.js","/assets/DzQCA2yr.js","/assets/DeeEol_f.js","/assets/CAuE0ezk.js","/assets/DAUeTMrX.js","/assets/CrcWtjbP.js","/assets/CgyvAz6C.js","/assets/spe7z86_.js","/assets/C-nCVsKR.js","/assets/DLeAmSCQ.js","/assets/DdVR3Pz8.js","/assets/5cIqyEdw.js","/assets/Cw0eGT1J.js","/assets/C257RZKv.js","/assets/pg5Yqc0R.js","/assets/DRgpciUe.js","/assets/BLij1S53.js","/assets/BsMxF8R0.js","/assets/BwG0amZs.js","/assets/BCFtoxP5.js","/assets/DY_CEfdD.js","/assets/pgLbhXWf.js","/assets/C614_HYG.js","/assets/DmeZkDIp.js","/assets/MzRaTIcD.js","/assets/C_g-O4Gs.js","/assets/B-jwg_u5.js","/assets/QCyQ1GL1.js","/assets/ko7GnFd5.js","/assets/B_k-0BwA.js","/assets/afVWRT85.js","/assets/ttoNfDGx.js","/assets/CHviUcZZ.js","/assets/DxC7LeQc.js","/assets/Dh1-cht_.js","/assets/B_i_qtcZ.js","/assets/BE8IY8gt.js","/assets/C05VYrFn.js","/assets/Lna5OnNw.js","/assets/BWJuYbwH.js","/assets/DeKLRoyl.js","/assets/SyP_NeUg.js","/assets/wKftdA2l.js","/assets/C1lcKi8D.js","/assets/BArYletM.js","/assets/COV5_i0I.js","/assets/CAxhOFCo.js","/assets/FgBOWsG9.js","/assets/BnW5Cjft.js","/assets/-pdHVXSQ.js","/assets/65dwAlAw.js","/assets/icIKXX7t.js","/assets/D9c_B6d5.js","/assets/D4wE7_nO.js","/assets/xctrF5Mf.js","/assets/BssVDLUb.js","/assets/_zjoyvor.js","/assets/JFT4kPjj.js","/assets/Cjx0Jm_9.js","/assets/ClBa-S_6.js","/assets/DHW1JoHc.js","/assets/BUHWtVmj.js","/assets/CwqVBaG7.js","/assets/BnUJNPbi.js","/assets/BC-dwig-.js","/assets/BCZo90Eb.js","/assets/DJmKixyW.js","/assets/BlXdpcKC.js","/assets/Y0VgyivO.js","/assets/BApd_skn.js","/assets/BVnxe_ky.css","/assets/3R-r9iI4.js","/assets/B8tcHAIe.js","/assets/PDcdbbTi.css","/assets/CNaZghSN.js","/assets/DoAZ8Y6i.js","/assets/YbmgpN2I.css","/assets/ByYqX41A.js","/assets/BeI6pmwh.js","/assets/C7jYiIVE.js","/assets/DHQtVhqT.js","/assets/PkoSox-Q.js","/assets/B9M3WFvS.js","/assets/eiIRcv4N.js","/assets/ClBkzm7B.js","/assets/DA4QF27-.js","/assets/sGxXic02.css","/assets/Dg9pdl13.js","/assets/B11s8VmD.js","/assets/CFbAbVf2.js","/assets/DMlthTA5.js","/assets/BIg64QSs.js","/assets/nw2hz-On.js","/assets/B0pp1U0q.js","/assets/EF3HPbt7.js","/assets/C7HGDkKz.js","/assets/DAjxW7_k.css","/assets/DiCdT7U-.js","/assets/boz7P3-D.js","/assets/3P7hJbJc.js","/assets/C5Oa78QC.js","/assets/DnKpxgZK.js","/assets/yimnAqHW.css","/assets/CZ9DLn-l.js","/assets/BQpdk47y.js","/assets/pfJDzghP.js","/assets/SwPjID29.js","/assets/BsWSrTIk.js","/assets/DJy42Mia.js","/assets/DAJ2i47O.js","/assets/CX8d5yJQ.js","/assets/Cu1P3XHj.js","/assets/D7VrKFiZ.js","/assets/CIlIuJ3F.js","/assets/CJ_MJqUF.js","/assets/Bgb1kJEf.js","/assets/CCqbo_up.js","/assets/DcJiyLoQ.js","/assets/jcq29s9g.css","/assets/eZ9z8lRL.js","/assets/CM4qAjv4.js","/assets/BfQrVtxa.js","/assets/Cr9xqmyp.js","/assets/D1fTv405.js","/assets/Y6tckUdT.js","/assets/EIAB8Smo.js","/assets/BFT92hb0.js","/assets/CsRbTcbB.js","/assets/C7VpzNYO.js","/assets/DpOOInF-.js","/assets/DKgJECdx.js","/assets/ddefe9m9.
1js","/assets/BGK7C1jI.js","/assets/RIDq19XW.js","/assets/CBzalQ6U.js","/assets/CzoE012F.css","/assets/CzFuN84U.js","/assets/Conh5lkr.js","/assets/FYC2fxVO.js","/assets/BrG9Oquz.js","/assets/B1Z47u_Y.js","/assets/BVQeHTe0.js","/assets/CXnXaKLB.js","/assets/Bto7kNEk.js","/assets/D07uTQxV.js","/assets/CwAD3BWZ.js","/assets/DtbIi6xt.js","/assets/D_agkCZq.js","/assets/3hAjvLlj.js","/assets/0ubioXrS.js","/assets/CrPICBf0.js","/assets/B6Ua-KcH.js","/assets/BCDYy_zt.js","/assets/VD8aVHt3.js","/assets/BiwXpg4C.js","/assets/Cg0Ywo61.js","/assets/Dz2HxG5I.js","/assets/DrrqygUR.js","/assets/CmmqE_r7.css","/assets/BrEuhb4h.js","/assets/Bcu8Ancw.js","/assets/BAAZUIxw.js","/assets/C0CQUxZn.js","/assets/DU6-uZDx.js","/assets/BdHCVIQO.js","/assets/Ctpq5NGQ.js","/assets/BPZ4Fe07.js","/assets/CFEoaXHB.js","/assets/C0Z6nhZ5.js","/assets/C7cZLlaJ.js","/assets/B-jtaKDW.js","/assets/Cg5xnkkN.js","/assets/kqf0sYNF.js","/assets/DfgYa08G.js","/assets/BoOE3gcs.js","/assets/BQCoLa7J.js","/assets/CU0hSNVq.js","/assets/BMge1vMU.js","/assets/B1wVzJiK.js","/assets/o86MoFkK.js","/assets/CYDBkA2c.js","/assets/BsFeVDoy.js","/assets/DUd3dBrG.js","/assets/kFBAm7cw.js","/assets/CprRDI1s.js","/assets/CL8LgLlD.js","/assets/WsXCSpaw.js","/assets/MyQAqFEw.js","/assets/DJuF53Pm.js","/assets/CIvMTz84.js","/assets/WluvfFMk.js","/assets/DC743flv.js","/assets/Dmn-m3Ge.js","/assets/Dha8MKDO.js","/assets/BJRXRE_O.js","/assets/h2VbSJgB.js","/assets/BZrE9IBw.css","/assets/CV4hYSRZ.js","/assets/D2XNUN2x.js","/assets/Dfskd4X0.js","/assets/CW1y8dUU.js","/assets/SfXw05RZ.js","/assets/BswG2Dpi.css","/assets/DJs_2-4R.js","/assets/Bt0cs3VY.css","/assets/SZAmD7sE.js","/assets/BY3v5wVU.js","/assets/Bof4orvz.js","/assets/t00fpdQk.js","/assets/DMcPPKrn.js","/assets/B04_uVTa.js","/assets/Bz82pPTU.js","/assets/DY9ZrfoR.js","/assets/CIVIWLf_.js","/assets/aK257U1q.js","/assets/B9mLtgnY.js","/assets/Bo-c1hkz.js","/assets/C6GWfmPI.js","/assets/Bkd5bLdl.js","/assets/Df09hZto.js","/assets/C5f9DJ6p.js","/assets/CMSk2SIJ.js","/assets/BUfEQFAZ.js","/assets/w4a6GcUa.js","/assets/D0zL1ow9.js","/assets/BKbFY8xN.js","/assets/VbGTL-PY.js","/assets/Du64uQu_.js","/assets/Cuz8H-Ku.js","/assets/BUXm-eRK.js","/assets/Dfu9OSmf.js","/assets/BVxVTFhq.js","/assets/DhK6F67L.js","/assets/M3-bgkcH.js","/assets/CkqWINTb.js","/assets/BkCUsicO.js","/assets/Dh3Aw0jh.css","/assets/DcVsGGHt.js","/assets/DqLAO9Zi.js","/assets/C1hgCK8U.js","/assets/D-RhlrAn.js","/assets/CGr9OQGD.js","/assets/BjCngwrH.js","/assets/DN0sFjlw.js","/assets/18ctC6vh.js","/assets/D3ubHdet.css","/assets/Q-kjz_UX.js","/assets/B8xSl7hz.js","/assets/D9PobU5u.js","/assets/D9pHFRd7.js","/assets/pdt_8Jip.js","/assets/AFDL8Q4h.js","/assets/C2-g0mYA.js","/assets/BI2XpSmv.css","/assets/DwmcYoEe.js","/assets/BCdicUVM.js","/assets/dDDKZMJR.js","/assets/DLhrBHbO.js","/assets/ITYKTJ8K.css","/assets/BjPjk9oK.js","/assets/YkKJT-98.js","/assets/K3QZhlwz.js","/assets/BFOVdpr-.js","/assets/B76WtCwR.js","/assets/C8pzrRxz.js","/assets/D8mWr5u3.js","/assets/DU9Rw6Rb.js","/assets/DNTE4tP5.js","/assets/Z9DhMlBd.js","/assets/DbjQIhSo.js","/assets/AtBmAYHw.js","/assets/GKn2X9qF.js","/assets/COsrYKU3.js","/assets/B1hyJ_g1.js","/assets/m-C9EId8.js","/assets/9wVn_-cX.js","/assets/rZm7HUh6.js","/assets/CRF05k7m.js","/assets/DSQfYNrt.js","/assets/DchP3Kg6.js","/assets/DSU2XesP.js","/assets/BRg4y9hJ.js","/assets/BIoHTjAU.js","/assets/CQ8AlZ5a.js","/assets/BwH2wC86.js","/assets/DhedVw-5.js","/assets/C4cikkwf.js","/assets/Bp5oppks.js","/assets/DNxpTHq-.js","/assets/DIgJEGI9.js","/assets/DbttHMyD.js","/assets/DGJL_d6O.js","/assets/DeTijXEs.js","/assets/BFIAEmfA.js","/assets/IqvL3QQV.js","/assets/BOvv2mne.js","/assets/d-LRmNSM.js","/assets/CoVTytpA.js","/assets/D2J8QfvV.js","/assets/BR0IZea4.js","/assets/Csf_0byF.css","/assets/DhAsFTEg.js","/assets/C5UKesGC.js","/assets/vRDOrMBs.js","/assets/DTvMUUz9.css","/assets/DjzFmP2n.js","/assets/CzZI30Z3.js","/assets/DEdi5niW.css","/assets/CbayCWfA.js","/assets/znx68G_h.js","/assets/FklKBWKw.js","/assets/CiH6u3xA.js","/assets/BZeoIQCS.js","/assets/DVGKLcGy.js","/assets/DTiysjas.css","/assets/DDuZWGOA.js","/assets/d24tusFS.js","/assets/ylFCbGpm.js","/assets/CCPYOvI9.js","/assets/DpV2qUu1.css","/assets/BvOwAuwo.js","/assets/D-7T9fe3.js","/assets/CKTXKBSt.js","/assets/DJfypsVM.js","/assets/C07hXsDV.js","/assets/B7FdeCF6.js","/assets/DudvDjJt.js","/assets/NUXKr4Kf.js","/assets/CFkkBNT5.js","/assets/CQ5wn0o5.js","/assets/CWJJrNVS.js","/assets/0wx8qKZr.js","/assets/BlUuGHPI.js","/assets/BjHTf3KR.js","/assets/D6qq2d1L.js","/assets/CyK39S2t.js","/assets/ogYFhjPw.js","/assets/C--YfVBW.
1js","/assets/sKgd4D4i.js","/assets/C-cJGuRm.js","/assets/CTz8TfiR.js","/assets/CtYMwAiq.js","/assets/DHZPUny0.js","/assets/CiwnKE6-.js","/assets/VsEiyUSf.js","/assets/BS6Q1M2L.js","/assets/CVgK-UWI.js","/assets/DxpkXtFc.js","/assets/BkpF3cCn.js","/assets/9JAog3IO.js","/assets/DV0GsbPX.js","/assets/IZKlbq6n.js","/assets/D5YYvKkT.js","/assets/Cbw-MF0-.js","/assets/jQfAw6-C.js","/assets/BdnJ6lXM.js","/assets/CwgCSrGn.js","/assets/PlGgn90E.js","/assets/Cgjxw02Q.js","/assets/DtFHCKhv.js","/assets/DSQchlMy.js","/assets/CY4vSIOc.js","/assets/BXPSmIVy.js","/assets/DzdZ7CPM.js","/assets/BfxOGNnr.js","/assets/DJIg6UKd.js","/assets/CsOXDHS6.js","/assets/BXdGsDDH.js","/assets/DXexH4av.js","/assets/DjR1PFep.js","/assets/-_a56Lov.js","/assets/C94ORELY.js","/assets/CrSMMmjr.js","/assets/DbLTL8rM.js","/assets/BnwYaO8Y.js","/assets/FcvQrkUg.js","/assets/BMCK5dGY.js","/assets/Y8JFc6JY.js","/assets/DjFy-5_s.js","/assets/oI1QGtLF.js","/assets/CW1DmXTS.js","/assets/BdGiKNsT.js","/assets/DFXcK1k7.js","/assets/BC-0jdA6.js","/assets/Bqoxc5It.js","/assets/B-DmazAI.js","/assets/DDewSzc7.js","/assets/GH4qz5_6.js","/assets/C__DYOi-.js","/assets/CS0w8Qjx.js","/assets/35EEWAh3.js","/assets/Dj8yYyEC.js","/assets/VMgEFtXu.js","/assets/DPQOwis1.js","/assets/vahExi3u.js","/assets/-w6xv0HM.js","/assets/BKBHznH6.js","/assets/BU0o6owh.js","/assets/CEPtJUiU.js","/assets/ySfaRXds.js","/assets/BFDYvjmh.js","/assets/BmVvDLzp.js","/assets/BFu00Oo3.js","/assets/DDLklzH4.js","/assets/Dabr-Rb0.js","/assets/DmAGg5lN.js","/assets/PuyV5dPK.js","/assets/BoexAf2U.js","/assets/BqedmqrR.js","/assets/BbjXB4qa.js","/assets/CzdG997s.js","/assets/BAx9wdEi.js","/assets/DzE1TXUX.js","/assets/Dm_iWeoF.js","/assets/B6Yb9voZ.js","/assets/Cfd8VeJg.js","/assets/DLx86PuG.js","/assets/DjdjtAkh.js","/assets/C6P_HS_U.js","/assets/25ZI171S.js","/assets/BcBHXQHE.js","/assets/BO9vmC-5.js","/assets/TFiTRI7_.js","/assets/CjJF-dv3.js","/assets/CaLs0E7w.js","/assets/P4ebect1.js","/assets/BlB3Nmta.js","/assets/cyg06p8K.js","/assets/BbdnLR6C.js","/assets/CtuX5rIo.js","/assets/W38epTfg.js","/assets/BaZbYmRD.js","/assets/D5DUUnpA.js","/assets/DvbiH2KC.js","/assets/B49SMKow.js","/assets/BnHjvV0f.js","/assets/jkBC1CJ4.js","/assets/DHmOULZ9.js","/assets/CLz8TbE4.js","/assets/Bm8ikGWJ.js","/assets/BS1YDPuA.js","/assets/JSiLyijH.js","/assets/88AFPgFm.js","/assets/DG0pgm-F.js","/assets/Bpsaohux.js","/assets/D1rW0Ft2.js","/assets/BJCMN7fv.js","/assets/BSKIop4l.js","/assets/yydNwLAx.js","/assets/BifOEiCM.js","/assets/Wc6Hahzr.js","/assets/D0aY4cZ9.js","/assets/j-Z_D73U.js","/assets/CFJ_uZjg.js","/assets/CvgRxltZ.js","/assets/CS4x-X_a.js","/assets/DRsqHcgp.js","/assets/6gwN5SkD.js","/assets/Bu2IQ8xf.js","/assets/CMXhioAc.js","/assets/kpBOkHwq.js","/assets/3kB7B-15.js","/assets/izX9ah16.js","/assets/Ca2I2xs-.js","/assets/CxxP7Om4.js","/assets/DjrzJRwv.js","/assets/CZXoLC2s.js","/assets/BdgEKJGo.js","/assets/Cqj-88VT.js","/assets/C5itHxgA.js","/assets/CSNEfC53.js","/assets/CC0FyxE-.js","/assets/opk9sOBG.js","/assets/DK5ed-fu.js","/assets/Dp_bWNND.js","/assets/v4z_YRkJ.js","/assets/me6TXZwM.js","/assets/DUBEXDwT.js","/assets/k3Fa_-Og.js","/assets/BxI2t3gt.js","/assets/fFxA32Kf.js","/assets/ECEDqDtp.js","/assets/DreFYNFP.js","/assets/D_KXXDzE.js","/assets/Bdz_0dPx.js","/assets/4OVHBo73.js","/assets/CYKJB49t.js","/assets/BkCxenTY.js","/assets/BStbIMbE.js","/assets/7yqlpLAX.js","/assets/F6iPku3i.js","/assets/3t8PcDjB.js","/assets/CscH_pJX.js","/assets/CPVQ49kc.js","/assets/BEIeLEtn.js","/assets/Bo1kCW7y.js","/assets/-nJ1OtWq.js","/assets/D1LkP92C.js","/assets/BzFQfqPr.js","/assets/CMzEQvF6.js","/assets/D-QIVOZF.js","/assets/EUbJyAvc.js","/assets/CpcbeU5L.js","/assets/CBxZJw2C.js","/assets/Cy421mze.js","/assets/B2OeIbzB.js","/assets/OkN-8uru.js","/assets/ZGjWqlgK.js","/assets/CagkhpGk.js","/assets/CLl4_BPO.js","/assets/QOnUEK2N.js","/assets/DLShv2WV.js","/assets/BNdHXc6F.js","/assets/Dwo4SC-7.js","/assets/B-U9z4sc.js","/assets/DMMHckV1.js","/assets/Ck3oJrPj.js","/assets/C_p4aht-.js","/assets/woWl3bVg.js","/assets/NbdLDT5H.js","/assets/CWKyaZYJ.js","/assets/D9ErxRjc.js","/assets/tLXviTku.js","/assets/BYjvkT-o.js","/assets/CkHd84ES.js","/assets/B8fh1lTW.js","/assets/CM2QgXF5.js","/assets/Cbuuq0RM.js","/assets/C2myHwbs.js","/assets/DzHH4gUW.js","/assets/Df4xaE2y.js","/assets/C1vsCAiM.js","/assets/CU6WfHuH.js","/assets/B8gpYMfX.js","/assets/CyFeWhGY.js","/assets/-tJM7vxW.js","/assets/DlnCHJJl.js","/assets/l_vyzoOA.js","/assets/JLTP9g4e.js","/assets/CgYOk0Cq.js","/assets/BN5zrOjC.js","/assets/X36MUZa1.js","/assets/CPXJCI5o.js","/assets/BPlnP_mQ.js","/assets/CcbOSUcW.js","/assets/Cyp_n_Y7.js","/assets/BvNb9Ml_.js","/assets/CPgZ7Luc.js","/assets/D7EyjlFL.js"])))=>i.map(i=>d[i]); 2(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`20261001-39361-126a85bd`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:textmagic-web-app":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`599e513b-a402-4d6d-80f4-6cb7f192bbd8`,e._sentryDebugIdIdentifier=`sentry-dbid-599e513b-a402-4d6d-80f4-6cb7f192bbd8`)}catch{}})();import{a as e,t}from"./fWYCr6o0.js";import"./Cyg3Lur7.js";import{$n as n,A as r,An as i,B as a,C as o,Cn as s,D as c,Dn as l,E as u,En as d,F as f,Fn as p,Fr as ee,Ft as te,G as ne,Gn as re,H as ie,I as ae,In as oe,Ir as se,It as ce,J as le,Jt as m,K as ue,Kn as de,L as fe,Ln as pe,Lt as me,M as he,Mn as ge,Mt as _e,N as ve,Nn as ye,O as be,Ot as xe,P as Se,Pt as Ce,Q as we,R as Te,S as Ee,Sn as De,St as Oe,T as ke,Tn as Ae,U as je,Un as Me,V as Ne,W as Pe,Wn as Fe,Xn as Ie,Xt as h,Yt as g,Z as Le,Zn as Re,Zt as ze,_t as Be,an as Ve,b as He,bn as Ue,cn as We,ct as Ge,dn as Ke,dt as qe,fn as Je,fr as Ye,g as _,gn as Xe,h as Ze,hn as Qe,ht as v,in as $e,it as et,j as tt,jn as nt,k as rt,kt as it,lt as at,m as ot,mt as st,nn as ct,nr as lt,nt as ut,pn as dt,pt as ft,q as pt,qn as mt,rr as ht,rt as gt,st as y,tn as _t,tr as vt,tt as yt,un as bt,vn as xt,vt as St,w as Ct,x as wt,y as Tt,yr as Et,yt as Dt}from"./D1KcagSz.js";import{A as b,At as Ot,B as kt,Bt as At,C as jt,Ct as x,D as S,E as C,F as w,Ft as T,H as E,I as D,It as Mt,J as Nt,L as O,Lt as Pt,M as Ft,Mt as It,Nt as Lt,O as k,P as Rt,Qt as A,R as zt,U as Bt,Wt as j,Z as Vt,_ as Ht,_t as Ut,ct as Wt,d as Gt,dn as M,dt as Kt,et as qt,f as Jt,fn as Yt,ft as Xt,gn as Zt,it as N,j as Qt,k as P,kt as $t,l as en,lt as F,m as tn,nt as nn,ot as rn,pn as an,q as on,tt as sn,ut as I,vt as cn,wt as ln,x as un,y as dn,yt as fn,z as pn}from"./CPzLrubv.js";import{$a as mn,$f as hn,Ad as gn,An as _n,Ap as vn,Bd as yn,Bm as bn,Br as xn,Bs as Sn,Cm as Cn,Cn as wn,Dc as Tn,Dn as En,Ds as L,Em as Dn,En as On,Eo as kn,Ep as An,Fa as jn,Fc as Mn,Ga as Nn,Gc as Pn,Gf as Fn,Gp as In,Hd as Ln,Hf as Rn,Ia as zn,Ja as Bn,Jd as Vn,Ji as Hn,Jn as Un,Kc as Wn,Kd as Gn,Kf as Kn,Kn as qn,Kp as Jn,Kr as Yn,Ld as Xn,Li as Zn,Lm as Qn,Md as $n,Mn as er,N as tr,Na as nr,Nc as rr,Nd as ir,Nn as ar,Oc as or,On as sr,Op as cr,Pa as lr,Pc as ur,Pi as dr,Pl as fr,Qa as pr,Qc as mr,Qd as hr,Qf as gr,Rd as _r,Rm as vr,S as yr,Sn as br,Sp as xr,T as Sr,Tn as Cr,Ts as wr,Ud as Tr,Uf as Er,Us as Dr,Vc as Or,Vm as kr,Vr as Ar,Wd as jr,Wf as Mr,Wp as Nr,Xa as Pr,Xf as Fr,Xi as Ir,Xo as Lr,Ya as Rr,Yd as zr,Yf as Br,Yr as Vr,Za as Hr,Zc as Ur,Zf as Wr,_d as Gr,_l as Kr,_m as qr,a as Jr,ad as Yr,al as Xr,ap as Zr,bi as Qr,bl as $r,bm as ei,bs as ti,c as ni,cf as ri,cl as ii,cm as ai,cn as oi,d as si,df as ci,di as li,dl as ui,ea as di,ef as fi,el as pi,ep as mi,f as hi,fl as gi,fp as R,fs as _i,g as vi,gl as yi,gp as bi,h as xi,hf as Si,hl as Ci,hp as wi,i as Ti,ia as Ei,id as Di,jc as Oi,jd as ki,ji as Ai,jn as ji,k as Mi,kc as Ni,kd as Pi,kn as Fi,kp as Ii,l as Li,lf as Ri,li as zi,ll as Bi,lo as Vi,mo as Hi,mp as Ui,ms as Wi,n as Gi,na as Ki,nd as qi,nm as Ji,oo as Yi,p as Xi,pf as Zi,pl as Qi,pp as $i,qd as ea,qn as ta,r as na,ra,rd as ia,s as aa,sf as oa,sl as sa,sm as ca,so as la,ss as ua,t as da,td as fa,tf as pa,tl as ma,tm as ha,tp as ga,u as _a,ud as va,uf as ya,vc as ba,vd as xa,vl as Sa,vm as Ca,w as wa,wm as Ta,wn as Ea,wp as Da,xn as Oa,xp as ka,xs as Aa,ym as ja,zc as Ma,zd as Na}from"./DAD6CFn-.js";import{$h as Pa,$m as Fa,$p as Ia,$r as La,$t as Ra,Ah as za,Ai as Ba,Am as Va,An as Ha,Ar as Ua,At as Wa,Bd as Ga,Bh as Ka,Bi as qa,Bl as Ja,Bm as Ya,Bn as Xa,Bp as Za,Br as Qa,Bt as $a,Ch as eo,Ci as to,Cm as no,Cn as ro,Cr as io,Dh as ao,Dm as oo,Dn as so,Dr as co,Dt as lo,Eh as uo,Ei as fo,Em as po,En as mo,Er as ho,Fh as go,Fm as _o,Fn as vo,Fp as yo,Fr as z,Fs as bo,Ft as xo,Gc as So,Gh as Co,Gm as wo,Gn as B,Go as To,Gr as Eo,Gt as Do,Hf as Oo,Hh as ko,Hm as Ao,Hn as jo,Hr as Mo,Ih as No,Im as Po,Ip as Fo,It as Io,Jh as Lo,Jm as Ro,Jn as zo,Jp as V,Jr as Bo,Jt as Vo,Kh as Ho,Km as Uo,Kn as Wo,Ko as Go,Kp as Ko,Kr as qo,Kt as Jo,Lh as Yo,Li as Xo,Lm as Zo,Lp as Qo,Lr as $o,Lt as es,Mh as ts,Mm as ns,Mn as rs,Mr as is,Mt as as,Nh as os,Nm as ss,Np as cs,Nr as ls,Nt as us,Oh as ds,Oi as fs,Om as ps,On as ms,Op as hs,Or as gs,Ot as _s,Ph as vs,Pm as ys,Pp as bs,Pt as xs,Qh as Ss,Qm as Cs,Qn as ws,Qp as Ts,Qr as Es,Qt as Ds,Rh as Os,Ri as ks,Rm as As,Rn as js,Rp as Ms,Rr as Ns,Rt as Ps,Sh as Fs,Si as Is,Sm as Ls,Sn as Rs,Sr as zs,Th as Bs,Ti as Vs,Tm as Hs,Tn as Us,Tr as Ws,Uh as Gs,Um as Ks,Un as qs,Ur as Js,Vh as Ys,Vm as Xs,Vn as Zs,Vp as Qs,Vr as H,Vt as $s,Wh as ec,Wm as tc,Wn as nc,Wr as rc,Wt as ic,Xc as ac,Xh as oc,Xm as sc,Xn as cc,Xo as lc,Xp as uc,Xr as dc,Xt as fc,Yh as pc,Yi as mc,Ym as hc,Yp as gc,Yr as _c,Yt as vc,Zh as yc,Zm as bc,Zp as xc,_ as Sc,_h as Cc,_i as U,_m as wc,_n as Tc,_r as Ec,_t as Dc,aa as Oc,ag as kc,ah as A
2c,ai as jc,am as Mc,an as Nc,bh as Pc,bi as Fc,bm as Ic,bn as Lc,br as Rc,cg as zc,ch as Bc,ci as Vc,cm as Hc,cn as Uc,cr as Wc,ct as Gc,dg as Kc,dh as qc,di as Jc,dm as Yc,dn as Xc,dt as Zc,eg as Qc,eh as $c,ei as el,em as tl,en as nl,er as rl,fg as il,fh as al,fi as ol,fm as sl,fn as cl,fr as ll,ft as ul,gg as dl,gh as fl,gi as pl,gm as ml,gn as hl,gt as gl,h as _l,hg as vl,hh as yl,hm as bl,hp as xl,hr as Sl,ht as Cl,ig as wl,ih as Tl,ii as W,im as El,in as Dl,ip as Ol,ir as kl,jh as Al,ji as G,jm as jl,jn as Ml,jr as Nl,kc as Pl,kh as Fl,ki as Il,km as Ll,kr as Rl,kt as zl,lg as Bl,lh as Vl,li as Hl,lm as Ul,lt as Wl,md as Gl,mg as Kl,mh as ql,mi as Jl,mm as Yl,mn as Xl,mr as Zl,mt as Ql,mu as $l,ng as eu,nh as tu,ni as nu,nl as ru,nm as iu,nn as au,og as ou,oh as su,oi as cu,om as lu,on as uu,or as du,ot as fu,pg as pu,ph as mu,pi as hu,pm as gu,pr as _u,pt as vu,pu as yu,qh as bu,qm as xu,qp as Su,qr as Cu,qt as wu,rg as Tu,rh as Eu,ri as K,rm as Du,rn as Ou,rr as ku,sg as Au,sh as ju,sm as Mu,sn as Nu,sr as Pu,st as Fu,tg as Iu,th as Lu,ti as Ru,tm as zu,tn as Bu,tp as Vu,tr as Hu,ug as Uu,uh as Wu,ui as Gu,um as Ku,un as qu,ut as Ju,v as Yu,vh as Xu,vi as Zu,vm as Qu,vn as $u,vr as ed,vt as td,wh as nd,wi as rd,wm as id,wn as ad,wt as od,xh as sd,xi as cd,xm as ld,xn as ud,xr as dd,y as fd,yh as pd,yi as md,ym as hd,yn as gd,yr as _d,yt as vd,zh as yd,zi as bd,zm as xd,zn as Sd,zp as Cd,zr as wd,zt as Td}from"./TmSZSC_3.js";import{a as q}from"./BjAQM_Oc.js";import{n as Ed,t as Dd}from"./-811D8z9.js";import{Ca as Od,Da as kd,Ma as Ad,Sa as jd,_a as Md,ba as Nd,ja as Pd,va as Fd,wa as Id,xa as Ld}from"./2bt8kL8y.js";import{Dt as Rd,Et as zd,Ot as Bd,bt as Vd,ct as Hd,dt as Ud,ft as Wd,gt as Gd,it as Kd,lt as qd,pt as Jd,st as Yd,ut as Xd,wt as Zd,yt as Qd}from"./BHfckxVT.js";import{n as $d}from"./CzXJs3IN.js";import{A as ef,B as tf,C as nf,D as rf,E as af,F as of,H as sf,J as cf,L as lf,M as uf,N as df,O as ff,P as pf,R as mf,S as hf,T as gf,V as _f,_ as vf,a as yf,b as bf,c as xf,d as Sf,f as Cf,g as wf,h as Tf,i as Ef,j as Df,k as Of,l as kf,m as Af,o as jf,p as Mf,q as Nf,r as Pf,s as Ff,u as If,v as Lf,w as Rf,x as zf,y as Bf,z as Vf}from"./Ba8ehXid.js";import{t as Hf}from"./CcI5nlVs.js";import{n as Uf,r as Wf,t as Gf}from"./DXQjY_sz.js";import{t as Kf}from"./DrwvEtWe.js";import{Cr as qf,Sr as Jf,br as Yf,vr as Xf,xr as Zf,yr as Qf}from"./CX6T4B_G.js";import{d as $f,l as ep,u as tp}from"./zdS51YWs.js";import{t as np}from"./D4u8vew7.js";import{t as rp}from"./DTUyPo_0.js";import{t as ip}from"./BxMIElt2.js";import{t as ap}from"./BoPi8K6r.js";import{C as op,M as J,N as sp,S as cp,_ as lp,b as up,c as dp,d as fp,f as pp,g as mp,h as hp,i as gp,k as _p,l as vp,m as yp,n as bp,o as xp,p as Sp,r as Cp,s as wp,u as Tp,v as Ep,w as Dp,x as Op,y as kp}from"./CWMZE_q4.js";import{E as Ap,N as jp}from"./BBW7VmMX.js";import{t as Mp}from"./CrhFl_gt.js";import{t as Np}from"./BrG1OBn9.js";import{n as Y,r as Pp,t as Fp}from"./CFkkBNT5.js";se(),!window.requestIdleCallback&&(window.requestIdleCallback=e=>window.setTimeout(()=>{let t=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})}),window.cancelIdleCallback=e=>clearTimeout(e)),window.Promise.withResolvers=window.Promise.withResolvers||(()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}});var Ip=class{constructor(){this.storage=new Map}get length(){return this.storage.size}clear(){this.storage.clear()}getItem(e){return this.storage.get(e)??null}key(e){return Array.from(this.storage.keys())[e]??null}removeItem(e){this.storage.delete(e)}setItem(e,t){this.storage.set(e,t)}},Lp=()=>new Proxy(new Ip,{get:(e,t,n)=>t in e?e[t]:e.getItem(t),set:(e,t,n)=>(t in e?e[t]=n:e.setItem(t,n),!0)}),Rp=e=>{try{let t=`__tm-local-storage-probe__`;return e().setItem(t,t),e().removeItem(t),!0}catch{return!1}};Rp(()=>window.localStorage)||Object.defineProperty(window,"localStorage",{value:Lp()}),Rp(()=>window.sessionStorage)||Object.defineProperty(window,"sessionStorage",{value:Lp()});var zp={wrapper:`BaseWrapperService`,modal:`ModalService`,queryModal:`QueryModalService`,partial:`PartialUIWrapperService`,queryPartial:`PartialQueryUIWrapperService`,groupPartial:`GroupedPartialUIWrapperService`,queryGroupPartial:`GroupedPartialUIWrapperService`,table:`TableWrapperService`,queryTable:`TableQueryWrapperService`,lsTable:`TableLocalStorageWrapperService`,queryLsTable:`TableQueryLsWrapperService`,section:`SectionService`},Bp=function(e){return e[e.confirmation=0]=`confirmation`,e[e.confirmationDelete=1]=`confirmationDelete`,e[e.confirmationPassword=2]=`confirmationPassword`,e[e.prompt=3]=`prompt`,e[e.export=4]=`export`,e[e.contact=5]=`contact`,e[e.selectingContacts=6]=`selectingContacts`,e[e.selectingContactsProgress=7]=`selectingContactsProgress`,e[e.selectingContactsLists=8]=`selectingContactsLists`,e[e.selectingSegments=9]=`selectingSegments`,e[e.customFieldsSchemaModal=10]=`customFieldsSchemaModal`,e[e.contactListMoveCopyModal=11]=`contactListMoveCopyModal`,e[e.addNewPinnedContactsMo
2dal=12]=`addNewPinnedContactsModal`,e[e.chooseAudioModal=13]=`chooseAudioModal`,e[e.smsSurveys=14]=`smsSurveys`,e[e.smsSurveyRecipients=15]=`smsSurveyRecipients`,e[e.editSmsSurveyName=16]=`editSmsSurveyName`,e[e.scheduleSmsSurvey=17]=`scheduleSmsSurvey`,e[e.previewSmsSurvey=18]=`previewSmsSurvey`,e[e.smsSurveyQuestion=19]=`smsSurveyQuestion`,e[e.smsSurveyQuestionDelay=20]=`smsSurveyQuestionDelay`,e[e.smsSurveyReply=21]=`smsSurveyReply`,e[e.smsSurveyFinalMessage=22]=`smsSurveyFinalMessage`,e[e.phoneNumberLabel=23]=`phoneNumberLabel`,e[e.apiV2KeysCreateModal=24]=`apiV2KeysCreateModal`,e[e.keywordsAddModal=25]=`keywordsAddModal`,e[e.templates=26]=`templates`,e[e.templateShare=27]=`templateShare`,e[e.templateSelect=28]=`templateSelect`,e[e.templatesEditCategory=29]=`templatesEditCategory`,e[e.templateCategory=30]=`templateCategory`,e[e.templateCategoryDelete=31]=`templateCategoryDelete`,e[e.contactList=32]=`contactList`,e[e.contactListDeleteModal=33]=`contactListDeleteModal`,e[e.contactListBulkDeleteModal=34]=`contactListBulkDeleteModal`,e[e.contactListTempDetails=35]=`contactListTempDetails`,e[e.UnsubscribeContactModal=36]=`UnsubscribeContactModal`,e[e.blockedContact=37]=`blockedContact`,e[e.contactTagsBulkModal=38]=`contactTagsBulkModal`,e[e.segmentCreateModal=39]=`segmentCreateModal`,e[e.segmentDeleteModal=40]=`segmentDeleteModal`,e[e.segmentRenameModal=41]=`segmentRenameModal`,e[e.segmentSaveAsModal=42]=`segmentSaveAsModal`,e[e.accountDetails=43]=`accountDetails`,e[e.billingDetailsModal=44]=`billingDetailsModal`,e[e.sentSmsBulkDetailsModal=45]=`sentSmsBulkDetailsModal`,e[e.senderSettingsCountriesEditDefaultSenderModal=46]=`senderSettingsCountriesEditDefaultSenderModal`,e[e.phoneVerificationModal=47]=`phoneVerificationModal`,e[e.inviteSubAccountModal=48]=`inviteSubAccountModal`,e[e.switchSubAccountModal=49]=`switchSubAccountModal`,e[e.resendInvitationSubAccountModal=50]=`resendInvitationSubAccountModal`,e[e.scheduledRetryModal=51]=`scheduledRetryModal`,e[e.subAccountDetails=52]=`subAccountDetails`,e[e.closeAccountModal=53]=`closeAccountModal`,e[e.closeSubAccountModal=54]=`closeSubAccountModal`,e[e.receivedSmsFilterModal=55]=`receivedSmsFilterModal`,e[e.sentSmsFilterModal=56]=`sentSmsFilterModal`,e[e.messageDetailsModal=57]=`messageDetailsModal`,e[e.contactNotesModal=58]=`contactNotesModal`,e[e.chatsNotificationsModal=59]=`chatsNotificationsModal`,e[e.chatConversationSenderSettingsModal=60]=`chatConversationSenderSettingsModal`,e[e.chatFiltersSet=61]=`chatFiltersSet`,e[e.allContactListModal=62]=`allContactListModal`,e[e.previewModal=63]=`previewModal`,e[e.defaultSenderIdApplyModal=64]=`defaultSenderIdApplyModal`,e[e.auSenderIdApplyModal=65]=`auSenderIdApplyModal`,e[e.allowedEmailsAddModal=66]=`allowedEmailsAddModal`,e[e.allowedEmailsEditSettingsModal=67]=`allowedEmailsEditSettingsModal`,e[e.messagesAttachmentFileModal=68]=`messagesAttachmentFileModal`,e[e.messagesAttachmentFilePreviewModal=69]=`messagesAttachmentFilePreviewModal`,e[e.messagesAttachmentSelectModal=70]=`messagesAttachmentSelectModal`,e[e.calendarModal=71]=`calendarModal`,e[e.calendarGroupModal=72]=`calendarGroupModal`,e[e.scheduledMessageModal=73]=`scheduledMessageModal`,e[e.addContactsChooseSourceModal=74]=`addContactsChooseSourceModal`,e[e.composePreviewModal=75]=`composePreviewModal`,e[e.composeEmailProgressModal=76]=`composeEmailProgressModal`,e[e.importMatchingFullscreenModal=77]=`importMatchingFullscreenModal`,e[e.importMatchingCountryModal=78]=`importMatchingCountryModal`,e[e.twoFaEditIpAddressesModal=79]=`twoFaEditIpAddressesModal`,e[e.passwordResetModal=80]=`passwordResetModal`,e[e.passwordChangeModal=81]=`passwordChangeModal`,e[e.auditLogsEventSummaryModal=82]=`auditLogsEventSummaryModal`,e[e.subAccountsImportDetailsFailedModal=83]=`subAccountsImportDetailsFailedModal`,e[e.accountSsoDetailsModal=84]=`accountSsoDetailsModal`,e[e.accountSecurityLoginsHistoryModal=85]=`accountSecurityLoginsHistoryModal`,e[e.apiV1KeyModal=86]=`apiV1KeyModal`,e[e.apiV1UrlTestModal=87]=`apiV1UrlTestModal`,e[e.apiV2UrlTestModal=88]=`apiV2UrlTestModal`,e[e.carrierLookupDetail
2sModal=89]=`carrierLookupDetailsModal`,e[e.emailLookupDetailsModal=90]=`emailLookupDetailsModal`,e[e.tenDlcSwitchTollFreeModal=91]=`tenDlcSwitchTollFreeModal`,e[e.tenDlcTollFreeConsentDisclosureModal=92]=`tenDlcTollFreeConsentDisclosureModal`,e[e.reviewRecommendedAiFixesModal=93]=`reviewRecommendedAiFixesModal`,e[e.tenDlcSelectCampaignDetailsModal=94]=`tenDlcSelectCampaignDetailsModal`,e[e.billingAutoRechargeSettingsEditModal=95]=`billingAutoRechargeSettingsEditModal`,e[e.billingConfirmPlanDowngradeModal=96]=`billingConfirmPlanDowngradeModal`,e[e.billingConfirmDowngradeToPayAsYouGoModal=97]=`billingConfirmDowngradeToPayAsYouGoModal`,e[e.tenDlcBrandDetailsModal=98]=`tenDlcBrandDetailsModal`,e[e.tenDlcLinkNumberModal=99]=`tenDlcLinkNumberModal`,e[e.tollFreeFormModal=100]=`tollFreeFormModal`,e[e.paymentPricingCalculatorModal=101]=`paymentPricingCalculatorModal`,e[e.byocPhoneLabelModal=102]=`byocPhoneLabelModal`,e[e.byocCarrierLabelModal=103]=`byocCarrierLabelModal`,e[e.byocCarrierLinkModal=104]=`byocCarrierLinkModal`,e[e.byocCredentialsModal=105]=`byocCredentialsModal`,e[e.byocCredentialsSinchModal=106]=`byocCredentialsSinchModal`,e[e.byocSinchCallbackModal=107]=`byocSinchCallbackModal`,e[e.messagesBulksProgressModal=108]=`messagesBulksProgressModal`,e[e.contactImportResultModal=109]=`contactImportResultModal`,e[e.emailVerificationModal=110]=`emailVerificationModal`,e[e.passwordVerificationModal=111]=`passwordVerificationModal`,e[e.accountBalanceCriticallyLowModal=112]=`accountBalanceCriticallyLowModal`,e[e.marketingDataModal=113]=`marketingDataModal`,e[e.editVerifyingEmailModal=114]=`editVerifyingEmailModal`,e[e.upgradeAccountModal=115]=`upgradeAccountModal`,e[e.subscribeCreateModal=116]=`subscribeCreateModal`,e[e.subscribeRenameModal=117]=`subscribeRenameModal`,e[e.subscribeDuplicateModal=118]=`subscribeDuplicateModal`,e[e.monthlyPlansSection=119]=`monthlyPlansSection`,e[e.pinnedContactsSection=120]=`pinnedContactsSection`,e[e.previewKanbanBoardTemplateModal=121]=`previewKanbanBoardTemplateModal`,e[e.createTaskBoardTemplateModal=122]=`createTaskBoardTemplateModal`,e[e.selectTaskBoardTemplateModal=123]=`selectTaskBoardTemplateModal`,e[e.taskStageModal=124]=`taskStageModal`,e[e.createTaskModal=125]=`createTaskModal`,e[e.taskViewModal=126]=`taskViewModal`,e[e.taskMoveAllModal=127]=`taskMoveAllModal`,e[e.taskBoardsArchiveModal=128]=`taskBoardsArchiveModal`,e[e.taskStageDeleteModal=129]=`taskStageDeleteModal`,e[e.taskBoardsMenuSection=130]=`taskBoardsMenuSection`,e[e.sidebarTaskBoardsMenuSection=131]=`sidebarTaskBoardsMenuSection`,e[e.taskChecklistNameEdit=132]=`taskChecklistNameEdit`,e[e.taskChecklistItemEdit=133]=`taskChecklistItemEdit`,e[e.taskViewModalTopBarDueDateModal=134]=`taskViewModalTopBarDueDateModal`,e[e.taskBoardKanbanSection=135]=`taskBoardKanbanSection`,e[e.closeUserAccountModal=136]=`closeUserAccountModal`,e[e.webWidgetModal=137]=`webWidgetModal`,e[e.copyWebWidgetModal=138]=`copyWebWidgetModal`,e[e.sendWidgetInstructionsModal=139]=`sendWidgetInstructionsModal`,e[e.billingBuyPrepaidCreditModal=140]=`billingBuyPrepaidCreditModal`,e[e.stripeBillingFetchPaygPrices=141]=`stripeBillingFetchPaygPrices`,e[e.whatsAppViewQrCodeModal=142]=`whatsAppViewQrCodeModal`,e[e.tenDlcTollFreeOptInScreenshotExampleModal=143]=`tenDlcTollFreeOptInScreenshotExampleModal`,e[e.chatAssignModal=144]=`chatAssignModal`,e[e.chatRejectModal=145]=`chatRejectModal`,e[e.chatAddNoteModal=146]=`chatAddNoteModal`,e[e.chatBlockIPConfirmation=147]=`chatBlockIPConfirmation`,e[e.chatRatingModal=148]=`chatRatingModal`,e[e.tenDlcOptInFlowDescriptionRequirementsModal=149]=`tenDlcOptInFlowDescriptionRequirementsModal`,e[e.ticketCreateModal=150]=`ticketCreateModal`,e[e.ticketCreateWorkspaceModal=151]=`ticketCreateWorkspaceModal`,e[e.ticketAssignModal=152]=`ticketAssignModal`,e[e.ticketFetchInboxes=153]=`ticketFetchInboxes`,e[e.ticketFetchInboxesAndFv=154]=`ticketFetchInboxesAndFv`,e[e.sidebarTicketFetchInboxesAndFv=155]=`sidebarTicketFetchInboxesAndFv`,e[e.ticketFetchSpamFilter=156]=`ticketFetchSpamFilter`,e[e.ticketsForwardingInstructionsModal=157]=`ticketsForwardingInstructionsModal`,e[e.ticketSaveViewAsModal=158]=`ticketSaveViewAsModal`,e[e.TicketFilteredViewPreviewModal=159]=`TicketFilteredViewPreviewModal`,e[e.ticketMarkAsSpamModal=160]=`ticketMarkAsSpamModal`,e[e.ticketMarkAsNotSpamModal=161]=`ticketMarkAsNotSpamModal`,e[e.ticketsFetchWorkspace=162]=`ticketsFetchWorkspace`,e[e.ticketsEditorModal=163]=`ticketsEditorModal`,e[e.ticketBulkMarkAsSpamModal=164]=`ticketBulkMarkAsSpamModal`,e[e.ticketBulkAssignMo
2dal=165]=`ticketBulkAssignModal`,e[e.templatesMenu=166]=`templatesMenu`,e[e.plansCardConnectModal=167]=`plansCardConnectModal`,e[e.plansChangeWithComparisonTableModal=168]=`plansChangeWithComparisonTableModal`,e[e.plansUpgradeModal=169]=`plansUpgradeModal`,e[e.contactDeleteModal=170]=`contactDeleteModal`,e[e.dealsPipelinesMenuSection=171]=`dealsPipelinesMenuSection`,e[e.sidebarDealsPipelinesMenuSection=172]=`sidebarDealsPipelinesMenuSection`,e[e.selectDealPipelineTemplateModal=173]=`selectDealPipelineTemplateModal`,e[e.createOrUpdateDealPipelineTemplateModal=174]=`createOrUpdateDealPipelineTemplateModal`,e[e.archiveDealPipelineModal=175]=`archiveDealPipelineModal`,e[e.pipelineDefaultOwnerModal=176]=`pipelineDefaultOwnerModal`,e[e.dealsPipelineKanbanSection=177]=`dealsPipelineKanbanSection`,e[e.dealMoveAllModal=178]=`dealMoveAllModal`,e[e.dealCustomStageModal=179]=`dealCustomStageModal`,e[e.dealSystemStageModal=180]=`dealSystemStageModal`,e[e.dealCardAddContactModal=181]=`dealCardAddContactModal`,e[e.dealTransferOwnershipModal=182]=`dealTransferOwnershipModal`,e[e.createDealModal=183]=`createDealModal`,e[e.dealCustomStageDeleteModal=184]=`dealCustomStageDeleteModal`,e[e.dealViewModal=185]=`dealViewModal`,e[e.dealTimelineSection=186]=`dealTimelineSection`,e[e.dealActivityItemEdit=187]=`dealActivityItemEdit`,e[e.unsubscribeContactWithEmailModal=188]=`unsubscribeContactWithEmailModal`,e[e.facebookQrModal=189]=`facebookQrModal`,e[e.campaignsSendersVerifyDomainSendModal=190]=`campaignsSendersVerifyDomainSendModal`,e[e.campaignsEmailSenderModal=191]=`campaignsEmailSenderModal`,e[e.campaignsEmailLinkTrackingModal=192]=`campaignsEmailLinkTrackingModal`,e[e.messengerSettingsFooterModal=193]=`messengerSettingsFooterModal`,e[e.abandonedCartDelayModal=194]=`abandonedCartDelayModal`,e[e.pointAiAttachmentModal=195]=`pointAiAttachmentModal`,e[e.pointAiAttachmentModalWebsite=196]=`pointAiAttachmentModalWebsite`,e[e.pointAiAttachmentModalDocument=197]=`pointAiAttachmentModalDocument`,e[e.composeTestEmailModal=198]=`composeTestEmailModal`,e[e.composeEmailPreviewModal=199]=`composeEmailPreviewModal`,e[e.composeEmailSwitchToImmediateSendingModal=200]=`composeEmailSwitchToImmediateSendingModal`,e[e.automationFlowSidebarWrapper=201]=`automationFlowSidebarWrapper`,e[e.automationFlowConfirmationModal=202]=`automationFlowConfirmationModal`,e[e.automationFlowDuplicatingModal=203]=`automationFlowDuplicatingModal`,e[e.automationFlowEditingNameModal=204]=`automationFlowEditingNameModal`,e[e.automationFlowActivateWithSettingsModal=205]=`automationFlowActivateWithSettingsModal`,e[e.automationEmailPreviewModal=206]=`automationEmailPreviewModal`,e[e.automationLogsDetailsModal=207]=`automationLogsDetailsModal`,e[e.automationTemplateModal=208]=`automationTemplateModal`,e[e.automationEmailEditorModal=209]=`automationEmailEditorModal`,e[e.automationStepContactsModal=210]=`automationStepContactsModal`,e[e.automationFlowPausingOrStoppingSingleModal=211]=`automationFlowPausingOrStoppingSingleModal`,e[e.automationFlowPausingOrStoppingBulkModal=212]=`automationFlowPausingOrStoppingBulkModal`,e[e.automationWebhookTestRequestModal=213]=`automationWebhookTestRequestModal`,e[e.automationWebhookBodyEditorModal=214]=`automationWebhookBodyEditorModal`,e[e.scheduledEmailRetryModal=215]=`scheduledEmailRetryModal`,e[e.outboundEmail
2sInsertContentModal=216]=`outboundEmailsInsertContentModal`,e[e.scheduledEmailModal=217]=`scheduledEmailModal`,e[e.domainWarmUpModal=218]=`domainWarmUpModal`,e[e.emailCampaignsPromoModal=219]=`emailCampaignsPromoModal`,e[e.contactsTagsCreateEditModal=220]=`contactsTagsCreateEditModal`,e[e.addLabelModal=221]=`addLabelModal`,e[e.removeLabelModal=222]=`removeLabelModal`,e[e.gettingStartedChooseYourTextingNumberModal=223]=`gettingStartedChooseYourTextingNumberModal`,e[e.emailTemplatesFormWrapper=224]=`emailTemplatesFormWrapper`,e[e.emailDetailsModal=225]=`emailDetailsModal`,e[e.emailTemplatesPreviewModal=226]=`emailTemplatesPreviewModal`,e[e.emailTemplatesSaveModal=227]=`emailTemplatesSaveModal`,e[e.emailTemplatesChooseEditorModal=228]=`emailTemplatesChooseEditorModal`,e[e.stripoFullscreenModalWrapper=229]=`stripoFullscreenModalWrapper`,e[e.stripoEditorFormWrapper=230]=`stripoEditorFormWrapper`,e[e.stripoPrebuiltTemplatesSection=231]=`stripoPrebuiltTemplatesSection`,e[e.stripoPrebuiltTemplatesFiltersLoader=232]=`stripoPrebuiltTemplatesFiltersLoader`,e[e.stripoPrebuiltTemplatesPreviewModal=233]=`stripoPrebuiltTemplatesPreviewModal`,e[e.scheduledEmailUpcomingDeleteModal=234]=`scheduledEmailUpcomingDeleteModal`,e[e.composeEmailStepContentAiReviewImprovingYourEmailModal=235]=`composeEmailStepContentAiReviewImprovingYourEmailModal`,e[e.composeEmailStepContentAiReviewImprovingResultModal=236]=`composeEmailStepContentAiReviewImprovingResultModal`,e[e.emailPriceSection=237]=`emailPriceSection`,e[e.composeEmailChooseEditorModal=238]=`composeEmailChooseEditorModal`,e[e.connectedAppsList=239]=`connectedAppsList`,e[e.byocUnlinkIdentifierModal=240]=`byocUnlinkIdentifierModal`,e}({}),Vp=e=>!!(Array.isArray(e)&&e.every(Hp)),Hp=e=>!!(qa(e)&&e.id&&typeof e.id==`string`),Up=Symbol(`tmDialogContext`),Wp=Symbol(`dialogWrapperModalConfig`),Gp={small:`500px`,medium:`600px`,large:`700px`,xLarge:`900px`,xxLarge:`1200px`,full:`90%`},Kp={alignTop:{type:Boolean,default:!1},scrollable:{type:Boolean},leftAsideWidth:{type:String,default:`0`},isOpen:{type:Boolean,default:!1},size:{type:String,default:`medium`},exactSize:{type:String},maxHeight:{type:String},minHeight:{type:String},overrideModalStyles:{type:Object},noBackdropDismiss:{type:Boolean,default:!0},keepAliveOnRouteChange:{type:Boolean,default:!1},navigationComponent:{type:Object,default:void 0},modalClass:{type:String},[Ca]:{type:String,default:``}},qp={title:{type:String,required:!1},noFooter:{type:Boolean,default:void 0},noHeader:{type:Boolean,default:void 0},noHeaderBorderBottom:{type:Boolean},hideCancelButton:{type:Boolean},hideCloseButton:{type:Boolean},showCreateAnother:{type:Boolean},cancelButtonText:{type:String,default:`Cancel`},withoutContentPadding:{type:[Boolean,Object],default:void 0,validator:e=>{if(e===void 0||typeof e==`boolean`)return!0;if(!qa(e))return!1;let t=`horizontal`in e,n=`vertical`in e;return!(!t&&!n||t&&typeof e.horizontal!=`boolean`||n&&typeof e.vertical!=`boolean`)}},titleIcon:{type:String},titleIconClass:{type:String},truncateTitle:{type:Boolean},scrollbarId:{type:String},canCloseCallback:{type:Function}},Jp={"update:model-value":e=>!0,"before-hide":()=>!0,open:()=>!0,close:()=>!0},Yp=e=>qa(e)&&`modalConfig`in e&&qa(e.modalConfig);E(),$t();var Xp=(e,t,n=T(document))=>{let r=n=>{let r=n.target;r&&r instanceof Element&&hs().self().document.contains(r)&&(e.value?.contains(r)||(n.stopPropagation(),t()))};fn(n,(e,t)=>{t&&t.removeEventListener(`click`,r),e&&e.addEventListener(`click`,r)},{immediate:!0}),Vt(()=>{n.value?.removeEventListener(`click`,r)})};E(),$t();var Zp=O({props:{...Kp},emits:{...Jp},setup(e,t){let n=T([]),r=T([]),i=T([]),a=T([]),o=T([]),s=T(null),c=T(),l=T(),u=null;Xp(c,()=>{o.value.forEach(e=>{e()})},l);let d=()=>{t.emit(`before-hide`),n.value.forEach(e=>e())},f=C(()=>{let{class:n,...r}=t.attrs,{modalClass:i,...a}=e;return{...r,...a}}),p=C(()=>({[Ca]:e[Ca]})),ee=()=>{t.emit(`open`),r.value.forEach(e=>e())},te=()=>{u?.isConnected===!0&&u.focus(),u=null};nn(te);let ne=()=>{te(),t.emit(`close`),i.value.forEach(e=>e()),r.value=[],i.value=[],a.value=[],n.value=[]},re=()=>
2{a.value.forEach(e=>e()),r.value=[],i.value=[],a.value=[],n.value=[]},ie=async e=>{if(e){t.emit(`update:model-value`,e);return}if(typeof s.value==`function`)try{let e=s.value();if(e instanceof Promise&&(e=await e),!e)return}catch{return}t.emit(`update:model-value`,e)};fn(()=>e.isOpen,async()=>{if(e.isOpen){let e=document.activeElement;u=e instanceof HTMLElement&&e!==document.body&&e.matches(`:focus-visible`)?e:null}await Nt(),l.value=e.isOpen?c.value?.closest(`.q-dialog`):null},{immediate:!0}),rn(Up,{open:ee,close:ne,onBeforeHide(e){n.value.push(e)},onOpen(e){r.value.push(e)},onClose(e){i.value.push(e)},onEscape(e){a.value.push(e)},onOutsideClick(e){o.value.push(e)},dialogEmit(e,n){return t.emit(e,n)},canCloseCallback(e){s.value=e}});let ae=C(()=>e.exactSize?e.exactSize:Gp[e.size]);return{handleBeforeHide:d,computedAttrs:f,handleOpen:ee,handleClose:ne,handleEscape:re,handleModelValueUpdate:ie,modalStyles:C(()=>{let t={width:ae.value,maxHeight:e.maxHeight,minHeight:e.minHeight,height:e.maxHeight?`100%`:``,...!!e.leftAsideWidth&&{paddingLeft:e.leftAsideWidth},...e.overrideModalStyles??{}};return e.navigationComponent&&(t.maxWidth=ae.value),t}),modalEl:c,dataTestIdAttr:p}}});E(),A();function Qp(e,t,n,r,i,a){return N(),b(`div`,on({class:`tm-dialog-wrapper`},e.dataTestIdAttr),[w(_e,on({"model-value":e.isOpen},e.computedAttrs,{"no-backdrop-dismiss":e.noBackdropDismiss,class:[{"tm-dialog--scrollable":e.scrollable},e.modalClass],"transition-show":`jump-up`,"transition-hide":`jump-down`,"no-route-dismiss":e.keepAliveOnRouteChange,"no-refocus":``,"onUpdate:modelValue":e.handleModelValueUpdate,onHide:e.handleClose,onShow:e.handleOpen,onBeforeHide:e.handleBeforeHide,onEscapeKey:e.handleEscape}),{default:x(()=>[F(e.$slots,`dialog-root`,{},()=>[S(`div`,{ref:`modalEl`,class:M([`tm-modal`,`relative`,{"tm-modal--align-top":e.alignTop,"tm-modal--with-aside":e.leftAsideWidth,"tm-modal--scrollable":e.scrollable,"with-nav":!!e.navigationComponent}]),"data-model-el":`true`,style:an(e.modalStyles)},[F(e.$slots,`default`,{},void 0,!0)],6),F(e.$slots,`navigation-buttons`,{},void 0,!0)],!0)]),_:3},16,[`model-value`,`no-backdrop-dismiss`,`class`,`no-route-dismiss`,`onUpdate:modelValue`,`onHide`,`onShow`,`onBeforeHide`,`onEscapeKey`])],16)}var $p=q(Zp,[[`render`,Qp],[`__scopeId`,`data-v-55762152`]]),em=e=>async()=>{if(!navigator.onLine)throw new Za(`You are offline`);return e()},tm=e=>qa(e)&&typeof e.__retry==`function`&&typeof e.__onStateChange==`function`;E(),$t();var nm=Lt(new Set),rm=e=>{nm.add(e)},im=e=>{nm.delete(e)},am=()=>{let e=Array.from(nm);nm.clear(),e.forEach(e=>{try{e()}catch(e){Pl().error(`error`,`Async component retry handler failed: ${String(e)}`)}})},om=()=>({asyncLoadFailedShown:C(()=>nm.size>0)});E();function X(e){let{loader:t,...n}=typeof e==`function`?{loader:e}:e,r=null,i=()=>{tm(a)&&a.__retry()},a=D({...n,loader:em(t),onError(e,t,n,o){return Pl().raw(`debug`,e),tm(a)?(r=t,rm(i),a.__stateChangeListeners.forEach(e=>e(`error`)),a.__previousLoadError=e,!0):n()}}),o=a.__asyncLoader;return Object.assign(a,{__stateChangeListeners:[],__retry(){if(!r)throw new Za(`Retry handler not set`);return r()},__onStateChange(e){this.__stateChangeListeners.push(e)},__asyncLoader(){return new Promise(e=>{o().then(t=>{this.__previousLoadError=null,im(i),e(t),this.__stateChangeListeners.forEach(e=>e(`resolved`))})})},__clearListeners(){this.__stateChangeListeners=[]},__previousLoadError:null})}E();var sm=O({components:{DetailsTable:Dd,DetailsTableItem:Ed,TmSkeleton:bn}});E();var cm={class:`w100pr`};function lm(e,t,n,r,i,a){let o=I(`details-table-item`),s=I(`tm-skeleton`),c=I(`details-table`);return N(),k(c,null,{default:x(()=>[w(o,{loading:``}),w(o,{loading:``}),w(o,{loading:``}),w(o,{loading:``,"cell-align-center":!0},{default:x(()=>[w(s,{type:`circle`,height:`28px`,width:`28px`,class:`mr-2`}),w(s,{type:`QChip`,width:`59px`,height:`12px`})]),_:1}),w(o,{loading:``,"cell-align-center":!0},{default:x(()=>[w(s,{type:`QChip`,height:`12px`,width:`14px`,class:`mr-2`}),w(s,{type:`QChip`,height:`12px`,width:`90px`})]),_:1}),w(o,{loading:``,"cell-align-center":!0},{default:x(()=>[S(`div`,cm,[w(s,{type:`QChip`,height:`12px`,"random-width":``,class:`mb-2`}),w(s,{type:`QChip`,height:`12px`,"random-width":``})])]),_:1}),w(o,{loading:``}),w(o,{loading:``}),w(o,{loading:``}),w(o,{loading:``}),w(o,{loading:``}),w(o,{loading:``})]),_:1})}var um=q(sm,[[`render`,lm]]);E();var dm=O({components:{TmSkeleton:bn},props:{config:{type:Array,required:!0}}});E(),A();var fm={class:`tm-configured-skeleton`};function pm(e,t,n,r,i,a){let o=I(`tm-skeleton`);return N(),b(`div`,fm,[(N(!0),b(un,null,Wt(e.config,(e,t)=>(N(),b(`div`,{key:t,class:`tm-configured-skeleton__row`},[Array.isArray(e)?(N(!0),b(un,{key:0},Wt(e,(e,t)=>(N(),k(o,{key:`col-${t}`,width:e.width,height:e.height,class:M(e.classes),style:an(e.style)}
2,null,8,[`width`,`height`,`class`,`style`]))),128)):(N(),k(o,{key:1,width:e.width,height:e.height,class:M(e.classes),style:an(e.style)},null,8,[`width`,`height`,`class`,`style`]))]))),128))])}var mm=q(dm,[[`render`,pm],[`__scopeId`,`data-v-496aeff2`]]),hm={textLines:3,items:2,itemsTextLines:2,itemClass:`mr-2`,dev:!1,itemBlockClass:`mb-5`};E(),$t(),A();var gm={class:`tm-angle-wrap-tooltip__main`},_m={class:`tm-angle-wrap-tooltip__content`},vm=6,ym=2,bm=q(O({__name:`TmAngleWrapTooltip`,props:{direction:{default:`top`},color:{default:Ad},offset:{},custom:{type:Boolean},viewportWidth:{},viewportHeight:{},anchorBounding:{},tooltipPosition:{}},setup(e){let t=e,n=C(()=>{let[e]=t.offset||[0];if(t.anchorBounding&&t.tooltipPosition&&t.viewportWidth&&t.viewportHeight){let n=0,r=0,{top:i,right:a,bottom:o,left:s}=t.tooltipPosition;if(typeof i==`number`){let e=Math.abs(Math.min(t.anchorBounding.top/2,0)),n=Math.max((t.anchorBounding.bottom-t.viewportHeight)/2,0),a=Math.min(t.anchorBounding.centerY+e-n,t.viewportHeight-vm-ym);r=Math.max(a-i-vm,ym)}if(typeof o==`number`){let e=Math.abs(Math.min(t.anchorBounding.top/2,0)),n=Math.max((t.anchorBounding.bottom-t.viewportHeight)/2,0);r=o-(t.viewportHeight-t.anchorBounding.centerY-e+n)+vm,r=Math.min(r,-2)}if(typeof a==`number`){let r=Math.max((t.anchorBounding.right-t.viewportWidth)/2,0),i=Math.abs(Math.min(t.anchorBounding.left/2,0));n=Math.max(t.viewportWidth-t.anchorBounding.right+e,0)-(t.viewportWidth-(t.anchorBounding.centerX-r+i))+vm,n=Math.min(n,-2)}if(typeof s==`number`){let e=Math.max((t.anchorBounding.right-t.viewportWidth)/2,0),r=Math.abs(Math.min(t.anchorBounding.left/2,0)),i=Math.min(t.anchorBounding.centerX-e+r,t.viewportWidth-vm-ym);n=Math.max(i-s-vm,ym)}return[Cn(Math.round(n)),Cn(Math.round(r))]}return[0,0]});return(t,r)=>(N(),b(`div`,{class:M([`tm-angle-wrap-tooltip`,{[`tm-angle-wrap-tooltip--${e.direction}`]:e.direction,[`tm-angle-wrap-tooltip--${e.color}`]:e.color,"tm-angle-wrap-tooltip--custom":e.custom}]),style:an({"--arrow-offset-x":j(n)[0],"--arrow-offset-y":j(n)[1]})},[S(`div`,gm,[S(`div`,_m,[F(t.$slots,`default`,{},void 0,!0)]),r[0]||(r[0]=S(`svg`,{class:`tm-angle-wrap-tooltip__angle tm-angle-wrap-tooltip__angle--horizontal`},[S(`path`,{d:`M4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0L0 0L4.58579 4.58579Z`,fill:`currentColor`})],-1)),r[1]||(r[1]=S(`svg`,{class:`tm-angle-wrap-tooltip__angle tm-angle-wrap-tooltip__angle--vertical`},[S(`path`,{d:`M4.58579 7.41421C5.36683 6.63317 5.36684 5.36684 4.58579 4.58579L0 0L0 12L4.58579 7.41421Z`,fill:`currentColor`})],-1))])],6))}}),[[`__scopeId`,`data-v-5a790c51`]]),xm=24,Sm=(e,t)=>e&&t?.contains(e),Cm=(e,t=[])=>{if(e?.parentElement&&e.parentElement!==document.body){let n=e.parentElement;(wi(n)||Ui(n))&&t.push(n),Cm(n,t)}return t},wm=e=>{let t;t=e instanceof HTMLElement?e.getBoundingClientRect():e;let n=window.scrollY||document.documentElement.scrollTop,r=window.scrollX||document.documentElement.scrollLeft,i=t.top+n,a=t.left+r;return{top:i,left:a,right:a+t.width,bottom:i+t.height,centerX:a+t.width/2,centerY:i+t.height/2,width:t.width,height:t.height}},Tm=(e,t,n,r)=>{let{top:i,right:a,bottom:o,left:s}=e,c=typeof i==`number`&&i+t.height>r-xm||typeof o==`number`&&o+t.height>r-xm;return{outOfBoundsX:typeof a==`number`&&a+t.width>n-xm||typeof s==`number`&&s+t.width>n-xm,outOfBoundsY:c}},Em=(e,t,n,r,i)=>({"top-left":{right:n-e.right+i[0],bottom:r-e.top+i[1]},top:{left:e.centerX-t.width/2+i[0],bottom:r-e.top+i[1]},"top-right":{left:e.left+i[0],bottom:r-e.top+i[1]},"left-top":{right:n+e.width-e.right+i[0],bottom:r-e.height-e.top+i[1]},left:{right:n+e.width-e.right+i[0],top:e.centerY-t.height/2-i[1]},"left-bottom":{right:n+e.width-e.right+i[0],top:e.top+i[1]},"right-top":{left:e.right+i[0],bottom:r-e.height-e.top+i[1]},right:{left:e.right+i[0],top:e.centerY-t.height/2-i[1]},"right-bottom":{left:e.right+i[0],top:e.top+i[1]},"bottom-left":{right:n-e.right+i[0],top:e.top+e.height+i[1]},bottom:{left:e.centerX-t.width/2+i[0],top:e.top+e.height+i[1]},"bottom-right":{left:e.left+i[0],top:e.top+e.height+i[1]}}),Dm=(e,t,n)=>t&&n?{top:`bottom`,"top-left":`bottom-right`,"top-right":`bottom-left`,left:`right`,"left-top":`right-bottom`,"left-bottom":`right-top`,right:`left`,"right-top":`left-bottom`,"right-bottom":`left-top`,bottom:`top`,"bottom-left":`top-right`,"bottom-right":`top-left`}[e]:t?{top:`top`,"top-left":`top-right`,"top-right":`top-left`,left:`right`,"left-top":`right-top`,"left-bottom":`right-bottom`,right:`left`,"right-top":`left-top`,"right-bottom":`left-bottom`,bottom:`bottom`,"bottom-left":`bottom-right`,"bottom-right":`bottom-left`}[e]||e:n&&{top:`bottom`,"top-left":`bottom-left`,"top-right":`bottom-right`,left:`left`,"left-top":`left-bottom`,"left-bottom":`left-top`,right:`right`,"right-top":`right-bottom`,"right-bottom":`right-top`,bottom:`top`,"bottom-left":`top-left`,"bottom-right":`top-right`}[e]||e,Om=12,km=(e,t,n,r,i,a)=>{let o=i.startsWith(`top`)||i.startsWith(`bottom`),s=(e,t)=>Math.min(xm,e-Om,t-e-Om),c=o?Math.max(0,s(a.centerX,n)):xm,l=o?xm:Math.max(0,s(a.centerY,r)),u=(e,t,n,r)=>typeof r==`number`?Math.max(n,Math.min(r,e-t-n)):void 0,d={top:u(r,t.height,l,e.top),right:u(n,t.width,c,e.right),bottom:u(r,t.height,l,e.bottom),left:u(n,t.width,c,e.left)},f=r-(d.bottom??l)-(d.top??l),p=Math.min(t.height,f);return{...d,height:p}},Am=(e,t,n,r=[0,0])=>{let i=document.body.clientWidth,a=document.body.clientHeight,o=wm(t),s=wm(n),c=Em(o,s,i,a,r),l=c[e],{outOfBoundsX:u,outOfBoundsY:d}=Tm(l,s,i,a);if(u||d){let t=Dm(e,u,d);l=c[t],e=t}let f=km(l,s,i,a,e,o);
2return{viewportWidth:i,viewportHeight:a,newDirection:e,anchorBoundingRect:o,top:f.top,right:f.right,left:f.left,bottom:f.bottom,height:f.height}},jm=`updateTooltipPosition`,Mm=()=>{let e=Ga();return{updateTooltipPosition:()=>{e.emit(jm,void 0)},subscribeToUpdateTooltipPosition:t=>e.subscribe(jm,t),unsubscribeFromUpdateTooltipPosition:t=>{e.unsubscribe(t)}}};E(),$t(),A(),Jt();var Nm=q(O({__name:`TmCustomTooltip`,props:{direction:{default:()=>`top`},color:{default:()=>Ad},offset:{},interactive:{type:Boolean,default:!1},anchorElement:{},disabled:{type:Boolean,default:!1},delay:{default:0},persistence:{},custom:{type:Boolean}},emits:[`close`,`close-animation-end`],setup(e,{emit:t}){let n=Qt(e,[`direction`,`color`,`interactive`,`disabled`,`delay`,`persistence`]),r=t,{subscribeToUpdateTooltipPosition:i,unsubscribeFromUpdateTooltipPosition:a}=Mm(),o=``,s=T(!1),c=T(!1),l=cn(`anchorRef`),u=cn(`tooltipRef`),d=cn(`tooltipContentRef`),f=T([]),p=T({}),ee=T(void 0),te=Ut(),ne=C(()=>n.anchorElement?n.anchorElement:te.anchor?l.value:l.value?l.value.parentElement:null),re=async()=>{if(ee.value=void 0,await Nt(),!ne.value||!u.value)return;let{newDirection:t,top:r,right:i,bottom:a,left:o,height:s,anchorBoundingRect:c,viewportWidth:l,viewportHeight:d}=Am(e.direction,ne.value,u.value,n.offset);if(ee.value={top:typeof r==`number`&&Cn(r)||void 0,right:typeof i==`number`&&Cn(i)||void 0,bottom:typeof a==`number`&&Cn(a)||void 0,left:typeof o==`number`&&Cn(o)||void 0,height:typeof s==`number`&&Cn(s)||void 0},!e.persistence&&(c.top+c.height<0||c.left>l||c.top>d||c.right<0)){ue();return}p.value={anchorBoundingRect:c,viewportWidth:l,viewportHeight:d,tooltipPosition:{top:r,right:i,bottom:a,left:o,height:s},direction:t}},ie=$i(re),ae=t=>!e.persistence&&!(t?.relatedTarget&&(Sm(t.relatedTarget,u.value)||Sm(t.relatedTarget,ne.value))),oe=e=>{ae(e)&&ue()},se=new ResizeObserver(()=>{ie()}),ce=async()=>{e.disabled||s.value||(s.value=!0,await re(),ne.value?.addEventListener(`mouseleave`,oe),e.interactive&&u.value?.addEventListener(`mouseleave`,oe),window.addEventListener(`resize`,ie),f.value=Cm(ne.value),f.value.length&&f.value.forEach(e=>{e.addEventListener(`scroll`,ie)}),d.value&&se.observe(d.value),o=i(ie),c.value=!0)},le=()=>{e.persistence||ce()},m=()=>{ie.cancel(),ne.value?.removeEventListener(`mouseleave`,oe),u.value?.removeEventListener(`mouseleave`,oe),window.removeEventListener(`resize`,ie),f.value.forEach(e=>{e.removeEventListener(`scroll`,ie)}),d.value&&se.disconnect(),a(o)},ue=()=>{m(),s.value=!1,c.value=!1,r(`close`)};return fn(()=>e.persistence,e=>{e&&(e.isOpen?ce():ue())},{immediate:!0}),sn(()=>{ne.value?.addEventListener(`mouseenter`,le),!e.persistence&&!e.disabled&&ne.value?.matches(`:hover`)&&ce()}),Vt(()=>{ne.value?.removeEventListener(`mouseenter`,le),m()}),(t,n)=>(N(),b(un,null,[S(`div`,{ref_key:`anchorRef`,ref:l,class:`tm-custom-tooltip__anchor`},[F(t.$slots,`anchor`,{},void 0,!0)],512),w(en,{appear:``,name:`q-transition--fade`,onAfterLeave:n[0]||(n[0]=e=>r(`close-animation-end`))},{default:x(()=>[j(s)?(N(),k(jt,{key:0,to:`body`},[S(`div`,{ref_key:`tooltipRef`,ref:u,class:M([`tm-custom-tooltip__tooltip-wrapper`,{"tm-custom-tooltip__tooltip-wrapper--content-hidden":!j(c),"tm-custom-tooltip__tooltip-wrapper--interactive":e.interactive}]),style:an([j(ee),e.delay>0?{"--tm-tooltip-delay":`${e.delay}ms`}:null])},[w(bm,{class:`tm-custom-tooltip__tooltip`,color:e.color,offset:e.offset,direction:j(p).direction,custom:e.custom,"viewport-width":j(p).viewportWidth,"viewport-height":j(p).viewportHeight,"anchor-bounding":j(p).anchorBoundingRect,"tooltip-position":j(p).tooltipPosition},{default:x(()=>[S(`div`,{ref_key:`tooltipContentRef`,ref:d},[F(t.$slots,`default`,{},void 0,!0)],512)]),_:3},8,[`color`,`offset`,`direction`,`custom`,`viewport-width`,`viewport-height`,`anchor-bounding`,`tooltip-position`])],6)])):P(``,!0)]),_:3})],64))}}),[[`__scopeId`,`data-v-a19da612`]]);E(),A(),$t();var Pm={key:0},Fm={key:3,class:`tm-auto-size-panel-item-btn__counter`},Im=q(O({__name:`TmAutoSizePanelItemButton`,props:{icon:{},color:{},iconSize:{default:`small`},iconRotate:{},btnSize:{default:``},flat:{type:Boolean},noBorder:{type:Boolean},iconOnly:{type:Boolean},text:{},to:{},disabled:{type:Boolean},tooltip:{},href:{},target:{},clicked:{type:Boolean},loading:{type:Boolean},submitLoading:{type:Boolean},submitLoadingColor:{},submitLoadingTitle:{},title:{},isLearningTooltip:{type:Boolean},learningTooltipKey:{},tooltipLearning:{},badge:{},buttonClass:{},hidingPriority:{},isAfterMore:{type:Boolean},tabindex:{}},emits:[`click`],setup(e,{emit:t}){let n=D(()=>R(()=>globalThis.__rdl__(() => import(`./DE47Qign.js`)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url));return(t,r)=>(N(),k(An,{"hiding-priority":e.hidingPriority,"is-after-more":e.isAfterMore},{"dropdown-item":x(()=>[w(bi,{title:e.title,disable:e.disabled,href:e.href,"icon-rotate":e.iconRotate,icon:e.icon,label:e.text,to:e.to,loading:e.loading,onClick:r[1]||(r[1]=e=>t.$emit(`click`,e))},null,8,[`title`,`disable`,`href`,`icon-rotate`,`icon`,`label`,`to`,`loading`])]),default:x(()=>[w(Ta,{to:e.to,title:e.title,disable:e.disabled,href:e.href,color:e.color,"icon-only":e.iconOnly,flat:e.flat,"no-border":e.noBorder,size:e.btnSize,target:e.target,skeleton:e.loading,loading:e.submitLoading,"loading-color":e.submitLoadingColor,"loading-title":e.submitLoadingTitle,class:M(e.buttonClass),clicked:e.clicked,tabindex:e.tabindex,onClick:r[0]||(r[0]=e=>t.$emit(`click`,e))},{default:x(()=>[F(t.$slots,`icon`,{},()=>[e.icon?(N(),k(ei,{key:0,name:e.icon,size:e.iconSize,left:!e.iconOnly,rotate:e.iconRotate},null,8,[`name`,`size`,`left`,`rotate`])):P(``,!0)],!0),e.iconOnly?P(``,!0):(N(),b(`div`,Pm,Zt(e.text),1)),e.isLearningTooltip&&e.learningTooltipKey?(N(),k(j(n),{key:1,"learning-tooltip-key":e.learningTooltipKey,tooltip:String(e.tooltip),"tooltip-learning":String(e.tooltipLearning)},null,8,[`learning-tooltip-key`,`tooltip`,`tooltip-learning`])):e.tooltip?(N(),k(Nm,{key:2},{default:x(()=>[S(`span`,null,Zt(e.tooltip),1)]),_:1})):P(``,!0),e.badge?(N(),b(`div`,Fm,Zt(e.badge),1)):P(``,!0)]),_:3},8,[`to`,`title`,`disable`,`href`,`color`,`icon-only`,`flat`,`no-border`,`size`,`target`,`skeleton`,`loading`,`loading-color`,`loading-title`,`class`,`clicked`,`tabindex`])]),_:3},8,[`hiding-priority`,`is-after-more`]))}}),[[`__scopeId`,`data-v-dfad3b0e`]]);E(),A();var Lm=O({__name:`TmSkeletonDetailsButtonsTable`,setup(e){return(e,t)=>(N(),b(un,null,[w(ka,{class:`mb-4`},{"dropdown-activator":x(()=>[w(Ta,null,{default:x(()=>[w(ei,{name:`more_vert`,left:``}
2),S(`span`,null,Zt(e.$t(`common.more`)),1)]),_:1})]),default:x(()=>[(N(),b(un,null,Wt(4,e=>w(Im,{key:e,loading:!0})),64))]),_:1}),w(um)],64))}});E();var Rm={},zm={class:`top-filter-margin-wrapper`};function Bm(e,t){return N(),b(`div`,zm,[F(e.$slots,`default`,{},void 0,!0)])}var Vm=q(Rm,[[`render`,Bm],[`__scopeId`,`data-v-aaf9012c`]]);E();var Hm=O({components:{TopFilterMarginWrapper:Vm,TmSkeleton:bn},props:{leftControls:{type:Array,default:()=>[`108px`,`128px`,`88px`,`78px`]},rightControls:{type:Array,default:()=>[`170px`,`36px`]},directionColumn:{type:Boolean}}});E(),A();var Um={class:`d-flex`},Wm={class:`d-flex`};function Gm(e,t,n,r,i,a){let o=I(`tm-skeleton`),s=I(`top-filter-margin-wrapper`);return N(),k(s,{class:M([`tm-skeleton-filter`,{"tm-skeleton-filter_column":e.directionColumn}])},{default:x(()=>[S(`div`,Um,[(N(!0),b(un,null,Wt(e.leftControls,e=>(N(),k(o,{key:e,type:`QChip`,width:e,height:`36px`,class:`mr-2`},null,8,[`width`]))),128))]),S(`div`,Wm,[(N(!0),b(un,null,Wt(e.rightControls,e=>(N(),k(o,{key:e,type:`QChip`,width:e,height:`36px`,class:`ml-2`},null,8,[`width`]))),128))])]),_:1},8,[`class`])}var Km=q(Hm,[[`render`,Gm],[`__scopeId`,`data-v-da563030`]]),qm=(e,t)=>e.filter(e=>t.includes(e)),Jm=(e,t)=>t[Math.abs(e)%t.length],Ym=(e,t)=>Jm(Bd(e),t),Xm=(e,t)=>e.slice(0,t).concat(e.slice(t+1)),Zm=(e,t)=>!ge(p(e,t)),Qm=(e,t)=>Array(e).fill(``).map((e,n)=>t(n)),$m=(e,t)=>Array(e).fill(t),eh=e=>Array.isArray(e)&&e.length>0,th=Symbol(`TableRowHovered`),nh=`tm-checkbox`,rh=[{loaderWidth:Il.checkbox,loaderType:`rect`,loaderClass:nh},{loaderWidth:100,dynamicLoaderWidth:!0,loaderType:`chip`},{loaderWidth:150,dynamicLoaderWidth:!0,loaderType:`chip`},{loaderWidth:100,dynamicLoaderWidth:!0,loaderType:`chip`},{loaderWidth:100,dynamicLoaderWidth:!0,loaderType:`chip`},{loaderWidth:16,loaderType:`circle`,loaderClass:`td-actions`}];E();var ih=(e,t)=>{let{hideCheckboxes:n=!1,hasActions:r=!0,rowsToDisplay:i}=t,a=Fo(e),o=C(()=>a.isInit()),s=C(()=>{let e=a.getColumns().getVisibleColumns();return eh(e)?e:Object.entries(a.getColumns().getInitColumns()).filter(([e,t])=>t.visibleInPreview!==!1).map(([e,t])=>({label:`tableColumns.${e}`,columnName:e,...t})).toSorted((e,t)=>e.columnOrder-t.columnOrder)}),c=C(()=>{let e=[];return n||e.push({loaderWidth:Il.checkbox,loaderType:`rect`,loaderClass:nh}),s.value.length&&s.value.map(e=>(e.loaderWidth=e.loaderWidth??e.minWidth,e.dynamicLoaderWidth=!0,e)).forEach(t=>{e.push(t)}),r&&e.push({loaderWidth:Il.actions}),e}),l=C(()=>{if(i!==void 0)return i;let e=o.value&&a.getCurrentPageRowsIds().length?a.getCurrentPageRowsIds().length:a.getPagination().getPerPage();return Math.min(e,20)});return{tableCellLoaderWidth:Il,headerColumns:s,columns:c,rows:l}};Jt(),E(),A();var ah=q(O({__name:`TmSimpleSkeleton`,props:{type:{default:`rect`},width:{default:`100%`},height:{default:`100%`},maxWidth:{default:`none`},maxHeight:{default:`none`}},setup(e){return tn(e=>({v80a12a32:e.width,v1c6ef826:e.height,v0915fa01:e.maxWidth,v004b6768:e.maxHeight})),(t,n)=>(N(),b(`div`,{class:M([`tm-simple-skeleton`,{"tm-simple-skeleton--rect":e.type===`rect`,"tm-simple-skeleton--chip":e.type===`chip`,"tm-simple-skeleton--circle":e.type===`circle`}])},null,2))}}),[[`__scopeId`,`data-v-e27b0c53`]]);E(),A();var oh={class:`tm-skeleton-table-body-row-layout`},sh=q(O({__name:`TmSkeletonTableBodyRowLayout`,props:{columns:{}},setup(e){return(t,n)=>(N(),b(`tr`,oh,[(N(!0),b(un,null,Wt(e.columns,(e,t)=>(N(),b(`td`,{key:t,class:M([`text-left`,[e.loaderClass,{"pa-0":e.hideLoader,"col-dynamic-width":!!e.dynamicLoaderWidth}]]),style:an({...e.columnStyles??{},maxWidth:e.loaderWidth})},[e.hideLoader?P(``,!0):(N(),k(ah,{key:0,type:e.loaderType??`chip`,width:!e.dynamicLoaderWidth&&typeof e.loaderWidth==`number`?`${e.loaderWidth}px`:void 0,"max-width":!e.dynamicLoaderWidth&&typeof e.loaderWidth==`number`?`${e.loaderWidth}px`:void 0,height:`18px`},null,8,[`type`,`width`,`max-width`]))],6))),128))]))}}),[[`__scopeId`,`data-v-3e228ce2`]]);E();var ch=O({components:{TmSkeletonTableBodyRowLayout:sh},props:{rows:{type:Number,default:10},columns:{type:Array,default:()=>[]}}});E();function lh(e,t,n,r,i,a){let o=I(`tm-skeleton-table-body-row-layout`);return N(),b(`tbody`,null,[(N(!0),b(un,null,Wt(e.rows,t=>(N(),k(o,{key:t,columns:e.columns},null,8,[`columns`]))),128))])}var uh=q(ch,[[`render`,lh]]);
2E(),$t(),A();var dh=q(O({__name:`TmTableContainer`,props:{theme:{}},setup(e){return(t,n)=>(N(),b(`div`,{class:M([`tm-table-container`,{"tm-table-container--theme-borderless":e.theme===j(Pd).BORDERLESS}])},[F(t.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-6f999780`]]),fh=()=>rh;E(),$t();var ph=O({__name:`Lazy`,setup(e){let t=T(!1);return Nt(()=>{t.value=!0}),(e,n)=>j(t)?F(e.$slots,`default`,{key:0}):P(``,!0)}});E();var mh=O({components:{TmIcon:ei},props:{label:{type:String,required:!0},direction:{type:String,required:!0},hideHeaderName:{type:Boolean}},emits:{"on-sort-changed":()=>!0},setup(e,t){return{onClick:()=>{t.emit(`on-sort-changed`)}}}});A(),E();var hh={key:0,class:`d-flex align-center`},gh={class:`truncate lh-16`},_h={class:`sort-icon`};function vh(e,t,n,r,i,a){let o=I(`tm-icon`);return N(),b(`th`,{class:M([`tm-table-th`,{active:e.direction}]),onClick:t[0]||(t[0]=t=>e.onClick())},[e.hideHeaderName?P(``,!0):(N(),b(`div`,hh,[S(`div`,gh,Zt(e.label),1),S(`span`,_h,[e.direction===`asc`?(N(),k(o,{key:0,name:`arrow_upward`,size:`medium`,class:M({active:e.direction===`asc`})},null,8,[`class`])):e.direction===`desc`?(N(),k(o,{key:1,name:`arrow_downward`,size:`medium`,class:M({active:e.direction===`desc`})},null,8,[`class`])):(N(),k(o,{key:2,name:`tmi-sort`,size:`medium`}))])]))],2)}var yh=q(mh,[[`render`,vh],[`__scopeId`,`data-v-7aa14c97`]]),bh=e=>`${e}%`;E(),A();var xh=q(O({__name:`TmStickyCell`,props:{tag:{default:`td`},position:{default:`right`},selected:{type:Boolean,default:!1},alignment:{},withShadow:{type:Boolean}},setup(e){return(t,n)=>(N(),k(Xt(e.tag),{class:M([`tm-sticky-cell`,`tm-sticky-cell--${e.position}`,{"tm-sticky-cell--with-shadow":e.withShadow,"tm-sticky-cell--selected":e.selected,"tm-sticky-cell--header":e.tag===`th`,[`tm-sticky-cell--alignment-${e.alignment?.direction}`]:e.alignment}])},{default:x(()=>[S(`div`,{class:M([`tm-sticky-cell__wrapper`,{"tm-sticky-cell__wrapper--selected":e.selected,[`tm-sticky-cell__wrapper--alignment-${e.alignment?.direction}`]:e.alignment}])},[F(t.$slots,`default`,{},void 0,!0)],2)]),_:3},8,[`class`]))}}),[[`__scopeId`,`data-v-35e9ec68`]]);E(),$t();var Sh={class:`d-flex`},Ch=O({__name:`FieldCheckbox`,props:{...$d,modelValue:{type:[Boolean,Array,null]},val:{type:String},alignTop:{type:Boolean,default:!1},fieldClass:{type:String},size:{type:String,default:``}},emits:{...sf()},setup(e,{expose:t,emit:n}){let r=e,{propsAndAttrs:i,emitChangeAndInput:a}=Hf(r,n,[`class`,`tabIndex`]),o=C(()=>r.isDisabled?-1:r.tabIndex??0),s=e=>{a(e)};return t({focus:()=>{}}),(t,n)=>(N(),b(`div`,Sh,[w(it,on(j(i),{class:[`tm-field-checkbox`,[e.fieldClass,{"tm-field-checkbox--align-top":e.alignTop,"tm-field-checkbox--required":t.required,"tm-field-checkbox--error":t.error,[`tm-field-checkbox--${e.size}`]:e.size}]],"model-value":e.modelValue,val:e.val,disable:t.isDisabled,tabindex:j(o),"onUpdate:modelValue":s}),{default:x(()=>[F(t.$slots,`default`,{},void 0,!0)]),_:3},16,[`class`,`model-value`,`val`,`disable`,`tabindex`])]))}}),wh=q(Ch,[[`__scopeId`,`data-v-48938586`]]);E(),$t();var Th=q(O({__name:`TmTableHeaderCheckbox`,props:{serviceId:{},disabled:{type:Boolean,default:!1}},setup(e){let t=mc(),n=Fo(e.serviceId),r=C(()=>n.getPagination().getData()),i=n.hasCounterService(),a=C(()=>n.getCounterService().getCount(e.serviceId)),o=C(()=>n.getSelectedRowsInCurrentPage().length),s=C(()=>n.getCurrentPageNonDisabledRowsIds().length),c=C(()=>{let e=o.value>=s.value,t=o.value>0;return!e&&t}),l=C(()=>t.findEntityByIdOrNull(e.serviceId)?.isAllSelected),u=C(()=>{if(c.value)return null;if(l.value)return!0;if(n.getCurrentPageRowsIds().length===0||!o.value)return!1;let{perPage:e,totalCount:t,page:u}=r.value;if(o.value===e||o.value===s.value||o.value===t-(u-1)*e)return!0;if(i){let t=a.value?.total;if(!t)return!1;if(o.value===t||o.value===t-(u-1)*e)return!0}return!1}),d=C(()=>r.value.totalCount>0),f=C(()=>i&&!!a.value&&a.value.total>0),p=C(()=>e.disabled||n.isDisabled()||!(d.value||f.value)),ee=e=>{e?n.selectRows(`pageAll`):n.unselectRows(`pageAll`)};return(e,t)=>(N(),k(wh,{class:`tm-table-header-checkbox`,"model-value":j(u),"is-disabled":j(p
2),"onUpdate:modelValue":ee},null,8,[`model-value`,`is-disabled`]))}}),[[`__scopeId`,`data-v-2169353a`]]);E(),$t(),A();var Eh={key:0},Dh=5,Oh=120,kh=200,Ah=q(O({__name:`TmTableHeader`,props:{serviceId:{},visibleColumns:{},hasActions:{type:Boolean},actionsWidth:{default:52},withScroll:{type:Boolean,default:!1},hideCheckbox:{type:Boolean,default:!1},singleSelection:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isNewSizingFlowEnabled:{type:Boolean},containerEl:{},hasOtherStickyCells:{type:Boolean},columnsLabelsOverride:{}},setup(e){let t=e,n=Fo(t.serviceId),r=Vu(),{activeBreakpoints:i}=ca(),a=e=>{let n=t.columnsLabelsOverride?.[e.columnName];return n===void 0?e.isCustomFieldColumn?e.label:r.t(e.labelShort??e.label):n},o=C(()=>i.value.includes(`sm-x-min`)),s=e=>{let t=fs(e.isStickyCell);return o.value?t.desktop:t.mobile},c=C(()=>!t.hideCheckbox&&t.visibleColumns.length>0),l=T(-1);Et(At(t,`containerEl`),e=>{t.isNewSizingFlowEnabled&&e.length!==0&&(l.value=e[0].contentRect.width)});let u=C(()=>l.value-p.value-(t.hasActions?t.actionsWidth:0)),d=C(()=>{let e={},n=t.visibleColumns.reduce((e,t)=>(t.maxWidth?e+=t.maxWidth:e+=Oh,e),0),r=t.visibleColumns.reduce((e,t)=>(t.minWidth?e+=t.minWidth:e+=Oh,e),0),i=u.value-n;if(n<u.value&&r>u.value)t.visibleColumns.forEach(t=>{e[t.columnName]=t.minWidth??Oh});else if(i>0)t.visibleColumns.forEach(t=>{e[t.columnName]=t.maxWidth??Oh});else{let n=1,i=2**53-1;for(;n<=30&&i>u.value&&i>r;)i=t.visibleColumns.reduce((t,r)=>(e[r.columnName]=r.maxWidth?Math.max(r.maxWidth-n*Dh,r.minWidth??Oh):r.minWidth??Oh,t+=e[r.columnName],t),0),n+=1}let a=t.visibleColumns.filter(e=>!!e.maxWidth),o=t.visibleColumns.filter(e=>!e.maxWidth),s=o.length>0&&t.visibleColumns.at(-1)?.maxWidth===void 0,c=a.reduce((t,n)=>(t+=e[n.columnName],t),0);if(o.length){let n=u.value-c,r=o.reduce((e,t)=>(e+=t.growRatio??1,e),0);if(o.forEach(t=>{let i=s?n/r*(t.growRatio??1):kh;e[t.columnName]=Math.max(i,t.minWidth??0)}),!s){let n=t.visibleColumns.at(-1);n&&(e[n.columnName]=u.value-(c-e[n.columnName]))}}else{let n=t.visibleColumns.at(-1);n&&(e[n.columnName]=u.value-(c-e[n.columnName]))}return e}),f=cn(`checkboxNode`),p=C(()=>f.value?.getBoundingClientRect().width??0),ee=C(()=>Object.fromEntries(n.getSorters().getAllSorters().map(e=>[e.name,e]))),te=C(()=>t.visibleColumns.reduce((e,t)=>(e+=t.growRatio,e),0)),ne=C(()=>100/te.value),re=e=>ee.value[e.columnName],ie=e=>!n.getColumns().hideHeaderSorting?.()&&!!re(e),ae=e=>re(e)?.direction||``,oe=e=>{if(!t.isNewSizingFlowEnabled)return{...e.columnStyles??{},width:e.growRatio===0?Cn(e.minWidth):bh(ne.value*e.growRatio),minWidth:Cn(e.minWidth),maxWidth:e.maxWidth&&Cn(e.maxWidth)};let n=d.value[e.columnName]?Cn(d.value[e.columnName]):void 0;return{...e.columnStyles??{},width:n,maxWidth:e.maxWidth?Cn(Math.max(e.maxWidth,d.value[e.columnName])):n,minWidth:e.minWidth?Cn(e.minWidth):n}},se=e=>{t.disabled||n.applySort(e.columnName)};return(t,n)=>(N(),b(`tr`,{class:M([`tm-table-header`,{"tm-table-header--disabled":e.disabled,"tm-table-header--new-sizing":e.isNewSizingFlowEnabled}])},[j(c)?(N(),b(`th`,{key:0,ref_key:`checkboxNode`,ref:f,class:`tm-checkbox`},[w(ph,null,{default:x(()=>[e.singleSelection?P(``,!0):(N(),k(Th,{key:0,"service-id":e.serviceId,disabled:e.disabled},null,8,[`service-id`,`disabled`]))]),_:1})],512)):P(``,!0),(N(!0),b(un,null,Wt(e.visibleColumns,t=>(N(),b(un,{key:`${t.columnName}:${t.columnOrder}:${e.visibleColumns.length}:${ae(t)}`},[ie(t)?(N(),k(yh,{key:0,label:t.hideHeaderName?``:a(t),direction:ae(t),style:an(oe(t)),onOnSortChanged:e=>se(t)},null,8,[`label`,`direction`,`style`,`onOnSortChanged`])):(N(),b(`th`,{key:1,class:M([t.columnClass,{"tm-table-header__column--sticky":s(t),"tm-table-header__column--sticky-shadow":s(t)}]),style:an(oe(t))},[t.hideHeaderName?P(``,!0):(N(),b(`span`,Eh,Zt(a(t)),1))],6))],64))),128)),e.hasActions?(N(),k(ph,{key:1},{default:x(()=>[w(xh,{tag:`th`,"with-shadow":!e.hasOtherStickyCells,style:an({width:j(Cn)(e.actionsWidth),maxWidth:j(Cn)(e.actionsWidth),minWidth:j(Cn)(e.actionsWidth)})},null,8,[`with-shadow`,`style`])]),_:1})):P(``,!0)],2))}}),[[`__scopeId`,`data-v-9d6c5cc9`]]);
2E(),$t(),A();var jh=q(O({__name:`TmTableLayout`,props:{isLoading:{type:Boolean},hasSelectedRows:{type:Boolean},singleSelection:{type:Boolean},fixedLayout:{type:Boolean},isNewSizingFlowEnabled:{type:Boolean},theme:{}},setup(e){return(t,n)=>(N(),b(`table`,{class:M([`tm-table`,{"tm-table--has-selected-rows":e.hasSelectedRows,"tm-table--single-selection":e.singleSelection,"tm-table--fixed-layout":e.fixedLayout,"tm-table--loading":e.isLoading,"tm-table--new-sizing":e.isNewSizingFlowEnabled,"tm-table--theme-borderless":e.theme===j(Pd).BORDERLESS}])},[S(`thead`,null,[F(t.$slots,`table-header`,{},void 0,!0),e.isLoading?F(t.$slots,`table-progress`,{key:0},()=>[n[0]||(n[0]=S(`tr`,{class:`tm-table-progress`},[S(`th`,{colspan:`100%`},[S(`div`,{class:`tm-table-progress-bar`},[S(`div`,{class:`tm-table-progress-bar__value`})])])],-1))],!0):P(``,!0)]),F(t.$slots,`table-body`,{},()=>[S(`tbody`,null,[F(t.$slots,`selected-rows`,{},void 0,!0),F(t.$slots,`rows`,{},void 0,!0)])],!0)],2))}}),[[`__scopeId`,`data-v-06ce9057`]]);E();var Mh=O({components:{TmSimpleSkeleton:ah,TmSkeletonTableBody:uh,TmTableLayout:jh},props:{rows:{type:Number,default:10},columns:{type:Array,default:fh},headerColumns:{type:Array,default:fh},hideGradient:{type:Boolean,default:!1}},setup(){return{getColWidth:e=>typeof e==`number`?Cn(e):e}}});E(),A();var Nh={class:`tm-skeleton-table`},Ph={key:0,class:`tm-skeleton-table__gradient`};function Fh(e,t,n,r,i,a){let o=I(`tm-simple-skeleton`),s=I(`tm-skeleton-table-body`),c=I(`tm-table-layout`);return N(),b(`div`,Nh,[w(c,{"is-loading":``},{"table-header":x(()=>[F(e.$slots,`table-header`,{},()=>[S(`tr`,null,[(N(!0),b(un,null,Wt(e.headerColumns,(t,n)=>(N(),b(`th`,{key:n,class:M(t.loaderClass)},[t.hideLoader?P(``,!0):(N(),k(o,{key:0,type:t.loaderType??`chip`,height:t.loaderHeight||`18px`,width:e.getColWidth(t.loaderWidth)},null,8,[`type`,`height`,`width`]))],2))),128))])],!0)]),"table-body":x(()=>[w(s,{rows:e.rows,columns:e.columns},null,8,[`rows`,`columns`])]),_:3}),e.hideGradient?P(``,!0):(N(),b(`div`,Ph))])}var Ih=q(Mh,[[`render`,Fh],[`__scopeId`,`data-v-1b05fc56`]]);E();var Lh=O({__name:`TmTableSemanticSkeleton`,props:{serviceId:{},rows:{default:10},columns:{default:fh},headerColumns:{default:()=>[]},hideGradient:{type:Boolean,default:!1},hideCheckboxes:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!1}},setup(e){return(t,n)=>(N(),k(Ih,{rows:e.rows,columns:e.columns,"hide-gradient":e.hideGradient},{"table-header":x(()=>[w(Ah,{"service-id":e.serviceId,"has-actions":e.hasActions,"visible-columns":e.headerColumns,"hide-checkbox":e.hideCheckboxes,"has-other-sticky-cells":!1,disabled:``},null,8,[`service-id`,`has-actions`,`visible-columns`,`hide-checkbox`])]),_:1},8,[`rows`,`columns`,`hide-gradient`]))}});E(),$t();var Rh=O({__name:`TmTableSkeleton`,props:{serviceId:{},bodyOnly:{type:Boolean},hasActions:{type:Boolean,default:!0},hideCheckboxes:{type:Boolean},hideGradient:{type:Boolean},rowsToDisplay:{}},setup(e){let t=e,{headerColumns:n,columns:r,rows:i}=ih(t.serviceId,{hideCheckboxes:t.hideCheckboxes,hasActions:t.hasActions,rowsToDisplay:t.rowsToDisplay});return(t,a)=>e.bodyOnly?(N(),k(uh,{key:0,rows:j(i),columns:j(r)},null,8,[`rows`,`columns`])):(N(),k(dh,{key:1},{default:x(()=>[w(Lh,{"service-id":e.serviceId,rows:j(i),columns:j(r),"header-columns":j(n),"hide-gradient":e.hideGradient,"hide-checkboxes":e.hideCheckboxes,"has-actions":e.hasActions},null,8,[`service-id`,`rows`,`columns`,`header-columns`,`hide-gradient`,`hide-checkboxes`,`has-actions`])]),_:1}))}});E(),$t(),A();var zh=O({__name:`TmTableWithControlsSkeleton`,props:{serviceId:{},bodyOnly:{type:Boolean},hasActions:{type:Boolean,default:!0},hideCheckboxes:{type:Boolean},hideGradient:{type:Boolean},rowsToDisplay:{},leftControls:{},rightControls:{}},setup(e){let t=ca(),n=e,r=e=>{if(e){if(e.every(e=>pe(e)))return e;for(let{breakpoint:n,controls:r}of e)if(Ot(t[n])&&t[n].value===!0)return r;return e.find(e=>e.breakpoint==="default")?.controls??void 0}},i=C(()=>r(n.leftControls)),a=C(()=>r(n.rightControls));return(e,t)=>
2(N(),b(un,null,[w(Km,{"left-controls":j(i),"right-controls":j(a)},null,8,[`left-controls`,`right-controls`]),w(Rh,Yt(pn(e.$props)),null,16)],64))}});E(),$t();var Bh=O({__name:`TmTableAbstractSkeleton`,props:{hasActions:{type:Boolean,default:!0},hideCheckboxes:{type:Boolean},hideGradient:{type:Boolean},rowsToDisplay:{}},setup(e){let t=e,n=fh(),r=t.rowsToDisplay??10;return(t,i)=>(N(),k(Ih,{rows:j(r),columns:j(n),"header-columns":j(n),"hide-gradient":e.hideGradient},null,8,[`rows`,`columns`,`header-columns`,`hide-gradient`]))}});E(),A();var Vh=O({__name:`TmTableAbstractWithControlsSkeleton`,props:{hasActions:{type:Boolean,default:!0},hideCheckboxes:{type:Boolean},hideGradient:{type:Boolean},rowsToDisplay:{},leftControls:{},rightControls:{},showHeader:{type:Boolean,default:!0}},setup(e){return(t,n)=>(N(),b(un,null,[e.showHeader?(N(),k(Km,{key:0,"left-controls":e.leftControls,"right-controls":e.rightControls},null,8,[`left-controls`,`right-controls`])):P(``,!0),w(dh,null,{default:x(()=>[w(Bh,Yt(pn(t.$props)),null,16)]),_:1})],64))}});E();var Hh=O({props:{fullHeight:{type:Boolean}}});E(),A();function Uh(e,t,n,r,i,a){return N(),b(`div`,{class:M([`tm-calendar-grid`,{"tm-calendar-grid--full-height":e.fullHeight}])},[F(e.$slots,`default`,{},void 0,!0)],2)}var Wh=q(Hh,[[`render`,Uh],[`__scopeId`,`data-v-aca8282c`]]),Gh=[`month`,`week`,`day`],Kh=e=>Gh.includes(e),qh=`month`,Jh=Symbol(`calendarState`),Yh=Symbol(`calendarScrollHidden`),Xh=`calendarModal`,Zh=`calendarGroupModal`,Qh=()=>{let e=[];return{addListener:t=>{e.push(t)},removeListener:t=>{e=e.filter(e=>e!==t)},triggerEvent:t=>{e.forEach(e=>e(t))}}};E(),$t();var $h=Qh(),eg=()=>{let e=Bt(Yh,!1),{isMobile:t}=ca();return{hideScroll:C(()=>j(e)||t.value)}},tg=(e,t)=>{let n=T(),r=(r,i)=>{r&&`$el`in r&&e.value!==-1&&i===e.value+t&&(n.value=r.$el)},i=()=>n.value?.scrollIntoView(!0);return sn(()=>{$h.addListener(i)}),Vt(()=>{$h.removeListener(i)}),sn(()=>{let{hideScroll:e}=eg();e.value||i()}),{setTimeRef:r,findTimeSlotsIndex:e=>e.findIndex(({current:e})=>e)}};E(),$t(),A();var ng=q(O({__name:`TmCalendarBody`,props:{onChangeContentSize:{type:Function}},setup(e){let t=e,{hideScroll:n}=eg(),r=T();return t.onChangeContentSize&&Et(r,()=>{if(!t.onChangeContentSize)return;if(!r.value)throw new G(`rowsElement not found`);let e=r.value.getBoundingClientRect();t.onChangeContentSize({width:e.width})}),(e,t)=>(N(),b(`div`,{class:M([`tm-calendar-body`,{"tm-calendar-body--with-scroll":!j(n)}])},[w(Zr,{class:`tm-calendar-body__scroll`,inactive:j(n)},{default:x(()=>[S(`div`,{ref_key:`rowsElement`,ref:r,class:`tm-calendar-body__rows`},[F(e.$slots,`default`,{},void 0,!0)],512)]),_:3},8,[`inactive`])],2))}}),[[`__scopeId`,`data-v-aad22cb9`]]);E(),$t();var rg=q(O({__name:`TmCalendarRow`,setup(e,{expose:t}){let n=T();return t({getRootElement:()=>{if(!n.value)throw new G(`tmCalendarRowElement not found`);return n.value}}),(e,t)=>(N(),b(`div`,{ref_key:`tmCalendarRowElement`,ref:n,class:`tm-calendar-row`},[F(e.$slots,`default`,{},void 0,!0)],512))}}),[[`__scopeId`,`data-v-5e046748`]]);E();var ig=O({props:{outdated:{type:Boolean},current:{type:Boolean}}});E(),A();function ag(e,t,n,r,i,a){return N(),b(`div`,{class:M({"tm-calendar-cell--outdated":e.outdated,"tm-calendar-cell--current":e.current})},[F(e.$slots,`default`,{},void 0,!0)],2)}var og=q(ig,[[`render`,ag],[`__scopeId`,`data-v-0d9377b9`]]);E(),A();var sg=q(O({__name:`TmCalendarMonthDayLayout`,props:{big:{type:Boolean},outdated:{type:Boolean},active:{type:Boolean}},setup(e){return(t,n)=>(N(),b(`div`,{class:M([`tm-calendar-month-day`,{"tm-calendar-month-day--big":e.big,"tm-calendar-month-day--active":e.active,"tm-calendar-month-day--outdated":e.outdated}])},[F(t.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-39a8fd6c`]]);E(),$t();var cg={class:`tm-calendar`},lg={class:`tm-calendar__body`},ug=q(O({__name:`TmCalendarSkeleton`,setup(e){return rn(Yh,!0),(e,t)=>(N(),b(`div`,cg,[w(Km),w(Zr,{"allow-scroll-x":``},{default:x(()=>[S(`div`,lg,[w(Wh,{class:`tm-calendar-monthly`},{default:x(()=>[w(ng,null,{default:x(()=>[(N(),b(un,null,Wt(5,e=>w(rg,{key:`row-${e}`,class:`tm-calendar-monthly-row`},{default:x(()=>[(N(),b(un,null,Wt(7,e=>w(og,{key:`cell-${e}`,class:`tm-calendar-monthly-row__cell`},{default:x(()=>[w(sg,{class:`flex-grow-1`},{default:x(()=>
2[j(Xo)(0,3)===1?(N(),k(bn,{key:0,type:`QChip`,width:`100px`,class:`align-self-center`})):P(``,!0)]),_:1})]),_:1})),64))]),_:1})),64))]),_:1})]),_:1})])]),_:1})]))}}),[[`__scopeId`,`data-v-7a869e22`]]),Z=class{static fromConfig(e,t=!1){return{content:mm,dev:t,props:{config:this.processConfig(e)}}}static forTableWithServiceId(e,t){return{content:zh,props:{...t,serviceId:e}}}static forAbstractTable(e){return{content:Vh,props:e}}static forMonthlyCalendar(){return{content:ug,props:{}}}static detailsTableSkeleton(e=!1){return{content:Lm,dev:e}}static box(e=``,t=`100%`,n=`300px`){return{classes:e,width:t,height:n}}static textRow(e=`100%`,t=`mb-1`){return{width:e,height:`16px`,classes:t}}static headline16Row(e=`100%`,t=`mb-2`){return{width:e,height:`26px`,classes:t}}static headline18Row(e=`100%`,t=`mb-2`){return{width:e,height:`24px`,classes:t}}static headlineXlFontRow(e=`100%`,t=`mt-3 mb-3`){return{width:e,height:`24px`,classes:t}}static textRows(e=1,t=`100%`,n=``){return Ke(e).map(r=>{let i=r===e-1;return[this.textRow(i?t:`100%`,i?n:void 0)]})}static radioTitleAndText(e=1,t=`50%`,n=`mb-1`){let r=[[{width:`17px`,height:`16px`,classes:`border-radius-100 mr-2`},{width:`80px`,height:`14px`,classes:`mb-1`}],{width:e===1?t:`100%`,height:`14px`,classes:`ml-6 ${e===1?n:``}`}];if(e>1)for(let i=1;i<e;i++){let a=i===e-1;r.push(this.textRow(a?t:`100%`,`ml-6 mt-1 ${n}`))}return r}static checkboxRow(e=1,t=`50%`,n=`mb-1`,r=`mr-2`){let i=[[{width:`17px`,height:`16px`,classes:r},{width:`100%`,height:`14px`,classes:e===1?n:`mb-1`}]];if(e>1)for(let r=0;r<e-1;r++){let a=r===e-1;i.push(this.textRow(a?t:`100%`,`ml-6 ${n}`))}return i}static confirmationSkeleton(e){let{textLines:t,itemsTextLines:n,items:r,itemClass:i,itemBlockClass:a,dev:o}={...hm,...e},s=[];return Ke(t).forEach(e=>{let n=e===t-1;s.push(this.textRow(n?`50%`:`100%`,n?`mt-1 mb-5`:`mt-1`))}),Ke(r).forEach(e=>{let t=e===r-1;s.push(this.checkboxRow(n,`100%`,t?``:a,i))}),this.fromConfig(s,o)}static confirmationCheckboxSkeleton(e=3,t=2,n=2,r=!1){return this.confirmationSkeleton({textLines:e,items:t,itemsTextLines:n,dev:r})}static confirmationBulletsSkeleton(e=3,t=2,n=1,r=!1){return this.confirmationSkeleton({textLines:e,items:t,itemsTextLines:n,dev:r,itemClass:`configured-skeleton__bullet`,itemBlockClass:`mb-4`})}static horizontalLine(){return{width:`100%`,height:`1px`,classes:`mt-2 mb-2`}}static input(e=`100%`,t=``){return{width:e,height:`40px`,classes:t}}static button(e=`120px`,t=``){return this.box(t,e,`36px`)}static labeledInput(e=`150px`,t=`mt-1 mb-3`){return[[this.textRow(e)],[this.input(`100%`,t)]]}static horizontalLabeledInput(e=`100px`,t=`ml-4 mb-5`){return[this.textRow(e,`ml-10 mt-3`),this.input(`100%`,t)]}static labeledInputs(e=3){return Ke(e).flatMap(()=>this.labeledInput(`${Je(130,180)}px`))}static textWithLabeledInput(e=3,t=!1){return this.fromConfig([...Ke(e-1).map(()=>this.textRow()),this.textRow(`60%`,`mb-5`),this.labeledInput()],t)}static twoActionsConstrolSkeletonConfig(){return[{breakpoint:`isSmBreakpoint`,controls:[`100px`]},{breakpoint:`default`,controls:[`100px`,`150px`]}]}static searchControlSkeletonConfig(){return[{breakpoint:`isMobile`,controls:[`40px`]},{breakpoint:`default`,controls:[`240px`]}]}static processConfig(e){let t=[];for(let n of e){if(Array.isArray(n)&&n.some(Array.isArray)){t.push(...n);continue}t.push(n)}return t}},dg=class extends ci{};U([v()],dg.prototype,`id`,void 0),U([v()],dg.prototype,`sender`,void 0),U([v()],dg.prototype,`charset`,void 0),U([ft()],dg.prototype,`chars`,void 0),U([ft()],dg.prototype,`partsCount`,void 0),U([v()],dg.prototype,`creditsPrice`,void 0),U([v()],dg.prototype,`price`,void 0),U([ft()],dg.prototype,`userId`,void 0),U([v()],dg.prototype,`countryId`,void 0),U([v()],dg.prototype,`source`,void 0),U([v()],dg.prototype,`fromEmail`,void 0),U([v()],dg.prototype,`avatar`,void 0),U([v()],dg.prototype,`smscId`,void 0),U([v()],dg.prototype,`charsetLabel`,void 0),U([at()],dg.prototype,`deleted`,void 0),U([y()],dg.prototype,`textParameters`,void 0),U([y()],dg.prototype,`emailToSms`,void 0),dg=U([Be(md.SENT_SMS_FULL)],dg);var fg=dg,pg=class extends pl{get notByocOutboundMessagePrice(){return this.activeMonthlyPlan&&this.activeMonthlyPlan.type!==`connect`?this.activeMonthlyPlan.messagePrice:this.commonMessagePrice}get canActivateConnectPlan(){return this.activeMonthlyPlan?this.activeMonthlyPlan.type===`connect`:!1}};U([y()],pg.prototype,`activeMonthlyPlan`,void 0),U([y()],pg.prototype,`monthlyPlansList`,void 0),U([at()],pg.prototype,`autoRechargeDisableAllowed`,void 0),U([at()],pg.prototype,`autoRechargeEnabled`,void 0),U([y()],pg.prototype,`autoRechargeTriggerList`,void 0),U([y()],pg.prototype,`priceList`,void 0),U([y()],pg.prototype,`autoRechargePrice`,void 0),U([ft()],pg.prototype,`autoRechargeTrigger`,void 0),U([ft()],pg.prototype,`commonMessagePrice`,void 0),U([at()],pg.prototype,`vatExempt`,void 0),U([y()],pg.prototype,`byocPlansList`,void 0),U([y()],pg.prototype,`availableByocPlan`,void 0),U([at()],pg.prototype,`isAllowedPromoCodes`,void 0),pg=U([Be(md.BILLING)],pg);var mg=pg;E();var hg=O({components:{TmSkeletonDetailsTable:um,TmSkeleton:bn},props:{title:{type:String,required:!1}},setup(){return{items:[{labelSize:`20%`}
2,{labelSize:`30%`},{labelSize:`50%`},{labelSize:`60%`},{labelSize:`60%`}],headerSizes:[`30%`,`40%`,`50%`]}}});E();var gg={class:`flex flex-column gap-6`};function _g(e,t,n,r,i,a){let o=I(`tm-skeleton`),s=I(`tm-skeleton-details-table`);return N(),b(`div`,gg,[(N(!0),b(un,null,Wt(e.headerSizes,(e,t)=>(N(),b(`div`,{key:t},[w(o,{class:`ten-dlc-select-campaign-details-modal-preloader__title`,width:e,height:`18px`},null,8,[`width`]),w(s)]))),128))])}var vg=q(hg,[[`render`,_g],[`__scopeId`,`data-v-9bac55b5`]]);E();var yg=O({components:{DetailsTableItem:Ed,TmSkeleton:bn,DetailsTable:Dd},props:{title:{type:String,required:!1}},setup(){return{items:[{labelSize:`20%`,valueSize:`70%`},{labelSize:`30%`,valueSize:`60%`},{labelSize:`50%`,valueSize:`65%`},{labelSize:`60%`,valueSize:`70%`},{labelSize:`60%`,valueSize:`40%`},{labelSize:`20%`,valueSize:`70%`},{labelSize:`30%`,valueSize:`60%`},{labelSize:`50%`,valueSize:`65%`},{labelSize:`60%`,valueSize:`70%`},{labelSize:`60%`,valueSize:`40%`},{labelSize:`30%`,valueSize:`60%`},{labelSize:`50%`,valueSize:`65%`}]}}});E();function bg(e,t,n,r,i,a){let o=I(`tm-skeleton`),s=I(`details-table-item`),c=I(`details-table`);return N(),k(c,{"left-class":`text-right`},{default:x(()=>[(N(!0),b(un,null,Wt(e.items,(e,t)=>(N(),k(s,{key:t},{label:x(()=>[w(o,{width:e.labelSize,height:`14px`},null,8,[`width`])]),default:x(()=>[w(o,{width:e.valueSize,height:`14px`},null,8,[`width`])]),_:2},1024))),128))]),_:1})}var xg=q(yg,[[`render`,bg]]),Sg=class extends pl{get bonusPercent(){return this.bonus/this.cost*100}};U([v()],Sg.prototype,`id`,void 0),U([ft()],Sg.prototype,`cost`,void 0),U([v()],Sg.prototype,`currency`,void 0),U([ft()],Sg.prototype,`bonus`,void 0),Sg=U([Be(md.STRIPE_PAYG_PRICE)],Sg);var Cg=Sg,wg=`TicketSaveAsModalFormService`,Tg=`ticketSaveViewAsModal`,Eg=`TicketFilteredViewPreviewModal`,Dg=`contactTagsBulkModal`,Og=`ContactBulkFormService`,kg=class extends pl{};U([v()],kg.prototype,`company`,void 0),U([v()],kg.prototype,`accountingEmail`,void 0),U([v()],kg.prototype,`paymentCountry`,void 0),U([Ge(mi,`paymentCountry`)],kg.prototype,`paymentCountryEntity`,void 0),U([v()],kg.prototype,`street`,void 0),U([v()],kg.prototype,`area`,void 0),U([v()],kg.prototype,`state`,void 0),U([v()],kg.prototype,`city`,void 0),U([v()],kg.prototype,`zip`,void 0),kg=U([Be(md.BILLING_DETAILS)],kg);var Ag=kg,jg=class extends pl{};U([v()],jg.prototype,`id`,void 0),U([v()],jg.prototype,`name`,void 0),jg=U([Be(md.STRIPO_TEMPLATE_TYPE)],jg);var Mg=jg,Ng=class extends Mg{};Ng=U([Be(md.STRIPO_TEMPLATE_FEATURE)],Ng);var Pg=Ng,Fg=class extends Mg{};Fg=U([Be(md.STRIPO_TEMPLATE_INDUSTRY)],Fg);var Ig=Fg,Lg=class extends Mg{};Lg=U([Be(md.STRIPO_TEMPLATE_SEASON)],Lg);var Rg=Lg;E();var zg=q(O({__name:`TmSkeletonDetailsTableRedesign`,props:{rows:{default:10},preset:{default:`column`}},setup(e){return(t,n)=>(N(),k(Wf,{preset:e.preset},{default:x(()=>[w(Uf,{"with-padding":``},{default:x(()=>[(N(!0),b(un,null,Wt(e.rows,e=>(N(),k(Gf,{key:e},{title:x(()=>[w(bn,{type:`QChip`,height:`12px`,"random-width":``,class:`mt-1`})]),default:x(()=>[w(bn,{type:`QChip`,height:`12px`,"random-width":``})]),_:1}))),128))]),_:1}),F(t.$slots,`default`,{},void 0,!0)]),_:3},8,[`preset`]))}}),[[`__scopeId`,`data-v-0f398bd4`]]);E();var Bg={class:`d-flex gap-2 mb-6`},Vg=O({__name:`OutboundEmailsDetailsModalPreloader`,setup(e){return(e,t)=>(N(),b(`div`,null,[S(`div`,Bg,[w(bn,{height:`36px`,width:`12%`}),w(bn,{height:`36px`,width:`24%`}),w(bn,{height:`36px`,width:`10%`})]),w(zg)]))}});E();var Hg={class:`d-flex gap-2 mb-6`},Ug=O({__name:`ScheduledEmailModalPreloader`,setup(e){return(e,t)=>(N(),b(`div`,null,[S(`div`,Hg,[w(bn,{height:`36px`,width:`11%`}),w(bn,{height:`36px`,width:`9%`}),w(bn,{height:`36px`,width:`13%`}),w(bn,{height:`36px`,width:`20%`}),w(bn,{height:`36px`,width:`14%`}),w(bn,{height:`36px`,width:`10%`})]),w(zg)]))}});E();var Wg={class:`tm-skeleton-details-table-sms-preview`},Gg={class:`tm-skeleton-details-table-sms-preview__header`},Kg={class:`tm-skeleton-details-table-sms-preview__content`},qg=q(O({__name:`TmSkeletonDetailsTableSmsPreview`,setup(e){return(e,t)=>(N(),b(`div`,Wg,[S(`div`,Gg,[w(bn,{type:`text`,height:`20px`,width:`50%`,class:`mt-1 mb-2`}),S(`div`,Kg,[w(bn,{type:`text`,height:`12px`,width:`22%`})])])]))}}),[[`__scopeId`,`data-v-4b98c780`]]);E();var Jg={class:`d-flex gap-2 mb-6`},Yg=O({__name:`ScheduledMessageModalPreloader`,setup(e){return(e,t)=>(N(),b(`div`,null,[S(`div`,Jg,[w(bn,{height:`36px`,width:`14%`}),w(bn,{height:`36px`,width:`22%`}),w(bn,{height:`36px`,width:`10%`})]),w(zg,{preset:`column-reverse`},{default:x(()=>[w(qg)]),_:1})]))}}),Xg=class extends pl{static getUid(e,t,n,r){if(n===Gr.SMS){let n=t;return Zg.VoiceCallValues.has(t)&&(n=`c`),`${n}${e}`}return r&&Zd(n)?`note${e}`:e}},Zg=Xg,Qg=(Xg.VoiceCallValues=new Set([va.CallInbound,va.CallOutbound,va.CallMissedInbound]),Xg);U([st(),v()],Qg.prototype,`uid`,void 0),U([v()],Qg.prototype,`id`,void 0),U([y(void 0)],Qg.prototype,`chatId`,void 0),U([y(null)],Qg.prototype,`avatar`,void 0),U([v()],Qg.prototype,`direction`,void 0),U([y()],Qg.prototype,`firstName`,void 0),U([y()],Qg.prototype,`lastName`,void 0),U([v()],Qg.prototype,`messageTime`,void 0),U([v(null)],Qg.prototype,`updatedAt`,void 0),U([y(null)],Qg.prototype,`receiver`,void 0),U([y(null)],Qg.prototype,`sender`,void 0),U([ft()],Qg.prototype,`sessionId`,void 0),U([v()],Qg.prototype,`status`,void 0),U([v()],Qg.prototype,`rejectReason`,void 0),U([v()],Qg.prototype,`errorCode`,void 0),U([v()],Qg.prototype,`text`,void 0),U([y()],Qg.prototype,`msgItems`,void 0),U([v()],Qg.prototype,`price`,void 0),U([y(null,e=>typeof e==`number`?e.toString():e)],Qg.prototype,`initiatorId`,void 0),U([v(null)],Qg.prototype,`createdByAutomationId`,void 0),U([v()],Qg.prototype,`chatType`,void 0),U([v()],Qg.prototype,`type`,void 0),U([y(null)],Qg.prototype,`payload`,void 0),U([y([])],Qg.prototype,`files`,void 0),U([at(null)],Qg.prototype,`isEdited`,void 0),Qg=Zg=U([Be(md.CHAT_MESSAGE)],Qg);var $g=Qg,e_=`scheduledMessageModal`,t_=e=>e.entity===$g.entity,n_=e=>e.entity===fg.entity,r_=e=>e.entity===ya.entity,i_=e=>e.entity===oa.entity,a_=e=>e.entity===ri.entity,o_=e=>e.entity===Di.entity;E(),$t();var s_=O({__name:`TmMessageDetailsModalPreloader`,setup(e){let{modelType:t}=qr(Pi).getParams(),n=!!t&&n_(t);return(e,t)=>
2j(n)?(N(),k(zg,{key:0,preset:`column-reverse`},{default:x(()=>[w(qg)]),_:1})):(N(),k(um,{key:1}))}}),c_=`28px`,l_=class extends pl{};U([v()],l_.prototype,`name`,void 0),U([at()],l_.prototype,`isDeleted`,void 0),l_=U([Be(md.AUTOMATION_LOG_PREVIEW)],l_);var u_=l_,d_=class extends pl{};U([v()],d_.prototype,`type`,void 0),U([v()],d_.prototype,`title`,void 0),U([at()],d_.prototype,`isDeleted`,void 0),d_=U([Be(md.AUTOMATION_LOG_STEP)],d_);var f_=d_,p_=e=>{if(!e||typeof e!=`object`||!(`type`in e))return e;let t=e;return t.type===fr.ACTION_CREATE_NEW_DEAL?{...t,pipelineId:t.pipelineId?String(t.pipelineId):null,dealStageId:t.dealStageId?String(t.dealStageId):null}:t.type===fr.ACTION_CREATE_NEW_TASK?{...t,boardId:t.boardId?String(t.boardId):null,stageId:t.stageId?String(t.stageId):null}:t.type===fr.ACTION_SEND_EMAIL?{...t,replyToEmail:t.replyToEmail===``?null:t.replyToEmail}:e},m_=class extends pl{};U([v()],m_.prototype,`automationId`,void 0),U([Ge(u_,`automationId`)],m_.prototype,`automation`,void 0),U([v()],m_.prototype,`contactId`,void 0),U([Ge(fa,`contactId`)],m_.prototype,`contact`,void 0),U([v()],m_.prototype,`stepId`,void 0),U([Ge(f_,`stepId`)],m_.prototype,`step`,void 0),U([v()],m_.prototype,`userId`,void 0),U([Ge(Er,`userId`)],m_.prototype,`user`,void 0),U([v()],m_.prototype,`status`,void 0),U([y()],m_.prototype,`reason`,void 0),U([at(!1)],m_.prototype,`isRetryable`,void 0),U([y()],m_.prototype,`entity`,void 0),U([v()],m_.prototype,`createdAt`,void 0),U([v()],m_.prototype,`finishedAt`,void 0),U([y(null,p_)],m_.prototype,`payload`,void 0),U([y()],m_.prototype,`details`,void 0),U([at(!1)],m_.prototype,`jumped`,void 0),U([y(null)],m_.prototype,`jumpedFromStepLocalId`,void 0),m_=U([Be(md.AUTOMATION_LOG)],m_);var h_=m_;E();var g_={confirmation:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./7jQXQgy3.js`)),__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(),Z.textRow(`200px`)])}},confirmationDelete:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B9_06ocz.js`)),__vite__mapDeps([13,1,2,3,4,5,6,7,8,9,10,14]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(`200px`)])}},confirmationPassword:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BCtBJrji.js`)),__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(`100px`,`mb-3`),Z.labeledInput(`80px`)])}},prompt:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./AiKVr3mh.js`)),__vite__mapDeps([72,1,2,3,4,5,6,7,8,9,10,73]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(),Z.textRow(`200px`)])}},export:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bn0Q7GpC.js`)),__vite__mapDeps([74,1,2,3,4,5,6,7,8,9,10,63,19,20,21,64,75,16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`exportModal.title`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(`250px`,`mb-3`),Z.labeledInput(`96px`)])}},smsSurveys:{type:`modal`,modules:[H.SmsSurveys],component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C066RLIE.js`)),__vite__mapDeps([79,1,2,3,4,5,6,7,8,9,10,24,22,75,19,16,17,18,20,21,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`createSmsSurveyModal.title`,preloader:Z.fromConfig([Z.textRow(`150px`),Z.input(`100%`,`mb-2`),Z.textRow(`150px`),[Z.box(`mb-2 `,`30%`,`160px`),Z.box(`mb-2 mx-auto`,`30%`,`160px`),Z.box(`mb-2 `,`30%`,`160px`)],[Z.box(`mb-2 `,`30%`,`160px`),Z.box(`mb-2 mx-auto`,`30%`,`160px`),Z.box(`mb-2 `,`30%`,`160px`)]])}},smsSurveyRecipients:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DBtnoi2-.js`)),__vite__mapDeps([80,1,2,3,4,5,6,7,8,9,10,37,38,39,81,17,18,82,83,84,85,21,20,86,87,88,89,90,76,22,77,78,91,63,19,64,92,93,94,95,34,96,97,98,99,100,27,28,101,102,103,104,31,105,106,107,108,109,110,111,112,113,114,115,116,117,75,16,23,24,25,26,29,30,32,33,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,65,66,67,68,69,70,71,118,119,120,121,122,123,124,125,126,127,128,129,130,131]),import.meta.url)),modalConfig:{size:`xLarge`,titleMessagePath:`smsSurveyAddRecipientsModal.title`,preloader:Z.fromConfig([Z.textRow(`100px`,`mb-2`),Z.box(``,`600px`,`120px`),Z.textRow(`600px`,`mt-1`)])},resolvers:[{service:`UserNumbersResolverService`},{service:`SenderSettingsCountriesResolverService`}]},editSmsSurveyName:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CBBq_G_1.js`)),__vite__mapDeps([132,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`smsSurveyEditNameModal.title`,preloader:Z.fromConfig([Z.labeledInput()])}},scheduleSmsSurvey:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CBetyKg2.js`)),__vite__mapDeps([133,1,2,3,4,5,6,7,8,9,10,24,32,31,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,121]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`smsSurveyScheduleModal.title`,preloader:Z.fromConfig([Z.textRow(`70px`),Z.input(`436px`,`mt-1`),Z.textRow(`70px`,`mt-2`),Z.input(`436px`,`mt-1`),Z.textRow(`100%`,`mt-1`),Z.textRow(`50px`,`mt-1`)])}},previewSmsSurvey:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BI9UmW6N.js`)),__vite__mapDeps([134,1,2,3,4,5,6,7,8,9,10,24,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,135]),import.meta.url)),modalConfig:{titleMessagePath:`smsSurveyPreviewModal.title`,size:`large`,noFooter:!0,preloader:{content:mm,props:{config:[{width:`362px`,height:`466px`,classes:`mx-auto`}]}}}},smsSurveyQuestion:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./3PnqyoMz.js`)),__vite__mapDeps([136,4,2,1,3,5,6,7,8,9,10,24,17,18,82,83,84,85,21,20,86,87,88,75,19,16,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,137,81,138,139,140,141,142,111,143,144,145,11,113,114,115,116,146]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:e=>e.editingId?`smsSurveyQuestionModal.title.edit`:`smsSurveyQuestionModal.title.add`,preloader:Z.fromConfig([Z.input(`490px`),Z.box(`mt-1`,`490px`,`150px`),Z.textRow(`490px`,`mt-1`)])}},smsSurveyQuestionDelay:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./TEv6ZGpy.js`)),__vite__mapDeps([147,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,109]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:e=>(`editingId`in e&&e.editingId?Gl().findEntityByIdOrNull(e.editingId):void 0)?.sendDelay?`smsSurveyQuestionDelayModal.title.edit`:`smsSurveyQuestionDelayModal.title.add`,preloader:Z.fromConfig([Z.textRow(`50%`),[Z.input(`132px`),Z.input(`132px`,`ml-2`)]])}},smsSurveyReply:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B6tlA8F3.js`)),__vite__mapDeps([148,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:e=>e.editingId?`smsSurveyReplyModal.title.edit`:`smsSurveyReplyModal.title.add`,preloader:Z.fromConfig([Z.labeledInput(),Z.textRows(2,`20%`)])}},smsSurveyFinalMessage:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B7V6JFzz.js`)),__vite__mapDeps([149,4,2,1,3,5,6,7,8,9,10,24,17,18,82,83,84,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,150,137,86,81,85,87,88,138,139,140,141,142,111,143,144,145,11,113,114,115,116,146]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:e=>e.editingId?`smsSurveyFinalMessageModal.title.edit`:`smsSurveyFinalMessageModal.title.add`,preloader:Z.fromConfig([Z.labeledInput(`490px`),Z.box(`mt-1`,`100px`,`20px`),Z.box(`mt-1`,`490px`,`150px`),Z.textRow(`490px`,`mt-1`)])}},phoneNumberLabel:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./6BaeEnXL.js`)),__vite__mapDeps([151,1,2,3,4,5,6,7,8,9,10,152,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:({editingId:e})=>e?`tmNumberLabelModal.editTitle`:`tmNumberLabelModal.createTitle`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},templates:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bs3HVKNV.js`)),__vite__mapDeps([153,1,2,3,4,5,6,7,8,9,10,17,18,19,82,83,84,86,85,21,20,87,88,154,24,155,47,140,37,38,39,41,141,142,75,16,22,23,25,26,27,28,29,30,31,32,33,34,35,36,40,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,156,157,158,145,11,159,160,161,162,109,163,143,144,111,164,165,166,167,168,121,169]),import.meta.url)),modules:[H.Templates,H.Compose],resolvers:[{service:`ModelResolver`,params:[$n]}],modalConfig:{size:`large`,titleMessagePath:e=>e.editingId?`entities.template.editTemplate`:`entities.template.newTemplate`,preloader:Z.fromConfig([Z.labeledInput(`110px`),[Z.textRow(`80px`,`mt-1`),Z.textRow(`85px`,`ml-auto mt-1`)],Z.box(`mt-2`,`100%`,`150px`),Z.textRow(`200px`,`ml-auto mt-1 mb-4`),Z.labeledInput(`80px`)])}},templateShare:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C4z2AWFx.js`)),__vite__mapDeps([170,1,2,3,4,5,6,7,8,9,10,24,37,38,39,140,20,41,141,142,91,63,19,21,64,92,93,94,95,34,96,97,98,171,35,18,36,32,31,40,42,43,17,44,172,101,102,27,28,173,174,175,176,177,178,179,11,180,60]),import.meta.url)),modalConfig:{size:`xLarge`,noFooter:!0,titleMessagePath:`templateShareModal.title`,preloader:Z.forAbstractTable()}},templateSelect:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DXtt8lhZ.js`)),__vite__mapDeps([181,4,2,1,3,5,6,7,8,9,10,24,37,38,39,166,
2140,20,41,141,142,91,63,19,21,64,92,93,94,95,34,96,97,98,176,177,178,179,11,180,28,60,182,183,184,36,185,186,75,16,17,18,22,23,25,26,27,29,30,31,32,33,35,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,61,62,65,66,67,68,69,70,71,76,77,187,86,88,188,189,190,191,121,192,193,194,195,196,89,197,198,199,200,201,146,202,203,204,205,206,207,85,87,208,109,165,167,168,209,210,211,130,212,213,214,215,216,217,90,218,219,220,221,222,223,224,225,226,116,227,228,229,84,101,230,231,232]),import.meta.url)),modules:[H.Templates,H.Stripo],modalConfig:{size:`xxLarge`,noFooter:!0,titleMessagePath:`entities.template.modalTitle`,preloader:Z.forAbstractTable()},resolvers:[{service:`FacetResolver`,params:{model:ki,subscriptionModels:[ki]}},{service:`FacetResolver`,params:{model:ia,subscriptionModels:[ia],resetSettingsOnSubscription:!0}}]},templatesEditCategory:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DgjzEwjc.js`)),__vite__mapDeps([233,1,2,3,4,5,6,7,8,9,10,24,166,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,167,168,121]),import.meta.url)),modules:[H.Templates],modalConfig:{titleMessagePath:`entities.templateCategory.editCategory`,size:`small`,preloader:Z.fromConfig([Z.textRow(`80%`,`mb-5`),Z.labeledInput(`222px`)])}},templateCategory:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CgonF4Zr.js`)),__vite__mapDeps([234,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modules:[H.Templates],modalConfig:{size:`small`,titleMessagePath:e=>e.editingId?`templateCategoryModal.renameTitle`:`templateCategoryModal.createTitle`,preloader:Z.fromConfig([Z.labeledInput(`115px`)])}},templateCategoryDelete:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DxybnlyB.js`)),__vite__mapDeps([235,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modules:[H.Templates],modalConfig:{size:`small`,titleMessagePath:`templateCategoryDeleteModal.title`,preloader:Z.fromConfig([Z.textRows(2,`50%`)])}},UnsubscribeContactModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BtrxRUq0.js`)),__vite__mapDeps([236,1,2,3,4,5,6,7,8,9,10,107,108,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`UnsubsribeContactModal.modalTitle`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(),Z.textRow(`250px`,`mb-3`),Z.checkboxRow()])}},addContactsChooseSourceModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BZMaiqR7.js`)),__vite__mapDeps([237,1,2,3,4,5,6,7,8,9,10,57,24,58,59,60,106,37,38,39,89,107,108,109,238,116]),import.meta.url)),modalConfig:{size:`medium`,noFooter:!0,titleMessagePath:`addContactsChooseSourceModal.title`,preloader:Z.fromConfig([[Z.box(``,`260px`,`180px`),Z.box(`ml-auto`,`260px`,`180px`)]])}},accountDetails:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bq1shcpk.js`)),__vite__mapDeps([239,1,2,3,4,5,6,7,8,9,10,35,24,18,36,32,31,37,38,39,40,41,42,43,17,44,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,240]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`accountDetailsEditModal.title`,preloader:Z.fromConfig([Z.labeledInputs(8)])}},subAccountDetails:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B5EJ0ZPk.js`)),__vite__mapDeps([241,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,242]),import.meta.url)),modules:[H.SubAccountsForm],modalConfig:{size:`small`,titleMessagePath:({titleMessagePath:e})=>e,preloader:Z.fromConfig([Z.labeledInputs(5),Z.textRow(`30px`,`mt-1 mb-3`),Z.radioTitleAndText(1,`50%`,`mb-5`),Z.radioTitleAndText(1)])}},contactList:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./C2pqY8C7.js`)),__vite__mapDeps([243,1,2,3,4,5,6,7,8,9,10,57,24,58,59,60,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,61,62,63,64,65,66,67,68,69,70,71,76,77,78,93]),import.meta.url)),modalConfig:{titleMessagePath:({editingId:e})=>e?`ContactListForm.editTitle`:`ContactListForm.addTitle`,size:`small`,preloader:Z.fromConfig([Z.labeledInput(`100px`,`mt-1 mb-6`),Z.checkboxRow(2,`50%`,`ml-6 mb
2-6`,`mr-2`),Z.checkboxRow(1,`100%`,`mb-1`,`mr-2`)])}},contactListDeleteModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CDw382_q.js`)),__vite__mapDeps([244,1,2,3,4,5,6,7,8,9,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(),Z.checkboxRow(),Z.button(`120px`,`ml-auto`)])}},contactListBulkDeleteModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DLchV3Q_.js`)),__vite__mapDeps([245,1,2,3,4,5,6,7,8,9,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(),Z.checkboxRow(),Z.button(`120px`,`ml-auto`)])}},contactListTempDetails:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CiTjjeXJ.js`)),__vite__mapDeps([246,1,2,3,4,5,6,7,8,9,10,24,37,38,39,91,63,19,20,21,64,92,93,94,95,34,96,97,98,177,247,18,31,248,106,89,107,108,109,249,17,27,28,116,250,251,252,253,49,50,101,254,11]),import.meta.url)),modalConfig:{titleMessagePath:({name:e})=>e,exactSize:`1100px`,noFooter:!0},modules:[H.ContactListCounter]},contact:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CFPcNL2O.js`)),__vite__mapDeps([255,1,2,3,4,5,6,7,8,9,10,106,37,38,39,89,107,108,109,256,257,258,17,18,259,84,229,260,24,25,75,19,16,20,21,22,23,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,261,262]),import.meta.url)),modules:[H.Tags,H.WebWidgets,H.WhatsApp,H.Facebook,H.Instagram],modalConfig:{size:`small`,preloader:Z.fromConfig([Z.labeledInputs(4),Z.button(`120px`,`ml-auto`)])}},contactListMoveCopyModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./io6b2778.js`)),__vite__mapDeps([263,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(`100%`,`mb-4`),Z.radioTitleAndText(2),Z.radioTitleAndText(2)])}},blockedContact:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Bnh1ONiu.js`)),__vite__mapDeps([264,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,265]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`blockedContactForm.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.button(`120px`,`ml-auto`)])}},[Dg]:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./B0EIrTy2.js`)),__vite__mapDeps([266,4,2,1,3,5,6,7,8,9,10,24,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,75,76,77,198,267,268,252,269]),import.meta.url)),modules:[H.Tags],modalConfig:{exactSize:`800px`,preloader:Z.fromConfig([Z.labeledInputs(1),Z.button(`120px`,`ml-auto`)])}},[Xn]:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Xq0A3FxQ.js`)),__vite__mapDeps([270,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,265,112,106,89,107,108,109,121]),import.meta.url)),modules:[H.FilteredViews,H.Segments],modalConfig:{size:`small`,titleMessagePath:`segmentCreateModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.button(`120px`,`ml-auto`)])}},[_r]:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CETQyqIN.js`)),__vite__mapDeps([271,1,2,3,4,5,6,7,8,9,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]),import.meta.url)),modules:[H.FilteredViews,H.Segments],modalConfig:{size:`small`,titleMessagePath:`segmentDeleteModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.button(`120px`,`ml-auto`)])}},[Na]:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BQNc0nor.js`)),__vite__mapDeps([272,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,265,273]),import.meta.url)),modules:[H.FilteredViews,H.Segments],modalConfig:{size:`small`,titleMessagePath:`segmentRenameModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.button(`120px`,`ml-auto`)])}},[yn]:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CnMb9hpc.js`)),__vite__mapDeps([274,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77]),import.meta.url)),modules:[H.FilteredViews,H.Segments],modalConfig:{size:`small`,preloader:Z.fromConfig([Z.labeledInput(),Z.button(`120px`,`ml-auto`)])}},receivedSmsFilterModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Ca7kz9iA.js`)),__vite__mapDeps([275,1,2,3,4,5,6,7,8,9,10,24,276,37,38,39,277,278,89]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`filters.receivedSmsModalTitle`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(),Z.textRow(`100px`)])}},sentSmsFilterModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BZx0bWHe.js`)),__vite__mapDeps([279,1,2,3,4,5,6,7,8,9,10,24,278,89,280,37,38,39,281,277]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`filters.sentSmsModalTitle`,preloader:Z.fromConfig([Z.textRow(),Z.textRow()])}}
2,chooseAudioModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BWQV_0v1.js`)),__vite__mapDeps([282,1,2,3,4,5,6,7,8,9,10,24,37,38,39,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,91,92,93,94,95,96,97,98,283,101,102,176,177,178,179,11,180,182,284,285,286,287]),import.meta.url)),modalConfig:{size:`xLarge`,preloader:Z.forAbstractTable(),getTitle:e=>e.translations.title}},allContactListModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CWrbyS0A.js`)),__vite__mapDeps([288,1,2,3,4,5,6,7,8,9,10,24,37,38,39,57,58,59,60,91,63,19,20,21,64,92,93,94,95,34,96,97,98,174,101,176,177,178,179,11,180,28,182,289,290,27,291,253,49,50,254,292,146]),import.meta.url)),modalConfig:{size:`xLarge`,titleMessagePath:`entities.contactList.filterLists`,preloader:Z.forAbstractTable()}},selectingContacts:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Q0jwFIm3.js`)),__vite__mapDeps([293,4,2,1,3,5,6,7,8,9,10,106,37,38,39,89,107,108,109,294,36,295,20,91,63,19,21,64,92,93,94,95,34,96,97,98,176,177,178,179,11,180,28,60,182,296,297]),import.meta.url)),modalConfig:{size:`xLarge`,leftAsideWidth:c_,maxHeight:`100%`,overrideModalStyles:{height:`auto`},scrollable:!0,noFooter:!0,noHeaderBorderBottom:!0,withoutContentPadding:{vertical:!0},titleMessagePath:`selectingContactsModal.title`,preloader:Z.forTableWithServiceId(In,{leftControls:Z.twoActionsConstrolSkeletonConfig(),rightControls:Z.searchControlSkeletonConfig()})}},selectingContactsProgress:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Ds1Unji2.js`)),__vite__mapDeps([298,1,2,3,4,5,6,7,8,9,10,106,37,38,39,89,107,108,109,121]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`selectingContactsProgressModal.modalTitle`,preloader:Z.fromConfig([Z.box(``,`100%`,`146px`)])}},selectingContactsLists:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CiuiG0zT.js`)),__vite__mapDeps([299,1,2,3,4,5,6,7,8,9,10,294,36,295,20,91,63,19,21,64,92,93,94,95,34,96,97,98,176,177,178,179,11,180,28,60,182,296,109]),import.meta.url)),modalConfig:{exactSize:`1050px`,titleMessagePath:`selectingContactsListsModal.title`,noHeaderBorderBottom:!0,withoutContentPadding:{vertical:!0},preloader:Z.forTableWithServiceId(Nr,{leftControls:Z.twoActionsConstrolSkeletonConfig(),rightControls:Z.searchControlSkeletonConfig(),hasActions:!1})}},selectingSegments:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DTQUmL2L.js`)),__vite__mapDeps([300,1,2,3,4,5,6,7,8,9,10,294,36,295,20,91,63,19,21,64,92,93,94,95,34,96,97,98,176,177,178,179,11,180,28,60,182,296,109,301,251,27,116,302,303,273,24]),import.meta.url)),modules:[H.FilteredViews,H.Segments],modalConfig:{size:`xLarge`,titleMessagePath:`selectingSegmentsModal.title`,noHeaderBorderBottom:!0,withoutContentPadding:{vertical:!0},preloader:Z.forTableWithServiceId(Jn,{leftControls:Z.twoActionsConstrolSkeletonConfig(),rightControls:Z.searchControlSkeletonConfig()})}},customFieldsSchemaModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DDd0WHNI.js`)),__vite__mapDeps([304,1,2,3,4,5,6,7,8,9,10,305,20,114,75,19,16,17,18,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,306,307,193,308,309,310,11,311]),import.meta.url)),modules:[H.CustomFields],modalConfig:{size:`small`,titleMessagePath:({editingId:e})=>e?`customFieldModalUpdate.title`:`customFieldModalCreate.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.textRow(),Z.button(`120px`,`ml-auto`)])}},previewModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C63e_qG3.js`)),__vite__mapDeps([312,1,2,3,4,5,6,7,8,9,10,17,18,313,314,284,315,316,121]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`attachmentPreview.title`}},defaultSenderIdApplyModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CUYp4cMO.js`)),__vite__mapDeps([317,1,2,3,4,5,6,7,8,9,10,36,35,24,18,32,31,37,38,39,40,41,42,43,17,44,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,318,319,320,321,322,93]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`senderIdApplyModal.title`,preloader:Z.fromConfig([[Z.textRow(`150px`,`ml-auto mr-4 mt-3`),Z.input(`400px`)
2],Z.textRow(`400px`,`ml-auto mt-1`),Z.textRow(`400px`,`ml-auto mt-1`),[Z.textRow(`200px`,`ml-auto mr-4 mt-5`),{width:`400px`,height:`80px`,classes:`mt-3`}],Z.textRow(`400px`,`ml-auto mt-1`),Z.textRow(`400px`,`ml-auto mt-1`),[Z.textRow(`50px`,`ml-auto mr-4 mt-3`),Z.textRow(`400px`,` mt-3`)],Z.textRow(`400px`,`ml-auto mt-1`),[Z.box(`mt-8`,`50px`,`14px`),Z.button(`120px`,`mt-5 ml-auto`)]])}},auSenderIdApplyModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BkxQtXjX.js`)),__vite__mapDeps([323,1,2,3,4,5,6,7,8,9,10,116]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`auSenderIdApplyModal.title`}},allowedEmailsAddModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CVhac3Wn.js`)),__vite__mapDeps([324,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,265]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`allowedEmailsAddModal.title`,preloader:Z.fromConfig([{width:`100%`,height:`110px`,classes:`mb-1`},Z.textRow(),Z.textRow(`50px`,``)])}},allowedEmailsEditSettingsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./RVgJmyV7.js`)),__vite__mapDeps([325,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,326,327]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`allowedEmailsEditSettingsModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.textRow(`90px`,`my-4`),Z.checkboxRow(1,`50%`,`mb-5`,`mb-4 mr-2`),Z.checkboxRow(1,`50%`,`mb-5`,`mb-4 mr-2`),Z.checkboxRow(1,`50%`,`mb-5`,`mb-4 mr-2`),[Z.box(`mt-3`,`50px`,`14px`),Z.button(`120px`,`ml-auto`)]])}},messagesAttachmentFileModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BTBiyCT4.js`)),__vite__mapDeps([328,1,2,3,4,5,6,7,8,9,10,18,81,17,82,83,84,85,21,20,86,87,88,75,19,16,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,146]),import.meta.url)),modalConfig:{size:`medium`,getTitle:e=>{let t=Vu();return e.title||t.t(`messagesAttachmentFileModal.attachFile`)},preloader:Z.fromConfig([Z.box(`mb-6`,`100%`,`240px`),Z.textRow(`350px`,`mb-2`),Z.textRow(`100%`,`mb-2`),Z.textRow(`370px`,``)])}},messagesAttachmentFilePreviewModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Ciz5TVPT.js`)),__vite__mapDeps([329,1,2,3,4,5,6,7,8,9,10,17,18,330,47]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`messagesAttachmentFilePreviewModal.fileUploaded`}},messagesAttachmentSelectModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DvOGtV9m.js`)),__vite__mapDeps([331,1,2,3,4,5,6,7,8,9,10,17,18,81,82,83,84,85,21,20,86,87,88,238,116]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`messagesAttachmentFileModal.attachFile`,noFooter:!0,preloader:Z.fromConfig([[Z.box(``,`48%`,`200px`),Z.box(`ml-auto`,`48%`,`200px`)]])}},pointAiAttachmentModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DFnzrpNY.js`)),__vite__mapDeps([332,1,2,3,4,5,6,7,8,9,10,24,333,17,18,186,37,38,39,334,238,116]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`pointAiAttachmentModal.title`,preloader:Z.fromConfig([[Z.box(``,`48%`,`200px`),Z.box(`ml-auto`,`48%`,`200px`)]])}},pointAiAttachmentModalWebsite:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DNTlBzFC.js`)),__vite__mapDeps([335,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,333,186,334]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`pointAiAttachmentModal.websiteTitle`}},pointAiAttachmentModalDocument:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./ChB3nzO7.js`)),__vite__mapDeps([336,1,2,3,4,5,6,7,8,9,10,24,17,18,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,337,93,333,186,334,338,114]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`pointAiAttachmentModal.documentTitle`}},calendarModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CZK3qRHP.js`)),__vite__mapDeps([339,1,2,7,8,340,3,4,5,6,9,10,341,36,342,343,17,18,230,84,231,344,229,258,259,345,313,314,284,315,316,346,347,252,348,349,350,82,83,351,352,353,354,355,96]),import.meta.url)),modalConfig:{size:`xLarge`,titleMessagePath:`tmCalendarModal.title`,preloader:Z.forMonthlyCalendar(
2)}},calendarGroupModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BAL6zNK9.js`)),__vite__mapDeps([356,1,2,3,4,5,6,7,8,9,10,39,342,343,17,18,230,84,231,344,229,258,259,345,313,314,284,315,316,346,347,252,348,349,350,36,82,83,351,352,353,354,340,93]),import.meta.url)),modalConfig:{size:`medium`,noFooter:!0,preloader:Z.fromConfig([Z.box(``,void 0,`48px`),Z.box(`mt-3`,void 0,`48px`),Z.box(`mt-3`,void 0,`48px`),Z.box(`mt-3`,void 0,`48px`),Z.box(`mt-3`,void 0,`48px`)])}},messageDetailsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DHsabA5J.js`)),__vite__mapDeps([357,1,2,3,4,5,6,7,8,9,10,358,359,17,18,360,361,24,60,362,107,108,140,20,37,38,39,41,141,142,346,84,229,363,343,230,231,344,258,259,345,313,314,284,315,316,347,252,364,106,89,109,90,365,121,366,367,368,369,93,116,276,277,370,371,372,32,31,77,373,374,375,280,281,376,377,378,130,379,28,34,380,36,212,381,382,383,384,385,386,387,388,283,101,389,11,390,391]),import.meta.url)),modules:[H.HistoryInboundCalls,H.HistoryReceivedSms,H.HistoryOutboundCalls,H.WhatsApp,H.Facebook,H.Instagram],resolvers:[{service:`ChatMessageResolverService`,params:{source:`messageDetailsModal`}}],modalConfig:{size:`large`,titleMessagePath:e=>{switch(e.modelType){case fg:return`pageTitle.user.history.sentSmsDetails`;case ya:return`pageTitle.user.history.receivedSmsDetails`;case ri:return`pageTitle.user.history.inboundCallDetails`;case oa:return`pageTitle.user.history.outboundCallDetails`;default:return`pageTabTitle.user.history.messageDetails`}},preloader:{content:s_},noFooter:!0}},contactNotesModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CHfsh4nH.js`)),__vite__mapDeps([392,1,2,3,4,5,6,7,8,9,10,17,18,393,24,186,37,38,39,394,395,361,60,337,93,396,96,397,11,398,399,400,36,401,402,58,59,403,404,105,405,406,407,408,212,409,410,32,31,106,89,107,108,109,411,86,88,157,158,47,208,154,155,412,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,35,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,61,62,63,64,65,66,67,68,69,70,71,76,77,78,413,114,414,116]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`contactNotes.notesFor`,preloader:Z.fromConfig([{width:`150px`,height:`36px`,classes:`mb-2`},{width:`100%`,height:`125px`}])}},chatsNotificationsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DopnQW3w.js`)),__vite__mapDeps([415,1,2,3,4,5,6,7,8,9,10,416,24,32,31,59,106,37,38,39,89,107,108,109,257,417,36,256,258,17,18,259,84,229,334,366,373,418,419,401,402,58,403,404,105,405,186,406,407,420,219,421,422,252]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`entities.chat.message.actions.chatNotifications`,preloader:{content:mm,props:{config:[{width:`100%`,height:`20px`,classes:`mb-5`},{width:`100%`,height:`20px`,classes:`mb-5`},{width:`100%`,height:`20px`,classes:`mb-5`},{width:`100%`,height:`20px`,classes:`mb-5`},{width:`100%`,height:`20px`}]}}}},chatConversationSenderSettingsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CPDbrB6k.js`)),__vite__mapDeps([423,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`entities.chat.message.actions.senderSettings`,preloader:{content:mm,props:{config:[{width:`100%`,height:`36px`,classes:`mb-2`}]}}}},chatFiltersSet:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bt6dC1xc.js`)),__vite__mapDeps([424,1,2,3,4,5,6,7,8,9,10,24,191,121,192,193,60,425,20,61,19,21,62,63,64,66,29,67,426,190,16,17,18,22,23,25,26,27,28,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,65,68,69,70,71,194,195,215,11,427,428,416,106,89,107,108,109,257,417,256,258,259,84,229,334,366,373,418,419,401,402,403,404,105,405,186,406,407,420,219,421,429,124,96,430]),import.meta.url)),resolvers:[{service:`ChatCustomFilteredViewResolverService`}],modalConfig:{size:`small`,noFooter:!0,titleMessagePath:`entities.chat.filtersSet.filterChats`,preloader:Z.fromConfig([Z.button(`436px`,`mt-1`),Z.button(`436px`,`mt-1`),Z.button(`436px`,`mt-1`),Z.button(`436px`,`mt-1`)])}},scheduledMessageModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./D4-SKvr2.js`)),__vite__mapDeps([431,1,2,3,4,5,6,7,8,9,10,432,24,59,140,20,37,38,39,41,141,142,281,375,433,434,435,36,121,436,360,361,60,362,381,31,343,17,18,230,84,231,344,229,258,259,345,313,314,284,315,316,346,347,252,372,32,77,161,44,437,106,89,107,108,109,369,93,438,368,114,386,28,353]),import.meta.url)),modules:[H.SenderSettingsCountries,H.SentSmsBase,H.Recipient,H.Scheduled,H.Compose,H.Templates,H.Labels],modalConfig:{size:`xLarge`,titleMessagePath:`scheduledMessageModal.title`,preloader:{content:Yg}}},composePreviewModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./eirT8eVA.js`)),__vite__mapDeps([439,1,2,3,4,5,6,7,8,9,10,358,359,17,18,36,32,31,81,82,83,84,85,21,20,86,87,88,106,37,38,39,89,107,108,109,319,320,78,344,229,258,259,345,313,314,284,315,316,346,347,364,90,365,121,366,367,368,24,369,93,116,440,374,77,441]),import.meta.url)),modalConfig:{size:`large`,preloader:Z.detailsTableSkeleton()}},importMatchingFullscreenModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BxPxsv2J.js`)),__vite__mapDeps([442,1,2,3,4,5,6,7,8,9,10,443,24,36,295,20,444,68,19,21,69,70,44,92,93,60]),import.meta.url)),modalConfig:{titleMessagePath:`importMatchingFullscreenModal.title`,size:`full`,preloader:Z.forAbstractTable()}},importMatchingCountryModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BfmKneE1.js`)),__vite__mapDeps([445,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,443,295]),import.meta.url)),modalConfig:{titleMessagePath:`importMatchingCountryModal.title`,size:`small`,preloader:Z.fromConfig([Z.box(`mb-5`,void 0,`100px`),Z.labeledInput(),Z.labeledInput()])}},twoFaEditIpAddressesModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CIOek0_z.js`)),__vite__mapDeps([446,1,2,3,4,5,6,7,8,9,10,35,24,18,36,32,31,37,38,39,40,41,42,43,17,44,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:`accountSecurityTwoFaEditIpAddressesModal.title`,size:`medium`,preloader:Z.fromConfig([Z.box(`mt-2`,`100%`,`112px`),Z.textRow(`90%`,`mt-1`),Z.textRow(`90%`,`mt-1`),Z.button(`120px`,`mt-4 ml-auto`)])}},passwordResetModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./1WoTWxDp.js`)),__vite__mapDeps([447,1,2,3,4,5,6,7,8,9,10,32,31,35,24,18,36,37,38,39,40,41,42,43,17,44]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`accountSecurityPasswordResetModal.title`,preloader:Z.fromConfig([Z.textRow(`100%`),Z.button(`120px`,`mt-4 ml-auto`)])}},passwordChangeModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Dpv-JfKz.js`)),__vite__mapDeps([448,1,2,3,4,5,6,7,8,9,10,32,31,35,24,18,36,37,38,39,40,41,42,43,17,44,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,240,449,96]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`accountSecurityPasswordChangeModal.title`,preloader:Z.fromConfig([Z.labeledInputs(4),Z.button(`120px`,`mt-4 ml-auto`)])}},phoneVerificationModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./McKmrgrr.js`)),__vite__mapDeps([450,1,2,3,4,5,6,7,8,9,10,36,35,24,18,32,31,37,38,39,40,41,42,43,17,44,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,11]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`phoneVerificationModal.title`,noFooter:!0,preloader:Z.fromConfig([Z.headline16Row(`60%`,`ml-auto mr-auto mt-0`),Z.headlineXlFontRow(`55%`,`mt-2 ml-auto mr-auto mb-3`),[Z.box(`ml-auto mr-3`,`52px`,`56px`),Z.box(`mr-3`,`52px`,`56px`),Z.box(`mr-10`,`52px`,`56px`),Z.box(`mr-3`,`52px`,`56px`),Z.box(`mr-3`,`52px`,`56px`),Z.box(`mr-auto`,`52px`,`56px`)],Z.box(`mt-7 mx-auto`,`92%`,`40px`),Z.textRow(`55%`,`mt-6 mx-auto`),Z.textRow(`35%`,`mt-7 mx-auto`)])}},inviteSubAccountModal:{type:`modal`,modules:[H.SubAccounts],component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BkxMnyuv.js`)),__vite__mapDeps([451,1,2,3,4,5,6,7,8,9,10,25,35,24,18,36,32,31,37,38,39,40,41,42,43,17,44,75,19,16,20,21,22,23,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,452,306]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:({titleMessagePath:e})=>e,preloader:Z.fromConfig([Z.labeledInput(`150px`,`mt-1 mb-1`),Z.box(`mb-3`,`70%`,`14px`),Z.textRow(`100px`,`mb-5`),Z.textRow(`40px`,`mb-3`),Z.radioTitleAndText(1,`50%`,`mb-5`),Z.radioTitleAndText(1)])}},resendInvitationSubAccountModal:{type:`modal`,modules:[H.SubAccountsForm],component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CKTG_PKY.js`)),__vite__mapDeps([453,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`resendInvitationSubAccountModal.title`,preloader:Z.fromConfig([Z.textRows(2,`90%`,`mb-4`),Z.labeledInput(`100px`)])}},closeAccountModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DtqWCeYD.js`)),__vite__mapDeps([454,1,2,3,4,5,6,7,8,9,10,35,24,18,36,32,31,37,38,39,40,41,42,43,17,44,58,59,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`closeAccountModal.title`,preloader:Z.confirmationCheckboxSkeleton(6)}},closeSubAccountModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./JVoty41Q.js`)),__vite__mapDeps([455,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`closeSubAccountModal.title`,preloader:Z.confirmationCheckboxSkeleton(1)}},switchSubAccountModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CyTDDz4P.js`)),__vite__mapDeps([456,1,2,3,4,5,6,7,8,9,10,24,37,38,39,35,18,36,32,31,40,41,42,43,17,44,457,91,63,19,20,21,64,92,93,94,95,34,96,97,98,101,171,172,213,214,109,102,27,28,173,174,175,176,177,178,179,11,180,60]),import.meta.url)),modules:[H.AccountSettings,H.SubAccounts],modalConfig:{size:`xLarge`,titleMessagePath:`switchSubAccountModal.title`,noFooter:!0}},billingDetailsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CIdEEt_T.js`)),__vite__mapDeps([458,1,2,3,4,5,6,7,8,9,10,35,24,18,36,32,31,37,38,39,40,41,42,43,17,44,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modules:[H.GoogleServices],modalConfig:{size:`small`,titleMessagePath:`billingDetailsEditModal.title`,preloader:Z.fromConfig([Z.labeledInputs(8)])}},scheduledRetryModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DBA5LaHx.js`)),__vite__mapDeps([459,1,2,3,4,5,6,7,8,9,10,36,32,31,28]),import.meta.url)),modalConfig:{size:`small`,getTitle:({messageIds:e})=>Vu().tc(`scheduledRetryModal.title`,e.length),preloader:Z.fromConfig([[Z.box(void 0,void 0,`60
2px`)]])}},sentSmsBulkDetailsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Ce2jRhTo.js`)),__vite__mapDeps([460,1,2,3,4,5,6,7,8,9,10,358,359,17,18,366,364,106,37,38,39,89,107,108,109,90,365,121,367,368,24,369,93,116,370,258,259,84,229,343,230,231,344,345,313,314,284,315,316,346,347,252,371,377,378,130,379,28,34,372,32,31,77,280,281,277,461,376,380,36,212,381,382,383,384,462,373,375,11]),import.meta.url)),modalConfig:{size:`large`,noFooter:!0,titleMessagePath:`sentSmsBulkDetailsModal.title`,preloader:Z.detailsTableSkeleton()},resolvers:[{service:`SentSmsBulkDetailsModalResolverService`,params:{source:`sentSmsBulkDetailsModal`}}]},auditLogsEventSummaryModal:{type:`modal`,modules:[H.AuditLogs],component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BUe3NXIw.js`)),__vite__mapDeps([463,4,2,1,3,5,6,7,8,9,10,358,359,24,31,174,101,283,172,281,464,32,182,465]),import.meta.url)),modalConfig:{size:`xLarge`,noFooter:!0,titleMessagePath:`auditLogsEventSummaryModal.title`,preloader:Z.detailsTableSkeleton()}},subAccountsImportDetailsFailedModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./D5fiwYxh.js`)),__vite__mapDeps([466,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,242,262]),import.meta.url)),modalConfig:{titleMessagePath:`subAccountsImportDetailsFailedModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInputs(4),Z.textRow(`50px`,`mt-5 mb-3`),Z.radioTitleAndText(1,`75%`,`mb-5`),Z.radioTitleAndText(1,`80%`)])}},senderSettingsCountriesEditDefaultSenderModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CMwhuSyv.js`)),__vite__mapDeps([467,1,2,3,4,5,6,7,8,9,10,20,36,69,70,124,96,468,37,38,39,125,116,126,34]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`senderSettingsCountriesEditDefaultSenderModal.title`,preloader:Z.fromConfig([Z.input(),Z.textRow(`250px`,`my-7`),Z.textRow(`135px`,`mb-1`),Z.textRow(`200px`,`my-2`),Z.textRow(`235px`,`my-2`),Z.textRow(`210px`,`my-2`),Z.textRow(`2260px`,`my-2`),Z.textRow(`220px`,`my-2`),Z.textRow(`205px`,`my-2`),Z.textRow(`235px`,`my-2`)])}},accountSsoDetailsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DgLsyqrt.js`)),__vite__mapDeps([469,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:`accountSsoDetailsModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInputs(),Z.textRow(`150px`),Z.box(`mt-1`,`100%`,`150px`),Z.textRow(`100px`,`mt-7 mb-3`),Z.radioTitleAndText(1,`60%`,`mb-5`),Z.radioTitleAndText(2,`60px`)])}},accountSecurityLoginsHistoryModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CsLAyzO0.js`)),__vite__mapDeps([470,1,2,3,4,5,6,7,8,9,10,35,24,18,36,32,31,37,38,39,40,41,42,43,17,44,471,91,63,19,20,21,64,92,93,94,95,34,96,97,98,99,100,27,28,101,174,283]),import.meta.url)),modalConfig:{size:`xLarge`,noFooter:!0,titleMessagePath:`accountSecurityLoginsHistoryModal.title`,preloader:Z.forAbstractTable({showHeader:!1,hideCheckboxes:!0})}},apiV2KeysCreateModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Cv0w0Azn.js`)),__vite__mapDeps([472,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`apiV2KeysCreateModal.title`,preloader:Z.fromConfig([{width:`50px`,height:`16px`,classes:`mb-1`},{width:`100%`,height:`36px`}])}},apiV1KeyModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C3sb4LYb.js`)),__vite__mapDeps([473,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,474]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`apiV1KeyModal.title`,preloader:Z.fromConfig([{width:`150px`,height:`16px`,classes:`mb-1`},{width:`100%`,height:`36px`}])}},apiV1UrlTestModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./TWJlQlJ0.js`)),__vite__mapDeps([475,1,2,3,4,5,6,7,8,9,10,24,476]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`apiUrlTestModal.loadingTitle`,preloader:Z.fromConfig([Z.textRows(4),Z.textRow(`100%`,``)])}},apiV2UrlTestModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B7ZTWPP8.js`)),__vite__mapDeps([477,1,2,3,4,5,6,7,8,9,10,24,476]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`apiUrlTestModal.loadingTitle`,preloader:Z.fromConfig([Z.textRows(4),Z.textRow(`100%`,``)])}},billingAutoRechargeSettingsEditModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./FqiDHFTz.js`)),__vite__mapDeps([478,4,2,1,3,5,6,7,8,9,10,32,31,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,479,480]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`billingAutoRechargeSettingsEditModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput(),Z.labeledInput(`180px`)])}},billingConfirmPlanDowngradeModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CP8z3IIx.js`)),__vite__mapDeps([481,1,2,3,4,5,6,7,8,9,10,36,32,31,479,480,482]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`billingConfirmPlanDowngradeModal.title`,preloader:Z.confirmationCheckboxSkeleton(3)}},billingConfirmDowngradeToPayAsYouGoModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bw8B6pKl.js`)),__vite__mapDeps([483,1,2,3,4,5,6,7,8,9,10,36,32,31,90,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,479,480]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`billingConfirmDowngradeToPayAsYouGoModal.title`,preloader:Z.confirmationCheckboxSkeleton(4)}},keywordsAddModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./NABqSP4v.js`)),__vite__mapDeps([484,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,485,146]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`keywordsAddModal.title`,preloader:Z.fromConfig([Z.labeledInput(`150px`,`mb-1`),Z.textRow(`60%`,``)])}}
2,emailLookupDetailsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BX-hVE62.js`)),__vite__mapDeps([486,1,2,3,4,5,6,7,8,9,10,24,487,36,32,31,295,20,318,319,320,488,489,358,359,106,37,38,39,89,107,108,109,350,17,18,82,83,84,349,351,352]),import.meta.url)),modalConfig:{size:`xLarge`,titleMessagePath:`emailLookupDetailsModal.title`,noFooter:!0,preloader:{content:um}}},carrierLookupDetailsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./D1NSaYIp.js`)),__vite__mapDeps([490,1,2,3,4,5,6,7,8,9,10,24,491,36,32,31,295,20,492,318,319,320,493,358,359,106,37,38,39,89,107,108,109]),import.meta.url)),modalConfig:{size:`xLarge`,titleMessagePath:`carrierLookupDetailsModal.title`,noFooter:!0,preloader:{content:um}}},tenDlcSwitchTollFreeModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CAuE0ezk.js`)),__vite__mapDeps([494,1,2,3,4,5,6,7,8,9,10,131,20,36,42]),import.meta.url)),modalConfig:{size:`small`,preloader:Z.fromConfig([Z.textRow(`90%`),Z.textRow(`100%`),Z.textRow(`70%`),[Z.box(`mt-8`,`50px`,`14px`),Z.button(`120px`,`mt-5 ml-auto`)]])}},tenDlcTollFreeConsentDisclosureModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DAUeTMrX.js`)),__vite__mapDeps([495,1,2,3,4,5,6,7,8,9,10,130,18,28]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`tenDlcTollFreeConsentDisclosureModal.title`,noFooter:!0,preloader:Z.fromConfig([Z.textRow(`100%`),Z.textRow(`40%`,`mt-6 mb-1`),Z.textRow(`80%`,`ml-6`),Z.textRow(`100%`,`ml-6 mt-1`),Z.textRow(`90%`,`ml-6 mt-1`),Z.textRow(`40%`,`mt-6 mb-1`),Z.textRow(`80%`,`ml-6`),Z.textRow(`100%`,`ml-6 mt-1`),Z.textRow(`90%`,`ml-6 mt-1`),Z.textRow(`90%`,`ml-6 mt-1`),Z.textRow(`40%`,`mt-6 mb-1`),Z.textRow(`80%`,`ml-6`),Z.textRow(`100%`,`ml-6 mt-1`),Z.textRow(`40%`,`mt-6 mb-1`),Z.textRow(`80%`,`ml-6`),Z.textRow(`100%`,`ml-6 mt-1`),Z.textRow(`90%`,`ml-6 mt-1`)])}},tenDlcSelectCampaignDetailsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CrcWtjbP.js`)),__vite__mapDeps([496,1,2,131,4,3,5,6,7,8,9,10,20,36,42,497,358,359,174,101,498,499,116,93,500]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`tenDlcSelectCampaignDetailsModal.title`,preloader:{content:vg}}},tenDlcBrandDetailsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DdVR3Pz8.js`)),__vite__mapDeps([501,1,2,3,4,5,6,7,8,9,10,358,359,502,174,101,44]),import.meta.url)),modalConfig:{noFooter:!0,size:`large`,titleMessagePath:`tenDlcBrandDetailsModal.title`,preloader:{content:xg}}},tenDlcLinkNumberModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Cw0eGT1J.js`)),__vite__mapDeps([503,1,2,3,4,5,6,7,8,9,10,36,37,38,39,499,116,504,91,63,19,20,21,64,92,93,94,95,34,96,97,98,214,109,176,177,178,179,11,180,28,60,182,131,42,505,27,174,101,102,506,229,17,18,84,500,252]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`tenDlcLinkNumberModal.title`}},tollFreeFormModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BLij1S53.js`)),__vite__mapDeps([507,1,2,3,4,5,6,7,8,9,10,358,359,36,508,96,498,499,116,93]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`tollFreeFormModal.title`,noFooter:!0,preloader:{content:vg}}},paymentPricingCalculatorModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BwG0amZs.js`)),__vite__mapDeps([509,1,2,3,4,5,6,7,8,9,10,36,32,31,66,19,20,21,29,67,320,92,93,510,511,52,68,69,70,44,512,28,252]),import.meta.url)),modules:[H.Payment],modalConfig:{exactSize:`800px`,titleMessagePath:`paymentPricingCalculatorModal.title`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(`200px`,`mb-8`),[Z.textRow(`150px`,`mr-auto`),Z.textRow(`100px`,`mr-auto ml-16`),Z.textRow(`80px`,`mr-auto`),Z.textRow(`40px`,`mr-auto mb-1`)],Z.horizontalLine(),[Z.input(`215px`,`ml-4`),Z.textRow(`50px`,`ml-8 mt-3 mr-16`),Z.input(`120px`,`ml-2`),Z.textRow(`60px`,`ml-8 mt-3 mr-2`)],Z.horizontalLine(),[Z.textRow(`180px`,`ml-4 mr-auto mt-1`),Z.textRow(`70px`,`mt-1 mr-5`),Z.textRow(`80px`,`mt-1 mr-8`)]])}},byocPhoneLabelModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C614_HYG.js`)),__vite__mapDeps([513,1,2,3,4,5,6,7,8,9,10,514,17,18,37,38,39,515,516,152,75,19,16,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:({editingId:e})=>e?`tmNumberLabelModal.editTitle`:`tmNumberLabelModal.createTitle`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},byocCarrierLabelModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B-jwg_u5.js`)),__vite__mapDeps([517,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,515,514,516]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`byocCarrierLabelModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},byocCarrierLinkModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./QCyQ1GL1.js`)),__vite__mapDeps([518,1,2,3,4,5,6,7,8,9,10,36,91,63,19,20,21,64,92,93,94,95,34,96,97,98,174,101,516,515,514,17,18,37,38,39,519,100,27,28,520,49,50,521,146,522,285,44]),import.meta.url)),modalConfig:{size:`xLarge`,titleMessagePath:`byocCarrierLinkModal.title`,preloader:Z.forAbstractTable()},resolvers:[{service:`ByocCarrierLinkModalResolver`}]},byocCredentialsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CHviUcZZ.js`)),__vite__mapDeps([523,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,515,514,516]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`byocCredentialsModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},byocCredentialsSinchModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DxC7LeQc.js`)),__vite__mapDeps([524,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,515,514,516]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`byocCredentialsSinchModal.title`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},byocSinchCallbackModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Dh1-cht_.js`)),__vite__mapDeps([525,1,2,3,4,5,6,7,8,9,10,379,121,514,17,18,37,38,39,515,516,526,105,93,96]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`byocSinchCallbackModal.title`}},messagesBulksProgressModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BE8IY8gt.js`)),__vite__mapDeps([527,1,2,3,4,5,6,7,8,9,10,358,359,32,31,528,81,17,18,82,83,84,85,21,20,86,87,88,319,320,36,230,231,77]),import.meta.url)),modalConfig:{exactSize:`800px`}},contactImportResultModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Lna5OnNw.js`)),__vite__mapDeps([529,1,2,3,4,5,6,7,8,9,10,24,36,106,37,38,39,89,107,108,109,260,25,75,19,16,17,18,20,21,22,23,26,27,28,29,30,31,32,33,34,35,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,261,262,530]),import.meta.url)),modalConfig:{size:`medium`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput(),Z.labeledInput(),Z.labeledInput(),Z.labeledInput(),Z.labeledInput()])}},editVerifyingEmailModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DeKLRoyl.js`)),__vite__mapDeps([531,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,532,93]),import.meta.url)),modalConfig:{titleMessagePath:`editVerifyingEmailModal.title`,size:`small`,preloader:Z.textWithLabeledInput()}},emailVerificationModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./wKftdA2l.js`)),__vite__mapDeps([533,1,2,3,4,5,6,7,8,9,10,36,240,24,534,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,535,11,536,116]),import.meta.url)),modules:[H.Auth],modalConfig:{titleMessagePath:`emailVerificationModal.title`,size:`small`,noFooter:!0}},passwordVerificationModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CAxhOFCo.js`)),__vite__mapDeps([537,1,2,3,4,5,6,7,8,9,10,36,240,24,534,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,535,11,536,116]),import.meta.url)),modules:[H.Auth],modalConfig:{titleMessagePath:`passwordVerificationModal.title`,size:`small`,noFooter:!0}},accountBalanceCriticallyLowModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./FgBOWsG9.js`)),__vite__mapDeps([538,1,2,3,4,5,6,7,8,9,10,32,31,35,24,18,36,37,38,39,40,41,42,43,17,44,319,320]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`accountBalanceCriticallyLowModal.title`,preloader:Z.fromConfig([Z.textRows(3,`50%`),Z.button(`60%`,`mt-4`)])}},marketingDataModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BnW5Cjft.js`)),__vite__mapDeps([539,1,2,3,4,5,6,7,8,9,10,36,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,540]),import.meta.url)),modalConfig:{size:`small`,keepAliveOnRouteChange:!0,preloader:Z.fromConfig([Z.textRow(`80%`,`mb-4`),Z.labeledInput(`150px`,`mb-3`),Z.labeledInput(`180px`,`mb-3`),Z.labeledInput(`200px`,`mb-3`)])}},upgradeAccountModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./65dwAlAw.js`)),__vite__mapDeps([541,1,2,3,4,5,6,7,8,9,10,24,35,18,36,32,31,37,38,39,40,41,42,43,17,44,320,60]),import.meta.url)),modalConfig:{size:`large`,noHeader:!0,noFooter:!0,preloader:Z.fromConfig([Z.box(`mx-auto mt-4`,`70px`,`70px`),Z.headlineXlFontRow(`80%`,`mt-5 mb-6 mx-auto`),Z.textRow(`60%`,`mx-auto mb-2`),Z.textRow(`50%`,`mx-auto mb-6`),Z.button(`120px`,`mx-auto`)])}},subscribeCreateModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./icIKXX7t.js`)),__vite__mapDeps([542,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,543,295]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`subscribeCreateModal.title`}},subscribeRenameModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./D4wE7_nO.js`)),__vite__mapDeps([544,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,543,295]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`subscribeRenameModal.title`}},subscribeDuplicateModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./xctrF5Mf.js`)),__vite__mapDeps([545,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,543,295]),import.meta.url)),resolvers:[{service:`SingleModelResolverService`,params:{model:qi,source:`subscribeDuplicateModal`,requestParam:`editingId`}}],modalConfig:{size:`small`,titleMessagePath:`subscribeDuplicateModal.title`,preloader:Z.fromConfig([Z.labeledInput(`80px`),Z.button(`120px`,`mt-6 ml-auto`)])}},monthlyPlansSection:{type:`section`,resolvers:[{service:`ModelSettingsResolverService`,params:{model:mg,cache:!1}}]}
2,selectTaskBoardTemplateModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BssVDLUb.js`)),__vite__mapDeps([546,1,2,401,3,4,5,6,7,8,9,10,547,47,548]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`tasksModals.selectTaskBoardTemplate.title`}},previewKanbanBoardTemplateModal:{type:`modal`,modules:[H.Kanban],component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Cjx0Jm_9.js`)),__vite__mapDeps([549,1,2,3,4,5,6,7,8,9,10,548,28]),import.meta.url)),modalConfig:{size:`xLarge`}},createTaskBoardTemplateModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./ClBa-S_6.js`)),__vite__mapDeps([550,1,2,3,4,5,6,7,8,9,10,24,36,403,17,18,401,404,402,37,38,39,58,59,105,405,186,406,407,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,551,109,11]),import.meta.url)),modalConfig:{titleMessagePath:e=>e.editingId?`tasksModals.createTaskBoardTemplate.editTitle`:`tasksModals.createTaskBoardTemplate.createTitle`,size:`small`}},taskStageModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BUHWtVmj.js`)),__vite__mapDeps([552,1,2,3,4,5,6,7,8,9,10,24,403,17,18,36,401,404,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:e=>e.editingId?`tasksModals.editTaskStage.editTitle`:`tasksModals.editTaskStage.createTitle`,size:`small`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},createTaskModal:{type:`modal`,modules:[H.TasksBase,H.Tasks],component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CwqVBaG7.js`)),__vite__mapDeps([553,1,2,3,4,5,6,7,8,9,10,403,24,17,18,36,401,404,400,402,37,38,39,58,59,105,405,186,406,407,408,212,409,410,32,31,106,89,107,108,109,411,86,88,157,158,47,208,154,155,412,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,35,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,419,554,555,394,556,557,116]),import.meta.url)),modalConfig:{titleMessagePath:`createTaskModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInput(),Z.textRow(`100%`,`mt-2 mb-1`),Z.box(`mb-4`,`100%`,`80px`),Z.labeledInputs(2),Z.button(`120px`,`mt-4 ml-auto`)])}},taskViewModal:{type:`modal`,modules:[H.Kanban,H.Automations],component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BlXdpcKC.js`)),__vite__mapDeps([558,4,2,1,3,5,6,7,8,9,10,24,31,36,32,85,21,20,86,87,88,17,18,403,401,404,402,37,38,39,58,59,105,405,186,406,407,212,75,19,16,22,23,25,26,27,28,29,30,33,34,35,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,178,179,93,11,182,559,109,554,560,90,78,337,396,96,384,561,338,562,563,121,564,565,566,567]),import.meta.url)),modalConfig:{size:`xLarge`,alignTop:!0,noFooter:!0,preloader:!1},resolvers:[{service:`TaskViewModalResolverService`},{service:`TaskCommentSubscriptionResolverService`},{service:`TaskChecklistResolverService`}]},taskMoveAllModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./ByYqX41A.js`)),__vite__mapDeps([568,1,2,3,4,5,6,7,8,9,10,24,403,17,18,36,401,404,402,37,38,39,58,59,105,405,186,406,407,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:`tasksModals.moveAllTasks.title`,size:`small`}},taskBoardsArchiveModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BeI6pmwh.js`)),__vite__mapDeps([569,1,2,3,4,5,6,7,8,9,10,403,24,17,18,36,401,404]),import.meta.url)),modalConfig:{titleMessagePath:({isArchived:e})=>e?`tasksModals.archiveBoardModal.unarchive`:`tasksModals.archiveBoardModal.archive`,size:`small`}},taskStageDeleteModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C7jYiIVE.js`)),__vite__mapDeps([570,1,2,3,4,5,6,7,8,9,10,24,403,17,18,36,401,404,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:`tasksModals.deleteTaskStage.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInput()])}},taskBoardsMenuSection:{type:`section`,resolvers:[{service:`TaskBoardsSidebarResolver`}],modules:[H.TasksBase]}
2,sidebarTaskBoardsMenuSection:{type:`section`,resolvers:[{service:`TaskBoardsSidebarResolver`}],modules:[H.TasksBase,H.Tasks]},taskBoardKanbanSection:{type:`section`},closeUserAccountModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DHQtVhqT.js`)),__vite__mapDeps([571,1,2,3,4,5,6,7,8,9,10,36,35,24,18,32,31,37,38,39,40,41,42,43,17,44,146]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`usersCloseAccountModal.title`}},pinnedContactsSection:{type:`section`,modules:[H.PinnedContacts],resolvers:[{service:`PinnedContactsResolverService`}]},addNewPinnedContactsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./PkoSox-Q.js`)),__vite__mapDeps([572,1,2,3,4,5,6,7,8,9,10,24,81,17,18,82,83,84,85,21,20,86,87,88,106,37,38,39,89,107,108,109,75,19,16,22,23,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,110,111,112]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`contacts.addPinnedItemModal.title`,preloader:Z.fromConfig([Z.textRow(`130px`,`mb-2`),Z.box(``,`100%`,`120px`),Z.button(`120px`,`mt-6 ml-auto`)])}},webWidgetModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B9M3WFvS.js`)),__vite__mapDeps([573,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:({editingId:e})=>e?`addWebWidgetModal.editTitle`:`addWebWidgetModal.title`,preloader:Z.fromConfig([Z.labeledInput(`80px`),Z.button(`120px`,`mt-6 ml-auto`)])}},copyWebWidgetModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./eiIRcv4N.js`)),__vite__mapDeps([574,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`webWidgetDuplicateModal.title`,preloader:Z.fromConfig([Z.labeledInput(`80px`),Z.button(`120px`,`mt-6 ml-auto`)])}},sendWidgetInstructionsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./ClBkzm7B.js`)),__vite__mapDeps([575,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`webWidgetSendInstructionsModal.title`,preloader:Z.fromConfig([Z.textRows(2,`70%`,`mb-4`),Z.labeledInput(`80px`),Z.button(`120px`,`mt-6 ml-auto`)])}},billingBuyPrepaidCreditModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DA4QF27-.js`)),__vite__mapDeps([576,1,2,3,4,5,6,7,8,9,10,32,31,35,24,18,36,37,38,39,40,41,42,43,17,44,185,90,320,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,479,480,577]),import.meta.url)),modules:[H.StripeBilling,H.Billing,H.BillingBase],modalConfig:{size:`small`,titleMessagePath:`buyPrepaidCreditModal.title`,preloader:Z.fromConfig([Z.textRow(`65%`,`mt-7 mb-5`),Z.labeledInput(`150px`,`mb-3`),Z.textRow(`70%`,`mb-15`),Z.
2checkboxRow(1,`70%`,`mb-3`,`mr-2 border-radius-100`),Z.checkboxRow(1,`50%`,`mb-3`,`mr-2 border-radius-100`),Z.checkboxRow(2,`45%`,``,`mr-2 border-radius-100`)])}},stripeBillingFetchPaygPrices:{type:`section`,resolvers:[{service:`ModelResolver`,params:[Cg]},{service:`LastInvoiceResolverService`}]},whatsAppViewQrCodeModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Dg9pdl13.js`)),__vite__mapDeps([578,1,2,3,4,5,6,7,8,9,10,24,17,18,379,121,105,579,116,28]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`whatsapp.viewQRCodeModal.title`}},taskChecklistItemEdit:{type:`section`},taskChecklistNameEdit:{type:`section`},tenDlcTollFreeOptInScreenshotExampleModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CFbAbVf2.js`)),__vite__mapDeps([580,1,2,7,8,9,28]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`tenDlcTollFreeOptInScreenshotExampleModal.title`,noFooter:!0,preloader:Z.fromConfig([Z.textRow(`100%`),Z.textRow(`95%`),Z.box(`mt-6 mb-1`,`100%`,`453px`)])}},taskViewModalTopBarDueDateModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DMlthTA5.js`)),__vite__mapDeps([581,1,2,3,4,5,6,7,8,9,10,406,562,563,19,20,121,564,146]),import.meta.url)),modalConfig:{exactSize:`290px`,titleMessagePath:`taskViewModalTopBarDueDateModal.title`,withoutContentPadding:!0}},chatAssignModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BIg64QSs.js`)),__vite__mapDeps([582,4,2,1,3,5,6,7,8,9,10,32,31,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,416,106,89,107,108,109,257,417,256,258,259,84,229,334,366,373,418,419,401,402,403,404,105,405,186,406,407,420,219,421,121]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:e=>e.isSingleChat?`chatAssignModal.titleForSingleChat`:`chatAssignModal.title`,preloader:Z.fromConfig([Z.textRow(`100%`),Z.textRow(`95%`),[[Z.textRow(`150px`,`mt-4`)],[Z.input(`100%`,`mt-1`)]]])}},chatRejectModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./nw2hz-On.js`)),__vite__mapDeps([583,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,416,106,89,107,108,109,257,417,256,258,259,84,229,334,366,373,418,419,401,402,403,404,105,405,186,406,407,420,219,421]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`chatRejectModal.title`,preloader:Z.fromConfig([Z.textRow(`100%`),Z.textRow(`30%`),[[Z.textRow(`209px`,`mt-4`)],[Z.box(`mt-2 mb-5`,`100%`,`80px`)]],[Z.box(`mr-2 mb-5`,`20px`,`19px`),Z.textRow(`100%`,`mt-1`)],[Z.box(`mr-2 mb-5`,`20px`,`19px`),Z.textRow(`70%`,`mt-1`)]])}},chatAddNoteModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./B0pp1U0q.js`)),__vite__mapDeps([584,1,2,3,4,5,6,7,8,9,10,416,24,32,31,59,106,37,38,39,89,107,108,109,257,417,36,256,258,17,18,259,84,229,334,366,373,418,419,401,402,58,403,404,105,405,186,406,407,420,219,421,585,130,26,19,20,21,27,28,29,23,25,30,33,34,35,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,82,83,86,85,87,88,81,140,141,142,75,16,22,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,413,394,395,361,337,93,396,96,397,156,157,158,145,11,159,160,345,313,161,586,587,588,119,162,589,121,163,333,143,144,111,590,164,591,592,330,138,593]),import.meta.url)),resolvers:[{service:`ChatSettingsResolverService`}],modalConfig:{size:`medium`,titleMessagePath:`chatAddNoteModal.title`,noHeader:!0,noFooter:!0,overrideModalStyles:{backgroundColor:` #FFF7DB`},preloader:Z.fromConfig([[Z.textRow(`86px`,`mt-1 ml-n4 mb-7`),Z.box(`ml-auto mt-1 mr-n2`,`16px`,`16px`)],Z.textRow(`190px`,`mt-4 ml-n4`),Z.textRow(`80%`,`mt-3 ml-n4`),Z.textRow(`82%`,`mt-3 ml-n4`),Z.textRow(`78%`,`mt-3 ml-n4 mb-11`),[Z.textRow(`22px`,`mt-9 ml-n3`),Z.box(`ml-auto mt-7 mr-n4`,`94px`,`36px`)]])}},chatRatingModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CZ9DLn-l.js`)),__vite__mapDeps([594,1,2,3,4,5,6,7,8,9,10,257,416,24,32,31,59,106,37,38,39,89,107,108,109,417,36,256,258,17,18,259,84,229,334,366,373,418,419,401,402,58,403,404,105,405,186,406,407,420,219,421,34]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`chatRatingModal.title`,noFooter:!0,preloader:Z.fromConfig([Z.box(`mb-4`,`100%`,`120px`)])}},chatBlockIPConfirmation:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CIYuU7s-.js`)).then(e=>e.n),__vite__mapDeps([420,2,1,3,4,5,6,7,8,9,10]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`chatBlockIPConfirmation.title`,preloader:Z.fromConfig([Z.textRow(`100%`),Z.textRow(`30%`),Z.textRow(`80%`),Z.textRow(`70%`)])}},tenDlcOptInFlowDescriptionRequirementsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BQpdk47y.js`)),__vite__mapDeps([595,4,2,1,3,5,6,7,8,9,10,452,131,20,36,42,109]),import.meta.url)),modalConfig:{size:`large`,titleMessagePath:`tenDlcOptInFlowDescriptionRequirementsModal.title`,noFooter:!0,preloader:Z.fromConfig([Z.textRow(`100%`),Z.textRow(`30%`),Z.textRow(`70%`,`mt-4`),Z.textRow(`40%`,`mt-4 mb-1`),Z.textRow(`50%`),Z.textRow(`80%`,`mt-5`),Z.textRow(`40%`,`mt-1 ml-4`),Z.textRow(`50%`,`mt-1 ml-4`),Z.textRow(`30%`,`mt-1 ml-4`),Z.textRow(`70%`,`mt-1 ml-4`),Z.textRow(`70%`,`mt-5`),Z.textRow(`40%`,`mt-1 ml-4`),Z.textRow(`50%`,`mt-1 ml-4`),Z.textRow(`30%`,`mt-1 ml-4`),Z.textRow(`70%`,`mt-1 ml-4`)])}},ticketCreateModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./pfJDzghP.js`)),__vite__mapDeps([596,1,2,3,4,5,6,7,8,9,10,400,36,401,402,24,37,38,39,58,59,403,17,18,404,105,405,186,406,407,408,212,409,410,32,31,106,89,107,108,109,411,86,88,157,158,47,208,154,155,412,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,35,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`tickets.createTicketModal.title`,preloader:Z.fromConfig([Z.labeledInput(`80px`),Z.labeledInput(`90px`),Z.labeledInput(`60px`),Z.labeledInput(`80px`),Z.labeledInput(`70px`)])},modules:[H.Tickets],resolvers:[{service:`FetchAllAccountsResolver`},{service:`ModelResolver`,params:[pa,fi]}]}
2,ticketCreateWorkspaceModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./SwPjID29.js`)),__vite__mapDeps([597,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`tickets.createWorkspaceModal.title`,preloader:Z.fromConfig([Z.textRows(2,`80%`,`mb-4`),Z.labeledInput(`110px`),Z.textRow(`55%`,`mt-1 mb-2`),Z.textRow(`40%`)])}},ticketAssignModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BsWSrTIk.js`)),__vite__mapDeps([598,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`tickets.assignModal.title`,preloader:Z.fromConfig([Z.textRow(`90%`,`mb-4`),Z.labeledInput(`110px`)])},resolvers:[{service:`FetchAllAccountsResolver`}]},ticketFetchInboxes:{type:`section`,resolvers:[{service:`ModelResolver`,params:[pa]}]},ticketFetchInboxesAndFv:{type:`section`,resolvers:[{service:`FilteredViewsResolverService`,params:[hr.TICKETS]},{service:`ModelResolver`,params:[pa]}]},sidebarTicketFetchInboxesAndFv:{type:`section`,resolvers:[{service:`FilteredViewsResolverService`,params:[hr.TICKETS]},{service:`ModelResolver`,params:[pa]},{service:`TicketCountResolverService`}]},ticketFetchSpamFilter:{type:`section`,resolvers:[{service:`SingleModelResolverService`,params:{model:zr,id:Vn,cache:!1}}]},templatesMenu:{type:`section`,modules:[H.Templates],resolvers:[{service:`TemplateCategoriesResolverService`}]},plansCardConnectModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DJy42Mia.js`)),__vite__mapDeps([599,1,2,3,4,5,6,7,8,9,10,130,18,600,36,32,31,35,24,37,38,39,40,41,42,43,17,44,320,479,480,96]),import.meta.url)),modules:[H.ByocHelper],modalConfig:{size:`small`,titleMessagePath:`plansCardConnectModal.title`}},plansChangeWithComparisonTableModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CX8d5yJQ.js`)),__vite__mapDeps([601,1,2,3,4,5,6,7,8,9,10,600,36,32,31,35,24,18,37,38,39,40,41,42,43,17,44,320,479,480,452,92,93,114]),import.meta.url)),modules:[H.ByocHelper],modalConfig:{size:`large`,getTitle:e=>e.title}},plansUpgradeModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Cu1P3XHj.js`)),__vite__mapDeps([602,1,2,3,4,5,6,7,8,9,10,600,36,32,31,35,24,18,37,38,39,40,41,42,43,17,44,320,479,480,603,121]),import.meta.url)),modules:[],modalConfig:{size:`medium`,titleMessagePath:`plansUpgradeModal.title`}},[Tg]:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CIlIuJ3F.js`)),__vite__mapDeps([604,1,2,3,4,5,6,7,8,9,10,24,400,36,401,402,37,38,39,58,59,403,17,18,404,105,405,186,406,407,408,212,409,410,32,31,106,89,107,108,109,411,86,88,157,158,47,208,154,155,412,75,19,16,20,21,22,23,25,26,27,28,29,30,33,34,35,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77]),import.meta.url)),modules:[H.Tickets],modalConfig:{size:`small`}},[Eg]:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CJ_MJqUF.js`)),__vite__mapDeps([605,1,2,176,4,3,5,6,7,8,9,10,177,93,178,179,11,180,28,60,606,46,47,37,38,39,63,19,20,21,64,191,121,192,193,190,16,17,18,22,23,24,25,26,27,29,30,31,32,33,34,35,36,40,41,42,43,44,45,48,49,50,51,52,53,54,55,56,57,58,59,61,62,65,66,67,68,69,70,71,194,195,607,608,609,427,428,116,610,611,612,400,401,402,403,404,105,405,186,406,407,408,212,409,410,106,89,107,108,109,411,86,88,157,158,208,154,155,412,142,91,92,94,95,96,97,98,283,101,213,214,172,102,182,425,426,215,613,290,253,254,614,305,114,615,616,196,197,198,199,556,617,618,619,620,621,77,622,146,623,624,555,394,557,625,626,627,628,629,630,203,204,205,631,632]),import.meta.url)),modules:[H.Tickets],modalConfig:{exactSize:`1100px`}},ticketMarkAsSpamModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./CXnXaKLB.js`)),__vite__mapDeps([633,1,2,3,4,5,6,7,8,9,10,36,400,401,402,24,37,38,39,58,59,403,17,18,404,105,405,186,406,407,408,212,409,410,32,31,106,89,107,108,109,411,86,88,157,158,47,208,154,155,412,44]),import.meta.url)),modules:[],modalConfig:{exactSize:`540px`,titleMessagePath:`tickets.ticketMarkAsSpamModal.title`}},ticketMarkAsNotSpamModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Bto7kNEk.js`)),__vite__mapDeps([634,1,2,3,4,5,6,7,8,9,10,36,400,401,402,24,37,38,39,58,59,403,17,18,404,105,405,186,406,407,408,212,409,410,32,31,106,89,107,108,109,411,86,88,157,158,47,208,154,155,412,96]),import.meta.url)),modules:[],modalConfig:{exactSize:`540px`,titleMessagePath:`tickets.ticketMarkAsNotSpamModal.title`}},ticketBulkMarkAsSpamModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./D07uTQxV.js`)),__vite__mapDeps([635,1,2,3,4,5,6,7,8,9,10,36,618,121]),import.meta.url)),modules:[],modalConfig:{exactSize:`540px`,titleMessagePath:`tickets.ticketBulkMarkAsSpamModal.title`}}
2,ticketBulkAssignModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CwAD3BWZ.js`)),__vite__mapDeps([636,1,2,3,4,5,6,7,8,9,10,30,19,20,21,31,32,33,27,28,34,35,24,18,36,37,38,39,40,41,42,43,17,44,45,408,618]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`tickets.bulkAssignModal.title`,preloader:Z.fromConfig([Z.textRow(`90%`,`mb-4`),Z.labeledInput(`110px`)])},resolvers:[{service:`FetchAllAccountsResolver`}]},contactDeleteModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DtbIi6xt.js`)),__vite__mapDeps([637,1,2,3,4,5,6,7,8,9,10,36,106,37,38,39,89,107,108,109,90,77]),import.meta.url)),modules:[],modalConfig:{size:`small`,titleMessagePath:`contactDeleteModal.title`}},ticketsForwardingInstructionsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./D_agkCZq.js`)),__vite__mapDeps([638,1,2,3,4,5,6,7,8,9,10,24,109]),import.meta.url)),modalConfig:{size:`medium`}},ticketsFetchWorkspace:{type:`section`,resolvers:[{service:`SingleModelResolverService`,params:{model:ea,id:Gn}}]},dealsPipelinesMenuSection:{type:`section`,resolvers:[{service:`DealPipelineResolverService`}],modules:[H.Deals]},sidebarDealsPipelinesMenuSection:{type:`section`,resolvers:[{service:`DealPipelineResolverService`}],modules:[H.Deals]},selectDealPipelineTemplateModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./3hAjvLlj.js`)),__vite__mapDeps([639,1,2,5,4,6,640,9,641,3,7,8,10,24,547,47,548]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`deals.dealsModals.selectDealPipelineTemplateModal.title`}},createOrUpdateDealPipelineTemplateModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B6Ua-KcH.js`)),__vite__mapDeps([642,1,2,3,4,5,6,7,8,9,10,24,36,641,640,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,551,109,121]),import.meta.url)),modalConfig:{titleMessagePath:e=>e.editingId?`deals.dealsModals.createOrUpdateDealPipelineTemplateModal.title.edit`:`deals.dealsModals.createOrUpdateDealPipelineTemplateModal.title.create`,size:`small`}},archiveDealPipelineModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BCDYy_zt.js`)),__vite__mapDeps([643,1,2,3,4,5,6,7,8,9,10,644,17,18,640,645]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`deals.archive`}},ticketsEditorModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./Cg0Ywo61.js`)),__vite__mapDeps([646,1,2,3,4,5,6,7,8,9,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,555,401,400,402,403,404,105,405,186,406,407,408,212,409,410,106,89,107,108,109,411,86,88,157,158,208,154,155,412,394,556,557,647,85,87,75,76,77,413,648,140,141,142,395,361,337,93,396,96,397,591,592,617,649,116]),import.meta.url)),modules:[],modalConfig:{exactSize:`1236px`,noFooter:!0,noHeader:!0,maxHeight:`100%`}},automationEmailEditorModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BrEuhb4h.js`)),__vite__mapDeps([650,1,2,3,4,5,6,7,8,9,10,651,85,21,20,86,87,88,17,18,400,36,401,402,24,37,38,39,58,59,403,404,105,405,186,406,407,408,212,409,410,32,31,106,89,107,108,109,411,157,158,47,208,154,155,412,75,19,16,22,23,25,26,27,28,29,30,33,34,35,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,413,648,140,141,142,394,395,361,337,93,396,96,397,187,188,189,146]),import.meta.url)),modules:[],modalConfig:{exactSize:`1236px`,noFooter:!0,maxHeight:`100%`}},automationStepContactsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BAAZUIxw.js`)),__vite__mapDeps([652,1,2,3,4,5,6,7,8,9,10,20,36,37,38,39,91,63,19,21,64,92,93,94,95,34,96,97,98,101,283,176,177,178,179,11,180,28,60,296,109,653,654,27,114,247,18,31,248,106,89,107,108,249,17,116,250,251,252,301,655,172,656,47]),import.meta.url)),modalConfig:{size:`full`,titleMessagePath:`automations.automationStepContactsMo
2dal.title`,noFooter:!0,keepAliveOnRouteChange:!0},modules:[H.Automations]},facebookQrModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BPZ4Fe07.js`)),__vite__mapDeps([657,1,2,3,4,5,6,7,8,9,10,17,18,105,658,579,116,659]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:e=>`${e.chatType}.qrModal.title`}},dealsPipelineKanbanSection:{type:`section`,resolvers:[{service:`RedirectableSingleModelResolverService`,params:{model:jr,source:`router`,requestParam:`pipelineId`,redirectToIfNotFound:{name:Tr.base}}}]},dealMoveAllModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C7cZLlaJ.js`)),__vite__mapDeps([660,1,2,3,4,5,6,7,8,9,10,24,645,661,17,18,37,38,39,640,405,186,662,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:`deals.dealsModals.moveAllDeals.title`,size:`small`}},dealCustomStageModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./kqf0sYNF.js`)),__vite__mapDeps([663,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,664,404,640,645,644]),import.meta.url)),modalConfig:{titleMessagePath:e=>e.editingId?`deals.dealsModals.stageModal.title.edit`:`deals.dealsModals.stageModal.title.create`,size:`small`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},dealSystemStageModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BoOE3gcs.js`)),__vite__mapDeps([665,1,2,3,4,5,6,7,8,9,10,24,17,18,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,664,404,640,645,644,116]),import.meta.url)),modalConfig:{titleMessagePath:e=>e.editingId?`deals.dealsModals.stageModal.title.edit`:`deals.dealsModals.stageModal.title.create`,size:`small`,preloader:Z.fromConfig([Z.labeledInput(),Z.labeledInput()])}},dealCardAddContactModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BQCoLa7J.js`)),__vite__mapDeps([666,1,2,3,4,5,6,7,8,9,10,24,661,17,18,37,38,39,640,405,186,662,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:`deals.dealsModals.dealCardAddContactModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInput()])}},dealTransferOwnershipModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CU0hSNVq.js`)),__vite__mapDeps([667,1,2,3,4,5,6,7,8,9,10,24,661,17,18,37,38,39,640,405,186,662,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,121]),import.meta.url)),modalConfig:{titleMessagePath:`deals.dealsModals.dealTransferOwnershipModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInput()])}},createDealModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BMge1vMU.js`)),__vite__mapDeps([668,1,2,3,4,5,6,7,8,9,10,24,641,640,212,661,17,18,37,38,39,405,186,662,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,554,121]),import.meta.url)),modules:[H.Deals],modalConfig:{titleMessagePath:`deals.dealsModals.createDealModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInput(`150px`,`mt-1 mb-4`),Z.labeledInput(),Z.textRow(`100%`,`mb-1 mt-2`),Z.box(`mb-2`,`100%`,`130px`),[Z.textRow(`48%`,`mt-3`),Z.textRow(`48%`,`mt-3 ml-4`)],[Z.input(`48%`,`mt-1`),Z.input(`48%`,`mt-1 ml-4 mb-4`)],Z.labeledInput(`150px`,`mt-1 mb-4`),Z.labeledInput(),[Z.textRow(`48%`,`mt-2`),Z.textRow(`48%`,`mt-2 ml-4`)],[Z.input(`48%`,`mt-1`),Z.input(`48%`,`mt-1 ml-4`)]])}},pipelineDefaultOwnerModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B1wVzJiK.js`)),__vite__mapDeps([669,1,2,24,645,3,4,5,6,7,8,9,10,644,17,18,640,75,19,16,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{titleMessagePath:`deals.dealsModals.pipelineDefaultOwnerModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInput()])}},dealCustomStageDeleteModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./o86MoFkK.js`)),__vite__mapDeps([670,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,664,404,640,645,644]),import.meta.url)),modalConfig:{titleMessagePath:`deals.dealsModals.deleteDealModal.title`,size:`small`,preloader:Z.fromConfig([Z.labeledInput()])}},campaignsSendersVerifyDomainSendModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CYDBkA2c.js`)),__vite__mapDeps([671,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,672,295]),import.meta.url)),modalConfig:{titleMessagePath:`campaigns.senders.flow.verifyDomain.sendModal.title`,size:`medium`,preloader:!1}},campaignsEmailSenderModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DUd3dBrG.js`)),__vite__mapDeps([673,1,2,3,4,5,6,7,8,9,10,78,674,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,96,675]),import.meta.url)),modalConfig:{size:`medium`,preloader:!1}},campaignsEmailLinkTrackingModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CL8LgLlD.js`)),__vite__mapDeps([676,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,677]),import.meta.url)),resolvers:[{service:`ModelSettingsResolverService`,params:{model:ir}}],modalConfig:{size:`small`,preloader:!1}},abandonedCartDelayModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./MyQAqFEw.js`)),__vite__mapDeps([678,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,679]),import.meta.url)),modalConfig:{size:`small`,preloader:!1}}
2,messengerSettingsFooterModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CIvMTz84.js`)),__vite__mapDeps([680,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,681,252]),import.meta.url)),resolvers:[{service:`ModelSettingsResolverService`,params:{model:ir}},{service:`ModelSettingsResolverService`,params:{model:Ag}}],modules:[H.BillingBase],modalConfig:{size:`xLarge`,preloader:Z.fromConfig([Z.textRow(`360px`),Z.box(`mt-1`,`100%`,`208px`),Z.box(`mt-4`,`100%`,`80px`)])}},dealViewModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DC743flv.js`)),__vite__mapDeps([682,4,2,1,3,5,6,7,8,9,10,24,17,18,31,36,32,33,27,28,34,85,21,20,86,87,88,185,640,105,186,37,38,39,212,89,661,405,662,75,19,16,22,23,25,26,29,30,35,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,683,684,261,685,686,687,114,688,559,109,414,107,108,560,90,78,337,93,396,96,384,561,689,690,691,168,121,338,692,141,693]),import.meta.url)),resolvers:[{service:`DealActivityItemsResolverService`}],modules:[H.Kanban,H.Automations],modalConfig:{exactSize:`1400px`,alignTop:!0,noFooter:!0,noHeader:!0,preloader:!1,keepAliveOnRouteChange:!0,navigationComponent:X(()=>R(()=>globalThis.__rdl__(() => import(`./DJs_2-4R.js`)),__vite__mapDeps([694,4,2,1,3,5,6,7,8,9,10,640,661,24,17,18,37,38,39,405,186,662,692,141,695]),import.meta.url))}},dealTimelineSection:{type:`section`,resolvers:[{service:`DealTimelineItemsResolverService`}]},dealActivityItemEdit:{type:`section`},unsubscribeContactWithEmailModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./SZAmD7sE.js`)),__vite__mapDeps([696,1,2,3,4,5,6,7,8,9,10,107,108,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:`unsubscribeContactWithEmailModal.title`}},composeEmailPreviewModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BY3v5wVU.js`)),__vite__mapDeps([697,1,2,3,4,5,6,7,8,9,10,698,82,83,84,699,77,349,17,18,201,34,700,114,701,252,109]),import.meta.url)),modalConfig:{size:`xxLarge`,titleMessagePath:`composeEmail.previewModal.title`}},composeTestEmailModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bz82pPTU.js`)),__vite__mapDeps([702,1,2,3,4,5,6,7,8,9,10,106,37,38,39,89,107,108,109,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,188,703,146]),import.meta.url)),modalConfig:{size:`large`},modules:[H.ComposeEmail]},composeEmailSwitchToImmediateSendingModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CIVIWLf_.js`)),__vite__mapDeps([704,1,2,3,4,5,6,7,8,9,10,705,44]),import.meta.url)),modules:[H.ComposeEmail],modalConfig:{size:`small`,titleMessagePath:`composeEmail.switchToImmediateSendingModal.title`,preloader:Z.fromConfig([Z.textRow(),Z.textRow(`120px`)])}},scheduledEmailRetryModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./B9mLtgnY.js`)),__vite__mapDeps([706,1,2,3,4,5,6,7,8,9,10,36,32,31,348,17,18,349,350,82,83,84,351,352,44]),import.meta.url)),modules:[H.ScheduledEmail],modalConfig:{size:`small`,getTitle:({messageIds:e})=>Vu().tc(`scheduledEmailRetryModal.title`,e.length),preloader:Z.fromConfig([[Z.box(void 0,void 0,`60px`)]])}}
2,outboundEmailsInsertContentModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bo-c1hkz.js`)),__vite__mapDeps([707,1,2,3,4,5,6,7,8,9,10,708,17,18,36,106,37,38,39,89,107,108,109,349,709,350,82,83,84,351,352,710,24,20,31,91,63,19,21,64,92,93,94,95,34,96,97,98,101,213,214,176,177,178,179,11,180,28,60,182,187,86,88,141,140,41,142,188,189,32,277,425,61,62,66,29,67,191,121,426,192,193,190,16,22,23,25,26,27,30,33,35,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,65,68,69,70,71,194,195,711,613,616,196,197,198,199,433,434,435,712,114,183,713,714,715,716,717,229,718,719,720,721,252]),import.meta.url)),modalConfig:{size:`xxLarge`,noFooter:!0},modules:[H.OutboundEmails]},scheduledEmailModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BVxVTFhq.js`)),__vite__mapDeps([722,1,2,3,4,5,6,7,8,9,10,348,17,18,349,350,36,82,83,84,351,352,723,24,360,361,60,362,32,31,59,90,187,20,37,38,39,86,88,141,140,41,142,188,189,381,724,700,201,114,725,106,89,107,108,109,369,93,438,368,726,708,709,34,375,433,434,435,727]),import.meta.url)),modules:[H.SenderSettingsCountries,H.SentSmsBase,H.Recipient,H.ScheduledEmail,H.Labels],modalConfig:{size:`xLarge`,titleMessagePath:`scheduledEmailModal.title`,preloader:{content:Ug}}},emailDetailsModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DcVsGGHt.js`)),__vite__mapDeps([728,1,2,3,4,5,6,7,8,9,10,708,17,18,36,106,37,38,39,89,107,108,109,349,709,350,82,83,84,351,352,729,24,360,361,60,362,59,187,20,86,88,141,140,41,142,188,189,32,31,730,365,121,731,77,724,700,201,114,732,11,380,212,381,382,383,384,726,90,34,375,433,434,435,146]),import.meta.url)),modules:[H.OutboundEmails,H.Recipient,H.Automations],resolvers:[{service:`OutboundEmailsDetailsModalResolverService`}],modalConfig:{size:`xLarge`,titleMessagePath:`pageTitle.user.history.outboundEmail
2sDetails`,preloader:{content:Vg}}},composeEmailProgressModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BjCngwrH.js`)),__vite__mapDeps([733,1,2,3,4,5,6,7,8,9,10,358,359,36,90,319,320,32,31,708,17,18,106,37,38,39,89,107,108,109,349,709,350,82,83,84,351,352,725,369,93,438,368,24,114,380,212,381,382,711,146]),import.meta.url)),modalConfig:{exactSize:`800px`},modules:[H.CampaignsSenders]},domainWarmUpModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DN0sFjlw.js`)),__vite__mapDeps([734,1,2,3,4,5,6,7,8,9,10,130,18,16,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,121]),import.meta.url)),modules:[H.ComposeEmail,H.CampaignsSenders],modalConfig:{size:`medium`,titleMessagePath:`composeEmail.warmUpModal.title`}},emailCampaignsPromoModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./18ctC6vh.js`)),__vite__mapDeps([735,1,2,3,4,5,6,7,8,9,10,217,90,218,121,47,736]),import.meta.url)),modalConfig:{exactSize:`800px`,noHeader:!0,noFooter:!0},modules:[]},contactsTagsCreateEditModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Q-kjz_UX.js`)),__vite__mapDeps([737,1,2,3,4,5,6,7,8,9,10,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,428]),import.meta.url)),modalConfig:{size:`small`,titleMessagePath:e=>e.editingId?`contactsTagsCreateEditModal.editTitle`:`contactsTagsCreateEditModal.createTitle`}},addLabelModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B8xSl7hz.js`)),__vite__mapDeps([738,1,2,3,4,5,6,7,8,9,10,24,36,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,434,714,715,93,109]),import.meta.url)),modules:[H.Labels],modalConfig:{size:`small`,titleMessagePath:e=>{let t=e;return t.isCreateNewLabelMode?`addLabelModal.createNewLabelTitle`:t.editingLabel?`addLabelModal.edit.title`:`addLabelModal.title`}}},removeLabelModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./D9PobU5u.js`)),__vite__mapDeps([739,1,2,3,4,5,6,7,8,9,10,65,63,19,20,21,64,44,435,36,714,24,715,93,47]),import.meta.url)),modules:[H.Labels],modalConfig:{size:`small`,titleMessagePath:`removeLabelModal.title`}},gettingStartedChooseYourTextingNumberModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./D9pHFRd7.js`)),__vite__mapDeps([740,1,2,3,4,5,6,7,8,9,10,32,31,741,742,220,743,121,744]),import.meta.url)),modules:[],modalConfig:{size:`xLarge`,titleMessagePath:`gettingStartedChooseYourTextingNumberModal.title`}},emailTemplatesFormWrapper:{type:`section`},emailTemplatesPreviewModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DwmcYoEe.js`)),__vite__mapDeps([745,1,2,3,4,5,6,7,8,9,10,140,24,20,37,38,39,41,141,142,187,17,18,86,88,188,189,32,31,700,201,114,109]),import.meta.url)),modules:[],modalConfig:{size:`xxLarge`,titleMessagePath:`emailTemplates.previewModal.title`}},emailTemplatesSaveModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BCdicUVM.js`)),__vite__mapDeps([746,1,2,3,4,5,6,7,8,9,10,36,75,19,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78,187,86,88,141,140,142,188,189]),import.meta.url)),modules:[H.Templates],resolvers:[{service:`ModelResolver`,params:[$n]}],modalConfig:{size:`medium`,titleMessagePath:`common.saveAsTemplate`,preloader:Z.fromConfig([Z.labeledInput(`110px`)])}},emailTemplatesChooseEditorModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./dDDKZMJR.js`)),__vite__mapDeps([747,1,2,5,4,6,7,8,24,187,3,9,10,17,18,20,37,38,39,86,88,141,140,41,142,188,189,32,31,748,130,749,146]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`emailTemplates.choose
2EditorModal.title`}},stripoFullscreenModalWrapper:{type:`section`},stripoEditorFormWrapper:{type:`section`,modules:[H.Stripo],resolvers:[{service:`ModelResolver`,params:[$n]},{service:`SingleModelResolverService`,params:{model:ki,requestParam:`templateId`,source:`stripoFullscreenModalWrapper`}}]},stripoPrebuiltTemplatesSection:{type:`section`,modules:[H.Stripo]},stripoPrebuiltTemplatesFiltersLoader:{type:`section`,resolvers:[{service:`ModelResolver`,params:[Mg,Pg,Ig,Rg]}]},stripoPrebuiltTemplatesPreviewModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./BjPjk9oK.js`)),__vite__mapDeps([750,1,2,3,4,5,6,7,8,9,10,189,32,31,700,201,114,109]),import.meta.url)),modules:[H.Stripo],modalConfig:{size:`xxLarge`,titleMessagePath:`emailTemplates.previewModal.title`},resolvers:[{service:`StripoPrebuiltTemplateResolverService`}]},scheduledEmailUpcomingDeleteModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./YkKJT-98.js`)),__vite__mapDeps([751,1,2,3,4,5,6,7,8,9,10,36,90,348,17,18,349,350,82,83,84,351,352,121]),import.meta.url)),modules:[],modalConfig:{size:`small`}},automationFlowSidebarWrapper:{type:`section`,modules:[H.Automations]},automationFlowConfirmationModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./K3QZhlwz.js`)),__vite__mapDeps([752,1,2,3,4,5,6,7,8,9,10,36,753]),import.meta.url)),modules:[H.Automations],modalConfig:{size:`small`}},automationFlowDuplicatingModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./B76WtCwR.js`)),__vite__mapDeps([754,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modules:[H.Automations],modalConfig:{size:`small`,titleMessagePath:`automations.flowDuplicateModal.title`}},automationFlowEditingNameModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./C8pzrRxz.js`)),__vite__mapDeps([755,1,2,3,4,5,6,7,8,9,10,24,75,19,16,17,18,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,76,77,78]),import.meta.url)),modules:[H.Automations],modalConfig:{size:`small`,titleMessagePath:`automations.flowEditingNameModal.title`}},automationFlowActivateWithSettingsModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./D8mWr5u3.js`)),__vite__mapDeps([756,1,2,3,4,5,6,7,8,9,10,36,78,757,24,17,18,25,58,59,82,83,84,75,19,16,20,21,22,23,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,76,77,758,361,759,760,761,334,762,753,109]),import.meta.url)),modules:[H.Automations],modalConfig:{size:`medium`,titleMessagePath:`automations.flowActivateWithSettingsModal.title`}},automationFlowPausingOrStoppingSingleModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./COsrYKU3.js`)),__vite__mapDeps([763,1,2,5,4,6,36,3,7,8,9,10,764,65,63,19,20,21,64,44,765,24]),import.meta.url)),modules:[H.Automations],modalConfig:{size:`small`,titleMessagePath:`automations.flowPausingOrStoppingModal.title`}},automationFlowPausingOrStoppingBulkModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./9wVn_-cX.js`)),__vite__mapDeps([766,1,2,36,3,4,5,6,7,8,9,10,764,65,63,19,20,21,64,44,767,765,24]),import.meta.url)),modules:[H.Automations],modalConfig:{size:`small`,titleMessagePath:`automations.flowPausingOrStoppingModal.titleBulk`}},automationWebhookTestRequestModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./CRF05k7m.js`)),__vite__mapDeps([768,1,2,3,4,5,6,7,8,9,10,358,359,105,769,24,770,771,114]),import.meta.url)),modules:[H.Automations],modalConfig:{size:`large`,titleMessagePath:`automations.webhookTestRequestModal.title`}},automationWebhookBodyEditorModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BRg4y9hJ.js`)),__vite__mapDeps([772,1,2,7,8,773,3,4,5,6,9,10,24,17,18,19,85,21,20,86,87,88,75,16,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,156,157,158,145,11,159,160,144,774,775,114]),import.meta.url)),modules:[H.Automations],modalConfig:{exactSize:`1236px`,noFooter:!0,maxHeight:`100%`}},composeEmailStepContentAiReviewImprovingYourEmailModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DhedVw-5.js`)),__vite__mapDeps([776,4,2,1,3,5,6,7,8,9,10,777,36,121,109]),import.meta.url)),modalConfig:{size:`medium`,noHeader:!0,noFooter:!0}},composeEmailStepContentAiReviewImprovingResultModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./Bp5oppks.js`)),__vite__mapDeps([778,1,2,3,4,5,6,7,8,9,10,36,700,201,114,777,121,779,146]),import.meta.url)),modules:[],modalConfig:{titleMessagePath:`composeEmailStepContentAiReviewImprovingResultModal.title`,exactSize:`1600px`}},emailPriceSection:{type:`section`,resolvers:[{service:`EmailPriceResolver`}]},automationEmailPreviewModal:{type:`modal`,component:X(()=>R(()=>globalThis.__rdl__(() => import(`./DIgJEGI9.js`)),__vite__mapDeps([780,1,2,3,4,5,6,7,8,9,10,698,82,83,84,699,77,349,17,18,201,34,700,114,781]),import.meta.url)),modalConfig:{size:`xxLarge`,titleMessagePath:`automations.automationEmailPreviewModal.title`},modules:[H.ComposeEmail]},automationLogsDetailsModal:{type:`queryModal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DGJL_d6O.js`)),__vite__mapDeps([782,1,2,3,4,5,6,7,8,9,10,358,359,24,17,18,379,121,46,47,31,36,32,56,33,27,28,34,106,37,38,39,89,107,108,109,258,259,84,229,90,653,11,775,770,771,783,784,381,785,20,786,343,230,231,344,345,313,314,284,315,316,346,347,252,363,365,364,366,367,368,369,93,116,276,277,730,731,349,77,724,700,201,114,708,709,350,82,83,351,352,732,703,370,371,377,378,130,372,787,760,759,156,86,88,157,158,145,159,160,788,508,96,789,790,161,44,791]),import.meta.url)),resolvers:[{service:`RedirectableSingleModelResolverService`,params:{model:h_,source:`automationLogsDetailsModal`,requestParam:`automationLogId`,redirectToIfNotFound:{name:Ln.logs},redirectToIfAccessError:{name:Ln.logs}}}
2],modules:[H.OutboundEmails,H.HistoryReceivedSms,H.Automations],modalConfig:{size:`xLarge`,titleMessagePath:`automations.automationLogsDetailsModal.title`}},automationTemplateModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./DhAsFTEg.js`)),__vite__mapDeps([792,1,2,3,4,5,6,7,8,9,10,32,31,793,24,17,18,20,84,46,47,36,56,57,58,59,60,63,19,21,64,90,349,759,760,761,334,762,753,156,86,88,157,158,145,27,28,11,159,160,775,774,770,230,231,703,787,109,794,795,796,559,191,121,426,425,61,62,66,29,67,192,193,194,215,30,33,34,35,37,38,39,40,41,42,43,44,45,190,16,22,23,25,26,48,49,50,51,52,53,54,55,65,68,69,70,71,195,607,608,609,427,428,116,797,798,799,800,106,89,107,108,368,103,801,802,803,804,805,806,807,252]),import.meta.url)),modalConfig:{exactSize:`1000px`,maxHeight:`100%`}},composeEmailChooseEditorModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./ylFCbGpm.js`)),__vite__mapDeps([808,1,2,3,4,5,6,7,8,9,10,24,140,20,37,38,39,41,141,142,708,17,18,36,106,89,107,108,109,349,709,350,82,83,84,351,352,748,130,749,809,810]),import.meta.url)),modalConfig:{size:`medium`,titleMessagePath:`composeEmailChooseEditorModal.title`}},reviewRecommendedAiFixesModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./BvOwAuwo.js`)),__vite__mapDeps([811,1,2,3,4,5,6,7,8,9,10,36,131,20,42,28]),import.meta.url)),modalConfig:{size:`xLarge`,titleMessagePath:`reviewRecommendedAiFixesModal.title`}},connectedAppsList:{type:`section`,resolvers:[{service:`ModelResolver`,params:[$r]}]},byocUnlinkIdentifierModal:{type:`modal`,component:D(()=>R(()=>globalThis.__rdl__(() => import(`./D-7T9fe3.js`)),__vite__mapDeps([812,1,2,3,4,5,6,7,8,9,10,36,813]),import.meta.url)),modalConfig:{size:`small`,getTitle:e=>e.title}}};E(),$t();var __=O({components:{TmDialog:$p},props:{...Kp,id:{type:String,required:!0}},emits:{...Jp},setup(e,t){let{t:n}=Vu(),{close:r,getWrapperData:i,getParams:a}=qr(e.id),o=a(),s=g_[e.id];if(!Yp(s))throw new wd(`Config for wrapper "${e.id}" is not ModalWrapperConfig`);let{modalConfig:c}=s,{titleMessagePath:l,titleMessageParams:u,getTitle:d}=c,f=()=>vt(l)?l(o):l??null,p=()=>vt(u)?u(o):u??{},ee=()=>{if(d)return d(o);let e=f(),t=p();if(e===null)return``;let r=n(e,t);return r===e?``:r};rn(Wp,{...c,get title(){return ee()}});let te=C(()=>i()),ne=T(e.isOpen);fn(te,()=>{ne.value=te.value?te.value?.isOpen:!1},{immediate:!0});let re=()=>{t.emit(`open`)},ie=()=>{t.emit(`close`),r()},ae=async e=>{ne.value=e},{getDataTestId:oe}=Kf()(`wrapper`,e.id),se=s.type===`queryModal`,ce=C(()=>{let{isOpen:t,id:n,...r}=e;return{...r,keepAliveOnRouteChange:se?!0:r.keepAliveOnRouteChange,...oe()}});return me(()=>{e.keepAliveOnRouteChange||r()}),{isWrapperOpen:ne,show:re,hide:ie,onHide:ae,computedProps:ce}}});A(),E();function v_(e,t,n,r,i,a){let o=I(`tm-dialog`);return N(),k(o,on({"is-open":e.isWrapperOpen},e.computedProps,{"modal-class":`tm-dialog-${e.id}`,onOpen:e.show,onClose:e.hide,"onUpdate:modelValue":e.onHide}),{default:x(t=>[F(e.$slots,`default`,Yt(pn(t)))]),"dialog-root":x(t=>[e.$slots[`dialog-root`]?F(e.$slots,`dialog-root`,Yt(on({key:0},t))):P(``,!0)]),"navigation-buttons":x(()=>[F(e.$slots,`navigation-buttons`)]),_:3},16,[`is-open`,`modal-class`,`onOpen`,`onClose`,`onUpdate:modelValue`])}var y_=q(__,[[`render`,v_]]);E();var b_=()=>{let e=Bt(Up);if(!e)throw new Fc(`Dialog context not found. useDialog should be placed in child of TmDialog.vue`);return e},x_=()=>{let e=Bt(Wp);if(!e)throw new Fc(`Wrapper dialog context not found. useWrapperDialog should be placed in child of TmWrapperDialog.vue`);return e},S_=e=>{let t=x_();return{...t,title:C(()=>e.title??t.title)}};E(),$t();var C_=O({components:{TmScrollbar:Zr,TmIcon:ei,TmButton:Ta,TmModalCloseBtn:Ci,FieldCheckbox:wh},props:{...qp,preloader:{type:Object},isWrapper:{type:Boolean,default:!0}},emits:{close:()=>!0},setup(e,t){let n=T(e.scrollbarId??hu()),{dialogEmit:r,onOutsideClick:i,onEscape:a,canCloseCallback:o}=b_(),s=e.isWrapper?S_(e):e,c=T(),l=T(),u=T(),d=T(!0),f=T(!0),p=T(!1),ee=C(()=>(e.noFooter??s.noFooter)!==!0),te=C(()=>t.slots[`modal-tabs`]),ne=C(()=>e.withoutContentPadding??s.withoutContentPadding),re=C(()=>typeof ne.value==`boolean`?ne.value===!0:ne.value?.horizontal===!0),ie=C(()=>typeof ne.value==`boolean`?ne.value===!0:ne.value?.vertical===!0),ae=T(0),oe=C(()=>e.showCreateAnother&&p.value),se=async()=>
2{if(e.canCloseCallback)try{if(!await e.canCloseCallback())return}catch(e){So().logAndCapture(e instanceof Error?e:String(e),Ba.ERROR);return}r(`update:model-value`,!1),t.emit(`close`)};return i(()=>{u.value?.focus()}),sn(()=>{`scrollable`in s&&s.scrollable&&(l.value=c.value.closest(`.q-dialog__inner`))}),o(()=>!e.canCloseCallback||e.canCloseCallback()),a(()=>{se()}),{scrollbarIdSetup:n,scrollAtStart:d,scrollAtEnd:f,scrollbarWidth:ae,createAnother:p,isAllowCreateAnother:oe,hasTabs:te,dialogEmit:r,modalEl:c,closeButtonEl:u,isDevMode:!1,handleCloseClick:se,shouldShowFooter:ee,withoutHorizontalContentPadding:re,withoutVerticalContentPadding:ie,...s}}});E(),A(),Jt();var w_={ref:`modalEl`,class:`tm-modal__content-wrapper`},T_={class:`tm-modal__header-top`},E_={key:0,class:`tm-modal__title-icon`},D_={class:`tm-modal__header-right`},O_={key:1,class:`tm-modal__tabs`},k_={class:`tm-modal__scroll`},A_={key:0,class:`tm-modal__create-another`},j_={class:`tm-modal__footer-right`};function M_(e,t,n,r,i,a){let o=I(`tm-icon`),s=I(`tm-modal-close-btn`),c=I(`tm-scrollbar`),l=I(`field-checkbox`),u=I(`tm-button`),d=Kt(`test-id`);return N(),b(`div`,w_,[F(e.$slots,`aside`,{},void 0,!0),e.noHeader?P(``,!0):(N(),b(`div`,{key:0,class:M([`tm-modal__header`,{"tm-modal__header--hide-shadow":e.scrollAtStart,"tm-modal__header--no-border-bottom":e.noHeaderBorderBottom}])},[S(`div`,T_,[S(`div`,{class:M([`tm-modal__title`,e.truncateTitle?`truncate`:`d-flex align-center`])},[e.titleIcon?(N(),b(`div`,E_,[w(o,{name:e.titleIcon,class:M(e.titleIconClass),size:`xxxLarge`},null,8,[`name`,`class`])])):P(``,!0),F(e.$slots,`modal-title`,{},()=>[Rt(Zt(e.title),1)],!0)],2),S(`div`,D_,[F(e.$slots,`modal-top-right`,{},void 0,!0),e.hideCloseButton?P(``,!0):(N(),k(s,{key:0,ref:`closeButtonEl`,class:`mr-n2 mt-n1`,onClose:e.handleCloseClick},null,8,[`onClose`]))])]),F(e.$slots,`after-header-top`,{},void 0,!0)],2)),e.hasTabs?(N(),b(`div`,O_,[F(e.$slots,`modal-tabs`,{},void 0,!0)])):P(``,!0),F(e.$slots,`main`,{},()=>[ln((N(),b(`div`,k_,[w(c,{"scrollbar-id":e.scrollbarIdSetup,"onUpdate:scrolledToTop":t[0]||(t[0]=t=>e.scrollAtStart=t),"onUpdate:scrolledToBottom":t[1]||(t[1]=t=>e.scrollAtEnd=t),"onUpdate:scrollbarWidth":t[2]||(t[2]=t=>e.scrollbarWidth=t)},{default:x(()=>[S(`div`,{class:M([`tm-modal__main`,{"tm-modal__main--no-header":e.noHeader,"tm-modal__main--no-footer":!e.shouldShowFooter,"tm-modal__main--without-content-h-padding":e.withoutHorizontalContentPadding,"tm-modal__main--without-content-v-padding":e.withoutVerticalContentPadding}])},[e.isDevMode&&e.preloader!==!1&&e.preloader?.content&&e.preloader.dev?(N(),k(Xt(e.preloader.content),on({key:0,class:`absolute tm-modal__main tm-modal__main__preloader-dev`},e.preloader.props||{}),null,16)):P(``,!0),F(e.$slots,`modal-content`,{createAnother:e.isAllowCreateAnother,handleCloseClick:e.handleCloseClick,scrollbarWidth:e.scrollbarWidth},void 0,!0)],2)]),_:3},8,[`scrollbar-id`])])),[[d,`tm-base-modal-scroll-content`]])],!0),F(e.$slots,`before-footer`,{},void 0,!0),ln(S(`div`,{class:M([`tm-modal__footer`,{"tm-modal__footer--hide-shadow":e.scrollAtEnd}])},[F(e.$slots,`footer`,{},()=>[e.showCreateAnother?(N(),b(`div`,A_,[w(l,{modelValue:e.createAnother,"onUpdate:modelValue":t[3]||(t[3]=t=>e.createAnother=t)},{default:x(()=>[Rt(Zt(e.$t(`common.createAnother`)),1)]),_:1},8,[`modelValue`])])):P(``,!0),S(`div`,j_,[F(e.$slots,`cancel-button`,{},()=>[e.hideCancelButton?P(``,!0):(N(),k(u,{key:0,onClick:e.handleCloseClick},{default:x(()=>[Rt(Zt(e.cancelButtonText),1)]),_:1},8,[`onClick`]))],!0),F(e.$slots,`modal-footer-button`,{createAnother:e.isAllowCreateAnother},void 0,!0)])],!0)],2),[[Ht,e.shouldShowFooter]]),F(e.$slots,`after-footer`,{},void 0,!0)],512)}var N_=q(C_,[[`render`,M_],[`__scopeId`,`data-v-26c658f7`]]);E();var P_=O({components:{TmLoader:Qi,TmSkeleton:bn,TmBaseModalContent:N_},setup(e){return{...S_(e)}}});A(),E();function F_(e,t,n,r,i,a){let o=I(`tm-skeleton`),s=I(`tm-loader`),c=I(`tm-base-modal-content`),l=Kt(`test-id`);return ln((N(),k(c,{"hide-cancel-button":``,class:`tm-preloader-modal-content`},{"modal-title":x(()=>[e.title?(N(),b(un,{key:0}
2,[Rt(Zt(e.title),1)],64)):(N(),k(o,{key:1,width:`200px`,height:`30px`}))]),"modal-content":x(()=>[F(e.$slots,`default`,{},()=>[w(s)],!0)]),_:3})),[[l,`tm-preloader-modal-content`]])}var I_=q(P_,[[`render`,F_],[`__scopeId`,`data-v-1347e6b4`]]);E(),$t();var L_=O({components:{TmBaseModalContent:N_,TmPreloaderModalContent:I_,SuspenseResolver:yi,TmWrapperDialog:y_,TmErrorState:ja},setup(){let e=bs(),t=cs(),n=C(()=>t.getWrappersByTypes([`modal`,`queryModal`]).filter(e=>e.isOpen).sort((e,t)=>e.openTimestamp-t.openTimestamp)),r=T([]);fn(n,()=>{let e=n.value.map(({id:e})=>e);r.value=r.value.filter(({id:t})=>e.includes(t));let t=r.value.map(({id:e})=>e);n.value.forEach(e=>{t.includes(e.id)||r.value.push(e)})});let i=()=>{let e=r.value.map(({id:e})=>e),t=n.value.find(({id:t})=>!e.includes(t));t&&r.value.push(t)},a=C(()=>r.value.map(t=>{let n=e.getWrapperConfig(t.id);if(!Yp(n))throw new wd(`Config is not WrapperConfigItemModal`);return n})),o=Ja(),s=ac(),c=$l(),l=C(()=>c.getCurrentRoute()),u=C(()=>l.value.name?.toString()||``);return fn(l,()=>{let{modals:e}=s.getQueryParams();Vp(e)&&e.forEach(({id:e})=>{t.isBuilt(e)||t.build(e)}),o.closeOrOpenByQuery(n.value)},{immediate:!0}),{currentRouteName:u,wrappersConfigs:a,onComponentMount:i}}});E();var R_={class:`w100pr`};function z_(e,t,n,r,i,a){let o=I(`tm-preloader-modal-content`),s=I(`tm-error-state`),c=I(`tm-base-modal-content`),l=I(`suspense-resolver`),u=I(`tm-wrapper-dialog`);return N(),b(`div`,null,[(N(!0),b(un,null,Wt(e.wrappersConfigs,t=>(N(),k(u,on({key:t.id,id:t.id},{ref_for:!0},t.modalConfig),{"navigation-buttons":x(()=>[t.modalConfig.navigationComponent?(N(),k(Xt(t.modalConfig.navigationComponent),{key:0})):P(``,!0)]),default:x(()=>[S(`div`,R_,[w(l,{resolvers:t.resolvers||[],"route-name":e.currentRouteName},Ft({default:x(({resolverProps:n})=>[(N(),k(Xt(t.component),{ref_for:!0,ref:e.onComponentMount,"resolver-props":n},null,8,[`resolver-props`]))]),failed:x(({onRetry:e})=>[w(c,{"hide-cancel-button":``,size:t.modalConfig.size},{"modal-content":x(()=>[w(s,{class:`pb-12`,size:`small`,onOnRetry:e},null,8,[`onOnRetry`])]),_:2},1032,[`size`])]),_:2},[t.modalConfig.preloader===!1?void 0:{name:`preloader`,fn:x(()=>[w(o,on({ref_for:!0},t.modalConfig),Ft({_:2},[t.modalConfig.preloader?.content?{name:`default`,fn:x(()=>[(N(),k(Xt(t.modalConfig.preloader?.content),on({ref_for:!0},t.modalConfig.preloader.props),null,16))]),key:`0`}:void 0]),1040)]),key:`0`}]),1032,[`resolvers`,`route-name`])])]),_:2},1040,[`id`]))),128))])}var B_=q(L_,[[`render`,z_]]);E(),$t(),A();var V_={class:`tm-notification__body`},H_={class:`tm-notification__title lh-20`},U_={class:`tm-notification__content body-text-regular-14 lh-20`},W_={key:1},G_=q(O({__name:`TmNotification`,props:{type:{},title:{},text:{}},emits:[`close`],setup(e){let t=e,n={success:`check_circle`,warning:`warning`,error:`error`,info:`info`},r=C(()=>n[t.type]);return(t,n)=>{let i=Kt(`safe-html`);return N(),b(`div`,{class:M([`tm-notification`,`tm-notification--${e.type}`])},[w(ei,{class:`tm-notification__icon`,name:j(r),size:`xLarge`},null,8,[`name`]),S(`div`,V_,[S(`div`,H_,Zt(e.title),1),S(`div`,U_,[t.$slots.default?F(t.$slots,`default`,{key:0},void 0,!0):e.text?ln((N(),b(`div`,W_,null,512)),[[i,e.text]]):P(``,!0)])]),w(ei,{class:`tm-notification__close`,size:`xLarge`,name:`close`,onClick:n[0]||(n[0]=e=>t.$emit(`close`))})],2)}}}),[[`__scopeId`,`data-v-26ad0270`]]);E(),$t();var K_=()=>{let e=Ol();return{notificationTopOffset:C(()=>e.getNotificationTopOffset())}},q_=()=>{let e=Ol(),t=e.getNotificationTopOffset();return It(()=>{e.setNotificationTopOffset(t)}),{setNotificationTopOffset:t=>{e.setNotificationTopOffset(t)}}};E(),$t(),A();var J_=q(O({__name:`TmNotifications`,setup(e){let{notificationTopOffset:t}=K_();return(e,n)=>{let r=I(`notifications`);return N(),k(r,{class:`tm-notifications`,width:`430`,group:j(io).main,style:an(j(t)?{marginTop:j(t)}:void 0)},{body:x(e=>[(N(),k(Xt(e.item.data.component??G_),{type:e.item.type,title:e.item.title,text:e.item.text,onClose:t=>e.close()},null,40,[`type`,`title`,`text`,`onClose`]))]),_:1},8,[`group`,`style`])}}}),[[`__scopeId`,`data-v-b6577567`]]);E(),A();var Y_=O({__name:`TmTextTooltip`,props:{direction:{},color:{},offset:{},interactive:{type:Boolean},anchorElement:{},disabled:{type:Boolean},delay:{},persistence:{},custom:{type:Boolean},variant:{},text:{default:``},textAlign:{default:`center`},html:{type:Boolean,default:!1}},setup(e){let t={ALLOWED_TAGS:[`a`,`b`,`br`,`em`,`i`,`p`,`strong`,`u`],ALLOWED_ATTR:[`href`,`target`]};return(n,r)=>{let i=Kt(`safe-html`);
2return N(),k(Nm,{"anchor-element":e.anchorElement,color:e.color,offset:e.offset,direction:e.direction,interactive:e.interactive,disabled:e.disabled,delay:e.delay,persistence:e.persistence},{default:x(()=>[e.html?ln((N(),b(`div`,{key:0,class:M([`pre-line`,`text-${e.textAlign}`])},null,2)),[[i,{html:e.text,config:t}]]):(N(),b(`div`,{key:1,class:M([`pre-line`,`text-${e.textAlign}`])},Zt(e.text),3))]),_:1},8,[`anchor-element`,`color`,`offset`,`direction`,`interactive`,`disabled`,`delay`,`persistence`])}}});E(),A(),Jt();var X_={key:0},Z_=[`href`,`onMousedown`],Q_=[`href`],$_={key:2,class:`body-text-semi-bold-14 white--text`},ev=O({__name:`TmTranslateTooltip`,props:{direction:{},color:{},offset:{},interactive:{type:Boolean},anchorElement:{},disabled:{type:Boolean},delay:{},persistence:{},custom:{type:Boolean},variant:{},keypath:{default:``},openLinkOnMousedown:{type:Boolean,default:!1}},setup(e){let t=e=>{hs().open(e,`_blank`)};return(n,r)=>(N(),k(Nm,{"anchor-element":e.anchorElement,color:e.color,offset:e.offset,direction:e.direction,interactive:e.interactive,disabled:e.disabled,delay:e.delay,persistence:e.persistence},{default:x(()=>[typeof e.keypath==`string`?(N(),b(`div`,X_,Zt(n.$t(e.keypath)),1)):(N(),k(gi,{key:1,keypath:e.keypath.translateKey},Ft({_:2},[Wt(e.keypath.slots,n=>({name:n.name,fn:x(()=>[n.href&&e.openLinkOnMousedown?(N(),b(`a`,{key:0,target:`_blank`,href:n.href,onMousedown:dn(e=>t(n.href),[`stop`,`prevent`])},Zt(n.value),41,Z_)):n.href?(N(),b(`a`,{key:1,target:`_blank`,href:n.href},Zt(n.value),9,Q_)):(N(),b(`span`,$_,Zt(n.value),1))])}))]),1032,[`keypath`]))]),_:1},8,[`anchor-element`,`color`,`offset`,`direction`,`interactive`,`disabled`,`delay`,`persistence`]))}});E();var tv=O({__name:`TmManagedTooltipWrapper`,props:{data:{},anchorElement:{}},setup(e){return(t,n)=>e.data.variant===`translate`?(N(),k(ev,on({key:0},e.data,{"anchor-element":e.anchorElement}),null,16,[`anchor-element`])):(N(),k(Y_,on({key:1},e.data,{"anchor-element":e.anchorElement}),null,16,[`anchor-element`]))}});$t();var nv=T([]);function rv(){return{tooltips:Pt(nv),registerTooltip:(e,t)=>{nv.value.push({id:hu(),anchorElement:e,tooltipData:t})},unregisterTooltip:e=>{nv.value=nv.value.filter(t=>t.anchorElement!==e)},isRegisteredTooltip:e=>nv.value.find(t=>t.anchorElement===e),updateTooltipData:(e,t)=>{let n=nv.value.find(t=>t.anchorElement===e);n&&(n.tooltipData=t)}}}E(),$t();var iv=O({__name:`TmTooltipManager`,setup(e){let{tooltips:t,unregisterTooltip:n}=rv();return(e,r)=>(N(!0),b(un,null,Wt(j(t),e=>(N(),k(tv,{key:e.id,data:e.tooltipData,"anchor-element":e.anchorElement,onCloseAnimationEnd:t=>j(n)(e.anchorElement)},null,8,[`data`,`anchor-element`,`onCloseAnimationEnd`]))),128))}});E();var av=O({components:{TmTooltipManager:iv,TmModalWrapper:B_,TmAuthLoader:Bi,TmNotifications:J_},setup(){let{shouldDisplayAuthLoader:e}=ii(),t=hs(),n=ee();return n.iconMapFn=e=>e.startsWith(`tmi-`)?{cls:`tmi ${e}`}:{cls:`mdi-r mdi-${e}`},{shouldDisplayAuthLoader:e,onReloadClick:()=>{t.reload()}}}});E();var ov={class:`app-wrapper`};function sv(e,t,n,r,i,a){let o=I(`tm-notifications`),s=I(`router-view`),c=I(`tm-auth-loader`),l=I(`tm-modal-wrapper`),u=I(`tm-tooltip-manager`);return N(),b(`div`,ov,[w(o),w(s),e.shouldDisplayAuthLoader?(N(),k(c,{key:0,onReload:e.onReloadClick},null,8,[`onReload`])):P(``,!0),w(l),w(u)])}var cv=q(av,[[`render`,sv],[`__scopeId`,`data-v-1b699765`]]),lv={config:{},plugins:{Loading:yt},iconSet:{name:`material-icons-round`,type:{positive:`check_circle`,negative:`warning`,info:`info`,warning:`priority_high`},arrow:{up:`arrow_upward`,right:`arrow_forward`,down:`arrow_downward`,left:`arrow_back`,dropdown:`tmi-arrow-down`},chevron:{left:`tmi-chevron-left`,right:`tmi-chevron-right`},colorPicker:{spectrum:`gradient`,tune:`tune`,palette:`style`},pullToRefresh:{icon:`refresh`},carousel:{left:`tmi-chevron-left`,right:`tmi-chevron-right`,up:`keyboard_arrow_up`,down:`keyboard_arrow_down`,navigationIcon:`lens`},chip:{remove:`cancel`,selected:`check`},datetime:{arrowLeft:`tmi-chevron-left`,arrowRight:`tmi-chevron-right`,now:`access_time`,today:`today`},editor:{bold:`format_bold`,italic:`format_italic`,strikethrough:`
2strikethrough_s`,underline:`format_underlined`,unorderedList:`format_list_bulleted`,orderedList:`format_list_numbered`,subscript:`vertical_align_bottom`,superscript:`vertical_align_top`,hyperlink:`link`,toggleFullscreen:`fullscreen`,quote:`format_quote`,left:`format_align_left`,center:`format_align_center`,right:`format_align_right`,justify:`format_align_justify`,print:`print`,outdent:`format_indent_decrease`,indent:`format_indent_increase`,removeFormat:`format_clear`,formatting:`text_format`,fontSize:`format_size`,align:`format_align_left`,hr:`remove`,undo:`undo`,redo:`redo`,heading:`format_size`,heading1:`none`,heading2:`none`,heading3:`none`,heading4:`none`,heading5:`none`,heading6:`none`,code:`code`,size:`format_size`,size1:`none`,size2:`none`,size3:`none`,size4:`none`,size5:`none`,size6:`none`,size7:`none`,font:`font_download`,viewSource:`code`},expansionItem:{icon:`keyboard_arrow_down`,denseIcon:`tmi-arrow-down`},fab:{icon:`add`,activeIcon:`close`},field:{clear:`cancel`,error:`error`},pagination:{first:`first_page`,prev:`tmi-chevron-left`,next:`tmi-chevron-right`,last:`last_page`},rating:{icon:`grade`},stepper:{done:`check`,active:`edit`,error:`warning`},tabs:{left:`tmi-chevron-left`,right:`tmi-chevron-right`,up:`keyboard_arrow_up`,down:`keyboard_arrow_down`},table:{arrowUp:`arrow_upward`,warning:`warning`,firstPage:`first_page`,prevPage:`tmi-chevron-left`,nextPage:`tmi-chevron-right`,lastPage:`last_page`},tree:{icon:`play_arrow`},uploader:{done:`done`,clear:`clear`,add:`add_box`,upload:`cloud_upload`,removeQueue:`clear_all`,removeUploaded:`done_all`}}},uv=(e,t)=>Object.entries(t).some(([t,n])=>typeof t==`string`&&t.startsWith(e)&&n),dv=e($f()),fv={ALLOWED_TAGS:[`div`,`span`,`a`,`mark`,`media`,`audio`,`img`,`br`],ALLOWED_ATTR:[`class`,`href`,`src`,`alt`,`height`,`width`,`target`]},pv={KEEP_CONTENT:!1},mv={ALLOWED_TAGS:[...fv.ALLOWED_TAGS,`strong`,`u`,`b`,`i`,`strike`,`em`,`s`,`pre`,`code`,`ul`,`ol`,`li`,`p`,`font`,`div`,`span`,`blockquote`,`table`,`tbody`,`thead`,`th`,`tr`,`td`,`style`],ALLOWED_ATTR:[...fv.ALLOWED_ATTR,`class`,`style`,`color`,`valign`]},hv=e=>e instanceof HTMLElement&&e.tagName===`IMG`&&e.dataset.type===`emoji`,gv=(e,t)=>t.allowedAttributes.class?!0:hv(e),_v=(e,t)=>t.allowedAttributes.style?!0:hv(e),vv=function(e){return e.MERGE=`merge`,e.STRICT=`strict`,e.RICH=`rich`,e}({}),yv=new Map,bv=(0,dv.default)();bv.addHook(`uponSanitizeAttribute`,(e,t)=>{t.attrName===`class`&&gv(e,t)&&(t.forceKeepAttr=!0),t.attrName===`style`&&_v(e,t)&&(t.forceKeepAttr=!0)});var xv=(e,t)=>e===vv.MERGE?xt(fv,t??{}):e===vv.STRICT?xt(pv,t??{}):e===vv.RICH?xt(mv,t??{}):t??fv,Sv=(e,t)=>{if(!e)return``;let n=typeof e==`string`,r=n?e:e.html,i=xv(t,n?null:e.config??null),a=JSON.stringify({toSanitizeValue:r,sanitizerConfig:i}),o=yv.get(a)??bv.sanitize(r,i);return yv.has(a)||yv.set(a,o),o},Cv=(e,{value:t,arg:n,modifiers:r})=>{let i=Sv(t,n);uv(`hide-empty`,r)&&!i.length?e.classList.add(`safe-html-directive--hidden`):e.classList.remove(`safe-html-directive--hidden`),e.innerHTML=i},wv={mounted:Cv,updated:Cv},Tv=`ignore-outer-click`;function Ev(e){return t=>{if(t.target instanceof Element){if(t.target.classList.contains(Tv)||t.target.parentElement?.classList.contains(Tv))return;this===t.target||this.contains(t.target)||e.value(t)}}}var Dv={beforeMount(e,t,n){if(t?.value?.constructor.name!==`Function`)throw Error(`On outer click method should be specified`);e.outerClick=Ev.bind(e)(t),e.outerClickSubscribeTimeout=setTimeout(()=>{window.addEventListener(`click`,e.outerClick)})},beforeUnmount(e){clearTimeout(e.outerClickSubscribeTimeout),window.removeEventListener(`click`,e.outerClick)}},{registerTooltip:Ov,unregisterTooltip:kv,isRegisteredTooltip:Av,updateTooltipData:jv}=rv(),Mv=new WeakMap,Nv=(e,t)=>{let n={data:t,onMouseEnter:()=>{Av(e)||Ov(e,n.data)}};Mv.set(e,n),t.persistence||e.addEventListener(`mouseenter`,n.onMouseEnter),t.persistence?.isOpen&&Ov(e,t)},Pv=(e,t)=>{let n=Mv.get(e);if(!n){Nv(e,t);return}n.data=t,t.persistence?e.removeEventListener(`mouseenter`,n.onMouseEnter):e.addEventListener(`mouseenter`,n.onMouseEnter),Av(e)?jv(e,t):t.persistence?.isOpen&&Ov(e,t)},Fv=e=>{let t=Mv.get(e);t&&(e.removeEventListener(`mouseenter`,t.onMouseEnter),Av(e)&&kv(e),Mv.delete(e))},Iv={beforeMount(e,t){e&&t.value&&Nv(e,t.value)},updated(e,t){e&&(t.value?Pv(e,t.value):Fv(e))},beforeUnmount(e){Fv(e)}},Lv=(e,t)=>{t?e.setAttribute(Ca,t):e.removeAttribute(Ca)},Rv={mounted(e,t){Lv(e,t.value)},updated(e,t){Lv(e,t.value)}};E(),$t();var zv=O({inheritAttrs:!1,__name:`TmRouterViewReloader`,setup(e){let{isShowRoute:t}=Vr();return(e,n)=>j(t)?F(e.$slots,`default`,{key:0}):P(``,!0)}});E(),$t();var Bv=O({components:{TmDropdown:xr,TmDropdownItem:bi,TmIcon:ei},props:{options:{type:Array,required:!0},highlightActive:Boolean,activeOption:String,dropdownModelValue:Boolean,maxWidth:String,menuWidth:String,disable:{type:Boolean}},emits:{"update:model-value":e=>!0,"update:dropdown":e=>!0,show:()=>!0,hide:e=>!0,"before-hide":()=>!0},setup(e,t){let n=T(),r=T(),i=T([]),a=T(!1),o=T(20),s=C(()=>o.value>=e.options.length?e.options:e.options.slice(0,o.value)),c=()=>{o.value+=20},l=null;Vt(()=>{l?.disconnect()});let u=(e,t)=>
2{i.value[t]=e?.$el},{focusedIndex:d,resetFocusedOption:f}=cr({isOpen:a,optionsCount:C(()=>s.value.length),getOptionElement:e=>i.value[e],close:()=>n.value?.close()});return fn(d,e=>{e>=0&&e>=s.value.length-5&&c()}),fn(()=>e.options.length,()=>{o.value=20,i.value=[],f()}),{tmDropdownElement:n,bottomElement:r,preparedOptions:s,setOptionElement:u,isOptionFocused:(t,n)=>d.value===-1?e.highlightActive&&t.value===e.activeOption:d.value===n,showHandler:()=>{a.value=!0,l=new IntersectionObserver(e=>{e[0].isIntersecting&&c()},{root:n.value.getMenuWrapperElement(),rootMargin:`0px 0px 100px 0px`}),l.observe(r.value),t.emit(`show`)},hideHandler:e=>{a.value=!1,t.emit(`hide`,e),l?.disconnect(),o.value=20}}}});E(),A();var Vv={ref:`bottomElement`};function Hv(e,t,n,r,i,a){let o=I(`tm-icon`),s=I(`tm-dropdown-item`),c=I(`tm-dropdown`);return N(),k(c,{ref:`tmDropdownElement`,"no-focus":!1,"model-value":e.dropdownModelValue,"max-width":e.maxWidth,width:e.menuWidth,disable:e.disable,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit(`update:dropdown`,t)),onShow:e.showHandler,onBeforeHide:t[1]||(t[1]=t=>e.$emit(`before-hide`)),onHide:e.hideHandler},{menu:x(t=>[F(e.$slots,`before-options`,Yt(pn(t))),e.preparedOptions.length?(N(!0),b(un,{key:0},Wt(e.preparedOptions,(t,n)=>(N(),k(s,{key:t.value,ref_for:!0,ref:t=>e.setOptionElement(t,n),tabindex:`-1`,focused:e.isOptionFocused(t,n),onClick:n=>e.$emit(`update:model-value`,t.value)},{default:x(()=>[F(e.$slots,`option`,{opt:t},()=>[t.icon?(N(),k(o,{key:0,name:t.icon,class:`neutral--text`,size:`small`,left:``},null,8,[`name`])):P(``,!0),S(`span`,null,Zt(t.text),1)])]),_:2},1032,[`focused`,`onClick`]))),128)):(N(),k(we,{key:1},{default:x(()=>[w(Le,{class:`text-grey`},{default:x(()=>[Rt(Zt(e.$t(`common.noResults`)),1)]),_:1})]),_:1})),S(`div`,Vv,null,512)]),default:x(()=>[F(e.$slots,`selected-item`)]),_:3},8,[`model-value`,`max-width`,`width`,`disable`,`onShow`,`onHide`])}var Uv=q(Bv,[[`render`,Hv]]);E(),A();var Wv=[`textContent`],Gv=q(O({__name:`TmFormLineLabel`,props:{label:{},fontSize:{},additional:{},extraHeightMd:{type:Boolean},required:{type:Boolean},distinct:{type:Boolean},ellipsis:{type:Boolean}},setup(e){return(t,n)=>(N(),b(`h6`,{class:M([`tm-form-line-label`,{[`tm-form-line-label--${e.fontSize}`]:e.fontSize,"tm-form-line-label--extra-height-md":e.extraHeightMd,"tm-form-line-label--required":e.required,"distinct--text":e.distinct,ellipsis:e.ellipsis}])},[F(t.$slots,`default`,{},()=>[S(`span`,null,Zt(e.label),1),e.additional?(N(),b(`span`,{key:0,class:`light--text font-weight-normal`,textContent:Zt(` (${e.additional})`)},null,8,Wv)):P(``,!0)],!0)],2))}}),[[`__scopeId`,`data-v-d6e84b7e`]]);E(),$t(),A();var Kv={key:2,class:`lh-40 font-weight-semi-bold`},qv=q(O({__name:`TmFormLine`,props:{label:{},fontSize:{},labelDistinct:{type:Boolean},leftLabel:{type:Boolean},leftLabelWidth:{},smallLabel:{type:Boolean},labelAdditional:{},text:{},required:{type:Boolean},inputWrapperClass:{},hideLabel:{type:Boolean},labelVerticalAlign:{default:`top`},overflowInitial:{type:Boolean},labelClass:{},additionalStyles:{default:()=>({})},disableFocus:{type:Boolean},ellipsis:{type:Boolean}},setup(e,{expose:t}){let n=e,r=Ut(),i=jn().inject(),a=zn().inject(T(`100px`)),o=T(null);lr().provide(o);let s=T(null),c=!!r.text,l=()=>{n.disableFocus||o.value?.focus?.()},u=C(()=>n.leftLabel||i?.value),d=C(()=>u.value?n.leftLabelWidth||a?.value:`100%`),f=C(()=>s.value?s.value.querySelector(`[validators*=required]`)!==null:!1),p=C(()=>{let e={"tm-form-line__input-wrapper":!0,"tm-form-line__input-wrapper_left-label":!!u.value};return n.inputWrapperClass&&(e[n.inputWrapperClass]=!0),e});return t({getInputWrapElement:()=>s.value}),(t,n)=>(N(),b(`div`,{class:M([`tm-form-line`,{"tm-form-line--left-label":j(u),"tm-form-line--overflow-initial":e.overflowInitial}])},[e.hideLabel?P(``,!0):(N(),b(`div`,{key:0,class:M([`tm-form-line__label`,{"tm-form-line__label--left":j(u),[`tm-form-line__label--vertical-${e.labelVerticalAlign}`]:!0},e.labelClass]),style:an({width:j(d),"min-width":j(d),...e.additionalStyles})},[F(t.$slots,`label`,Yt(pn({focus:l,label:e.label,required:e.required})),()=>[w(Gv,{label:e.label,"font-size":e.fontSize,additional:e.labelAdditional,"extra-height-md":j(u)&&!e.smallLabel,required:e.required||j(f),distinct:e.labelDistinct,ellipsis:e.ellipsis,onClick:l},{default:x(()=>[F(t.$slots,`label-text`,{},void 0,!0)]),_:3},8,[`label`,`font-size`,`additional`,`extra-height-md`,`required`,`distinct`,`ellipsis`]),F(t.$slots,`after-label`,{}
2,void 0,!0)],!0)],6)),!e.text&&!c?(N(),b(`div`,{key:1,ref_key:`inputWrapRef`,ref:s,class:M(j(p))},[F(t.$slots,`default`,{},void 0,!0)],2)):(N(),b(`div`,Kv,[F(t.$slots,`text`,{},()=>[Rt(Zt(e.text),1)],!0)]))],2))}}),[[`__scopeId`,`data-v-d3408cc3`]]);E(),$t(),A();var Jv=q(O({__name:`TmOverlay`,props:{active:{type:Boolean}},setup(e){let{isMobileMenu:t}=xn();return(n,r)=>(N(),b(`div`,{class:M([`tm-overlay`,{"tm-overlay--active":e.active,"tm-overlay--desktop":!j(t)}])},null,2))}}),[[`__scopeId`,`data-v-0f1352e0`]]),Yv=function(e){return e[e.General=0]=`General`,e[e.Extended=1]=`Extended`,e[e.Other=2]=`Other`,e}({}),Xv=`.AD.AE.AF.AG.AI.AL.AM.AN.AO.AQ.AR.AS.AT.AU.AW.AZ.BA.BB.BD.BE.BF.BG.BH.BI.BJ.BM.BN.BO.BR.BS.BT.BV.BW.BY.BZ.CA.CC.CD.CF.CG.CH.CI.CK.CL.CM.CN.CO.CR.CU.CV.CX.CY.CZ.DE.DJ.DK.DM.DO.DZ.EC.EE.EG.EH.ER.ES.ET.FI.FJ.FK.FM.FO.FR.GA.GD.GE.GF.GH.GI.GL.GM.GN.GP.GQ.GR.GS.GT.GU.GW.GY.HK.HM.HN.HR.HT.HU.IC.ID.IE.IL.IN.IO.IQ.IR.IS.IT.JM.JO.JP.KE.KG.KH.KI.KM.KN.KP.KR.KW.KY.KZ.LA.LB.LC.LI.LK.LR.LS.LT.LU.LV.LY.MA.MC.MD.ME.MG.MH.MK.ML.MM.MN.MO.MP.MQ.MR.MS.MT.MU.MV.MW.MX.MY.MZ.NA.NC.NE.NF.NG.NI.NL.NO.NP.NR.NU.NZ.OM.PA.PE.PF.PG.PH.PK.PL.PM.PN.PR.PT.PW.PY.QA.RE.RO.RS.RU.RW.SA.SB.SC.SD.SE.SG.SH.SI.SJ.SK.SL.SM.SN.SO.SR.SS.ST.SV.SY.SZ.TC.TD.TF.TG.TH.TJ.TK.TL.TM.TN.TO.TP.TR.TT.TV.TW.TY.TZ.UA.UG.GB.UM.US.UY.UZ.VA.VC.VE.VG.VI.VN.VU.WF.WS.YE.ZA.ZM.ZR.ZW`.split(`.`),Zv={BL:0,JE:1,XK:2,SX:3,MF:3,GG:4,IM:5,YT:6,PS:7,LV:8,CW:9},Qv={BQ:`NL`},$v=Math.max(...Object.values(Zv))+1,ey=(e,t)=>e/(t-1),ty=e=>ey(Math.max(0,Xv.indexOf(e)),Xv.length),ny=e=>ey(Zv[e],$v),ry=e=>{if(!e||e===`ZZ`)return{type:2,position:0};let t=Qv[e]??e;return Zv[t]?{type:1,position:ny(t)}:{type:0,position:ty(t)}},iy=[{format:`png`,mediaType:`image/png`,width:22,height:3660,space:`srgb`,channels:3,depth:`uchar`,density:72,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!0,hasAlpha:!1,autoOrient:{width:44,height:7320},aspect:.006010928961748634,allowUpscale:!1,pixelDensityDescriptor:`1x`,src:`/assets/CSjT5Ldx.png`},{format:`avif`,mediaType:`image/png`,width:22,height:3660,space:`srgb`,channels:3,depth:`uchar`,density:72,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!0,hasAlpha:!1,autoOrient:{width:44,height:7320},aspect:.006010928961748634,allowUpscale:!1,pixelDensityDescriptor:`1x`,src:`/assets/BpmPTbau.avif`},{format:`webp`,mediaType:`image/png`,width:22,height:3660,space:`srgb`,channels:3,depth:`uchar`,density:72,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!0,hasAlpha:!1,autoOrient:{width:44,height:7320},aspect:.006010928961748634,allowUpscale:!1,pixelDensityDescriptor:`1x`,src:`/assets/By50zhRI.webp`},{format:`png`,mediaType:`image/png`,width:44,height:7320,space:`srgb`,channels:3,depth:`uchar`,density:72,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!0,hasAlpha:!1,autoOrient:{width:44,height:7320},aspect:.006010928961748634,allowUpscale:!1,pixelDensityDescriptor:`2x`,src:`/assets/VlkkO3I2.png`},{format:`avif`,mediaType:`image/png`,width:44,height:7320,space:`srgb`,channels:3,depth:`uchar`,density:72,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!0,hasAlpha:!1,autoOrient:{width:44,height:7320},aspect:.006010928961748634,allowUpscale:!1,pixelDensityDescriptor:`2x`,src:`/assets/dHKkmYn2.avif`},{format:`webp`,mediaType:`image/png`,width:44,height:7320,space:`srgb`,channels:3,depth:`uchar`,density:72,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!0,hasAlpha:!1,autoOrient:{width:44,height:7320},aspect:.006010928961748634,allowUpscale:!1,pixelDensityDescriptor:`2x`,src:`/assets/BVqSH239.webp`}],ay=[{format:`png`,mediaType:`image/png`,width:22,height:150,space:`srgb`,channels:4,depth:`uchar`,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!1,hasAlpha:!0,autoOrient:{width:44,height:300},aspect:.14666666666666667,allowUpscale:!1,pixelDensityDescriptor:`1x`,src:`/assets/FCo3OZ7d.png`},{format:`avif`,mediaType:`image/png`,width:22,height:150,space:`srgb`,channels:4,depth:`uchar`,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!1,hasAlpha:!0,autoOrient:{width:44,height:300},aspect:.14666666666666667,allowUpscale:!1,pixelDensityDescriptor:`1x`,src:`/assets/Mb7
2Hvsro.avif`},{format:`webp`,mediaType:`image/png`,width:22,height:150,space:`srgb`,channels:4,depth:`uchar`,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!1,hasAlpha:!0,autoOrient:{width:44,height:300},aspect:.14666666666666667,allowUpscale:!1,pixelDensityDescriptor:`1x`,src:`/assets/Dna-edUu.webp`},{format:`png`,mediaType:`image/png`,width:44,height:300,space:`srgb`,channels:4,depth:`uchar`,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!1,hasAlpha:!0,autoOrient:{width:44,height:300},aspect:.14666666666666667,allowUpscale:!1,pixelDensityDescriptor:`2x`,src:`/assets/fyP3X7R7.png`},{format:`avif`,mediaType:`image/png`,width:44,height:300,space:`srgb`,channels:4,depth:`uchar`,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!1,hasAlpha:!0,autoOrient:{width:44,height:300},aspect:.14666666666666667,allowUpscale:!1,pixelDensityDescriptor:`2x`,src:`/assets/axtkSAre.avif`},{format:`webp`,mediaType:`image/png`,width:44,height:300,space:`srgb`,channels:4,depth:`uchar`,isProgressive:!1,isPalette:!1,bitsPerSample:8,hasProfile:!1,hasAlpha:!0,autoOrient:{width:44,height:300},aspect:.14666666666666667,allowUpscale:!1,pixelDensityDescriptor:`2x`,src:`/assets/DwVhhMmQ.webp`}];E(),Jt();var oy=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAeAQMAAABt+G7kAAAAA1BMVEVMaXFNx9g6AAAAAXRSTlMAQObYZgAAAAtJREFUeF5jGHYAAADSAAEzF5gpAAAAAElFTkSuQmCC`,sy=O({props:{countryCode:{type:String},size:{type:String,default:``}},setup(e){let t=To(),n=C(()=>e.countryCode?t.getCountryName(e.countryCode):``),r=C(()=>e.size?`tm-flag--${De(e.size)}`:``),i=C(()=>ry(e.countryCode??``));return{placeholderImageBase64:oy,countryName:n,flagType:C(()=>i.value.type),flagTypeClass:C(()=>{switch(i.value.type){case Yv.General:return`tm-flag--general`;case Yv.Extended:return`tm-flag--alt`;case Yv.Other:return`tm-flag--other`;default:throw new Qa(i.value.type)}}),flagPosition:C(()=>`${i.value.position*100}%`),sizeClass:r,flagOtherImageUrl:`url(${qf})`,generalFlagImages:Vd(iy),altFlagImages:Vd(ay)}}}),cy=()=>{tn(e=>({a88f8c56:e.flagPosition,v0dafbfd0:e.flagOtherImageUrl,v09b870b8:e.generalFlagImages.fallback,caf10c6e:e.generalFlagImages.imageSet,v04e4f57a:e.altFlagImages.fallback,c61d9130:e.altFlagImages.imageSet}))},ly=sy.setup;sy.setup=ly?(e,t)=>(cy(),ly(e,t)):cy,E(),A();var uy=[`src`,`alt`];function dy(e,t,n,r,i,a){return N(),b(`div`,{class:M([`tm-flag`,e.sizeClass,e.flagTypeClass])},[S(`img`,{class:`tm-flag__img`,src:e.placeholderImageBase64,alt:e.countryName},null,8,uy)],2)}var fy=q(sy,[[`render`,dy],[`__scopeId`,`data-v-311a2e9b`]]);E(),$t(),A();var py={key:1},my=O({__name:`PersonNameHighlight`,props:{name:{},search:{}},setup(e){let t=e,n=C(()=>t.name||`-`);return(t,r)=>e.search?(N(),k(np,{key:0,text:j(n),search:e.search,"ignore-chars":j(zd)},null,8,[`text`,`search`,`ignore-chars`])):(N(),b(`span`,py,Zt(j(n)),1))}});E();var hy=O({components:{TmConditionalLink:Qr,PersonNameHighlight:my,TmAvatar:Hi},props:{name:{type:String},avatarName:{type:String},avatarUrl:{type:String},avatarColor:{type:String},avatarIcon:{type:String},avatarSize:{type:String,default:`medium`},avatarCustomSize:{type:String},avatarPlaceholderCustomSize:{type:String},avatarExactColor:Boolean,avatarCustomIconClass:{type:String},to:{type:Object},isBlank:{type:Boolean},semiBold:{type:Boolean},searchQuery:{type:String},maxWidth:{type:String}},setup(e){return{placeholderProps:C(()=>{let t={};return e.avatarIcon&&(t.placeholderType=`icon`,t.customIcon=e.avatarIcon),t})}}});E(),A();var gy={class:`tm-person`},_y={class:`tm-person__avatar`};function vy(e,t,n,r,i,a){let o=I(`tm-avatar`),s=I(`person-name-highlight`),c=I(`tm-conditional-link`);return N(),b(`div`,gy,[S(`div`,_y,[F(e.$slots,`avatar`,{},()=>[w(o,on(e.placeholderProps,{url:e.avatarUrl,name:e.avatarName??e.name,color:e.avatarColor,size:e.avatarSize,"placeholder-custom-size":e.avatarPlaceholderCustomSize,"custom-size":e.avatarCustomSize,"exact-color":e.avatarExactColor,"custom-icon-class":e.avatarCustomIconClass}),Ft({_:2},[e.$slots[`avatar-status`]?{name:`status`,fn:x(()=>[F(e.$slots,`avatar-status`,{},void 0,!0)]),key:`0`}:void 0]),1040,[`url`,`name`,`color`,`size`,`placeholder-custom-size`,`custom-size`,`exact-color`,`custom-icon-class`])],!0)]),e.name||e.$slots.name?(N(),k(c,{key:0,tag:`span`,class:M([`tm-person__name truncate`,{"font-weight-semi-bold":e.semiBold,"blue-on-hover":e.to}]),style:an({"max-width":e.maxWidth}),"is-blank":e.isBlank,to:e.to},{default:x(()=>[F(e.$slots,`name`,Yt(pn({name:e.name})),()=>[w(s,{name:e.name,search:e.searchQuery},null,8,[`name`,`search`])],!0)]),_:3},8,[`class`,`style`,`is-blank`,`to`])):P(``,!0)])}var yy=q(hy,[[`render`,vy],[`__scopeId`,`data-v-65608fe9`]]);E();var by=O({components:{TmFlag:fy},props:{hideTitle:{type:Boolean},countryCode:{type:String,default:`ZZ`},title:{type:String},showTooltip:{type:Boolean,default:!1},size:{type:String,default:``},additionalData:{type:String,default:``},disabled:{type:Boolean},fontWeight:{type:String}},setup(e){let t=To();return{cTitle:C(()=>e.title?e.title:e.countryCode?t.getCountryName(e.countryCode):``)}}});E(),A();
2var xy={key:0,class:`tm-country-text`},Sy=[`title`],Cy={key:0,class:`tm-country__additional-data`};function wy(e,t,n,r,i,a){let o=I(`tm-flag`);return N(),b(`div`,{class:M({"tm-country":!0,"tm-country--disabled":e.disabled})},[w(o,{class:`tm-country__flag`,"country-code":e.countryCode,size:e.size},null,8,[`country-code`,`size`]),!e.hideTitle||e.countryCode?(N(),b(`div`,xy,[F(e.$slots,`title`,{title:e.cTitle},()=>[e.hideTitle?P(``,!0):(N(),b(`span`,{key:0,class:M([`tm-country__title`,{[`tm-country__title--font-${e.fontWeight}`]:e.fontWeight}]),title:e.showTooltip?e.cTitle:``},Zt(e.cTitle),11,Sy))],!0),e.additionalData?(N(),b(`span`,Cy,Zt(`(${e.additionalData})`),1)):P(``,!0)])):P(``,!0),F(e.$slots,`separator`,{},void 0,!0)],2)}var Ty=q(by,[[`render`,wy],[`__scopeId`,`data-v-ef99fc1a`]]);E(),A();var Ey=[`textContent`],Dy=q(O({__name:`FieldTextDomain`,props:{domainText:{},backgroundColor:{}},setup(e){return(t,n)=>(N(),b(`div`,{class:M({"field-text-domain":!0,[`field-text-domain_background-${e.backgroundColor}`]:!0}),textContent:Zt(e.domainText)},null,10,Ey))}}),[[`__scopeId`,`data-v-a67da5f8`]]);E(),$t();var Oy=O({components:{FieldTextDomain:Dy,TmIcon:ei,TmError:ap},props:{...$d,modelValue:{type:String,required:!0},leftIcon:{type:String},rightIcon:{type:String},fieldClass:{type:[String,Object],default:``},autoselect:{type:Boolean,default:!1},errorState:{type:Boolean,default:!1},domainText:{type:String},size:{type:String,default:``},debounce:{type:Number,default:0},max:{type:Number},maxLength:{type:Number,default:255},enableLastPass:{type:Boolean},trim:{type:Boolean,default:!1},frozen:{type:Boolean},inputClass:{type:String},pasteHandler:{type:Function},smallPadding:{type:Boolean},noAppendPadding:{type:Boolean},isBlocked:{type:Boolean,default:!1},clearable:{type:Boolean},isDisabledPasteHandler:{type:Boolean},hideMessage:{type:Boolean},nativeType:{type:String},rounded:{type:Boolean}},emits:{...sf(),clear:()=>!0,paste:e=>!0,"typing-start":()=>!0,blur:e=>!0},setup(e,t){let n=T(),{propsAndAttrs:r,emitInput:i,emitChange:a}=Hf(e,t,[`class`]),o=null;e.isStateless&&(o=ip({reset:()=>i(``)}).control);let s=C(()=>o?.getErrors()??e.errors),c=C(()=>e.errorState||s.value.length>0||e.serverErrors.length>0),l=C(()=>De(e.size)),{focus:u,blur:d}=rp(()=>n.value);nr({focus:u});let f=e=>{e??(e=``),i(String(e)),n.value&&u(),ie()},p=n=>{t.emit(`blur`,n),e.trim&&i(e.modelValue.trim()),e.isStateless&&o?.handleBlur()},ee=C(()=>n.value?.nativeEl),te=T(!1),ne=null,re=()=>{te.value||(te.value=!0,t.emit(`typing-start`))},ie=()=>{te.value=!1};return fn(ee,(e,t)=>{t&&ne&&t.removeEventListener(`input`,ne),e&&(ne=re,e.addEventListener(`input`,ne))},{immediate:!0}),nn(()=>{ee.value&&ne&&ee.value.removeEventListener(`input`,ne)}),{qInput:n,onInput:f,emitChange:a,propsAndAttrs:r,kebabSize:l,focus:u,blur:d,onBlur:p,nativeEl:ee,handlePaste:r=>{if(e.isDisabledPasteHandler||!n.value?.nativeEl||![`text`,`search`,`tel`,`url`,`password`].includes(n.value.nativeEl.type))return;r.preventDefault();let i=r.clipboardData?.getData(`text`)||``,a=e.modelValue||``,{newValue:o,cursorPosition:s}=Qd(n.value.nativeEl,i,a,e.maxLength),c;c=e.pasteHandler?e.pasteHandler(o):o,f(o),t.emit(`paste`,c),Nt(()=>{n.value?.nativeEl.setSelectionRange(s,s)})},errorsBag:s,innerErrorState:c,isTyping:te,inputType:C(()=>e.nativeType??r.value.type)}}});E(),A();var ky={key:0,class:`field-text__bottom`},Ay={key:0,class:`tm-field-text--error`};function jy(e,t,n,r,i,a){let o=I(`tm-icon`),s=I(`field-text-domain`),c=I(`tm-error`);return N(),b(`div`,null,[w(le,on({ref:`qInput`},e.propsAndAttrs,{debounce:e.debounce,outlined:``,maxlength:e.max||e.maxLength,dense:``,class:[`tm-field-text`,[e.fieldClass,{"tm-field-text--disabled":e.isDisabled,"tm-field-text--blocked":e.isBlocked,"tm-field-text--focused":e.isFocused,"tm-field-text--clearable":e.clearable&&!!e.modelValue,"tm-field-text--flat":e.flat,[`tm-field-text--${e.kebabSize}`]:e.size,"tm-field-text--transparent":e.transparent,"tm-field-text--small-padding":e.smallPadding,"tm-field-text--no-append-padding":e.noAppendPadding,"tm-field-text--rounded":e.rounded}]],type:e.inputType,tabindex:e.frozen?`-1`:``,disable:e.isDisabled||e.isBlocked,"model-value":e.modelValue||``,"data-lpignore":e.enableLastPass?void 0:`true`,clearable:e.clearable,"hide-bottom-sp
2ace":``,"onUpdate:modelValue":e.onInput,onChange:e.emitChange,onBlur:e.onBlur,onPaste:e.handlePaste,onClear:t[0]||(t[0]=t=>e.$emit(`clear`))}),Ft({_:2},[e.leftIcon||e.$slots.prepend?{name:`prepend`,fn:x(()=>[F(e.$slots,`prepend`,{},()=>[w(o,{name:e.leftIcon,size:`xLarge`},null,8,[`name`])],!0)]),key:`0`}:void 0,e.domainText||e.rightIcon||e.$slots.append?{name:`append`,fn:x(()=>[F(e.$slots,`append`,{},()=>[e.rightIcon?(N(),k(o,{key:0,name:e.rightIcon,size:`xLarge`},null,8,[`name`])):e.domainText?(N(),k(s,{key:1,"domain-text":e.domainText,"background-color":`white`},null,8,[`domain-text`])):P(``,!0)],!0)]),key:`1`}:void 0]),1040,[`debounce`,`maxlength`,`type`,`class`,`tabindex`,`disable`,`model-value`,`data-lpignore`,`clearable`,`onUpdate:modelValue`,`onChange`,`onBlur`,`onPaste`]),!e.hideMessage&&(e.innerErrorState||e.hint||e.$slots.hint)?(N(),b(`div`,ky,[e.innerErrorState?(N(),b(`div`,Ay,[F(e.$slots,`error`,{},()=>[w(c,{field:e.name??`text`,errors:e.errorsBag,"server-errors":e.serverErrors,invalid:e.innerErrorState},null,8,[`field`,`errors`,`server-errors`,`invalid`])],!0)])):P(``,!0),F(e.$slots,`hint`,{},()=>[Rt(Zt(e.hint),1)],!0)])):P(``,!0)])}var My=q(Oy,[[`render`,jy],[`__scopeId`,`data-v-1c0884a2`]]);E(),$t();var Ny=O({components:{FieldText:My},props:{modelValue:{type:String,default:``},size:{type:String,default:``},loading:{type:Boolean,default:!1},debounce:{type:Number},withIcon:{type:Boolean,default:!0},maxLength:{type:Number},noAppendPadding:{type:Boolean},isDisabled:{type:Boolean}},emits:{[of]:e=>!0},setup(e,t){let n=T();return{tmFieldRef:n,change:e=>t.emit(of,e),focus:()=>{n.value.focus()},blur:()=>{n.value.blur()}}}});E();function Py(e,t,n,r,i,a){let o=I(`field-text`);return N(),k(o,{ref:`tmFieldRef`,"model-value":e.modelValue,"left-icon":e.withIcon?`search`:void 0,class:`tm-search`,clearable:``,"native-type":`search`,size:e.size,debounce:e.debounce,loading:e.loading,max:e.maxLength,"no-append-padding":e.noAppendPadding,"is-disabled":e.isDisabled,"onUpdate:modelValue":e.change},{append:x(()=>[F(e.$slots,`append`,{},void 0,!0)]),_:3},8,[`model-value`,`left-icon`,`size`,`debounce`,`loading`,`max`,`no-append-padding`,`is-disabled`,`onUpdate:modelValue`])}var Fy=q(Ny,[[`render`,Py],[`__scopeId`,`data-v-98ffbbaf`]]);E(),A();var Iy=q(O({__name:`TmOnlineStatusBadge`,props:{isOnline:{type:Boolean},size:{default:`medium`}},setup(e){return(t,n)=>(N(),b(`div`,{class:M([`tm-online-status-badge`,[{"tm-online-status-badge--online":e.isOnline},`tm-online-status-badge--size-${e.size}`]])},null,2))}}),[[`__scopeId`,`data-v-dc87e4dd`]]);E();var Ly=O({components:{TmButton:Ta,TmIcon:ei},props:{icon:{type:String},title:{type:String},noBorderRadius:{type:Boolean},alignButtonTop:{type:Boolean},alignCenter:{type:Boolean,default:!1},justifyCenter:{type:Boolean,default:!1},size:{type:String,default:``},showCloseBtn:{type:Boolean},bordered:{type:Boolean},isReduced:{type:Boolean}},emits:{close:()=>!0},setup(e,t){return{hasAlertButtonSlot:t.slots[`alert-button`]}}});E(),A();var Ry={class:`tm-alert__content`},zy={class:`tm-alert__content__container`},By={key:0,class:`subhead-semi-bold-16 emphsize--text mb-1`};function Vy(e,t,n,r,i,a){let o=I(`tm-icon`),s=I(`tm-button`);return N(),b(`div`,{class:M([`tm-alert`,{"tm-alert--small":e.size===`small`,"tm-alert--medium":e.size===`medium`,"tm-alert--xSmall":e.size===`xSmall`,"tm-alert--bordered":e.bordered,"tm-alert--no-border-radius":e.noBorderRadius,"tm-alert--reduced":e.isReduced,"tm-alert--justify-center":e.justifyCenter}])},[S(`div`,{class:M([`tm-alert__wrapper`,{"tm-alert__wrapper--align-center":e.alignCenter}])},[F(e.$slots,`icon`,{},()=>[e.icon?(N(),k(o,{key:0,class:`tm-alert__icon`,name:e.icon,size:e.size===`xSmall`?`medium`:`xLarge`},null,8,[`name`,`size`])):P(``,!0)],!0),S(`div`,Ry,[S(`div`,zy,[e.title?(N(),b(`div`,By,Zt(e.title),1)):P(``,!0),S(`div`,{class:M([`tm-alert__body`,{"tm-alert__body--reduced":e.isReduced}])},[F(e.$slots,`default`,{},void 0,!0)],2)]),e.hasAlertButtonSlot||e.showCloseBtn?(N(),b(`div`,{key:0,class:M([`tm-alert__content__button`,{"tm-alert__content__button--top":e.alignButtonTop,"tm-alert__content__button--close":e.showCloseBtn&&!e.hasAlertButtonSlot}])},[F(e.$slots,`alert-button`,{},()=>[e.showCloseBtn?(N(),k(s,{key:0,size:`small`,class:`tm-alert__close-btn`,flat:``,"icon-only":``,color:`transparent`,onClick:t[0]||(t[0]=t=>e.$emit(`close`))},{default:x(()=>[w(o,{name:`close`,size:`small`,class:`neutral--text`})]),_:1})):P(``,!0)],!0)],2)):P(``,!0)])],2)],2)}var Hy=q(Ly,[[`render`,Vy],[`__scopeId`,`data-v-b194ec0c`]]);E(),$t();var Uy=O({__name:`TmPersistentTooltip`,props:{hideDelay:{},position:{},white:{type:Boolean,default:!1},maxWidth:{},isDefaultPadding:{type:Boolean,default:!0},contentClass:{}},emits:[`before-show`,`before-hide`,`update:model-value`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=T(null),o=T(!1),s=T(!1),c=T(!1),l=async e=>{if(e)c.value=!1;else if(c.value)return;o.value=e},u=()=>{c.value=!0},d=null,f=()=>{c.value=!0,d=window.setTimeout(()=>{s.value||(o.value=!1)},r.hideDelay)},p=()=>{s.value=!0},ee=()=>{s.value=!1};t({close:()=>{c.value=!1,s.value=!1,o.value=!1}});let te=null,ne=e=>{te=null,e.addEventListener(`mouseenter`,u),e.addEventListener(`mouseleave`,f)},re=()=>{te&&(te.addEventListener(`mouseenter`,u),te.addEventListener(`mouseleave`,f))},ie=()=>{i(`before-show`)},ae=()=>{i(`before-hide`),re()};return nn(()=>{re(),d!==null&&clearTimeout(d)}),fn(o,e=>{i(`update:model-value`,e)},{immediate:!0}),(t,n)=>(N(),b(`div`,null,[S(`div`,{onMouseenter:p,onMouseleave:ee},[F(t.$slots,`activator`)],32),w(Ji,{white:e.white,position:e.position,"model-value":j(o),"hide-delay":e.hideDelay,"max-width":e.maxWidth,"is-allow-pointer-events":!0,"is-default-padding":e.isDefaultPadding,"content-class":e.contentClass,"onUpdate:modelValue":l,onShow:ne,onBeforeShow:ie,onBeforeHide:ae},{default:x(()=>[S(`div`,{ref_key:`tooltipContentElement`,ref:a},[F(t.$slots,`tooltip-content`)],512)]),_:3},8,[`white`,`position`,`model-value`,`hide-delay`,`max-width`,`is-default-padding`,`content-class`])]))}});E();var Wy=O({components:{PageResolver:Li},props:{...Kr}});E(),A();function Gy(e,t,n,r,i,a){let o=I(`page-resolver`);
2return N(),k(o,Yt(pn({...e.$props,...e.$attrs})),{failed:x(()=>[...t[0]||(t[0]=[S(`div`,null,null,-1)])]),_:1},16)}var Ky=q(Wy,[[`render`,Gy]]);Jt(),E(),A();var qy={class:`tm-empty-state__body`},Jy={class:`tm-empty-state__body-title emphasize--text`},Yy={key:0,class:`tm-empty-state__text`},Xy=q(O({__name:`TmEmptyState`,props:{icon:{},iconRotate:{},title:{},description:{},minHeight:{default:`320px`},bordered:{type:Boolean,default:!0},iconSize:{default:`72px`},size:{}},setup(e){return tn(e=>({v6ad595c4:e.minHeight})),(t,n)=>{let r=Kt(`safe-html`);return N(),b(`div`,{class:M([`tm-empty-state`,{"tm-empty-state_bordered":e.bordered,[`tm-empty-state_${e.size}`]:!!e.size}])},[F(t.$slots,`icon`,{},()=>[e.icon?(N(),k(ei,{key:0,class:`tm-empty-state__icon`,"custom-size":e.iconSize,name:e.icon,rotate:e.iconRotate},null,8,[`custom-size`,`name`,`rotate`])):P(``,!0)],!0),F(t.$slots,`default`,{},()=>[S(`div`,qy,[S(`h3`,Jy,Zt(e.title),1),e.description?(N(),b(`div`,Yy,[F(t.$slots,`description`,{},()=>[ln(S(`div`,null,null,512),[[r,e.description]])],!0)])):P(``,!0)])],!0),F(t.$slots,`footer`,{},void 0,!0)],2)}}}),[[`__scopeId`,`data-v-6ecb07f6`]]);E();var Zy=O({components:{WhiteBlock:gn,TmEmptyState:Xy,TmButton:Ta,PageBlocks:zi}});A(),E();var Qy={class:`d-flex align-center`};function $y(e,t,n,r,i,a){let o=I(`tm-button`),s=I(`tm-empty-state`),c=I(`white-block`),l=I(`page-blocks`);return N(),k(l,null,{default:x(()=>[w(c,{class:`mt-6`},{default:x(()=>[w(s,{icon:`lock`,title:e.$t(`notFound.header`),description:e.$t(`notFound.text`),class:`pb-0`},{footer:x(()=>[S(`div`,Qy,[w(o,{color:`primary`,size:`xLarge`,to:{name:`user.base`}},{default:x(()=>[Rt(Zt(e.$t(`notFound.backText`)),1)]),_:1})])]),_:1},8,[`title`,`description`])]),_:1})]),_:1})}var eb=q(Zy,[[`render`,$y]]);E();var tb=O({components:{PageResolver:Li,NotFound:eb},inheritAttrs:!1,props:{...Kr}});E(),A();function nb(e,t,n,r,i,a){let o=I(`not-found`),s=I(`page-resolver`);return N(),k(s,Yt(pn({...e.$props,...e.$attrs})),{failed:x(()=>[w(o)]),_:1},16)}var rb=q(tb,[[`render`,nb]]);E();var ib={class:`d-flex mb-6`},ab=O({__name:`TmSkeletonDetailsPage`,setup(e){return(e,t)=>(N(),b(un,null,[S(`div`,ib,[w(vn,null,{default:x(()=>[w(bn,{type:`QBtn`,width:`105px`,height:`36px`,class:`mr-2 flex-shrink-0`}),w(bn,{type:`QBtn`,width:`106px`,height:`36px`,class:`mr-2 flex-shrink-0`}),w(bn,{type:`QBtn`,width:`175px`,height:`36px`,class:`mr-2 flex-shrink-0`}),w(bn,{type:`QBtn`,width:`138px`,height:`36px`,class:`mr-2 flex-shrink-0`}),w(bn,{type:`QBtn`,width:`78px`,height:`36px`,class:`flex-shrink-0`})]),_:1})]),w(um)],64))}});E();var ob=O({components:{TmBreadcrumbsSkeleton:li,PageBlocks:zi,TmSkeleton:bn,TmSkeletonDetailsPage:ab}});E();function sb(e,t,n,r,i,a){let o=I(`tm-breadcrumbs-skeleton`),s=I(`tm-skeleton`),c=I(`tm-skeleton-details-page`),l=I(`page-blocks`);return N(),k(l,{"full-width":``},{"page-blocks-top":x(()=>[w(o,{count:3})]),title:x(()=>[w(s,{type:`QChip`,width:`232px`,height:`20px`,class:`mb-7`})]),"white-wrapper":x(()=>[w(c)]),_:1})}var cb=q(ob,[[`render`,sb]]);E(),$t();var lb=O({components:{TmErrorState:ja,Resolver:ua,DetailsPagePreload:cb},inheritAttrs:!1,props:{...Kr},setup(e,t){let n=C(()=>{let{routeName:n,resolvers:r,...i}=e;return{...t.attrs,...i}}),{compKey:r}=Sa(At(e,`routeName`));return{compKey:r,propsAndAttrs:n}}});A(),E();function ub(e,t,n,r,i,a){let o=I(`router-view`),s=I(`tm-error-state`),c=I(`details-page-preload`),l=I(`resolver`);return N(),k(l,{key:e.compKey,resolvers:e.resolvers,"route-name":e.routeName},{failed:x(({onRetry:t})=>[F(e.$slots,`failed`,{},()=>[w(s,{size:`medium`,onOnRetry:t},null,8,[`onOnRetry`])])]),preloader:x(()=>[F(e.$slots,`preloader`,{},()=>[w(c)])]),default:x(()=>[w(o,Yt(pn(e.propsAndAttrs)),{default:x(({Component:t})=>[(N(),k(Xt(t),null,Ft({_:2},[Wt(e.$slots,t=>({name:String(t),fn:x(n=>[F(e.$slots,t,Yt(pn(n)))])}))]),1024))]),_:3},16)]),_:3},8,[`resolvers`,`route-name`])}var db=q(lb,[[`render`,ub]]);E();var fb={};function pb(e,t){return N(),k(pt,{class:`tm-card`},{default:x(()=>[F(e.$slots,`default`)]),_:3})}var mb=q(fb,[[`render`,pb]]);$t();var hb=T(),gb=()=>({onBeforeTabLeave:hb,setOnBeforeTabLeave:e=>{hb.value=e}});
2Jt(),E(),$t(),A();var _b={class:`tm-tabs__more`},vb={class:`d-flex align-center`},yb=[`textContent`],bb=q(O({__name:`TmTabs`,props:{tabs:{},tabStyle:{default:`default`},modelValue:{default:``},dropdownPosition:{},wrapperHorizontalPadding:{},useRouter:{type:Boolean},noBorder:{type:Boolean},noResponsive:{type:Boolean},tabsGrow:{type:Boolean},showCounterZero:{type:Boolean},topBorder:{type:Boolean},autoSize:{type:Boolean},centering:{type:Boolean}},emits:{[of]:e=>!0},setup(e,{emit:t}){tn(e=>({b45a8f12:e.wrapperHorizontalPadding}));let n=e,r=t,i=yu(),a=$l(),{onBeforeTabLeave:o}=gb(),s=C(()=>n.useRouter?n.tabs.filter(({to:e})=>{if(!e)return!0;let t=a.getRawRouteName(e);return!t||i.isAllowAccessToRoute(t)}):n.tabs),c=C(()=>{switch(n.tabStyle){case`pills`:return`tm-tabs--pills`;case`flat`:return`tm-tabs--flat`;default:return`tm-tabs--default`}}),l=C(()=>n.tabStyle===`flat`),u=C(()=>n.useRouter?ne:Pe),d=C(()=>n.autoSize?ka:`div`),f=async e=>{o.value&&o.value()===!1||r(of,e)},p=C(()=>({align:`left`,modelValue:n.modelValue,"onUpdate:model-value":f})),ee=e=>e.counter===void 0?!1:Number.isFinite(e.counter)?n.showCounterZero?!0:!!(typeof e.counter==`number`?e.counter:parseInt(e.counter,10)):!!e.counter,te=(e,t)=>{e&&a.isCurrentRoute(e)&&t.preventDefault()},re=cn(`tmTabs`),ie=e=>{if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key)||re.value===null)return;let t=Array.from(re.value.querySelectorAll(`[role="tab"]:not([aria-disabled="true"])`)),n=t.findIndex(e=>e===document.activeElement);if(n===-1)return;let r=n;switch(e.key){case`ArrowLeft`:r=(n-1+t.length)%t.length;break;case`ArrowRight`:r=(n+1)%t.length;break;case`Home`:r=0;break;case`End`:r=t.length-1;break;default:return}r<0||r>=t.length||(e.preventDefault(),t[r].focus())},{getDataTestId:ae}=Kf()();return(t,n)=>(N(),b(`div`,{ref:`tmTabs`,class:M([`tm-tabs`,[{"tm-tabs--no-border":e.noBorder,"tm-tabs--tabs-grow":e.tabsGrow,"tm-tabs--top-border":e.topBorder,"tm-tabs--centering":e.centering,"tm-tabs--no-responsive":e.noResponsive,"tm-tabs--auto-size":e.autoSize},j(c)]]),onKeydown:ie},[w(ue,Yt(pn(j(p))),{default:x(()=>[(N(),k(Xt(j(d)),{class:`tm-tabs__wrapper`,"dropdown-close-on-click":!0,"dropdown-position":e.dropdownPosition},{"dropdown-activator":x(()=>[w(Ta,{class:`neutral--text pb-2`,"text-link":``,flat:``,"flat-clicked":``},{default:x(()=>[S(`span`,_b,Zt(t.$t(`common.more`)),1),w(ei,{name:`tmi-arrow-drop-down-sharp`,class:`mr-0 ml-1 distinct--text`})]),_:1})]),default:x(()=>[(N(!0),b(un,null,Wt(j(s),e=>(N(),b(`div`,on({key:e.name,class:`tm-tabs__item`},{ref_for:!0},j(ae)(`tab`,e.name)),[(N(),k(Xt(j(u)),{name:e.name,to:e.to,class:M([`tm-tabs__tab`,{"tm-tabs__tab--flat":j(l)}]),onClickCapture:t=>te(e.to,t)},{default:x(()=>[S(`div`,vb,[F(t.$slots,`label`,on({ref_for:!0},{tab:e}),()=>[Rt(Zt(e.label?e.label:e.name),1)],!0),ee(e)?(N(),b(`span`,{key:0,class:M([`tm-tabs__counter`,{"tm-tabs__counter--error":e.error,[e.counterClass||``]:!0}]),textContent:Zt(e.counter)},null,10,yb)):P(``,!0),e.rightIcon?(N(),k(ei,on({key:1,class:`ml-1`},{ref_for:!0},e.rightIcon),null,16)):P(``,!0)])]),_:2},1064,[`name`,`to`,`class`,`onClickCapture`]))],16))),128))]),_:3},8,[`dropdown-position`]))]),_:3},16)],34))}}),[[`__scopeId`,`data-v-d814bab3`]]);E(),$t();var xb=O({name:`TmProgress`,components:{TmTooltip:Ji},props:{size:{type:String,default:`9px`},color:{type:String},value:{type:Number,default:0},extraRounded:{type:Boolean,default:!1},topRounded:{type:Boolean},bottom:{type:Boolean,default:!1},tooltipText:{type:String},tooltipState:{type:Boolean,default:!1},showProgress:{type:Boolean,default:!1},darkBg:{type:Boolean,default:!1}},setup(e,t){let n=!!t.slots.tooltip,r=!!t.slots.default,i=T(),a=T(),o=T(!1),s=T(!1);return sn(async()=>{(r||e.showProgress)&&a.value.clientWidth>i.value.clientWidth*e.value&&(o.value=!0),await new Promise(e=>{setTimeout(e,0)}),s.value=!0}),fn(()=>e.value,t=>{(r||e.showProgress)&&a.value.clientWidth>i.value.clientWidth*t?o.value=!0:o.value=!1}),{hasTooltip:n,hasText:r,track:i,barText:a,textRight:o,isRender:s}}});E(),A();var Sb={class:`tm-progress__tooltip`},Cb={key:0,class:`white--text d-flex justify-end flex-grow-1 align-center caption-12`};function wb(e,t,n,r,i,a){let o=I(`tm-tooltip`);return N(),b(`div`,{class:M([`tm-progress`,{"tm-progress--extra-rounded":e.extraRounded,"tm-progress--bottom":e.bottom,"tm-progress--top-rounded":e.topRounded,"tm-progress--dark-background":e.darkBg}])},[e.hasTooltip||e.tooltipText?(N(),k(o,{key:0,"model-value":e.tooltipState,"max-width":`250px`,white:``},{default:x(()=>[S(`div`,Sb,[F(e.$slots,`tooltip`,{},()=>[Rt(Zt(e.tooltipText),1)],!0)])]),_:3},8,[`model-value`])):P(``,!0),S(`div`,{ref:`track`,class:`tm-progress__track`,style:an({height:e.size,color:e.color})},[S(`div`,{ref:`bar`,class:`tm-progress__bar`,style:an({width:e.value*100+`%`})},[S(`div`,{ref:`barText`,class:M([`tm-progress__text`,{"tm-progress__text--right":e.textRight,"tm-progress__text--transition":e.isRender}])},[F(e.$slots,`default`,{},()=>[e.showProgress?(N(),b(`div`,Cb,[S(`div`,null,Zt(e.value*100+`%`),1)])):P(``,!0)],!0)],2)],4)],4)],2)}var Tb=q(xb,[[`render`,wb],[`__scopeId`,`data-v-422a4379`]]);E(),A();var Eb=1,Db=q(O({__name:`TmVideoModalWistia`,props:{videoId:{}},setup(e,{expose:t}){let n=e,r,i,a,o=e=>{So().logAndCapture(e,Ba.WARNING,`wistia`)},s=e=>e.message.startsWith(`Script loading aborted:`),c=e=>e?.code===Eb,l=()=>r?.popover?.isVisible()??!1,u=()=>{l()||r?.pause()},d=()=>{r?.pause()},f=e=>{e.key===`Escape`&&r?.pause()},p=e=>e instanceof HTMLVideoElement&&e.closest(`.wistia_async_${n.videoId}`)!==null,ee=e=>{if(!p(e.target))return;let t=e.target.error;if(e.stopPropagation(),c(t))return;let n=t?`Wistia MediaError: code ${t.code}`:`Wistia MediaError: unknown`;o(Error(n))},te=e=>{r=e,e.bind(`popoverhide`,d),e.bind(`play`,u),e.state()===`playing`&&!l()&&e.pause()},ne=()=>(a||(a=new Promise(e=>{window._wq=window._wq||[],window._wq.push({id:n.videoId,onReady:t=>{te(t),e(t)}})})),a),re=()=>
2(i||(i=Promise.all([Gd(`https://fast.wistia.com/embed/medias/${n.videoId}.jsonp`),Gd(`https://fast.wistia.com/assets/external/E-v1.js`)]).catch(e=>{i=void 0;let t=e instanceof Error?e:Error(String(e));throw s(t)||o(t),t})),i);return sn(()=>{document.addEventListener(`keydown`,f),document.addEventListener(`error`,ee,!0),ne(),re().catch(()=>void 0)}),Vt(()=>{document.removeEventListener(`keydown`,f),document.removeEventListener(`error`,ee,!0),r&&(r.pause(),r.unbind(`popoverhide`,d),r.unbind(`play`,u),r.remove())}),t({getVideoInstance:async()=>{if(r)return r;try{await re()}catch{throw new so(`Wistia video is unavailable`)}return ne()}}),(t,n)=>(N(),b(`div`,{class:M([`wistia_embed popover=true popoverContent=link`,`wistia_async_${e.videoId}`])},null,2))}}),[[`__scopeId`,`data-v-412ae6c1`]]);E(),A();var Ob={class:`tm-watch-tutorial__text`},kb=q(O({__name:`TmWatchTutorial`,props:{videoId:{},textLink:{type:Boolean,default:!0},size:{},color:{},invertedColors:{type:Boolean,default:!1},outlinedIcon:{type:Boolean,default:!1}},setup(e){let t=cn(`tmVideoModalWistiaElement`),n=async()=>{if(!t.value)throw new G(`tmVideoModalWistiaElement.value is null`);let e=await t.value.getVideoInstance();if(!e.popover)throw new G(`videoInstance.popover is null`);e.popover.show(),e.play()};return(r,i)=>(N(),k(Ta,{"text-link":e.textLink,color:e.color,size:e.size,class:M([`tm-watch-tutorial`,{[`tm-watch-tutorial_${e.size}`]:!!e.size,"tm-watch-tutorial_inverted":e.invertedColors}]),onClick:n},{default:x(()=>[w(ei,{name:e.outlinedIcon?`tmi-play-outline`:`tmi-play`,small:``,left:!0,class:`tm-watch-tutorial__icon`},null,8,[`name`]),S(`span`,Ob,Zt(r.$t(`common.watchTutorial`)),1),w(Db,{ref_key:`tmVideoModalWistiaElement`,ref:t,"video-id":e.videoId},null,8,[`video-id`])]),_:1},8,[`text-link`,`color`,`size`,`class`]))}}),[[`__scopeId`,`data-v-b5522acd`]]),Ab={frozen:{type:Boolean},disabled:{type:Boolean},closable:{type:Boolean},forButton:{type:Boolean},to:{type:Object},isOpenInNewTab:{type:Boolean},color:{type:String,default:`gray`},appearance:{type:String,default:`pastel`},variant:{type:String,default:`static`}},jb={textTransform:{type:String},shrink:{type:String,default:`label`},icon:{type:String},label:{type:[Number,String]},searchQuery:{type:String},additionalText:{type:[Number,String]},additionalTextVisible:{type:Boolean}};E(),A();var Mb=q(O({__name:`TmBadgeContent`,props:jb,setup(e){return(e,t)=>(N(),b(`span`,{class:M([`tm-badge-content`,`tm-badge-content--shrink-${e.shrink}`,{"tm-badge-content--with-icon":e.icon}])},[e.icon?(N(),k(ei,{key:0,name:e.icon,class:`tm-badge-content__icon`,size:`small`},null,8,[`name`])):P(``,!0),e.label?(N(),k(np,{key:1,class:M([`tm-badge-content__label`,{[`tm-badge-content__label--text-${e.textTransform}`]:e.textTransform}]),title:e.label&&`${e.label}`.length>20?`${e.label}`:void 0,text:`${e.label}`,search:e.searchQuery},null,8,[`class`,`title`,`text`,`search`])):P(``,!0),e.additionalText?(N(),b(`span`,{key:2,class:M([`tm-badge-content__additional-text truncate`,{"tm-badge-content__additional-text--text-visible":e.additionalTextVisible}])},Zt(e.additionalText),3)):P(``,!0)],2))}}),[[`__scopeId`,`data-v-031169d0`]]);E(),$t();var Nb=O({components:{TmButton:Ta,TmIcon:ei,TmBadgeContent:Mb},props:{...Ab,...jb},emits:{"click-close":e=>!0,click:e=>!0},setup(e,t){return{isFocusedCloseButton:T(!1),config:C(()=>
2{if(!e.disabled&&!e.frozen){if(e.variant===`link`&&e.to||e.to)return{componentType:`router-link`,componentProps:{ariaHidden:e.disabled,tabindex:e.disabled?`-1`:`0`,to:e.to,target:e.isOpenInNewTab?`_blank`:void 0,rel:e.isOpenInNewTab?`noopener noreferrer`:void 0}};if(e.variant===`button`)return{componentType:`button`,componentProps:{ariaHidden:e.disabled,tabindex:e.disabled?`-1`:`0`,type:`button`}}}return{componentType:`span`,componentProps:{}}}),onClick:n=>{(e.disabled||e.frozen)&&n.preventDefault(),t.emit(`click`,n)},onClickClose:n=>{(e.disabled||e.frozen)&&n.preventDefault(),t.emit(`click-close`,n)}}}});E(),Jt();function Pb(e,t,n,r,i,a){let o=I(`tm-badge-content`),s=I(`tm-icon`),c=I(`tm-button`);return N(),k(Xt(e.config.componentType),on(e.config.componentProps,{class:[`tm-badge`,{[`tm-badge--${e.color}`]:e.color,[`tm-badge--${e.appearance}`]:e.appearance,[`tm-badge--${e.variant}`]:e.variant,"tm-badge--closable":e.closable,"tm-badge--for-button":e.forButton,"tm-badge--disable-hover":e.isFocusedCloseButton}],"aria-frozen":e.frozen||void 0,"aria-disabled":e.disabled||void 0,onClick:e.onClick}),{default:x(()=>[F(e.$slots,`before`,{},void 0,!0),F(e.$slots,`default`,{},()=>[w(o,{label:e.label,icon:e.icon,"additional-text":e.additionalText,"additional-text-visible":e.additionalTextVisible,"text-transform":e.textTransform,"search-query":e.searchQuery,shrink:e.shrink},null,8,[`label`,`icon`,`additional-text`,`additional-text-visible`,`text-transform`,`search-query`,`shrink`])],!0),F(e.$slots,`after`,{},void 0,!0),e.closable?(N(),b(`span`,{key:0,class:`tm-badge__close-button-wrapper`,onMouseenter:t[0]||(t[0]=t=>e.isFocusedCloseButton=!0),onMouseleave:t[1]||(t[1]=t=>e.isFocusedCloseButton=!1)},[w(c,{class:`tm-badge__close-button`,size:`xxSmall`,flat:``,"icon-only":``,"no-border":``,rounded:``,disable:e.disabled,onClick:dn(e.onClickClose,[`prevent`,`stop`])},{default:x(()=>[w(s,{name:`close`,size:`small`})]),_:1},8,[`disable`,`onClick`])],32)):P(``,!0)]),_:3},16,[`class`,`aria-frozen`,`aria-disabled`,`onClick`])}var Fb=q(Nb,[[`render`,Pb],[`__scopeId`,`data-v-c00d028e`]]);E();var Ib={};
2function Lb(e,t){return N(),k(je,{class:`tm-list`},{default:x(()=>[F(e.$slots,`default`)]),_:3})}var Rb=q(Ib,[[`render`,Lb]]);$t();var zb=Symbol(`faq`),Bb=()=>ha(zb),Vb=()=>{let e=T();return Bb().provide(e),{activeItem:e}};E();var Hb=O({__name:`TmFaq`,setup(e){return Vb(),(e,t)=>(N(),k(Rb,{class:`tm-faq`},{default:x(()=>[F(e.$slots,`default`)]),_:3}))}});E();var Ub=O({components:{TmCard:mb}});E();function Wb(e,t,n,r,i,a){let o=I(`tm-card`);return N(),k(o,{class:`tm-faq-card`},{default:x(()=>[F(e.$slots,`default`,{},void 0,!0)]),_:3})}var Gb=q(Ub,[[`render`,Wb],[`__scopeId`,`data-v-e75b8c76`]]);E();var Kb={};function qb(e,t){return N(),k(ie,{class:`tm-card-section`},{default:x(()=>[F(e.$slots,`default`)]),_:3})}var Jb=q(Kb,[[`render`,qb]]);E();var Yb=O({components:{TmCardSection:Jb}});E();function Xb(e,t,n,r,i,a){let o=I(`tm-card-section`);return N(),k(o,{class:`tm-faq-card-section`},{default:x(()=>[F(e.$slots,`default`,{},void 0,!0)]),_:3})}var Zb=q(Yb,[[`render`,Xb],[`__scopeId`,`data-v-833eb651`]]);E(),$t(),A();var Qb={class:`tm-faq-expansion-item__answer`},$b=q(O({__name:`TmFaqExpansionItem`,props:{name:{},question:{},scrollToItem:{type:Boolean},labelSize:{default:`xm`},expandIcon:{}},setup(e,{expose:t}){let n=e,r=T(),i=C(()=>n.name||Math.random().toString()),a=Bb().inject(),o=T(!1),s=C(()=>a?i.value===a?.value:o.value),c=e=>{a?a.value=e?i.value:void 0:o.value=e};return t({show:()=>{r.value?.show()}}),(t,n)=>(N(),k(Yn,{ref_key:`expansionItem`,ref:r,class:`tm-faq-expansion-item`,opened:j(s),"scroll-to-item":e.scrollToItem,"expand-icon":e.expandIcon,"onUpdate:opened":c},{label:x(()=>[S(`div`,{class:M([`tm-faq-expansion-item__label`,`tm-faq-expansion-item__label--font-size-${e.labelSize}`])},[F(t.$slots,`question`,{},()=>[Rt(Zt(e.question),1)],!0)],2)]),default:x(()=>[w(Zb,null,{default:x(()=>[w(Gb,null,{default:x(()=>[S(`div`,Qb,[F(t.$slots,`default`,{},void 0,!0)])]),_:3})]),_:3})]),_:3},8,[`opened`,`scroll-to-item`,`expand-icon`]))}}),[[`__scopeId`,`data-v-d2fa5a00`]]);E();var ex=O({components:{ExternalLink:Mp},props:{text:{type:String,required:!0},withIcon:{type:Boolean},iconSize:{type:String}},setup(){return{textMagicSupport:jp}}});E();function tx(e,t,n,r,i,a){let o=I(`external-link`);return N(),k(o,{href:e.textMagicSupport,text:e.text,"with-icon":e.withIcon,"icon-size":e.iconSize},null,8,[`href`,`text`,`with-icon`,`icon-size`])}var nx=q(ex,[[`render`,tx]]);E();var rx=O({components:{SupportLink:nx,TmTranslate:gi},props:{title:{type:String,required:!0},description:{type:String}}});E(),A();var ix={class:`tm-faq-header`},ax={class:`tm-faq-header__title`},ox={key:0,class:`tm-faq-header__description`},sx={key:1,class:`tm-faq-header__description`};function cx(e,t,n,r,i,a){let o=I(`support-link`),s=I(`tm-translate`);return N(),b(`div`,ix,[F(e.$slots,`title`,{},()=>[S(`h2`,ax,Zt(e.title),1)],!0),F(e.$slots,`description`,{},()=>[e.description?(N(),b(`div`,ox,Zt(e.description),1)):(N(),b(`div`,sx,[w(s,{keypath:`faq.description`},{contact:x(()=>[w(o,{text:e.$t(`common.contactUs`)},null,8,[`text`])]),_:1})]))],!0)])}var lx=q(rx,[[`render`,cx],[`__scopeId`,`data-v-09901ca0`]]);E(),A();var ux={class:`tm-faq-parapragh`},dx={key:1},fx={key:2},px=q(O({__name:`TmFaqParagraph`,props:{withIcon:{type:Boolean},title:{},text:{}},setup(e){return(t,n)=>(N(),b(`p`,ux,[e.withIcon?F(t.$slots,`icon`,{key:0},()=>[w(ei,{name:`tmi-task-circle`,color:`green`,size:`xLarge`})],!0):P(``,!0),e.title?(N(),b(`b`,dx,Zt(e.title),1)):P(``,!0),e.text?(N(),b(`span`,fx,Zt(e.text),1)):P(``,!0)]))}}),[[`__scopeId`,`data-v-83773817`]]);$t(),E();var mx=O({components:{TmTabs:bb},props:{modelValue:{type:String,default:``},tabs:{type:Array,required:!0},tabParams:{type:Object}},emits:{[of]:e=>!0},setup(e){let t=T(null);return{rootElement:t,activeTab:C(()=>e.tabs.find(t=>t.name===e.modelValue)),scrollIntoView:e=>{t.value.scrollIntoView(e)}}}});E();var hx={ref:`rootElement`},gx={class:`flex flex-center`},_x={class:`mt-4`};function vx(e,t,n,r,i,a){let o=I(`tm-tabs`);return N(),b(`div`,hx,[S(`div`,gx,[w(o,{class:`tm-faq-tabs__tm-tabs`,"model-value":e.modelValue,tabs:e.tabs,"tab-style":`pills`,"no-border":``,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit(`update:model-value`,t))},null,8,[`model-value`,`tabs`])]),S(`div`,_x,[(N(),k(Xt(e.activeTab.component),{params:e.tabParams},null,8,[`params`]))])],512)}var yx=q(mx,[[`render`,vx]]),bx=(e,t,n)=>{if(n<=t)return t;let r=n-t+1,i=t+(e-t)%r;return i<t&&(i=r+i),i===0?0:i},xx=e=>{e.cancelable&&e.preventDefault(),e.stopPropagation()};
2E(),$t(),A();var Sx=[`id`,`aria-disabled`,`aria-selected`,`onMousemove`,`onClick`],Cx={key:0,class:`flex flex-center my-1`},wx=q(O({__name:`TmInteractiveList`,props:{overflow:{type:Boolean},initialIndex:{type:Number,default:-1},autoHighlightFirstOption:{type:Boolean},optionDisabled:{type:String,default:`disabled`},items:{type:Array,required:!0},loadMoreItemsHandler:{type:Function},isLoadingMore:{type:Boolean},comboboxId:{type:Number}},emits:[`update:model-value`,`on-select`],setup(e,{expose:t,emit:n}){let{keyEnter:r,keyDown:i,keyUp:a,keyPageDown:o,keyPageUp:s}=Ii,c=e,l=n,u=hs(),d=zt()?.uid,f=T(c.initialIndex),p=T(),ee=T(null),te=T([]),ne=T(),re=C(()=>c.comboboxId||d),ie=C(()=>c.items.map((e,t)=>({...e,disabled:m(e),listUid:`${re.value}_${t}`}))),ae=C(()=>ie.value.length),oe=C(()=>te.value[f.value]),se=C(()=>f.value>-1&&f.value<ae.value),ce=C(()=>{let e={id:`${re.value}_lb`,role:`listbox`,tabindex:`-1`,"aria-activedescendant":``};return f.value>=0&&(e[`aria-activedescendant`]=`${re.value}_${f.value}`),e}),le=(e,t)=>lt(e)&&t in e?e[t]:e,m=e=>le(e,c.optionDisabled)===!0,ue=()=>ie.value.findIndex(e=>!e.disabled),de=()=>ie.value.reduce((e,t,n)=>(t.disabled||e.push(n),e),[]),fe=C(()=>c.autoHighlightFirstOption?ue():c.initialIndex),pe=e=>{let t=c.overflow?p.value:ee.value;if(!e||!t){t&&(t.scrollTop=0);return}requestAnimationFrame(()=>{let{scrollTop:n,clientHeight:r}=t,i=t.getBoundingClientRect(),a=e.getBoundingClientRect().top-i.top+n,o=a+e.offsetHeight;o>n+r?t.scrollTop=o-r:a<n&&(t.scrollTop=a)})},me=e=>{let t=m(c.items[e]);return e!==-1&&e!==f.value&&t},he=!1,ge=Fe(()=>{he=!1},150),_e=(e=1)=>{let t=f.value;do t=bx(t+e,-1,ae.value-1);while(me(t));f.value!==t&&(f.value=t,he=!0,ge(),pe(oe.value))},ve=e=>{let t=de();if(!t.length)return;let n=t.indexOf(f.value),r;r=n===-1?e===1?0:t.length-1:(n+e+t.length)%t.length,f.value=t[r],he=!0,ge(),pe(oe.value)},ye=()=>{f.value=fe.value,Nt(()=>pe(oe.value))},be=e=>{l(`update:model-value`,e),l(`on-select`)},xe=e=>{let t=[r,i,a,o,s];e.target&&t.includes(e.code)&&((e.code===s||e.code===o)&&(xx(e),f.value=-1,_e(e.code===s?1:-1)),(e.code===a||e.code===i)&&(xx(e),c.autoHighlightFirstOption?ve(e.code===a?-1:1):_e(e.code===a?-1:1)),e.code===r&&se.value&&(xx(e),oe.value.firstElementChild.click()))},Se=e=>{he||(f.value=e)},Ce=()=>{he||(f.value=fe.value)},we=()=>{f.value=c.initialIndex,pe(oe.value)},Te=()=>{let e=t=>{let n=t?.parentElement;if(!n)return null;let r=u.getStyle(n);return[r.overflow,r.overflowY].some(e=>!/scroll|auto/.test(e))?e(n):n};c.overflow||(ee.value=e(p.value)),c.initialIndex!==-1&&Nt(()=>pe(oe.value))},Ee=null,De=()=>{let e=c.loadMoreItemsHandler;e&&(Ee=new IntersectionObserver(t=>{t[0].isIntersecting&&e()},{root:p.value,rootMargin:`0px 0px 100px 0px`}),Ee.observe(ne.value))};return sn(()=>{Te(),De(),c.autoHighlightFirstOption&&ye()}),fn(()=>c.items,(e,t)=>{c.autoHighlightFirstOption&&(t&&e.length>t.length||ye())}),Vt(()=>{Ee?.disconnect(),ge.cancel()}),t({onKeydown:xe,scrollToInitial:we}),(t,n)=>(N(),b(`div`,{ref_key:`listboxEl`,ref:p,class:M([`tm-interactive-list`,{"tm-interactive-list--overflow":e.overflow}])},[S(`div`,Yt(pn(j(ce))),[(N(!0),b(un,null,Wt(j(ie),(n,r)=>(N(),b(`div`,{id:n.listUid,ref_for:!0,ref:e=>j(te)[r]=e,key:n.listUid,class:M({"tm-interactive-list--disabled":n.disabled}),"aria-disabled":n.disabled,"aria-selected":j(f)===r&&!n.disabled,role:`option`,tabindex:`-1`,onMousemove:e=>Se(r),onMouseout:Ce,onClick:e=>be(n)},[F(t.$slots,`default`,on({ref_for:!0},{opt:e.items[r],index:r,focused:j(f)===r}),void 0,!0)],42,Sx))),128))],16),S(`div`,{ref_key:`bottomElement`,ref:ne},null,512),e.isLoadingMore?(N(),b(`div`,Cx,[w(kr,{color:`blue`})])):P(``,!0)],2))}}),[[`__scopeId`,`data-v-0d84ec14`]]);E();var Tx=O({name:`TmColoredUl`,props:{circleSize:{type:String,default:`6px`},circleLeft:{type:String,default:`0`},lineHeight:{type:String,default:`20px`},color:{type:String,default:`blue`},checkmark:{type:Boolean}}});E(),A();function Ex(e,t,n,r,i,a){return N(),b(`ul`,{class:M([`tm-colored-ul`,{[`tm-colored-ul--${e.color}`]:!0,"tm-colored-ul__circle":!e.checkmark,"tm-colored-ul__checkmark":e.checkmark}]),style:an(`--line-height: ${e.lineHeight}; --circle-size: ${e.circleSize}; --circle-left: ${e.circleLeft};`)},[F(e.$slots,`default`,{},void 0,!0)],6)}var Dx=q(Tx,[[`render`,Ex],[`__scopeId`,`data-v-e9c6a531`]]);Jt(),E(),A();var Ox={class:`tm-ellipsis__content`},kx=q(O({__name:`TmEllipsis`,props:{minWidth:{default:`200px`},expand:{type:Boolean},alignHtml:{type:Boolean},reducePadding:{type:Boolean}},setup(e){return tn(e=>({cc14caae:e.minWidth})),(t,n)=>(N(),b(`div`,{class:M([`tm-ellipsis`,{"tm-ellipsis--expand":e.expand,"tm-ellipsis--reduce-padding":e.reducePadding}])},[S(`div`,{class:M([`tm-ellipsis__in`,{"tm-ellipsis__align-html":e.alignHtml}])},[S(`span`,Ox,[F(t.$slots,`default`,{},void 0,!0)])],2)],2))}}),[[`__scopeId`,`data-v-86d117c1`]]);E(),$t();var Ax=O({__name:`TmPagingPaginatorData`,props:{firstIndex:{},lastIndex:{},total:{},totalFormatted:{},entity:{}},setup(e){let t=e,{isMobile:n}=ca(),r=Vu(),i=C(()=>r.t(j(n)?`tmTableFooter.pageNavigationTextShort`:`tmTableFooter.pageNavigationTextFull`,{itemsRange:`${t.firstIndex}-${t.lastIndex}`,itemsTotal:t.totalFormatted,entity:r.getLowerCaseEntityLabel(t.entity,t.total)}));return(e,t)=>(N(),k(ui,{content:j(i),"skip-italic":``,"skip-line-feed":``},null,8,[`content`]))}});E(),$t();var jx={class:`tm-paging-paginator`},Mx={class:`tm-paging-paginator__text`},Nx=q(O({__name:`TmPagingPaginator`,props:{entityName:{},firstIndex:{},lastIndex:{},total:{},totalLimit:{},isFirstPage:{type:Boolean},isLastPage:{type:Boolean},loading:{type:Boolean}},emits:[`prev`,`next`],setup(e){let t=e,n=ru(),r=C(()=>t.total&&t.totalLimit&&t.total>=t.totalLimit?`${n.formatInteger(t.total)}+`:n.formatInteger(t.total||0)),i=C(()=>t.loading&&t.total===void 0?`â¦`:r.value),a=C(()=>t.total===0?0:t.firstIndex+1);return(t,n)=>(N(),b(`div`,jx,[w(Ta,{"icon-only":``,size:`xMedium`,disabled:e.isFirstPage||e.loading,onClick:n[0]||(n[0]=e=>t.$emit(`prev`))},{default:x(()=>[w(ei,{name:`tmi-chevron-left`})]),_:1},8,[`disabled`]),w(Ta,{"icon-only":``,size:`xMedium`,disabled:e.isLastPage||e.loading,onClick:n[1]||(n[1]=e=>t.$emit(`next`))},{default:x(()=>[w(ei,{name:`tmi-chevron-right`})]),_:1},8,[`disabled`]),S(`div`,Mx,[F(t.$slots,`pagination-text`,{entity:e.entityName,firstItemIndex:j(a),lastItemIndex:e.lastIndex,itemsTotal:e.total,itemsTotalString:j(i)},()=>[w(Ax,{entity:e.entityName,"first-index":j(a),"last-index":e.lastIndex,total:e.total,"total-formatted":j(i)},null,8,[`entity`,`first-index`,`last-index`,`total`,`total-formatted`])],!0),F(t.$slots,`pagination-text-append`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-2715d038`]]),Px=e=>Object.fromEntries(Object.keys(e).map(t=>[t,n=>e[t](n)])),Fx=(e,t)=>(...n)=>{if(e.value===void 0)throw new wd(`Component ref is undefined`);if(typeof e.value[t]!=`function`)throw new wd(`Component's ref ${String(t)} method is undefined`);return e.value[t](...n)},Ix=(e,t)=>Object.fromEntries(t.map(t=>[t,Fx(e,t)]));E(),$t();var Lx=O({props:{modelValue:{type:[Array,String]}},emits:{"update:model-value":e=>!0,"input-value":e=>!0},setup(e,t){let n=T();return t.expose(Ix(n,[`focus`,`blur`,`hidePopup`,`refresh`,`scrollTo`,`setOptionIndex`,`getOptionIndex`,`showPopup`,`updateInputValue`,`updateMenuPosition`,`toggleOption`])),()=>{let r=e.modelValue||``,i=e=>t.emit(`update:model-value`,e||void 0),a=e=>t.emit(`input-value`,Array.isArray(e)?e[0]:e);return kt(Ne,{ref:n,...e,...t.attrs,modelValue:r,"onUpdate:model-value":i,onInputValue:a},Px(t.slots))}}});E(),$t();var Rx=e=>{let t=T(0),n=()=>{let t=e.value?.$el;if(!t||!(t instanceof HTMLElement))throw new Fc(`Element not found`);return t};return{popupContentStyle:C(()=>`width: ${t.value}px;`),updateWidth:()=>{let e=n();t.value=e.offsetWidth}}},zx=new Set,Bx=null,Vx=e=>{e.key===Ii.keyTab&&(Bx=Array.from(zx).findLast(e=>e.hasKeyboard())??null)},Hx=e=>
2{zx.size===0&&document.addEventListener(`keydown`,Vx,!0),zx.add(e)},Ux=e=>{Bx===e&&(Bx=null),!(!zx.delete(e)||zx.size>0)&&document.removeEventListener(`keydown`,Vx,!0)},Wx=e=>{let t={hasKeyboard:e};return Hx(t),It(()=>Ux(t)),{isTabPressedInsideField:()=>Bx===t}},Gx=e=>e instanceof HTMLElement||qa(e)&&e.nodeType===Node.ELEMENT_NODE;function Kx(e=document){let t=[];if(e.styleSheets.length>0)return Array.from(e.styleSheets);let n=e.querySelectorAll(`style`);for(let e of Array.from(n)){let n=e.textContent||``;try{let e=new CSSStyleSheet;e.replaceSync(n),t.push(e)}catch(e){console.warn(`Failed to parse styles:`,e)}}return t}function qx(e,t){let n={},r=Kx(e);for(let e of r)try{let r=e.cssRules||e.rules;for(let e of Array.from(r))if(e instanceof CSSStyleRule)try{if(t.matches(e.selectorText))for(let t=0;t<e.style.length;t++){let r=e.style[t];n[r]=e.style.getPropertyValue(r)}}catch{}}catch(t){console.warn(`Cannot access stylesheet:`,e.href,t)}return n}E(),$t(),Jt();var Jx=`simple-select-dropdown`,Yx=O({components:{FixedQSelect:Lx,TmError:ap},props:{...$d,open:{type:Boolean},modelValue:{type:[Array,String],required:!0},options:{type:Array},title:{type:String},useInput:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},optionAutoHeight:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!1},popupContentClass:{type:String,default:``},clearable:{type:Boolean,default:!0},fieldClass:{type:String},permanentPlaceholder:{type:Boolean,default:!1},errorState:{type:Boolean,default:!1},hideNoResult:{type:Boolean},noResultsText:{type:String},size:{type:String,default:``},emitValue:{type:Boolean,default:!0},mapOptions:{type:Boolean,default:!0},forcePlaceholder:{type:String},popupWidth:{type:String},popupWithoutMaxHeight:{type:Boolean},menuFit:{type:Boolean,default:!0},smallPadding:{type:Boolean},appendedToField:{type:Boolean},readonly:{type:Boolean},preventScrollClose:{type:Boolean},type:{type:String},qFieldNativeStyle:{type:Object},autoHighlightFirstOption:{type:Boolean},hideDropdownIcon:{type:Boolean}},emits:{...sf(),"input-value":e=>!0,focus:e=>!0,blur:e=>!0,"click-by-option":e=>!0,paste:e=>!0,"popup-show":()=>!0,"popup-hide":()=>!0,select:e=>!0,keyup:e=>!0,clear:()=>!0,"virtual-scroll":e=>!0},setup(e,t){let n=C(()=>De(e.size)),{propsAndAttrs:r,emitChangeAndInput:i}=Hf(e,t,[`disabled`,`class`,`tabIndex`,`hideDropdownIcon`]),a=null;e.isStateless&&(a=ip({reset:()=>se(null)}).control);let o=C(()=>a?.getErrors()??e.errors),s=C(()=>e.errorState||o.value.length>0||e.serverErrors.length>0),c=T(),l=T(!1),u=T(``),f=C(()=>!!u.value),p=C(()=>e.options?.find(({value:e})=>!e)),ee=C(()=>e.transparent&&!l.value||e.readonly),te=C(()=>e.qFieldNativeStyle?.minHeight??`26px`),ne=C(()=>e.qFieldNativeStyle?.gap??`10px`),re=C(()=>e.qFieldNativeStyle?.paddingTop??`0`),ie=C(()=>e.qFieldNativeStyle?.paddingRight??`0`),ae=C(()=>e.qFieldNativeStyle?.paddingBottom??`0`),oe=C(()=>e.qFieldNativeStyle?.paddingLeft??`13px`),se=t=>{if(!e.clearable&&!p.value&&t==null)return;let n;n=t??(e.multiple?[]:``),i(n)},ce=e=>{l.value=!0,t.emit(`focus`,e)},le=n=>{l.value=!1,t.emit(`blur`,n),e.isStateless&&a?.handleBlur()},m=e=>{t.emit(`input-value`,e),u.value=e},{isTabPressedInsideField:ue}=Wx(()=>Oe.value||l.value),de=Fe(e=>{if(t.emit(`keyup`,e),e.key===Ii.keyTab){if(e.shiftKey||ue())return;ge()}}),fe=e=>{t.emit(`paste`,e)},pe=()=>{Oe.value=!1,t.emit(`popup-hide`)},me=async()=>{Oe.value=!0,Pe(),t.emit(`popup-show`)},he=()=>{t.emit(`clear`)},ge=async()=>{let e=c.value;if(!e)return;let t=e.$el.querySelector(`.q-field__control`);t&&(t.focus(),await Nt(),t.click())},_e=()=>{e.isDisabled||c.value?.focus()};nr({focus:()=>{e.isDisabled||(l.value=!0,ge())}});let ve=()=>{if(!c.value)throw new wd(`Select ref is undefined`);c.value.updateInputValue(``)},ye=()=>{if(!c.value)throw new wd(`Select ref is undefined`);c.value.refresh()},be=C(()=>
2{if(e.forcePlaceholder)return e.forcePlaceholder;let t;return t=e.multiple?e.modelValue&&e.modelValue.length&&!e.permanentPlaceholder:e.modelValue||!e.useInput,t?void 0:e.placeholder}),xe=C(()=>{let t=e.popupContentClass?e.popupContentClass:``,n=e.menuFit?`simple-select-dropdown--menu-fit`:``;return`${Jx} ${e.popupWithoutMaxHeight?`${Jx}--without-max-height`:``} ${t} ${n} `}),Se=()=>c.value?.hidePopup(),Ce=()=>c.value?.updateMenuPosition();Da(()=>{e.preventScrollClose?Ce():Se()});let we=C(()=>{let t={};return e.popupWidth&&(t.width=e.popupWidth),t}),Te=e=>{t.emit(`click-by-option`,e.entity),t.emit(`select`,e)},Ee=()=>{c.value?.setOptionIndex(-1)},Oe=T(!1),ke=e=>!!e&&!e.subheader&&!e.notForSearch&&!e.disabled&&!e.unselectable,Ae=()=>e.options?.findIndex(ke)??-1,je=()=>(e.options??[]).reduce((e,t,n)=>(ke(t)&&e.push(n),e),[]),Me=e=>{if(!c.value)return;let t=je();if(t.length===0)return;let n=c.value.getOptionIndex(),r=t.indexOf(n),i;i=r===-1?e===1?0:t.length-1:(r+e+t.length)%t.length;let a=t[i];c.value.setOptionIndex(a),c.value.scrollTo(a)},Ne=0,Pe=()=>{if(!e.autoHighlightFirstOption)return;Ne+=1;let t=Ne;setTimeout(()=>{if(t!==Ne||!Oe.value||!c.value)return;let e=Ae();e>=0&&(c.value.setOptionIndex(e),c.value.scrollTo(e))})},Ie=()=>{if(!c.value)return!1;let t=c.value.getOptionIndex(),n=d(t)&&t>=0?t:Ae(),r=n>=0?e.options?.[n]:void 0;return r===void 0||!ke(r)?!1:(c.value.toggleOption(r),Te(r),e.multiple&&ve(),!0)},h=t=>{if(!Oe.value||!c.value)return;if(t.key===Ii.keyTab){c.value.setOptionIndex(-1);return}if(!e.autoHighlightFirstOption)return;let n=t.target;if(Gx(n)&&n instanceof HTMLInputElement){if(t.key===Ii.keyDown||t.key===Ii.keyUp){t.preventDefault(),t.stopPropagation(),Me(t.key===Ii.keyUp?-1:1);return}t.key===Ii.keyEnter&&Ie()&&(t.preventDefault(),t.stopPropagation())}},g=(e,t)=>!!e&&!!t&&t.length>0&&e.length>t.length&&t.every((t,n)=>t.value===e[n].value);return fn(()=>e.options,(e,t)=>{Oe.value&&!g(e,t)&&Pe()}),Ye(()=>c.value?.$el,`keydown`,h,!0),fn(()=>[e.open,c.value],(e,t)=>{let[n,r]=e,[i]=t||[];if(r){if(n){setTimeout(()=>{ge()},50);return}i!==void 0&&Se()}},{immediate:!0}),fn(l,e=>{if(!e)return;if(!c.value)throw new G(`selectRef.value is null`);let t=c.value.$el;if(!(t instanceof HTMLElement))throw new G(`selecteHtmlElement should be instanceof HTMLElement`);let n=t.querySelectorAll(`input`),r=Array.from(n).filter(e=>!e.classList.contains(`q-select__autocomplete-input`));if(r.length>1)throw new G(`Should be only one input element`);let i=r[0];if(!i)throw new G(`input is null`);i.focus()}),{kebabSize:n,selectRef:c,clearSearchQuery:ve,selectOptionLabelKey:Nf,selectOptionValueKey:cf,focused:l,hasSearch:f,hideAppendIcon:ee,onInputValue:m,onFocus:ce,onBlur:le,onInput:se,onKeyUp:de,onPaste:fe,onPopupHide:pe,onPopupShow:me,onClear:he,refreshMenu:ye,propsAndAttrs:r,placeholderComputed:be,popupContentStyle:we,internalPopupContentClass:xe,kebabCase:De,focus:_e,...Ix(c,[`blur`,`hidePopup`,`refresh`,`scrollTo`,`setOptionIndex`,`showPopup`,`updateInputValue`,`updateMenuPosition`]),onClickByOption:Te,onOptionMouseLeave:Ee,errorsBag:o,innerErrorState:s,qFieldNativeMinHeight:te,qFieldNativeGap:ne,qFieldNativePaddingTop:re,qFieldNativePaddingRight:ie,qFieldNativePaddingBottom:ae,qFieldNativePaddingLeft:oe}}}),Xx=()=>{tn(e=>({a4d2cdf4:e.qFieldNativeMinHeight,v0171aa37:e.qFieldNativePaddingTop,v6b90fa7e:e.qFieldNativePaddingRight,v28c923ee:e.qFieldNativePaddingBottom,v2cbfd365:e.qFieldNativePaddingLeft,v942700fa:e.qFieldNativeGap}))},Zx=Yx.setup;Yx.setup=Zx?(e,t)=>(Xx(),Zx(e,t)):Xx,A(),E();var Qx={class:`truncate`},$x={class:`truncate`},eS={key:0,class:`mb-1 body-text-regular-12 error--text`};function tS(e,t,n,r,i,a){let o=I(`tm-error`),s=I(`fixed-q-select`);return N(),k(s,on({ref:`selectRef`},e.propsAndAttrs,{"option-value":e.selectOptionValueKey,"option-label":e.selectOptionLabelKey,"emit-value":e.emitValue,"map-options":e.mapOptions,disable:e.isDisabled,loading:e.loading,"model-value":e.modelValue,options:e.options,title:e.title,"dropdown-icon":`tmi-arrow-down`,"hide-dropdown-icon":e.hideAppendIcon||e.hideDropdownIcon,label:e.modelValue?.length||e.useInput?void 0:e.placeholder,placeholder:e.placeholderComputed,class:[`tm-field-select`,[e.fieldClass,{"hide-selected-value":(e.focused||e.isFocused)&&e.hasSearch,"tm-field-select--flat":e.flat,"tm-field-select--auto-height":e.autoHeight,[`tm-field-select--${e.kebabSize}`]:e.size,"tm-field-select--transparent":e.transparent,"tm-field-select--focused":e.focu
2sed||e.isFocused,"tm-field-select--error":e.errorState,"tm-field-select--small-padding":e.smallPadding,"tm-field-select--appended":e.appendedToField,"tm-field-select--hide-append-icon":e.hideAppendIcon}]],"popup-content-class":e.internalPopupContentClass,"popup-content-style":e.popupContentStyle,behavior:`menu`,"virtual-scroll-item-size":40,"use-input":e.useInput,multiple:e.multiple,clearable:e.clearable&&!e.hideAppendIcon,tabindex:e.tabIndex,"bottom-slots":e.innerErrorState||!!e.$slots.error||!!e.hint||!!e.$slots.hint,outlined:``,dense:``,"onUpdate:modelValue":e.onInput,onFocus:e.onFocus,onBlur:e.onBlur,onInputValue:e.onInputValue,onKeyup:e.onKeyUp,onPaste:e.onPaste,onPopupHide:e.onPopupHide,onPopupShow:e.onPopupShow,onClear:e.onClear,onVirtualScroll:t[0]||(t[0]=t=>e.$emit(`virtual-scroll`,t))}),Ft({option:x(t=>[w(we,on(t.itemProps,{class:{"q-item--subheader caption-12":t.opt.subheader,"q-item--border-top":t.opt.newContactOption||t.opt.borderTop,"q-item--autoheight":e.optionAutoHeight,"tm-field-select__option--small-padding":e.smallPadding,disabled:t.opt.disabled},clickable:!t.opt.disabled&&!t.opt.unselectable,onClick:n=>e.onClickByOption(t.opt),onMouseleave:e.onOptionMouseLeave}),{default:x(()=>[F(e.$slots,`option`,Yt(pn(t)),()=>[S(`span`,$x,Zt(t.opt.text),1)],!0)]),_:2},1040,[`class`,`clickable`,`onClick`,`onMouseleave`])]),"no-option":x(t=>[F(e.$slots,`before-options`,{},void 0,!0),e.hideNoResult?P(``,!0):F(e.$slots,`no-option`,Yt(on({key:0},t)),()=>[w(we,Yt(pn(t.itemProps)),{default:x(()=>[w(Le,{class:`text-grey`},{default:x(()=>[Rt(Zt(e.noResultsText||e.$t(`common.noResults`)),1)]),_:1})]),_:1},16)],!0)]),after:x(()=>[F(e.$slots,`after`,{},void 0,!0)]),"before-options":x(()=>[F(e.$slots,`before-options`,{},void 0,!0)]),"after-options":x(()=>[F(e.$slots,`after-options`,{},void 0,!0)]),selected:x(()=>[F(e.$slots,`selected`,{},void 0,!0)]),hint:x(()=>[S(`div`,null,[e.innerErrorState?(N(),b(`div`,eS,[F(e.$slots,`error`,{},()=>[w(o,{field:e.name??`select`,errors:e.errorsBag,"server-errors":e.serverErrors,invalid:e.innerErrorState},null,8,[`field`,`errors`,`server-errors`,`invalid`])],!0)])):P(``,!0),S(`div`,null,[F(e.$slots,`hint`,{},()=>[Rt(Zt(e.hint),1)],!0)])])]),_:2},[e.$slots.selected?void 0:{name:`selected-item`,fn:x(t=>[F(e.$slots,`selected-item`,Yt(pn(t)),()=>[S(`span`,Qx,[F(e.$slots,`selected-item-truncate`,Yt(pn(t)),()=>[Rt(Zt(t.opt.text),1)],!0)])],!0)]),key:`0`},e.$slots.append?{name:`append`,fn:x(()=>[F(e.$slots,`append`,{},void 0,!0)]),key:`1`}:void 0,e.$slots.prepend?{name:`prepend`,fn:x(()=>[F(e.$slots,`prepend`,{},void 0,!0)]),key:`2`}:void 0,e.$slots.label?{name:`label`,fn:x(()=>[F(e.$slots,`label`,{},void 0,!0)]),key:`3`}:void 0]),1040,`option-value.option-label.emit-value.map-options.disable.loading.model-value.options.title.hide-dropdown-icon.label.placeholder.class.popup-content-class.popup-content-style.use-input.multiple.clearable.tabindex.bottom-slots.onUpdate:modelValue.onFocus.onBlur.onInputValue.onKeyup.onPaste.onPopupHide.onPopupShow.onClear`.split(`.`))}var nS=q(Yx,[[`render`,tS],[`__scopeId`,`data-v-1e00b6a6`]]);E(),$t(),A();var rS={class:`tm-paging-limit`},iS={key:0,class:`tm-paging-limit__text`},aS={class:`font-weight-semi-bold white-space-nowrap`},oS=q(O({__name:`TmPagingLimit`,props:{value:{default:10},options:{default:()=>[10,25,50,100,250]}},emits:[`update:model-value`],setup(e){let t=e,{isMobile:n}=ca(),r=Vu(),i=C(()=>String(t.value)),a=C(()=>t.options.map(e=>({text:e?r.tc(`tmTableFooter.perPageOption`,e):r.t(`common.all`),value:String(e)}))),o=C(()=>t.options.includes(t.value)?null:r.tc(`tmTableFooter.perPageOption`,t.value));return(e,t)=>(N(),b(`div`,rS,[j(n)?P(``,!0):(N(),b(`div`,iS,Zt(e.$t(`tmTableFooter.rowsPerPage`)),1)),w(nS,{"model-value":j(i),options:j(a),clearable:!1,outlined:``,dense:``,size:`xSmall`,"menu-fit":!1,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit(`update:model-value`,+t))},{"selected-item":x(({opt:e})=>[S(`span`,aS,Zt(e.text??j(o)),1)]),_:1},8,[`model-value`,`options`])]))}}),[[`__scopeId`,`data-v-94067abb`]]);E(),A();var sS={class:`tm-paging`},cS=q(O({__name:`TmPaging`,props:{entity:{},firstIndex:{},lastIndex:{},total:{},totalLimit:{},isFirstPage:{type:Boolean},isLastPage:{type:Boolean},perPage:{},perPageOptions:{},loading:{type:Boolean},hidePerPage:{type:Boolean}},emits:[`prev`,`next`,`update:per-page`],setup(e){return(t,n)=>(N(),b(`div`,sS,[w(Nx,{"entity-name":e.entity,"first-index":e.firstIndex,"last-index":e.lastIndex,total:e.total,"total-limit":e.totalLimit,loading:e.loading,"is-first-page":e.isFirstPage,"is-last-page":e.isLastPage,onPrev:n[0]||(n[0]=e=>t.$emit(`prev`)),onNext:n[1]||(n[1]=e=>t.$emit(`next`))},{"pagination-text":x(e=>[F(t.$slots,`pagination-text`,Yt(pn(e)),void 0,!0)]),"pagination-text-append":x(()=>[F(t.$slots,`pagination-text-append`,{},void 0,!0)]),_:3},8,[`entity-name`,`first-index`,`last-index`,`total`,`total-limit`,`loading`,`is-first-page`,`is-last-page`]),e.hidePerPage?P(``,!0):(N(),k(oS,{key:0,value:e.perPage,options:e.perPageOptions,"onUpdate:modelValue":n[2]||(n[2]=e=>t.$emit(`update:per-page`,e))},null,8,[`value`,`options`]))]))}}),[[`__scopeId`,`data-v-c3feb577`]]);E();var lS=O({components:{PersonNameHighlight:my,TmAvatar:Hi},props:{name:{type:String},avatarName:{type:String},avatarUrl:{type:String},avatarColor:{type:String},avatarIcon:{type:String},avatarSize:{type:String,default:`medium`},avatarCustomSize:{type:String},avatarPlaceholderCustomSize:{type:String},semiBold:{type:Boolean},searchQuery:{type:String},maxWidth:{type:String},hoverable:{type:Boolean,default:!1},exactColor:{type:Boolean},overrideTextColor:{type:String}},setup(e){return{placeholderProps:C(()=>{let t={};return e.avatarIcon&&(t.placeholderType=`icon`,t.customIcon=e.avatarIcon),t})}}});E(),A();var uS={class:`tm-person`},dS={class:`tm-person__avatar`};function fS(e,t,n,r,i,a){let o=I(`tm-avatar`),s=I(`person-name-highlight`);return N(),b(`div`,uS,[S(`div`,dS,[F(e.$slots,`avatar`,{},()=>[w(o,on(e.placeholderProps,{url:e.avatarUrl,name:e.avatarName||e.name,color:e.avatarColor,size:e.avatarSize,"placeholder-custom-size":e.avatarPlaceholderCustomSize,"custom-size":e.avatarCustomSize,"exact-color":e.exactColor,"override-text-color":e.overrideTextColor}),null,16,[`url`,`name`,`color`,`size`,`placeholder-custom-size`,`custom-size`,`exact-color`,`override-text-color`])],!0)]),e.name||e.$slots.name?(N(),b(`span`,{key:0,class:M([`tm-person__name`,{"font-weight-semi-bold":e.semiBold,"tm-person__name--hoverable":e.hoverable}]),style:an({"max-width":e.maxWidth})},[F(e.$slots,`name`,Yt(pn({name:e.name})),()=>[w(s,{name:e.name,search:e.searchQuery},null,8,[`name`,`search`])],!0)],6)):P(``,!0)])}var pS=q(lS,[[`render`,fS],[`__scopeId`,`data-v-cb9aca25`]]);
2E(),$t(),A();var mS={class:`virtual-scroll`},hS=[`onClick`,`onDblclick`],gS=q(O({__name:`TmVirtualScroll`,props:{items:{},keyProp:{default:`id`},minRowHeight:{},rowHeight:{},itemGap:{default:0},withExtraPages:{type:Boolean,default:!1},scrollToDown:{type:Boolean,default:!1},scrollbarStyle:{default:`thumb-with-track`}},emits:[`click`,`dblclick`,`page`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=cn(`list`),o=cn(`scroller`),s=T(0),c=T([]),l=T([]),{isMobile:u}=ca(),d=new Map,f=new Set,p,ee=new Map,te=!1,ne=0,re=0,ie=!1,ae=-1,oe=-1,se=0,ce,le=0,m=!1,ue=!1,de=0,fe=!1,pe=0,me=C(()=>r.items.length??0),he=C(()=>ge.value?r.rowHeight+r.itemGap:r.minRowHeight??10),ge=C(()=>typeof r.rowHeight==`number`&&!Number.isNaN(r.rowHeight)&&r.rowHeight>0),_e=C(()=>{if(!s.value)return 0;if(ge.value)return r.rowHeight*me.value;let e=0;if(me.value&&l.value?.length){let t=l.value[me.value-1];t?.rowHeight&&(e=t.offsetY+t.rowHeight)}return e||(e=he.value*me.value),e=Math.max(e,re-r.itemGap),e}),ve=C(()=>({height:`${_e.value||he.value*me.value}px`,width:`100%`}));Et(a,e=>{a.value&&(e.length&&e[0].contentRect?s.value=e[0].contentRect.height:s.value=a.value.clientHeight,xe())}),sn(()=>{if(!a.value)throw new wd(`Root element not found`);let e=a.value.getBoundingClientRect();s.value=e.height,a.value.addEventListener(`scroll`,be,{passive:!0}),Se(),Oe()}),Vt(()=>{ie=!0,a.value?.removeEventListener(`scroll`,be),clearTimeout(ce),ye.cancel(),cancelAnimationFrame(le),d.clear(),p?.disconnect()});let ye=Fe(e=>{if(ue||r.scrollToDown&&!fe||!r.scrollToDown&&fe)return;let t=e.scrollHeight-e.clientHeight;if(f.has(t)||t<pe){pe=t;return}let n=fe?t*.3:t/2;(fe&&de<n||!fe&&de>n)&&(i(`page`,fe?`up`:`down`),f.add(t)),pe=t},35),be=()=>{le||(le=requestAnimationFrame(Se))},xe=()=>{m=!0,cancelAnimationFrame(le),le=requestAnimationFrame(Se)},Se=()=>{if(le=0,ie||!a.value)return;ue&&ne!==a.value.scrollHeight-a.value.clientHeight&&Me(),de=a.value.scrollTop;let e=m;m=!1,(e||ne!==de)&&(fe=ne>de,ne=de,r.scrollToDown&&(ue=de===a.value.scrollHeight-a.value.clientHeight),ye(a.value),Ce())},Ce=(e=!1)=>{let{first:t,last:n}=Te();if(n<t||!e&&ae===t&&oe===n)return;let i=t,a=n,o=0,s=n-t;if(r.withExtraPages&&s*3<=me.value){let e=(s*3-s)/2;i=Math.max(0,t-e),a=Math.min(n+e,me.value),i>t-e?(o=i-(t-e),a=Math.min(me.value,a+o)):a<n+e&&(o=n+e-a,i=Math.max(0,i-o))}ae=t,oe=n;let u=i,d=0;c.value.length=Math.max(a-i,1);let f=Math.min(a,me.value-1);for(;u<=f;)c.value[d]=l.value[u],d+=1,u+=1;Oe()},we=e=>{let t=l.value,n=0,r=t.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2);t[a].offsetY-10<=e?(i=a,n=a+1):r=a-1}return i},Te=()=>{if(!l.value.length)return{first:-1,last:-2};let e=ne,t=ne+s.value,n=we(t);return n<0&&(n=l.value.length-1),{first:Math.max(we(e)-1,0),last:n}},Ee=e=>{let t=r.items[e];return t?t[r.keyProp]:null},De=(e,t)=>{let n=l.value[e];if(!n)return;let r=n.offsetY,i=n.rowHeight;e+=1,n=l.value[e];let a=t?l.value.length:oe+1;for(;n&&e<a;)r+=i,n.offsetY=r,n.css.transform=`translateY(${r}px)`,i=n.rowHeight,e+=1,n=l.value[e];re=r},Oe=()=>{te||(te=!0,Nt(()=>{te=!1,ke()}))},ke=()=>{if(ge.value||!o.value)return;p===void 0&&(p=new ResizeObserver(e=>{if(ge.value)return;let t=1/0;for(let n of e){let e=ee.get(n.target);if(typeof e!=`number`)continue;let i=l.value[e];if(!i)continue;let a=(n.contentRect?.height??0)+r.itemGap;if(i.rowHeight===a)continue;i.rowHeight=a,i.index===0&&(i.offsetY=0);let o=Ee(i.index);o&&d.set(o,a),t=Math.min(t,i.index)}t<1/0&&De(t,!0)}));let e=new Set(ee.keys()),t=new Map,n=o.value.children;for(let r=0;r<n.length;r++){let i=n[r],a=c.value[r];a&&(t.set(i,a.index),e.has(i)?e.delete(i):p.observe(i))}for(let t of e)p.unobserve(t);ee.clear();for(let[e,n]of t)ee.set(e,n)},Ae=e=>{se+=1,se===1?ce=setTimeout(()=>{i(`click`,{row:r.items[e.index],index:e.index}),se=0},200):(clearTimeout(ce),i(`dblclick`,{row:r.items[e.index],index:e.index}),se=0)},je=()=>{if(!a.value)throw new wd(`No list component`);return a.value},Me=()=>{a.value&&(a.value.scrollTop=a.value.scrollHeight-a.value.clientHeight)};return fn(()=>r.items,(e,t)=>{l.value.length=e.length;let n=!1;e.forEach((e,t)=>{let i=t===0?0:l.value[t-1].offsetY+l.value[t-1].rowHeight,a=0;if(e){let t=e[r.keyProp];a=d.get(t)??null}if(l.value[t])l.value[t].offsetY=i,l.value[t].css.transform=`translateY(${i}px)`,(a||!e)&&(l.value[t].rowHeight=a??0,n=!0);else{let n={transform:`translateY(${i}px)`};l.value[t]={index:t,offsetY:i,rowHeight:e?a??he.value:0,css:n}}}),!n&&t&&(n=e.length<=t.length),n&&De(0,!0),ne=-1,e?.length===t?.length&&(ae=-1),t&&(!e||e.length<t.length)&&f.clear(),xe()},{immediate:!0}),fn(_e,(e,t)=>{if(ue){Me();return}!fe||!a.value||!t||a.value.scrollTop+e-t<0||Nt(()=>{a.value&&(de+=e-t,a.value.scrollTop=de,ne=de,Ce())})}),t({getScrollElement:je,scrollTo:e=>{let t=l.value[e];if(!a.value||!t)return;
2let n=a.value.scrollTop,r=a.value.clientHeight,i=t.offsetY,o=i+t.rowHeight;i<n?a.value.scrollTop=i:o>n+r&&(a.value.scrollTop=o-r)},scrollToEnd:Me}),(t,n)=>(N(),b(`div`,mS,[S(`div`,{ref:`list`,class:M([`virtual-scroll-list`,`virtual-scroll-list--${e.scrollbarStyle}`])},[S(`div`,{ref:`scroller`,class:M([`scroller`,{"scroller--mobile":j(u)}]),style:an(j(ve))},[(N(!0),b(un,null,Wt(j(c),n=>(N(),b(`div`,{key:n.index,class:M([`virtual-scroll-item`,{"virtual-scroll-item--mobile":j(u)}]),style:an(n.css),onClick:e=>Ae(n),onDblclick:e=>Ae(n)},[n&&e.items[n.index]?F(t.$slots,`default`,on({key:0,ref_for:!0},{item:e.items[n.index],index:n.index}),()=>[Rt(Zt(n[e.keyProp]),1)],!0):P(``,!0)],46,hS))),128))],6)],2)]))}}),[[`__scopeId`,`data-v-3b401d3d`]]);E(),$t();function _S(){return _S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_S.apply(this,arguments)}var vS=function(){var e=!1,t=[];return{resolved:function(){return e},resolve:function(){if(!e){e=!0;for(var n=0,r=t.length;n<r;n++)t[n]()}},promise:{then:function(n){if(!e){t.push(n);return}n()}}}},yS=Object.prototype.hasOwnProperty;function bS(){var e=vS();return{notify:function(){e.resolve()},wait:function(){return e.promise},render:function(e,t,n){this.wait().then(function(){n(window.grecaptcha.render(e,t))})},reset:function(e){e!==void 0&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.reset(e)}))},execute:function(e){e!==void 0&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.execute(e)}))},checkRecaptchaLoad:function(){yS.call(window,`grecaptcha`)&&yS.call(window.grecaptcha,`render`)&&this.notify()},assertLoaded:function(){if(!e.resolved())throw Error(`ReCAPTCHA has not been loaded`)}}}var xS=bS();typeof window<`u`&&(window.vueRecaptchaApiLoaded=xS.notify);var SS=O({name:`VueRecaptcha`,props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String},loadRecaptchaScript:{type:Boolean,default:!0},recaptchaScriptId:{type:String,default:`__RECAPTCHA_SCRIPT`},recaptchaHost:{type:String,default:`www.google.com`},language:{type:String,default:``}},emits:[`render`,`verify`,`expired`,`error`],setup:function(e,t){var n=t.slots,r=t.emit,i=T(null),a=T(null),o=function(e){r(`verify`,e)},s=function(){r(`expired`)},c=function(){r(`error`)};return sn(function(){if(xS.checkRecaptchaLoad(),e.loadRecaptchaScript&&!document.getElementById(e.recaptchaScriptId)){var t=document.createElement(`script`);t.id=e.recaptchaScriptId,t.src=`https://`+e.recaptchaHost+`/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl=`+e.language,t.async=!0,t.defer=!0,document.head.appendChild(t)}var l=_S({},e,{callback:o,"expired-callback":s,"error-callback":c}),u=i.value,d=n.default?u.children[0]:u;xS.render(d,l,function(e){a.value=e,r(`render`,e)})}),{root:i,widgetId:a,reset:function(){xS.reset(a.value)},execute:function(){xS.execute(a.value)}}},render:function(){var e=this.$slots.default,t=typeof e==`function`?e():e;return kt(`div`,{ref:`root`},t)}});E(),$t();var CS=O({components:{TmSpinner:kr,VueRecaptcha:SS},emits:{passed:e=>!0},setup(e,t){let n=T(!1);return{siteKey:`6LfHQnUoAAAAAK_7BN61-_YlWULZ3qAw2LCCrVCP`,handleCaptchaReady:()=>{n.value=!0},handleCaptchaPassed:async e=>{n.value=!1,t.emit(`passed`,e)},captchaReady:n}}});E(),A();var wS={class:`tm-captcha`},TS={class:`tm-captcha__loader-spinner`};function ES(e,t,n,r,i,a){let o=I(`vue-recaptcha`),s=I(`tm-spinner`);return N(),b(`div`,wS,[w(o,{sitekey:e.siteKey,class:M({"tm-captcha--hidden":!e.captchaReady}),"load-recaptcha-script":``,onVerify:e.handleCaptchaPassed,onRender:e.handleCaptchaReady},null,8,[`sitekey`,`class`,`onVerify`,`onRender`]),S(`div`,TS,[e.captchaReady?P(``,!0):(N(),k(s,{key:0,color:`primary`}))])])}var DS=q(CS,[[`render`,ES],[`__scopeId`,`data-v-57141e75`]]);E(),$t();var OS=O({__name:`TmModuleErrorBoundary`,setup(e){let t=T(0),n=new Set,r=null;qt(e=>{if(e instanceof Cd)return n.add(e.module),i(),!1});function i(){r||(r=new Promise(e=>{queueMicrotask(()=>{let i=Array.from(n);n.clear(),console.warn(`[ModuleErrorBoundary] Loading missing modules: ${i.join(`, `)}â¦`),ls(``,i).then(()=>{t.value+=1}).catch(e=>{let t=e instanceof Error?e:new mo(String(e));So().logAndCapture(t,Ba.ERROR)}).finally(()=>{r=null,e()})})}))}return(e,n)=>F(e.$slots,`default`,{key:j(t)})}});E(),A(),$t();var kS=O({__name:`TmRouterView`,setup(e){return(e,t)=>(N(),k(OS,null,{default:x(()=>[w(j(Ce),Yt(pn(e.$attrs)),Ft({_:2},[Wt(e.$slots,(t,n)=>({name:n,fn:x(t=>[F(e.$slots,n,Yt(pn(t??{})))])}))]),1040)]),_:3}))}});E();var AS=O({components:{TmScrollbar:Zr}
2,props:{blueBackground:Boolean}});E(),A();function jS(e,t,n,r,i,a){let o=I(`tm-scrollbar`);return N(),b(`div`,{class:M([`single-page-content`,{"single-page-content--blue":e.blueBackground}])},[w(o,null,{default:x(()=>[F(e.$slots,`default`,{},void 0,!0)]),_:3})],2)}var MS=q(AS,[[`render`,jS],[`__scopeId`,`data-v-91c9ce73`]]);E(),$t(),Jt(),A();var NS=q(O({__name:`MainSidebarButton`,props:{route:{},active:{type:Boolean},skipAction:{type:Boolean}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=$l(),a=C(()=>n.route?i.resolve(n.route).href:void 0),o=()=>{r(`click`),!n.skipAction&&n.route&&i.push(n.route)};return(t,n)=>(N(),k(Xt(j(a)?`a`:`div`),{class:M([`main-sidebar-button`,{"main-sidebar-button--active":e.active}]),href:j(a),onClick:dn(o,[`prevent`])},{default:x(()=>[F(t.$slots,`default`,{},void 0,!0)]),_:3},8,[`class`,`href`]))}}),[[`__scopeId`,`data-v-38283ab5`]]),PS=Symbol(`sidebar-expanded-menu-item`),FS=()=>ha(PS),IS=()=>({alwaysExpandable:FS().inject()?.alwaysExpandable??!1});E(),A();var LS=q(O({__name:`DropdownDirection`,props:{name:{},size:{},color:{},opened:{type:Boolean}},setup(e){return(t,n)=>(N(),k(ei,{class:M([`dropdown-direction`,[`dropdown-direction`,{"dropdown-direction--opened":e.opened}]]),name:e.name,size:e.size,color:e.color},null,8,[`class`,`name`,`size`,`color`]))}}),[[`__scopeId`,`data-v-ef707e96`]]),RS=`closed-forever`;function zS(e){return`ftooltip--${e}`}var BS=e=>{let t=zS(e.key),n=!ta(t),r=()=>ta(t)===RS;return r()&&Un(t,RS,400),{isFeatureTooltipDisplayed:n,isClosedForever:r}};E(),$t(),A();var VS={key:1,class:`main-sidebar-item__direction-placeholder`},HS={key:0,class:`mt-1`},US=q(O({__name:`MainSidebarItem`,props:{label:{},icon:{},route:{},mainSectionRoute:{},expanded:{type:Boolean},nested:{type:Boolean}},emits:[`toggle`],setup(e){let t=e,n=T(),{isTablet:r}=ca(),{isMenuOpen:i}=xn(),a=$l(),o=C(()=>t.route&&a.getRouteByName(t.route.name).meta||null),s=C(()=>{let e=t.mainSectionRoute??t.route;return!e||u.value?!1:Array.isArray(e)?e.some(e=>a.isActiveRouteByName(e.name)):a.isActiveRouteByName(e.name)}),c=Ut(),{alwaysExpandable:l}=IS(),u=C(()=>c.default?l?!0:r.value:!1),d=C(()=>u.value&&t.expanded&&i.value),f=C(()=>o.value?.featureTooltip&&BS(o.value.featureTooltip).isFeatureTooltipDisplayed&&(i.value||!r.value));return(t,r)=>(N(),b(`li`,{ref_key:`tooltipAnchor`,ref:n,class:M([`main-sidebar-item`,{"mb-n1":j(d)}])},[w(NS,{route:e.route,class:M([`main-sidebar-item__link`,{"main-sidebar-item__nested":e.nested}]),active:j(s),"skip-action":j(u)&&j(i),onClick:r[0]||(r[0]=e=>t.$emit(`toggle`))},{default:x(()=>[e.icon?(N(),k(ei,{key:0,name:e.icon,size:`xLarge`},null,8,[`name`])):P(``,!0),j(i)?(N(),b(un,{key:1},[S(`div`,{class:M([`flex-grow-1 ml-3`,{"ml-6_5":!e.icon}])},Zt(e.label),3),F(t.$slots,`badges`,{},void 0,!0),j(u)?(N(),k(LS,{key:0,class:M({"mr-4":!e.nested,"mr-2":e.nested}),name:`tmi-arrow-down`,size:`large`,opened:e.expanded},null,8,[`class`,`opened`])):(N(),b(`div`,VS))],64)):(N(),b(un,{key:2},[w(Ji,{position:`right`,delayed:``,offset:[j(14),10]},{default:x(()=>[Rt(Zt(e.label),1)]),_:1},8,[`offset`]),F(t.$slots,`badges`,{},void 0,!0)],64)),j(f)?(N(),b(un,{key:3},[S(`div`,{ref_key:`tooltipAnchor`,ref:n,class:`main-sidebar-item__tooltip-anchor`},null,512),j(o)?.featureTooltip?(N(),k(Xt(j(o).featureTooltip.component),{key:0,target:j(n),config:j(o).featureTooltip,"is-menu-open":j(i)},null,8,[`target`,`config`,`is-menu-open`])):P(``,!0)],64)):P(``,!0)]),_:3},8,[`route`,`class`,`active`,`skip-action`]),j(d)?(N(),b(`div`,HS,[F(t.$slots,`default`,{},void 0,!0)])):P(``,!0)],2))}}),[[`__scopeId`,`data-v-ff39134a`]]);E(),$t();var WS=O({__name:`MainSidebarSwitcher`,setup(e){let{isMenuOpen:t,updateMenuState:n}=xn();return(e,r)=>(N(),k(US,{label:e.$t(j(t)?`common.collapse`:`common.expand`),icon:j(t)?`tmi-menu-close`:`menu`,onToggle:j(n)},null,8,[`label`,`icon`,`onToggle`]))}});E(),$t(),A();var GS={class:`flex-grow-1 mb-2`},KS={key:0,class:`mb-1`},qS=q(O({__name:`MainSidebar`,props:{scrollbarStyle:{}},setup(e){let{isMenuOpen:t,isMenuWithOverlay:n,isMobileMenu:r}=xn();return(i,a)=>(N(),b(`div`,{key:j(r).toString(),class:M([`main-sidebar`,{"main-sidebar--collapsed":!j(t),"main-sidebar--mobile":j(r),"main-sidebar--with-overlay":j(n)}])},[j(r)?P(``,!0):F(i.$slots,`logo`,{key:0},void 0,!0),w(Zr,{class:`main-sidebar__scroll-container`,"scrollbar-style":e.scrollbarStyle??`thumb-without-track-white`},{default:x(()=>[S(`ul`,GS,[F(i.$slots,`default`,{},void 0,!0)]),j(r)?P(``,!0):(N(),b(`ul`,KS,[F(i.$slots,`footer`,{},()=>[w(WS)],!0)]))]),_:3},8,[`scrollbar-style`])],2))}}),[[`__scopeId`,`data-v-865dd1b6`]]);Jt();var JS={Resolver:ua,PageResolver:Li,AsyncResolver:Wn,RedirectToIfNotFoundResolver:Ky,NotFoundPageResolver:rb,DetailsPageResolver:db,SuspenseResolver:yi,TmRouterViewReloader:zv,DetailsHero:Vi,TmDropdownSelect:Uv,TmFormLine:qv,TmOverlay:Jv,TmIcon:ei,TmFlag:fy,TmAvatar:Hi,TmPerson:yy,TmCountry:Ty,TmSearch:Fy,TmOnlineStatusBadge:Iy,TmAlert:Hy,TmTooltip:Ji,TmPersistentTooltip:Uy,TmButton:Ta,TmCard:mb,TmTabs:bb,TmProgress:Tb,TmWatchTutorial:kb,TmBadge:Fb,TmFaq:Hb,TmFaqCard:Gb,TmFaqCardSection:Zb,TmFaqExpansionItem:$b,TmFaqHeader:lx,TmFaqParagraph:px,TmFaqTabs:yx,TmInteractiveList:wx,TmColoredUl
2:Dx,TmEllipsis:kx,TmPaging:cS,TmPersonBase:pS,TmVirtualScroll:gS,TmCaptcha:DS,TmTranslate:gi,TmFormattedTextRenderer:ui,TmSkeleton:bn,PageContent:Lr,SinglePageContent:MS,MainSidebar:qS,RouterView:kS},YS=class{constructor(e,t,n,r,i,a,o,s){this.vuexService=e,this.routerService=t,this.routerBuilderService=n,this.translateService=r,this.monitoringService=i,this.trackingService=a,this.authService=o,this.windowService=s}createVueApp(e,t){return Gt(e,t)}async create(e,t){let n=this.createVueApp(t);n.config.performance=!1;let r=this.routerService.getRouter();return this.monitoringService.init(n,r),this.trackingService.registerApp(n),n.use(ut,lv),n.use(this.vuexService.getStore()),n.config.globalProperties.$t=this.translateService.t,n.config.globalProperties.$tc=this.translateService.tc,n.use(this.translateService.getPlugin()),await da(this.routerBuilderService),this.windowService.self().__getCurrentUser?await this.authService.tryFillCurrentUser(e=>{n.use(r)},!0):n.use(r),n.use(et),Object.entries(JS).forEach(([e,t])=>{e===`RouterView`&&delete n._context.components[e],n.component(e,t)}),n.directive(`safe-html`,wv),n.directive(`outer-click`,Dv),n.directive(`tooltip`,Iv),n.directive(`test-id`,Rv),n.mount(e),n}};YS=U([g(),B(0,m(V.VuexService)),B(1,m(V.RouterService)),B(2,m(V.RouterBuilderService)),B(3,m(V.TranslateService)),B(4,m(V.MonitoringService)),B(5,m(V.TrackingService)),B(6,m(V.AuthService)),B(7,m(V.WindowService))],YS);var XS=YS,ZS={install:({Model:e,String:t})=>{let n=t.prototype.fix;t.prototype.fix=function(e){return!this.isNullable&&e===null?``:n.call(this,e)};let r=e.insertOrUpdate;e.insertOrUpdate=function(e){return Array.isArray(e.data)?e.data.forEach(e=>{QS(e,this)}):QS(e.data,this),r.call(this,e)};let i=e.prototype.$insertOrUpdate;e.prototype.$insertOrUpdate=function(e){return Array.isArray(e.data)?e.data.forEach(e=>{QS(e,this.$self())}):QS(e.data,this.$self()),i.call(this.$self(),e)}}};function QS(e,t){let n=t.fields();Object.entries(n).forEach(([t,r])=>{let i=e[t];if(r instanceof Dt){if(i===null&&!e[r.foreignKey])e[r.foreignKey]=n[r.foreignKey].value;else if(i)return QS(i,r.parent)}r instanceof Oe&&(i?.length===0&&(!e[r.foreignKey]||e[r.foreignKey].length===0)?e[r.foreignKey]=n[r.foreignKey].value:i&&i.forEach(e=>{QS(e,r.parent)}))})}var $S=(e,t)=>(delete e[t],e),eC=(e,t)=>{let n=e();return n&&$S(n,t)},tC=(e,t)=>{let n=e();return n&&n.map(e=>$S(e,t))},nC=e=>function(t){let n=t.all;t.all=function(){return tC(()=>n.call(this),e)};let r=t.prototype.$all;t.prototype.$all=function(){return tC(()=>r.call(this),e)};let i=t.find;t.find=function(t){return eC(()=>i.call(this,t),e)};let a=t.prototype.$find;t.prototype.$find=function(t){return eC(()=>a.call(this,t),e)};let o=t.findIn;t.findIn=function(t){return tC(()=>o.call(this,t),e)};let s=t.prototype.$findIn;t.prototype.$findIn=function(t){return tC(()=>s.call(this,t),e)}},rC=e=>function(t){let n=t.prototype.all;t.prototype.all=function(){return tC(()=>n.call(this),e)};let r=t.prototype.find;t.prototype.find=function(t){return eC(()=>r.call(this,t),e)};let i=t.prototype.get;t.prototype.get=function(){return tC(()=>i.call(this),e)};let a=t.prototype.first;t.prototype.first=function(){return eC(()=>a.call(this),e)};let o=t.prototype.last;t.prototype.last=function(){return eC(()=>o.call(this),e)};let s=t.prototype.findIn;t.prototype.findIn=function(t){return tC(()=>s.call(this,t),e)}},iC={install:({Model:e,Query:t},n)=>{nC(n.stiTypeKey)(e),rC(n.stiTypeKey)(t)}},aC=e=>e.store().$db().baseModel(e.entity),oC=e=>{let t=``;if(e&&!ge(e.types())){for(let n of Object.keys(e.types()))if(pl.isModelType(e.types()[n],e)){t=n;break}}return t},sC=e=>(t,n)=>{let r=n.stiModel?oC(n.stiModel):``,i=e.baseEntity?aC(e):e,a=t.entities[i.entity].data;(n.data||[]).forEach(t=>{let n={...t,$id:t.id};r&&(n[e.typeKey]=r),a[n.id]=n})},cC=e=>(t,n)=>{let r=n.stiModel?oC(n.stiModel):``,i=e.baseEntity?aC(e):e,a=t.entities[i.entity].data;(n.data||[]).forEach(t=>{let{id:n,...i}=t;a[n]={...a[n],...i},r&&(a[n][e.typeKey]=r)})},lC=e=>(t,n)=>{let r=n.stiModel?oC(n.stiModel):``,i=e.baseEntity?aC(e):e,a=t.entities[i.entity].data;
2(n.data||[]).forEach(t=>{let{id:n,...i}=t;a[n]?a[n]={...a[n],...i}:a[n]={...t,$id:t.id},r&&(a[n][e.typeKey]=r)})},uC=e=>(t,n)=>{if(!n.condition)throw new Us(`Payload should contain update condition for "getLowLevelUpdateByConditionMutationByModel"`);n.data||(n.data=e=>e);let r=n.stiModel?oC(n.stiModel):``,i=e.baseEntity?aC(e):e,a=t.entities[i.entity].data;for(let[t,i]of Object.entries(a))if(n.condition(i)){if(vt(n.data))n.data(a[t]);else{let{id:e,...r}=n.data;a[t]={...a[t],...r}}r&&(a[t][e.typeKey]=r)}},dC=e=>(t,n)=>{let r=n.stiModel?oC(n.stiModel):``,i=e.baseEntity?aC(e):e,a=t.entities[i.entity].data;n.ids.forEach(t=>{(!r||r===a[t][e.typeKey])&&delete a[t]})},fC=e=>(t,n)=>{let r=n.stiModel?oC(n.stiModel):``,i=e.baseEntity?aC(e):e,a=t.entities[i.entity].data;for(let[t,i]of Object.entries(a))(!r||r===i[e.typeKey])&&n.condition(i)&&delete a[t]},pC=e=>`LOW_LEVEL_INSERT.${e}`,mC=e=>`LOW_LEVEL_UPDATE.${e}`,hC=e=>`LOW_LEVEL_UPDATE_CONDITION.${e}`,gC=e=>`LOW_LEVEL_INSERT_OR_UPDATE.${e}`,_C=e=>`LOW_LEVEL_DELETE.${e}`,vC=e=>`LOW_LEVEL_DELETE_CONDITION.${e}`,yC=(e,t)=>{t[pC(e.entity)]=sC(e),t[mC(e.entity)]=cC(e),t[hC(e.entity)]=uC(e),t[gC(e.entity)]=lC(e),t[_C(e.entity)]=dC(e),t[vC(e.entity)]=fC(e)},bC=class{getStore(){return this._store&&this._store.$db&&this._store.$db().isStarted?this._store:(xe.use(ZS),xe.use(iC,{stiTypeKey:Zu}),this._store=a({plugins:[St.install()]}),this._store)}getModelByModelEntity(e){return this.getDB().baseModel(e)}getDB(){return this.getStore().$db()}addMutations(e){let t=this.getStore();Object.keys(e).forEach(n=>{(t._mutations[n]||(t._mutations[n]=[])).push(r=>{e[n].call(t,t.state,r)})})}hasMutation(e){let t=this.getStore();return Array.isArray(t._mutations[e])&&t._mutations[e].length>0}setDefaultMutation(e){if(!this.hasMutation(pC(e.entity))){let t={};yC(e,t),this.addMutations(t)}}};bC=U([g()],bC);var xC=bC,SC=(e,t)=>e.replace(/{(\d+)}/g,(e,n)=>t[n]===void 0?e:t[n]),CC=class{getPath(e,t){return this._interpolateEndpoint(e,t)}_interpolateEndpoint(e,t){let n=J[e];return t?SC(n,t):n}};CC=U([g()],CC);var wC=CC,TC=class extends Pp{constructor(e,t,n,r,i){super(r),this.serializerService=e,this.api=t,this.endpointsService=n,this.loggerService=r,this.filterQueryService=i,this.makeCancelableRequest=e=>{let t=this.api.getCancelToken(),n=e(t.token);return n.cancel=()=>t.cancel(),n},this.transport=t}getApiSource(){return this.transport}async fillByFilter(e,t=!1){this.logGroupStart(`fillByFilter`),this.logArgs(JSON.stringify(e));let n=await this.readByFilter(e);return t?await this.create(n):await this.insertOrUpdate(n),this.logGroupEnd(),n}async readByFilter(e,t,n=[]){let r=await this.fetchByFilter(this.getSettingsFetch(),e,t,n),i=this.getItemsFromReadByFilterResponseData(r.data);return Np.normalizePayload(i,this.model())}async fillAll(e=!1){this.logGroupStart(`fillAll`);let t=this.fillByFilter([],e);return this.logGroupEnd(),t}async fillByCursor(e,t=[],n=``,r=[],i=1,a=!1){this.logGroupStart(`fillByCursor`);let{items:o}=await this.doCursor(e,t,n,r,[],i);return a?await this.create(o):await this.insertOrUpdate(o),this.logGroupEnd(),o}getFetchEndpointParams(){return[]}getPath(e,t){return this.endpointsService.getPath(e,[t])}getUpdatePath(e,t){return this.endpointsService.getPath(e,[t.id])}serializeData(e){return this.serializerService.serialize(this.model(),e)}autocompleteRequest(e,t,n,r,i,a,o,s){return this.doAutocomplete(e,t,n,r,i,a,o,s)}doAutocomplete(e,t,n,r,i,a,o,s){return this.doCursor(this.getSettingsFetch(),n,e,t,i,r,a,o,s)}fetchByFilter(e,t,n,r=[]){return this.getApiSource().get(this.endpointsService.getPath(e),{params:{perPage:100,...this.decorateFilterToStrictQueryPart(t),...n&&!ge(n)?{query:n,searchFields:r}:{}},paramsSerializer:_p})}async doCursor(e,t,n,r,i=[],a=1,o=25,s,c){return this.doGrid(e,t,{filter:i,sort:s,other:c},{pageKey:`${a}-${o}`,requestParams:{page:a,perPage:o}},n,r)}async doGrid(...e){let t=await this.doRawGridTyped(...e);return t.items=Np.normalizePayload(t.items,this.model()),t}decorateFilterToStrictQueryPart(e){return this.filterQueryService.decorateFilterToStrictQueryPart(e)}
2createGridRequestParamsWithPreparedFilters(e,t,n,r,i){let a={...t?t.requestParams:[]};return Object.keys(e.filter).length>0&&(a={...a,...i}),e.sort&&Object.keys(e.sort).length>0&&(a={...a,sort:{...e.sort}}),e.groupBy&&Object.keys(e.groupBy).length>0&&(a={...a,groupBy:{...e.groupBy}}),n&&n.length>0&&(a={...a,searchQuery:n}),r&&r.length>0&&(a={...a,searchFields:r}),e.other&&Object.keys(e.other).length>0&&(a={...a,...e.other}),a}createGridRequestParams(e,t,n,r){return this.createGridRequestParamsWithPreparedFilters(e,t,n,r,this.decorateFilterToStrictQueryPart(e.filter))}async doRawGridWithPreparedParams(e,t,n,r){let i=this.endpointsService.getPath(e,t),a={params:n,paramsSerializer:e=>_p(e)};return r instanceof AbortSignal?a.signal=r:r&&(a.cancelToken=r),this.getApiSource().get(i,a)}async doRawGrid(e,t,n,r,i,a,o){let s=this.createGridRequestParams(n,r,i,a);return this.doRawGridWithPreparedParams(e,t,s,o)}async doRawGridTyped(e,t,n,r,i,a,o){let s=await this.doRawGrid(e,t,n,r,i,a,o);return this.prepareGridResponse(s.data)}prepareGridResponse(e){return e.items=e.items.map(e=>({...e,id:e.id?.toString()||``})),e}async putForFormRequest(e){let{id:t,...n}=e,r=this.endpointsService.getPath(this.settings().single,[t]);return this.getApiSource().put(r,n)}async exportRequest(e,t,n){if(!this.settings().exportEndpoint&&!n)throw new Us(`Please define export endpoint in settings() or provide customUrl to exportRequest method`);let r=n||this.endpointsService.getPath(this.settings().exportEndpoint,t),i={params:e,paramsSerializer:e=>_p(e),responseType:`blob`};return this.getApiSource().get(r,i)}exportToPdfRequest(e){let t=this.getExportToPdfRequestUrl(e);return this.getApiSource().getFile(t)}getPdfDownloadLink(e){let t=this.getExportToPdfRequestUrl(e);return this.getApiSource().get(t)}gridRequest(e,t,n,r,i,a){return this.doGrid(this.getSettingsFetch(),a??this.getFetchEndpointParams(),e,t,n,r,i)}async fetchAllItems(){let{items:e}=await this.gridRequest({filter:[]});return await this.insertOrUpdate(e),e}mapBulkDeleteParamsToNewFilters(e,t){let n=this.prepareBulkDeleteParams(t),r=re(e),i;if(r[0]?i=r[0]:(i={},r.push(i)),!n.all){if(!n.ids)throw new G(`preparedParams.ids is undefined`);i.id={[ku.in]:n.ids.map(e=>+e)}}if(delete n.ids,delete n.all,r.length!==0){if(n.filters)throw new G(`preparedParams.filters should be undefined`);n.filters=r}return n}bulkDelete(e,t,n,r){let i=this.settings().bulkDeleteEndpoint;if(!i)throw new G("Specify `bulkDeleteEndpoint`");let a=`${this.endpointsService.getPath(i,r)}?${_p({filter:t})}`,o=this.prepareBulkDeleteParams(n);return this.api.post(a,o)}bulkUpdate(e,t,n,r){let i=this.settings().bulkUpdateEndpoint;if(!i)throw new G("Specify `bulkUpdateEndpoint`");let a=this.getBulkBasePayload(r,{ids:t,all:n});return this.api.post(this.endpointsService.getPath(i),{...a,updateParameters:e})}reorder(e,t){let n=this.settings().reorderEndpoint;if(!n)throw new G("Specify `reorderEndpoint`");return this.getApiSource().put(this.getPath(n,e),{afterId:t})}async facetsRequest(e=[],t){let n=this.settings().facetEndpoint;if(n)return this.fillFacetsByEndpoint(n,e,t?{types:t}:{});throw new Us("Please specify `facetEndpoint`")}getExportToPdfRequestUrl(e){if(!this.settings().pdfDownloadEndpoint)throw new Us(`Please define pdf download endpoint in settings()`);return this.endpointsService.getPath(this.settings().pdfDownloadEndpoint,[e])}async fillFacetsByEndpoint(e,t,n){let r=this.endpointsService.getPath(e,t);return(await this.getApiSource().get(n?`${r}?${_p(n)}`:r)).data}prepareBulkDeleteParams(e){return{...e,all:+!!e.all}}getItemsFromReadByFilterResponseData(e){return`items`in e?e.items:e}getFetchPath(e){let t=this.getSettingsFetch();return this.endpointsService.getPath(t,e)}prepareBulkQuery(e){return{ids:e.selectedIds,all:Number(e.isAllSelected)}}getSettingsFetch(){let{fetch:e}=this.settings();if(!e)throw new Us("You must define `fetch` property in settings()");return e}async addModelToStore(e){let t=await this.model().insert({data:e}),r=Ue(this.model().entity);return n(t,[r,0])}getBulkBasePayload(e,t){return t.all?{filters:e,searchQuery:``}:{filters:xt(e,[{id:{in:t.ids}}]),searchQuery:``}}async doGet(e,t){return this.getApiSource().get(this.getPath(e,t))}async doDelete(e,t,n){return this.getApiSource().delete(this.getPath(e,t),n||{})}doPost(e,t,n){let r=this.getApiSource(),i=this.getUpdatePath(e,t);return r.post(i,t,n)}async doPut(e,t){return this.getApiSource().put(this.getUpdatePath(e,t),this.serializeData(t))}
2async getRequest(e){if(!this.hasSingleSetting())throw new Us(`You must define \`single\` property in settings() for entity ${this.model().entity}`);let t=await this.doGet(this.settings().single,e);return t.data=Np.normalizePayload(t.data,this.model()),t.data}putRequest(e){if(!this.hasSingleSetting())throw new Us(`You must define \`single\` property in settings() for entity ${this.model().entity}`);return this.doPut(this.settings().single,e)}postRequest(e,t){if(!this.settings().create)throw new Us(`You must define \`create\` property in settings() for entity ${this.model().entity}`);return this.doPost(this.settings().create,e,t)}deleteRequest(e){return this.deleteRequestWithParams(e)}deleteRequestWithParams(e,t){if(!this.hasSingleSetting())throw new Us(`You must define \`single\` property in settings() for entity ${this.model().entity}`);return this.doDelete(this.settings().single,e,t)}};TC=U([g(),h(),B(0,m(V.SerializerService)),B(1,m(V.Api)),B(2,m(V.EndpointsService)),B(3,m(V.LoggerService)),B(4,m(V.FilterQueryService))],TC);var Q=TC,EC=class extends Pp{constructor(e,t){super(t),this.transport=e}getApiSource(){return this.transport}async insertOrUpdate(e){let t=await this.getApiSource().get(this.model().name);for(let r of e)n(t.data,r.id)?this.update([r]):this.insert([r]);return e}async fillAll(e=!1){this.logGroupStart(`fillAll`);let t=await this.getApiSource().get(this.settings().single);if(!t.data)throw new Ml(`Response data expected`);return await this.insertOrUpdate(Object.values(t.data)),this.logGroupEnd(),t.data}getPath(e,t){return`${e}${this.getRepoSeparator()}${t}`}getUpdatePath(e,t){return this.getPath(e,t.id)}getRepoSeparator(){return this.transport.getPathSeparator?this.transport.getPathSeparator():`/`}serializeData(e){return e}log(e){this.loggerService.log(`orm`,e,`storageRepository`)}logError(e){this.loggerService.error(`orm`,e,`storageRepository`)}async lowLevelDeleteByCondition(e,t){super.lowLevelDeleteByCondition(e,t);let n=this.settings().single;if(!n)throw new Us(`${this.model().entity} storage repository without 'single' in settings`);let r=(await this.transport.get(n)).data;if(!r)throw new Ml(`Response data expected`);Object.values(r).forEach(t=>{e(t)&&this.transport.delete(`${n}${this.getPathSeparator()}${t.id}`)})}getPathSeparator(){if(!this.transport.getPathSeparator)throw new Us(`${this.model().entity} repository wrong transport`);return this.transport.getPathSeparator()}async doGet(e,t){return this.getApiSource().get(this.getPath(e,t))}async doDelete(e,t){return this.getApiSource().delete(this.getPath(e,t))}doPost(e,t){let n=this.getApiSource(),r=this.getUpdatePath(e,t);return n.post(r,t)}async doPut(e,t){return this.getApiSource().put(this.getUpdatePath(e,t),this.serializeData(t))}async getRequest(e){if(!this.hasSingleSetting())throw new Us(`You must define \`single\` property in settings() for entity ${this.model().entity}`);let t=await this.doGet(this.settings().single,e);return t.data=Np.normalizePayload(t.data,this.model()),t.data}putRequest(e){if(!this.hasSingleSetting())throw new Us(`You must define \`single\` property in settings() for entity ${this.model().entity}`);return this.doPut(this.settings().single,e)}postRequest(e){if(!this.settings().create)throw new Us(`You must define \`create\` property in settings() for entity ${this.model().entity}`);return this.doPost(this.settings().create,e)}deleteRequest(e){if(!this.hasSingleSetting())throw new Us(`You must define \`single\` property in settings() for entity ${this.model().entity}`);return this.doDelete(this.settings().single,e)}};EC=U([g(),h(),B(0,ze()),B(1,m(V.LoggerService))],EC);var DC=EC,OC={[Mo.REPOSITORIES]:Q,[Mo.REPOSITORIES_STORE]:DC,[Mo.REPOSITORIES_MOCK]:DC},kC=e=>qa(e)&&typeof e.fillByCustomParams==`function`&&typeof e.findByCustomParams==`function`,AC=class{constructor(e,t){this.vuexService=e,this.get=t;let n={};this.repos={};for(let e of Object.keys(OC))n[e]={},this.repos[e]={};this.cache=n}addService(e,t){let n=Reflect.getMetadata(Jl.RepoSettings,e.bindingValue);if(!n){Pl().raw(`error`,e);let t=e.id||`unknown repository`;throw new G(`Please use @RepositorySettings decorator for ${t}`)}let r=n.model,i=this.getRepoGroupByName(t);this.repos[i][r.entity]={id:e.id,model:r};let a=this.vuexService.getDB();a&&(a.schemas[r.entity]||a.register(r))}getRepository(e,t){return this.getRepositoryByModelNameNew(e.entity,t)}getRepositoryByModelNameNew(e,t){let n=this.getRepoGroupByName(t),r=this.cache[n][e];if(r)return r;if(!this.repos[n][e])throw new Us(`Not found repository for ${e}`);let i=this.repos[n][e],a=this.get(i.id);return this.cache[n][e]=a,a}all(e){return this.cache[e]}getAllRepos(e){let t=this.getRepoGroupByName(e);return Object.keys(this.repos[t])}getRepoGroupByName(e){return e||Mo.REPOSITORIES}};AC=U([g(),B(0,m(V.VuexService)),B(1,m(`GetLocator`))],AC);var jC=AC,MC=e=>{let t={};for(let n in e){let r=n.split(`.`),i=t;for(let e=0;e<r.length-1;e++){let t=r[e],n=r[e+1];if(!(t in i)){let e=+n;i[t]=Number.isInteger(e)&&e>=0?[]:{}}i=i[t]}i[r[r.length-1]]=e[n]}return t},NC=e=>Array.isArray(e)?e.map(e=>MC(e)):MC(e),PC=(e,t=[],n=!0,r=`.`)=>
2!lt(e)||n&&Array.isArray(e)?{[t.join(r)]:e}:bt(e,(e,i,a)=>xt(e,PC(i,[...t,a],n,r)),{}),FC=(e,t=[],n=!0,r=`.`)=>Array.isArray(e)?e.map(e=>PC(e,t,n,r)):PC(e,t,n,r),IC=(e,t,n)=>{let r=e;for(let e=0;e<t.length-1;e++){let n=t[e],i=t[e+1],a=/^\d+$/.test(i);r[n]||(r[n]=a?[]:{}),r=r[n]}let i=t[t.length-1];r[i]===void 0?r[i]=n:Array.isArray(r[i])?r[i].push(n):r[i]=[r[i],n]},LC=e=>{let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];i===`[`||i===`]`?n&&(t.push(n),n=``):n+=i}return n&&t.push(n),t},RC=e=>{let t={};if(e=e.trim().replace(/^(\?|#|&)/,``),!e)return t;let n=e.split(`&`);for(let e of n){let n=e.indexOf(`=`),r,i;if(n===-1?(r=decodeURIComponent(e),i=``):(r=decodeURIComponent(e.slice(0,n)),i=decodeURIComponent(e.slice(n+1))),r.includes(`[`)){IC(t,LC(r),i);continue}t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t},zC=(e,t)=>{let n=e.indexOf(`.`);if(n>0){let r=e.substring(0,n),i=e.substring(n+1);return{[r]:zC(i,t)}}return{[e]:t}},BC=(e,t)=>t?`${e}.${t}`:e,VC=(e,t,n)=>({[BC(e,t)]:JSON.stringify(FC(n))}),HC=e=>{let t={};for(let n in e){let r=e[n];try{r=JSON.parse(e[n])}catch{throw new G(`"${e[n]}" is not a valid dot notation`)}t=xt(t,zC(n,NC(r)))}return t},UC=(...e)=>{let t=(e,t)=>{if(Array.isArray(e)&&e.every(e=>typeof e!=`object`)){let n=t.filter(t=>!e.includes(t));return e.concat(n)}},n=Me.apply(void 0,[{},...e.map(HC),t]),r={};for(let e in n)for(let t in n[e])r={...r,...VC(e,t,n[e][t])};return r},WC=e=>[Is,fo,to,rd].some(t=>e.startsWith(`${t}.`)),GC=e=>(e?Object.keys(e).map(t=>{let n=e[t];if(n===void 0)return``;if(n===null)return JC(t);if(lt(n)&&!Array.isArray(n))return Object.keys(n).map(e=>GC({[`${t}[${e}]`]:n[e]}),``).filter(e=>e.length>0).join(`&`);if(Array.isArray(n)){let e=[];return n.forEach((n,r)=>{n!==void 0&&(n===null?e.push(JC(t)):lt(n)?Object.keys(n).forEach(i=>{e.push(GC({[`${t}[${r+1}][${i}]`]:n[i]}))}):e.push(`${JC(t)}=${JC(n)}`))}),e.filter(e=>e.length>0).join(`&`)}return`${JC(t)}=${JC(n)}`}).filter(e=>e.length>0).join(`&`):null)||``,KC=/[^A-Za-z0-9\-_.~{}[\]:",]/gu,qC=/[!'()*]/,JC=e=>String(e).replace(KC,e=>qC.test(e)?`%${e.charCodeAt(0).toString(16)}`:encodeURIComponent(e)),YC=class{constructor(e,t,n,r){this.loggerService=e,this.subscriptionService=t,this.windowService=n,this.titlerManager=r,this.previousRoute=void 0}async beforeEach(e,t){this.previousRoute=t,this.loggerService.table(`router`,{to:{path:e.fullPath,name:e.name},from:{path:t.fullPath,name:t.name},empty:{path:``,name:``}},`beforeEach`),this.subscriptionService.emit(mr,e)}async afterEach(e,t){e.meta.titler&&e.meta.titler.service!==`DefaultTitlerService`||e.redirectedFrom?.path.endsWith(`_`)||this.setTitleForRoute(e)}setTitleForRoute(e){this.titlerManager.updateTitle(e,e.meta?.titler?.params)}subscribe(e,t){this.subscriptionService.subscribeWithSubscriptionKey(mr,t,e)}unsubscribe(e){this.subscriptionService.unsubscribe(e)}get currentRoute(){return this.router.currentRoute}getCurrentRoute(){return this.router.currentRoute.value}getCurrentRoutesNames(){return this.router.currentRoute.value.matched.reduce((e,t)=>{t.name&&e.add(t.name);let n=vt(t.meta.parent)?t.meta.parent(this.router.currentRoute.value):t.meta.parent;return n&&e.add(n),e},new Set)}getPreviousRoute(){return this.previousRoute}isEqual(e,t){return this.resolve(e).path===this.resolve(t).path}isCurrentRoute(e){return this.isEqual(e,this.getCurrentRoute())}isCurrentRouteByName(e){let t=null;if(typeof e==`string`)t=e;else if(`name`in e&&e.name)t=e.name;else return!1;return this.getCurrentRoute().name===t}isChildOf(e,t){let n=ma(e)?e:this.resolve(e),r=ma(t)?t:this.resolve(t);return r.path.startsWith(n.path)&&r.name!==n.name}isChildOfByName(e,t){let n=ma(e)?e:this.resolve(e),r=ma(t)?t:this.resolve(t),i=r.name?String(r.name):null,a=n.name?String(n.name):null;return!i||!a?!1:i.startsWith(a)}isChildOfCurrentRoute(e){return this.isChildOf(this.getCurrentRoute(),e)}isCurrentRouteChildOf(e){return this.isChildOf(e,this.getCurrentRoute())}isCurrentRouteChildOfByName(e){return this.isChildOfByName(e,this.getCurrentRoute())}isActive(e){return typeof e==`string`||!(`name`in e)?!1:this.isActiveRouteByName(e.name)}
2isActiveRouteByName(e){return this.getCurrentRoutesNames().has(e)}getRouter(){return this.router}resolve(e,t){return this.router.resolve(e,t)}resolveFinalPath(e,t,n=new Set){let r=this.resolve(e,t),i=r.name,a=i||r.path;if(a&&n.has(a))return r;a&&n.add(a);let o=i?this.getRouteByName(i):void 0;if(!o)return r;if(o.redirect){let e=typeof o.redirect==`function`?o.redirect(r):o.redirect;return this.resolveFinalPath(e,t,n)}if(!o.path&&o.children?.length){let e={name:o.children[0].name,params:r.params,query:r.query};return this.resolveFinalPath(e,t,n)}return r}getFullUrl(e){let{href:t}=this.resolve(e);return new URL(t,window.location.origin).href}back(e=!1){this.router.back()}forward(){this.router.forward()}push(e){return this.router.push(e)}replace(e){return this.router.replace(e)}openRouteInNewTab(e){let t=this.router.resolve(e);this.windowService.open(t.href,`_blank`)}getRoutes(){return this.routes}setRoutes(e){this.routes=e}getRouteFromRoot(e){return this.getRouteByName(e,this.getRoutes())}getRouteByName(e,t){return this.toFlatten(t??this.routes).filter(t=>t.name===e)[0]}getByTagsFromGroup(e,t){return this.getByTags(this.toFlatten(this.getRouteFromRoot(e).children),t)}getByTags(e,t){return!ht(e)&&!e.children?[]:(ht(e)?e:e.children).filter(e=>e.meta&&e.meta.tags?t.every(t=>e?.meta?.tags.includes(t)):!1)}toFlatten(e){return e.reduce((e,t)=>(e.push(t),t.children&&t.children.length&&e.push(...this.toFlatten(t.children)),e),[])}reset(){throw new ro(`Will not call in dev or prod env`)}matchRoutesByPathContext(e){for(let[t,n]of Object.entries(e))if(this.isCurrentRouteChildOf({name:t})){if(pi(n)){let{params:e,...t}=n;return t.path=this.applyParametersToPath(n.path,e),t}return n}throw new ro(`Not found matched location for all contexts`)}applyParametersToPath(e,t){return Te(e,t)}};YC=U([g(),B(0,m(V.LoggerService)),B(1,m(V.SubscriptionService)),B(2,m(V.WindowService)),B(3,m(V.TitlerManager))],YC);var XC=YC,ZC=class extends XC{constructor(e,t,n,r,i,a){super(e,t,n,i),this.loggerService=e,this.subscriptionService=t,this.windowService=n,this.historyService=r,this.titlerManager=i,this.eventBusService=a}initRouter(){return this.historyService.createRouterHistory(),this.router=te({history:this.historyService.getRouterHistory(),routes:this.getRoutes(),stringifyQuery:GC,parseQuery:RC}),this.assignPreAppLoader(),this.handleAppLoadedEvent(),this.router}getRawRouteName(e){if(typeof e!=`string`&&`name`in e&&typeof e.name==`string`)return e.name}getNamedRouteFromRecord(e){return{name:e.name}}getNamedRoutesFromRecords(e){return e.map(e=>this.getNamedRouteFromRecord(e))}getOriginRoute(e){return typeof e.name==`string`&&e.name.startsWith(`resolver-`)&&e.children&&e.children[0]?this.getOriginRoute(e.children[0]):e}assignPreAppLoader(){this.router.afterEach(e=>{setTimeout(()=>{this.windowService.self().__preAppLoader?.toggle(!1)},5e3)})}handleAppLoadedEvent(){this.router.isReady().then(()=>{setTimeout(()=>{this.eventBusService.emit(new Rs)},5e3)})}};ZC=U([g(),h(),B(0,m(V.LoggerService)),B(1,m(V.SubscriptionService)),B(2,m(V.WindowService)),B(3,m(V.HistoryService)),B(4,m(V.TitlerManager)),B(5,m(V.EventBusService))],ZC);var QC=ZC,$C=`hasUnsavedChangesOnCurrentRoute`,ew=`skipRouteLeaveConfirmation`,tw=`routeLeaveMessage`,nw=`1`,rw=class{constructor(e,t){this.sessionStorageService=e,this.translateService=t,this.cleanup()}setHasUnsavedChangesOnCurrentRoute(e){e?this.sessionStorageService.set($C,nw):this.sessionStorageService.delete($C)}hasUnsavedChangesOnCurrentRoute(){return this.sessionStorageService.get($C)===nw}setSkipRouteLeaveConfirmation(e){e?this.sessionStorageService.set(ew,nw):this.sessionStorageService.delete(ew)}shouldSkipRouteLeaveConfirmation(){return this.sessionStorageService.get(ew)===nw}setRouteLeaveMessage(e){e?this.sessionStorageService.set(tw,e):this.sessionStorageService.delete(tw)}getRouteLeaveMessage(){return this.sessionStorageService.get(tw)??this.translateService.t(`common.leavePageUnsavedChanges`)}cleanup(){this.setHasUnsavedChangesOnCurrentRoute(!1),this.setSkipRouteLeaveConfirmation(!1),this.setRouteLeaveMessage(``)}};rw=U([g(),B(0,m(V.SessionStorageService)),B(1,m(V.TranslateService))],rw);var iw=class{constructor(e,t,n,r,i){this.routerService=e,this.loggerService=t,this.subscriptionService=n,this.loggedInStatusService=r,this.resolverService=i,this.beforeEachHandlers=[],this.beforeResolveHandlers=[],this.middlewares=[]}build(e=[]){let t=this.runMiddlewares(Gi);this.routerService.setRoutes(t),this.routerService.initRouter();let n=this.routerService.getRouter();n.afterEach(async(e,t)=>{requestIdleCallback(()=>{this.subscriptionService.emit(Ur,e)},{timeout:3e3}),await this.routerService.afterEach(e,t)}
2),n.beforeResolve(async(e,t)=>{this.beforeResolveHandlers.forEach(n=>n(e,t,()=>{}))});let r=!1;n.beforeEach(async(t,n,i)=>{if(r)Array.isArray(t.meta?.modules)&&t.meta.modules.length&&!Ua(String(t.name),t.meta.modules)&&await this.resolverService.resolveDeps(String(t.name),t.meta.modules);else{let n=Array.isArray(t.meta?.modules)?[...e,...t.meta.modules]:e;await this.resolverService.resolveDeps(String(t.name),n),r=!0}let a=null;this.beforeEachHandlers.forEach(e=>e(t,n,()=>{a=!0}));let o=this.loggedInStatusService.isUserLoggedIn(),s=this.loggedInStatusService.isLogOutByUnauthorizedApiError();this.loggerService.log(`routerBuilder`,`isAuthenticated = ${JSON.stringify(o)}`),this.loggerService.log(`routerBuilder`,JSON.stringify(t.meta)),await this.routerService.beforeEach(t,n);let c=this.checkAuthPermissions(o,t,s);a?i(!1):typeof c==`boolean`?i():(r=!1,i(c))})}addBeforeEachHandler(e){this.beforeEachHandlers.push(e)}removeBeforeEachHandler(e){let t=this.beforeEachHandlers.findIndex(t=>t===e);this.beforeEachHandlers.splice(t,1)}addBeforeResolveHandler(e){this.beforeResolveHandlers.push(e)}removeBeforeResolveHandler(e){let t=this.beforeResolveHandlers.findIndex(t=>t===e);this.beforeResolveHandlers.splice(t,1)}addRoute(e,t){let n=this.routerService.getRouteByName(e),r=n.meta?.modules??[],[i]=this.runMiddlewares([{...t,meta:{...t.meta,modules:[...new Set([...r,...t.meta?.modules??[]])]}}]);n.children=[...n.children??[],i],this.routerService.getRouter().addRoute(e,i)}addMiddleware(e){this.middlewares.push(e)}checkAuthPermissions(e,t,n){let r=!0;if(t.name===`auth.logout`)return r;let i=t.meta?.pageAvailableFor||yr.authenticated;return e&&i===yr.notAuthenticated?(this.loggerService.log(`routerBuilder`,`to: user.base`),r={name:`user.base`}):!e&&i===yr.authenticated&&n&&(this.loggerService.log(`routerBuilder`,`to: auth.login`),r={name:`auth.login`}),this.loggerService.log(`routerBuilder`,`return ${JSON.stringify(r)}`),r}dumpRoutes(e){return e.map(e=>({name:e.name,path:e.path,children:e.children&&e.children.length>0?this.dumpRoutes(e.children):[]}))}
2runMiddlewares(e){return this.middlewares.forEach(t=>{e=t.pipe(e)}),e}};iw=U([g(),B(0,m(V.RouterService)),B(1,m(V.LoggerService)),B(2,m(V.SubscriptionService)),B(3,m(V.LoggedInStatusService)),B(4,m(V.ResolverService))],iw);var aw=iw,ow=class{constructor(e){this.translateService=e}baseTitle(e,t){return e?this.translateService.t(`pageTabTitle.withColon`,{title:t}):this.translateService.t(`pageTabTitle.withoutColon`)}getTitle(e,t){let n=e.meta?.tabTitle,r=this.translateService.exists(n),i=r?this.getPageTitle(n,t):``;return this.baseTitle(r,i)}getPageTitle(e,t){return this.translateService.t(e,t)}};ow=U([g(),B(0,m(V.TranslateService))],ow);var sw=ow,cw=class{constructor(e,t,n){this.em=e,this.defaultTitlerService=t,this.translateService=n}getTitle(e,t){let n=this.getId(e,t),r=this.em.getRepository(t.model).findEntityByIdOrNull(n);if(!r)return t.noRecordTranslateKey?this.defaultTitlerService.baseTitle(!0,this.translateService.t(t.noRecordTranslateKey)):this.defaultTitlerService.baseTitle(!1,``);try{return this.generateByEntity(r,t)}catch{return this.defaultTitlerService.baseTitle(!1,``)}}generateByEntity(e,t){let n=t.field||`name`;if(qa(e)&&e[n]&&typeof e[n]==`string`){let r=t.translateKey?this.translateService.t(t.translateKey,{field:e[n].toString()}):e[n];return this.defaultTitlerService.baseTitle(!!e,r)}throw new ud(`Wrong entity to generate title`)}getId(e,t){return e.params[t.idParamName]}};cw=U([g(),B(0,m(V.EntityManager)),B(1,m(V.DefaultTitlerService)),B(2,m(V.TranslateService))],cw);var lw=cw,uw=class{constructor(e){this.defaultTitlerService=e}getTitle(e){return this.defaultTitlerService.getTitle(e,e.params)}};uw=U([g(),B(0,m(V.DefaultTitlerService))],uw);var dw=uw,fw=class{constructor(e,t,n){this.logger=e,this.windowService=t,this.get=n,this.titler=new Set}addService(e){this.titler.add(e.id)}getTitler(e){if(!this.titler.has(e))throw new Za(`Titler ${e} not found`);return this.get(e)}getTitle(e,t){let{matched:n,meta:r}=e;this.logger.raw(`titler`,n);let i=r?.titler||n.findLast(e=>!!e.meta?.titler)?.meta?.titler;return i?this.getTitler(i.service).getTitle(e,i.params||t||{}):``}updateTitle(e,t){let n=this.getTitle(e,t);this.windowService.setDocumentTitle(n)}};fw=U([g(),B(0,m(V.LoggerService)),B(1,m(V.WindowService)),B(2,m(`GetLocator`))],fw);var pw=fw,mw=class{constructor(e,t,n){this.routeLeaveService=e,this.routerBuilderService=t,this.windowService=n}async resolve(){this.routerBuilderService.addBeforeResolveHandler(this.routeEnterHandler.bind(this)),this.routerBuilderService.addBeforeEachHandler(this.routeLeaveHandler.bind(this)),this.windowService.self().addEventListener(`beforeunload`,this.beforeUnloadHandler.bind(this))}async unresolve(){this.routerBuilderService.removeBeforeResolveHandler(this.routeEnterHandler),this.routerBuilderService.removeBeforeEachHandler(this.routeLeaveHandler),this.windowService.self().removeEventListener(`beforeunload`,this.beforeUnloadHandler)}routeEnterHandler(){this.routeLeaveService.cleanup()}routeLeaveHandler(...e){let[,,t]=e,n=this.routeLeaveService.hasUnsavedChangesOnCurrentRoute(),r=this.routeLeaveService.shouldSkipRouteLeaveConfirmation(),i=this.routeLeaveService.getRouteLeaveMessage();n&&!r&&this.windowService.self().confirm(i)===!1&&t()}beforeUnloadHandler(e){let t=this.routeLeaveService.hasUnsavedChangesOnCurrentRoute(),n=this.routeLeaveService.shouldSkipRouteLeaveConfirmation(),r=this.routeLeaveService.getRouteLeaveMessage();t&&!n&&(e.preventDefault(),e.returnValue=r)}};mw=U([g(),B(0,m(V.RouteLeaveService)),B(1,m(V.RouterBuilderService)),B(2,m(V.WindowService))],mw);var hw=class{subscribePopState(e){window.addEventListener(`popstate`,e,!1)}unsubscribePopState(e){window.removeEventListener(`popstate`,e,!1)}subscribePushState(e){window.addEventListener(`pushstate`,e,!1)}unsubscribePushState(e){window.removeEventListener(`pushstate`,e,!1)}getLocationQuery(){return window.location.search}createRouterHistory(){this.routerHistory=ce(`/`)}getRouterHistory(){if(!this.routerHistory)throw new ro(`Initialize router history firstly`);return this.routerHistory}};hw=U([g()],hw);var gw=hw,_w=e(fe()),vw=class{constructor(e,t,n){this.resolverManager=e,this.resolverExecutorService=t,this.loggerService=n}
2async resolveComponent(e,t,n){return this.logResolvers(e,`resolveComponent`),this.resolveParallel(e,t,n)}resolveDeps(e,t){return ls(e,t)}async unresolveComponent(e,t,n){let r=re(e).reverse();return this.logResolvers(r,`unresolveComponent`),this.usePool(e,this.unresolveDefault,t,n,5)}async resolveParallel(e,t,n){return(await Promise.all(e.map(async e=>this.resolveDefault(e,t,n)))).reduce((e,n)=>(qa(n)&&p(Object.keys(e),Object.keys(n)).length&&console.warn(`There are resolvers with same keys for route ${String(t?.name)}`),{...e,...n}),{})}isFailed(e,t){return e.some(e=>{if(Array.isArray(e))return this.isFailed(e,t);let n=this.resolverManager.getResolver(e.service),r=typeof n.isFailed==`function`&&n.isFailed(e.params,t);return r||this.loggerService.log(`resolver`,`${e.service.toString()} is not failed`,`isFailed`),r})}async resolveDefault(e,t,n){if(Array.isArray(e)){let r={};for(let i of e){let e;e=Array.isArray(i)?await this.resolveDefault(i,t,n):await this.resolverExecutorService.resolve(i,t,n),r={...r,...e}}return r}try{return await this.resolverExecutorService.resolve(e,t,n)}catch(t){throw this.loggerService.error(`debug`,`Failed to resolve ${e.service}`),this.loggerService.raw(`debug`,t),t}}async unresolveDefault(e,t,n){if(Array.isArray(e))for(let r of e)try{Array.isArray(r)?await this.unresolveDefault(r,t,n):await this.resolverExecutorService.unresolve(r,t,n)}catch(e){Array.isArray(r)||this.loggerService.error(`debug`,`Failed to resolve ${r.service}`),this.loggerService.raw(`debug`,e);return}else try{await this.resolverExecutorService.unresolve(e,t,n)}catch(t){this.loggerService.error(`debug`,`Failed to resolve ${e.service}`),this.loggerService.raw(`debug`,t)}}async usePool(e,t,n,r,i=5){return _w.default.withConcurrency(i).for(e).handleError(async e=>{throw e}).process(async e=>{await t.call(this,e,n,r)})}logResolvers(e,t){this.loggerService.shouldLogByChannel(`resolver`,[t])&&e.forEach(e=>{Array.isArray(e)?this.logResolvers(e,t):this.loggerService.log(`resolver`,JSON.stringify({service:e.service.toString()}),t)})}};vw=U([g(),B(0,m(V.ResolverManager)),B(1,m(V.ResolverExecutorService)),B(2,m(V.LoggerService))],vw);var yw=vw,bw=class{constructor(e){this.get=e,this.resolvers=new Set}addService(e){this.resolvers.add(e.id)}getResolver(e){if(!this.resolvers.has(e))throw new Lc(`Resolver ${e} not found`);return this.get(e)}};bw=U([g(),B(0,m(`GetLocator`))],bw);var xw=bw,Sw=class{pipe(e){return e.map(e=>{if(e.children&&e.children.length>0&&(e.children=this.pipe(e.children)),e.meta?.resolvers?.length){let t=e.meta.resolverComponent?e.meta.resolverComponent:Li,{resolvers:n,resolverComponentProps:r,...i}=re(e.meta),a=hu(),o={name:`resolver-${a}`,path:e.path,props:{resolvers:e.meta.resolvers,routeName:e.name,key:e.meta.resolverComponent?`${a}-ForPageResolver`:`${a}-ForResolverComponent`,...e.meta.resolverComponentProps||{}},component:t,meta:{permission:e.meta.permission},children:[{...e,path:``}],redirect:{name:e.name}};return e.name&&(e.meta=i),o}return e})}};Sw=U([g()],Sw);var Cw=Sw,ww=class{pipe(e){return this.addModulesToRoute(e),e}addModules(e,t){if(e.meta||(e.meta={}),!e.meta.modules)e.meta.modules=[...t];else for(let n of t)e.meta.modules.includes(n)||e.meta.modules.push(n)}addModulesToRoute(e,t=[]){for(let n of e)t.length&&this.addModules(n,t),this.addResolverModules(n),n.children?.length&&this.addModulesToRoute(n.children,n.meta?.modules??[])}
2addResolverModules(e){let t=e.meta?.resolvers;if(!t?.length)return;let n=e.meta?.modules??[],r=[];for(let e of t){let t=Array.isArray(e)?e:[e];for(let e of t){let t=Qs.get(e.service);t&&!n.includes(t)&&!r.includes(t)&&r.push(t)}}r.length&&this.addModules(e,r)}};ww=U([g()],ww);var Tw=ww,Ew=class{pipe(e){return e.map(e=>{if(e.children&&e.children.length>0&&(e.children=this.pipe(e.children)),e.meta&&e.meta.titler&&e.meta.titler.service){let t=()=>R(()=>globalThis.__rdl__(() => import(`./DJfypsVM.js`)),__vite__mapDeps([814,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),{titler:n,...r}=re(e.meta),i={path:``,name:`titler-${hu()}`,props:{titler:n},component:t,meta:{titler:n},children:[e]};return e.name&&(e.meta=r),i}return e})}};Ew=U([g()],Ew);var Dw=Ew,Ow=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>t(e,n))),kw=class{constructor(){this.i18n=null,this.defaultLocale=gd,this.t=this.t.bind(this),this.tc=this.tc.bind(this)}setI18n(e){this.i18n=e}t(e,t){return e===``?``:this.i18n?this.i18n.global.t(e,t):e}tm(e){return e===``?``:this.i18n?this.i18n.global.tm(e):e}tf(e,t={},n){return this.exists(e)?this.t(e,t):n}n(e,t,n,r){return this.i18n?this.i18n.global.n(e,t,n,r):``}getPlugin(){return{install:e=>{this.i18n?.install(e),e.config.globalProperties.$traw=this.traw.bind(this),e.config.globalProperties.$rt
2=this.i18n.global.rt}}}tc(e,t,n){return e===``?``:this.i18n?this.i18n.global.t(e,{...n},t):e}exists(e){return this.i18n?.global.te(e)??!1}getEntityLabel(e,t=1){return this.t(`entities.${e}.name`,{count:t})}getLowerCaseEntityLabel(e,t=1){let n=`entities.${e}.lowerCaseName`;return this.tf(n,{count:t},this.getEntityLabel(e,t))}setLocaleMessages(e){this.i18n?.global.setLocaleMessage(this.defaultLocale,{...this.getLocaleMessages(),...e})}addLocaleMessages(e,t){this.i18n?.global.mergeLocaleMessage(t,e)}traw(e){let t=this.i18n.global.tm(e);if(Array.isArray(t))return t.map((t,n)=>this.traw(`${e}.${n}`));if(qa(t)){if(ae(t))return this.t(e);if(Object.keys(t).length!==0)return Ow(t,t=>[t,this.traw(`${e}.${t}`)])}return typeof t==`function`?t({normalize:e=>e[0]}):typeof t==`string`&&this.i18n.global.te(e)?t:e}trawForStringArray(e){let t=this.traw(e);if(!Array.isArray(t))throw new G(`res should be type "Array"`);return t.map(e=>{if(typeof e!=`string`)throw new G(`t should be type "string"`);return e})}translateValidationError(e,t){let n={...e.message.params};return n.field=n.field??t,e.message.tc?this.tc(e.message.path,e.message.tc,n):this.t(e.message.path,n)}getCurrentLocale(){return this.defaultLocale}getLocaleMessages(){return this.i18n?.global.messages[this.defaultLocale]}};kw=U([g()],kw);var Aw=kw,jw=function(e){return e.utmSource=`utm_source`,e.utmMedium=`utm_medium`,e.utmCampaign=`utm_campaign`,e.utmTerm=`utm_term`,e.utmContent=`utm_content`,e.gclid=`gclid`,e.fbclid=`fbclid`,e.msclkid=`msclkid`,e.liFatId=`li_fat_id`,e.twclid=`twclid`,e}({}),Mw=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_term`,`utm_content`,`gclid`,`fbclid`,`msclkid`,`li_fat_id`,`twclid`],{lazyInject:Nw}=f(Qo()),Pw=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.router=e,this.em=t,this.loggerService=n,this.windowService=r,this.oAuthSignUpService=i,this.loggedInStatusService=a,this.authLoaderService=o,this.restrictionPagesRouterService=s,this.localStorageService=c,this.subscriptionService=l,this.templatesTableExpandLocalStorageService=u,this.browserIdentifierService=d,this.openAiAttributionService=f}getCurrentUser(e=[]){return this.getUserRepo().getCurrentUser(e)}async tryFillCurrentUser(e,t=!1){try{let n=await this.getUserRepo().fillCurrentUser(t);return this.loggedInStatusService.setUserLoggedIn(n.id),e?.(n.id),n}catch(t){this.loggerService.error(`exception`,t.message),e?.(null),t instanceof Nu?this.loggedInStatusService.setUserLoggedOut(!0):this.loggedInStatusService.setUserLoggedOut();return}}async authenticateByLoginAndPassword(e,t,n){try{await this.getUserRepo().login({username:e,password:t},n),await this.onSuccessLogin()}catch(t){if(t instanceof Ou)await this.openTotpTfaPage(e,t.credentials);else if(t instanceof hl)await this.openSmsTfaPage(e,t.credentials);else if(t instanceof Xl)await this.openEmailTfaPage(e,t.credentials);else if(t instanceof Uc)await this.toVerifyEmailPage(e,t.userId);else if(t instanceof au)await this.toSignupPhoneVerificationPage(e);else if(t instanceof rs&&t.message?.indexOf(`username or password is incorrect`)>=0)await this.authLoaderService.hideLoader(),await this.toInitialRoute({errorMessage:t.message});else throw t}}async authenticateByTfaCode(e){await this.getUserRepo().login(e),await this.onSuccessLogin()}async signup(e){try{let t=this.addUtmLabelsToSignupPayload(e);t=this.addTimezoneToSignupPayload(t);let n=await this.getUserRepo().signup(t);return this.removeSignupAttributionCookies(),n}catch(e){if(e instanceof Dl){await this.restrictionPagesRouterService.goToUnavailableLocationRoute();return}throw e}}async signupByInvite(e){await this.getUserRepo().signupByInvite(e),await this.onSuccessLogin()}async signupByOAuth(e){await this.getUserRepo().signupByOAuth(e),await this.oAuthSignUpService.clearOAuthSignUpData(),await this.onSuccessLogin()}toVerifyEmailPage(e,t){let n={name:`auth.signup.verifyEmail`,query:{email:e,userId:t}};return this.router.push(n)}async toInitialRoute(e){return this.router.push({name:`auth.login`,query:e})}async logout(e=!1){if(e||this.loggedInStatusService.isUserLoggedIn())try{await this.getUserRepo().logout()}catch(e){if(!(e instanceof Nu))throw e}finally{this.logoutInternal()}}logoutInternal(){this.subscriptionService.broadcastEmit(Xc.UserLoggedOut),this.subscriptionService.emit(aa,{}),this.loggedInStatusService.setUserLoggedOut()}async logoutRedirect(){this.loggedInStatusService.setUserLoggedOut(),await this.router.push({name:`auth.logout`}).catch(()=>{})}getStatus(){return Wr.NONE}async resendVerification(e){try{let{data:t}=await this.getUserRepo().resendVerification(e);return t}catch(e){if(e instanceof Nc)return Promise.resolve({availableToResendAt:e.availableToResendAt});throw e}}sendVerifyCodeOnEmail(){return this.getUserRepo().sendVerifyCodeOnEmail()}sendVerifyCodeOnPhone(){return this.getUserRepo().sendVerifyCodeOnPhone()}verifyPhoneByCode(e){let t=this.getCurrentUser();if(!t)throw new G(`Current user not found`);return this.getUserRepo().verifyPhoneByCode(t.id,e)}requestResetPassword(e,t){return this.getUserRepo().requestResetPassword(e,t)}resetPassword(e,t){return this.getUserRepo().resetPassword(e,t)}resetPasswordByUserId(e){return this.getUserRepo().resetPasswordByUserId(e)}changePassword(e,t){return this.getUserRepo().changePassword(e,t)}verifyPasswordCode(e){return this.getUserRepo().verifyPasswordCode(e,this.browserIdentifierService.getUid())}resendPasswordVerificationCode(){return this.getUserRepo().resendPasswordVerificationCode()}verifyEmailCode(e){return this.getUserRepo().verifyEmailCode(e,this.browserIdentifierService.getUid())}resendEmailVerificationCode(){return this.getUserRepo().resendEmailVerificationCode()}async resendSmsCode(e){return this.getUserRepo().resendSmsCode(e)}resendEmailCode(e){return this.getUserRepo().resendEmailCode(e)}validatePasswordResetToken(e){return this.getUserRepo().validatePasswordResetToken(e)}async completeRegistration(e){await this.getUserRepo().completeRegistration(e)}getCredentialsWithAdditionalData(){return this.getAuthStateRepo().getCredentialsWithAdditionalData()}async openSmsTfaPage(e,t){await this.getAuthStateRepo().storeCredentialsWithAdditionalData(e,t),await this.router.push({name:`auth.smsCode`})}async openTotpTfaPage(e,t){await this.getAuthStateRepo().storeCredentialsWithAdditionalData(e,t),await this.router.push({name:`auth.totpCode`})}async openEmailTfaPage(e,t){await this.getAuthStateRepo().storeCredentialsWithAdditionalData(e,t),await this.router.push({name:`auth.emailCode`})}async redirectAfterSuccessLogin(){try{let{name:e,params:t,query:n}=JSON.parse(this.localStorageService.get(`tm::redirectAfterLoginKey`)||`{}`);if(e&&e!==`auth.logout`&&this.router.resolve(e)){await this.router.replace({name:e,params:t,query:n});return}}catch{}await this.router.replace({name:Oa})}async onSuccessLogin(){let e=await this.tryFillCurrentUser();if(e&&this.templatesTableExpandLocalStorageService.init(e.status),this.getAuthStateRepo().removeCredentials(),this.teamWorkflowService.mustAcceptTermsUpdate()){await this.router.replace({name:Ti});return}await this.redirectAfterSuccessLogin()}async goToAuthByOAuthProviderPage(e){let t=await this.getUserRepo().getAuthLink(e);this.windowService.open(t)}async goToSSOLogin(e){let t=await this.getUserRepo().getSSOLoginLink({email:e});this.windowService.open(t)}async toOauthSignupCompletePage(e){await this.oAuthSignUpService.storeOAuthSignUpD
2ata(e),await this.router.push({name:`auth.signup.oauth`})}async authByOAuthProvider(e,t){try{let{status:n,data:r}=await this.getUserRepo().loginByOAuthProvider(e,{...t,utmParams:this.getUtmPayload(),timezone:this.dateTimeService.getBrowserTimezone()});if(n===206){let{token:e,username:t,email:n,firstName:i,lastName:a}=r;if(!e)return;await this.toOauthSignupCompletePage({token:e,username:t,firstName:i,lastName:a,email:n}),this.removeSignupAttributionCookies();return}await this.onSuccessLogin(),this.removeSignupAttributionCookies()}catch(t){if(t instanceof Ou){await this.openTotpTfaPage(t.credentials.email,t.credentials);return}if(t instanceof hl){await this.openSmsTfaPage(t.credentials.email,t.credentials);return}if(t instanceof uu){let t=this.oAuthSignUpService.getExpectationFailedErrorMessage(e);await this.toInitialRoute({errorMessage:t});return}if(t instanceof au&&t.email){await this.toSignupPhoneVerificationPage(t.email);return}throw t}}verifyEmail(e){return this.getUserRepo().fetchVerifyEmail(e)}async confirmRegistrationCodeFromEmail({code:e,email:t}){try{return await this.getUserRepo().confirmRegistrationCodeFromEmail({code:e,email:t}),await this.onSuccessLogin(),!0}catch(e){if(e instanceof au)return await this.toSignupPhoneVerificationPage(t),!1;throw e}}async checkEmailCodeResendAvailability(e,t){try{await this.getUserRepo().checkEmailCodeResendAvailability(e,t)}catch(e){if(e instanceof qu){let t=e.getAvailableToResendAt();return{availableAt:typeof t==`string`?new Date(t).getTime():Date.now()}}}return{availableAt:Date.now()}}checkInvitationToken(e){return this.getUserRepo().checkInvitationToken(e)}saveCurrentRouteForRedirectAfterLogin(){try{let{pathname:e,search:t}=new URL(this.windowService.getLocation().href);this.router.getRouter().isReady().then(()=>{if(e===``||e===`/`)return;let n=this.router.resolve(`${e}${t}`);n.name&&[void 0,yr.authenticated].includes(n.meta.pageAvailableFor)&&this.localStorageService.set(ni,JSON.stringify(dt(n,[`name`,`params`,`query`])))})}catch{}}toSignupPhoneVerificationPage(e,t){return this.router.push(vi(e,t))}toSignupPhoneVerificationCodePage(e,t){return this.router.push(xi(e,t))}providePhoneToSignup(e){return this.getUserRepo().providePhoneToSignup(e)}async confirmPhoneToSignup(e){let{data:t}=await this.getUserRepo().confirmPhoneToSignup(e);if(!t.firstName||!t.lastName){await this.toOauthSignupCompletePage({token:t.token,username:t.username,email:t.email,firstName:null,lastName:null});return}await this.onSuccessLogin()}resendPhoneCodeToSignup(e){return this.getUserRepo().resendPhoneCodeToSignup(e)}addUtmLabelsToSignupPayload(e){return{...e,utmParams:this.getUtmPayload()}}addTimezoneToSignupPayload(e){return{...e,timezone:this.dateTimeService.getBrowserTimezone()}}removeUtmLabelsFromCookies(){Mw.forEach(e=>{qn(e)})}removeSignupAttributionCookies(){this.removeUtmLabelsFromCookies(),this.openAiAttributionService.removeOpprefCookie()}getAuthStateRepo(){return this.em.getRepository(pf)}getUtmPayload(){return{source:ta(jw.utmSource),medium:ta(jw.utmMedium),campaign:ta(jw.utmCampaign),content:ta(jw.utmContent),term:ta(jw.utmTerm),gclid:ta(jw.gclid),fbclid:ta(jw.fbclid),msclkid:ta(jw.msclkid),li_fat_id:ta(jw.liFatId),twclid:ta(jw.twclid),...this.openAiAttributionService.getClickIds()}}getUserRepo(){return this.em.getRepository(Kn)}};U([Nw(V.UserSettingsService)],Pw.prototype,`userSettingsService`,void 0),U([Nw(V.DateTimeService)],Pw.prototype,`dateTimeService`,void 0),U([Nw(V.TeamWorkflowService)],Pw.prototype,`teamWorkflowService`,void 0),Pw=U([op($u),op(jo),g(),B(0,m(V.RouterService)),B(1,m(V.EntityManager)),B(2,m(V.LoggerService)),B(3,m(V.WindowService)),B(4,m(V.OAuthSignUpService)),B(5,m(V.LoggedInStatusService)),B(6,m(V.AuthLoaderService)),B(7,m(V.RestrictionPagesRouterService)),B(8,m(V.LocalStorageService)),B(9,m(V.SubscriptionService)),B(10,m(V.TemplatesTableExpandLocalStorageService)),B(11,m(V.BrowserIdentifierService)),B(12,m(V.OpenAiAttributionService))],Pw);var Fw=Pw,Iw=e=>({total:e.total,parts:e.parts,countries:{...Object.keys(e.countries).reduce((t,n)=>(t[n]={allowDedicated:e.countries[n].allow_dedicated,count:e.countries[n].count,landline:e.countries[n].landline,max:e.countries[n].max,countryId:e.countries[n].countryId,countryName:e.countries[n].country_name,sum:e.countries[n].sum},t),{})}}),Lw=e=>({id:e.id,email:e.email,createdAt:new Date(String(e.createdAt)),firstName:e.firstName,lastName:e.lastName,phone:e.phone,username:e.username,status:e.status,type:e.subaccountType,company:e.company,balance:e.balance,lastActive:e.lastActive?new Date(String(e.lastActive)):null,lastLogin:e.lastActive?new Date(String(e.lastActive)):null,currency:e.currency?.id,organization:e.company,orgn
2ame:e.company,acCompany:e.company,acUsername:e.username,acUserId:e.id,acCreatedAt:new Date(String(e.createdAt)),acCountry:e.countryId,acTimezone:e.timezone?.timezone}),Rw=e=>({address:{state:e.state,postalCode:e.postalCode,street:e.street},ltv:e.lifeTimeValue,mostUsedProduct:e.mostUsedProduct,autorecharge:e.autoRechargeEnabled,acZip:e.postalCode,acState:e.state}),zw=class{constructor(){this.serializersMap={[md.TEST]:e=>e,[md.MESSAGES_PRICE]:Iw,[md.USER_ANALYTICS_FIELD]:Lw,[md.USER_ANALYTICS_TRAIT]:Rw}}serialize(e,t){let n=this.serializersMap[e.entity];return!n||typeof n!=`function`?t:n(t)}unserialize(e,t){throw typeof e==`string`&&(e=JSON.parse(e)),new Za(`There no model to unserialize`)}};zw=U([g()],zw);var Bw=zw,Vw=class extends Q{};Vw=U([Y({model:df}),g(),h()],Vw);var Hw=Vw,Uw=class extends Q{setIsDisabled(e,t){return this.update([{id:e,isDisabled:t}])}isDisabled(e){return this.findEntityByIdOrNull(e)?.isDisabled??!1}getTableInitFlag(e){let t=this.findEntityByIdOrNull(e);return t?t.isInit:!1}setTableInitFlag(e,t){this.update([{id:e,isInit:t}])}getIsExportInProgressFlag(e){let t=this.findEntityByIdOrNull(e);return t?t.isExportInProgress:!1}setIsExportInProgressFlag(e,t){this.update([{id:e,isExportInProgress:t}])}setCanBeRestored(e,t){this.update([{id:e,canBeRestored:t}])}cleanUp(e){this.reset(e)}reset(e){if(!this.findEntityByIdOrNull(e)){this.insert([{id:e,isExpand:!1,isShowFilters:!1,canBeRestored:!1}]);return}this.update([{id:e,isExpand:!1,isShowFilters:!1,canBeRestored:!1}])}getLastSelectedRow(e){return this.findEntityByIdOrNull(e)?.lastSelectedRow}setLastSelectedRow(e,t){this.update([{id:e,lastSelectedRow:t}])}};Uw=U([Y({model:Bu}),g(),h()],Uw);var Ww=Uw,Gw=class extends Q{insertOne(e){this.insertOrUpdate([e])}};Gw=U([Y({model:nl}),g(),h()],Gw);var Kw=Gw,qw=class extends Q{unselectAll(e){return this.insertOrUpdateItem({id:e,selectedRows:[]})}selectRows(e,t,n){let r=this.getSelectedRows(e);return t.forEach(e=>{n?r.add(e):r.delete(e)}),this.insertOrUpdateItem({id:e,selectedRows:[...r]})}getSelectedRows(e){let t=this.findEntityByIdOrNull(e);return new Set(t?.selectedRows||[])}isRowSelected(e,t){return this.getSelectedRows(e).has(t)}cleanUp(e){this.lowLevelDelete([e])}};qw=U([Y({model:Ra}),g(),h()],qw);var Jw=qw,Yw=class extends Q{cleanUp(e){this.delete([e])}selectAll(e){this.insertOrUpdateItem({id:e,isAllSelected:!0})}unselectAll(e){this.insertOrUpdateItem({id:e,isAllSelected:!1})}};Yw=U([Y({model:Ds}),g(),h()],Yw);var Xw=Yw,Zw=class extends Q{cleanUpByTableId(e){this.deleteByCondition(t=>t.id===e)}getPageMapKey(e,t){return[e,t].join(`-`)}};Zw=U([Y({model:uf}),g(),h()],Zw);var Qw=Zw,$w=class extends Q{init(e,t){this.lowLevelInsert([{id:e,searchFields:t}])}setValue(e,t){let n=this.findEntityByIdOrFail(e);n.history.push(t),n.value=t,this.lowLevelUpdate([n])}getValue(e,t=``){let n=this.findEntityByIdOrNull(e);return n&&n.value||t}getSearchFields(e,t=[]){let n=this.findEntityByIdOrNull(e);return n?n.searchFields:t}getHistory(e){let t=this.findEntityByIdOrNull(e);return t?t.history:[]}};$w=U([Y({model:Df}),g(),h()],$w);var eT=$w,tT=class extends Q{constructor(...e){super(...e),this.isLoading=!1,this.queuedActions=[]}processQueuedActions(){for(let e of this.queuedActions)e();this.queuedActions=[]}createNote(e,t){try{this.isLoading=!0;let n=this.endpointsService.getPath(this.settings().create,[t]);return this.getApiSource().post(n,e)}finally{this.isLoading=!1,this.processQueuedActions()}}getNotesByIds(e,t=2**53-1){return this.query().with([`user.*`,`files`]).whereIdIn(e).orderBy(`createdAt`,`desc`).limit(t).get()}getTotalCount(e){return this.query().whereIdIn(e).count()}getNotes(e,t,n,r,i,a){return this.doGrid(this.getSettingsFetch(),e,t,n,r,i,a)}
2async queueInsertOrUpdate(e,t=!1){return new Promise(n=>{let r=async()=>{await this.insertOrUpdate(e),n(e)};this.isLoading&&!t?this.queuedActions.push(r):r()})}};tT=U([Y({model:Rn,single:`note`,fetch:`notes`,create:`noteCreate`,bulkDeleteEndpoint:`noteBulkDelete`}),g(),h()],tT);var nT=tT,rT=e=>e.then(()=>{});function iT(e,t,n,r,i){return aT(Error(e),t,n,r,i)}function aT(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}var oT={google:`googleAuthLink`,apple:`appleAuthLink`,microsoft:`microsoftAuthLink`},sT={google:`googleAuth`,apple:`appleAuth`,microsoft:`microsoftAuth`},cT=class extends Q{constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r,i),this.serializerService=e,this.api=t,this.endpointsService=n,this.loggerService=r,this.filterQueryService=i,this.windowService=a,this.userAnalyticsFieldsRepository=o,this.userAnalyticsTraitsRepository=s,this.userSettingsRepository=c,this.getCurrentUserAdapter=async e=>{let t=this.windowService.self().__getCurrentUser,n=await t(),r=await n.json(),i=e.validateStatus,a={};if(n.headers.forEach((e,t)=>{a[t]=e}),!n.status||!i||i(n.status))return{data:r,status:n.status,statusText:n.statusText,headers:a,config:e};throw iT(r?.message??`Request failed with status code ${n.status}`,e,``,{},n)}}getFilteredUsers(e){return this.query().where(t=>e.includes(t.id)).get()}login(e,t){let n={appName:`textmagic_carrera_app`,...e},r=t?{...n,"g-recaptcha-response":t}:n,i=this.endpointsService.getPath(`login`);return this.api.post(i,r)}logout(){let e=this.endpointsService.getPath(`authLogout`);return this.currentUserId=``,this.api.post(e)}async resendEmailCode(e){return this.api.get(this.endpointsService.getPath(`resendEmailCode`,[e]))}async resendSmsCode(e){let t=this.endpointsService.getPath(`resendPhoneCode`,[e]);return this.api.get(t)}async validatePasswordResetToken(e){let t=this.endpointsService.getPath(`passwordResetValidateToken`);return(await this.api.post(t,{token:e})).data.email}async signup(e){let{data:t}=await this.api.post(this.endpointsService.getPath(`registration`),{...e});return{confirmationEmail:t.confirmationEmail,userId:t.userId.toString()}}signupByInvite(e){return this.api.post(this.endpointsService.getPath(`registrationByInvite`),{...e})}signupByOAuth(e){return this.api.post(this.endpointsService.getPath(`registrationByOAuth`),{...e})}async updateCurrentUserInStore(e){return await this.insertOrUpdate([{id:this.currentUserId,...e}]),this.findEntityByIdOrFail(this.currentUserId)}getCurrentUser(e=[]){return this.query().with(e).find(this.currentUserId)}getCurrentUserCountryId(){return this.getRaw(this.currentUserId).countryId}async fillCurrentUser(e=!1){let t=this.endpointsService.getPath(`currentUser`),n=e?this.getCurrentUserAdapter:void 0,r=await this.api.get(t,{adapter:n});return this.checkCurrentUser(r.data),this.currentUserId=r.data.id,this.userSettingsRepository.insertOrUpdate([r.data]),this.userAnalyticsFieldsRepository.storeAnalyticsFields(r.data.analyticsFields),this.userAnalyticsTraitsRepository.storeAnalyticsTraits(r.data),this.updateCurrentUserInStore(r.data)}updateCurrentUser(e,t){return this.api.put(this.endpointsService.getPath(`currentUser`),{...e,deviceIdentifier:t})}async resendVerification(e){return this.api.post(this.endpointsService.getPath(`registrationEmailResend`),{...e})}async sendVerifyCodeOnEmail(){await this.api.get(this.endpointsService.getPath(`sendVerifyCodeOnEmail`))}async sendVerifyCodeOnPhone(){await this.api.post(this.endpointsService.getPath(`sendVerifyCodeOnPhone`))}async verifyPhoneByCode(e,t){return await this.api.post(this.endpointsService.getPath(`checkVerifyCodeOnPhone`),{confirmationCode:t}),this.findEntityByIdOrFail(e).$update({phoneAccepted:!0})}async requestResetPassword(e,t){let n=this.endpointsService.getPath(`resetPasswordByEmail`),r={email:e,"g-recaptcha-response":t};await this.api.post(n,r)}async resetPassword(e,t){let n=this.endpointsService.getPath(`passwordResetSetPassword`),r={token:e,newPassword:t};await this.api.post(n,r)}resetPasswordByUserId(e){return rT(this.api.post(this.endpointsService.getPath(`accountsResetPasswordById`,[e]))
2)}acceptPrivacyPolicy(){return this.api.post(this.endpointsService.getPath(`userAcceptPrivacyPolicy`))}changePassword(e,t){return rT(this.api.put(this.endpointsService.getPath(`changePassword`),{oldPassword:e,newPassword:t}))}verifyPasswordCode(e,t){let n=this.endpointsService.getPath(`userPasswordVerify`);return this.api.post(n,{confirmationCode:e,deviceIdentifier:t})}resendPasswordVerificationCode(){let e=this.endpointsService.getPath(`userPasswordResendCode`);return this.api.post(e)}verifyEmailCode(e,t){let n=this.endpointsService.getPath(`userEmailVerify`);return this.api.post(n,{confirmationCode:e,deviceIdentifier:t})}resendEmailVerificationCode(){let e=this.endpointsService.getPath(`userEmailResendCode`);return this.api.post(e)}async getUsersFacets(e){let t=this.endpointsService.getPath(`usersFacet`);return(await this.api.get(t,{params:{includeParent:e}})).data}async fetchSubAccounts(e={includeSelf:!0,includeParent:!0}){let{items:t}=await this.doGrid(`subaccountsAll`,[],{filter:[],sort:{subaccount:{name:`asc`}},other:e});return await this.insertOrUpdate(t),t.map(e=>this.findEntityByIdOrFail(e.id.toString()))}getSubAccounts(e,t){let n=this.query();return e.statuses?.length&&n.where(`status`,e.statuses),e.includeParent||n.where(`subaccountType`,e=>e!==Fr.SUPER_ADMIN),e.includeSelf||n.where(e=>e.id!==t),e.includeRemoved||n.where(e=>!e.isRemoved),n.get()}checkEmailForSignupAvailability(e,t){return this.api.post(this.endpointsService.getPath(`registrationEmailIsAvailable`),{email:e,"g-recaptcha-response":t})}async confirmRegistrationCodeFromEmail(e){let{data:t}=await this.api.post(this.endpointsService.getPath(`registrationConfirmCodeFromEmail`),e);return t}checkEmailCodeResendAvailability(e,t){return this.api.post(this.endpointsService.getPath(`registrationResendAvailability`),{email:e,newEmail:t})}async completeRegistration(e){let{data:t}=await this.api.post(this.endpointsService.getPath(`registrationConfirm`),{token:e});return t}async getAuthLink(e){let t=oT[e],n=this.endpointsService.getPath(t);return(await this.api.get(n)).data.authUrl}async getSSOLoginLink(e){let{data:{authUrl:t}}=await this.api.post(this.endpointsService.getPath(`ssoAuthUrl`),{...e});return t}async loginByOAuthProvider(e,t){let n=sT[e],r=this.endpointsService.getPath(n),i={...t,appName:`textmagic_carrera_app`};return this.api.post(r,i)}async getTaxNumbers(){return(await this.api.get(this.endpointsService.getPath(`taxNumber`))).data}updateVatNumber(e,t){return this.api.post(this.endpointsService.getPath(`taxNumber`),{taxIdn:e,type:t})}async inviteSubAccount(e){return this.api.post(this.endpointsService.getPath(`inviteSubAccount`),e)}async resendInvitationSubAccount(e){return this.api.post(this.endpointsService.getPath(`reinviteSubAccount`),e)}async closeAccount(e){await this.getApiSource().post(this.endpointsService.getPath(`closeAccount`),e)}async closeSubAccounts(e,t=!1){let n={ids:e,all:t};await this.getApiSource().post(this.endpointsService.getPath(`closeSubAccount`),n)}async getMessagesRetentionPeriod(){return(await this.api.get(this.endpointsService.getPath(`accountMessageRetentionPeriod`))).data.dataMessagesLifetime}updateMessagesRetentionPeriod(e){let t={dataMessagesLifetime:e};return this.api.put(this.endpointsService.getPath(`accountMessageRetentionPeriod`),t)}deleteAllMessages(e){return this.api.delete(this.endpointsService.getPath(`myDataDeleteAllMessages`),{data:{password:e}})}deleteAllContacts(e){return this.api.delete(this.endpointsService.getPath(`myDataDeleteAllContacts`),{data:{password:e}})}async openSubAccount(e){let t=this.endpointsService.getPath(`subAccountReopen`,[e]);return this.getApiSource().post(t)}async fetchVerifyEmail(e){let t=this.endpointsService.getPath(`verifyEmailVerify`);await this.api.post(t,{token:e}),await this.updateCurrentUserInStore({emailAccepted:!0})}runImpersonateMode(e){let t=this.endpointsService.getPath(`runImpersonate`,[e]);return this.api.post(t)}stopImpersonateMode(){let e=this.endpointsService.getPath(`stopImpersonate`);return this.api.post(e)}async checkInvitationToken(e){try{return(await this.api.post(this.endpointsService.getPath(`registrationByInviteTokenCheck`),{token:e})).status===204}catch{return!1}}
2fetchSubAccountsWithPagination(e,t,n=``){return this.makeCancelableRequest(async r=>{let i=await this.gridRequest({filter:[],...t},{pageKey:``,requestParams:e},n,void 0,r);return await this.insertOrUpdate(i.items),i})}adminsGridRequest(e,t,n,r){return this.doGrid(`userAdmins`,this.getFetchEndpointParams(),e,t,n,r)}async cancelPhoneVerification(){let e=this.endpointsService.getPath(`userVerifyPhoneCancel`);return this.api.delete(e)}exportMyData(e,t){let n=this.endpointsService.getPath(`myDataExport`);return this.exportRequest(e,t,n)}async getSSOInvitationDataByToken(e){let t=this.endpointsService.getPath(`registrationBySSOInvitationTokenCheck`);return(await this.api.post(t,{token:e})).data}completeSsoInvitation(e,t,n){return this.api.post(this.endpointsService.getPath(`registrationBySSOInvitation`),{token:e,firstName:t,lastName:n})}checkCurrentUser(e){if(!e)throw new Ml(`User not found`);if(!e.timezone)throw new Ml(`User's timezone not found`)}async getAssigneeList(e,t,n){let r=await this.api.get(this.endpointsService.getPath(`assigneeFetch`),{params:{lastId:e,perPage:t,searchQuery:n}});return await this.insertOrUpdate(r.data.items),r.data}async providePhoneToSignup(e){let t=this.endpointsService.getPath(`registrationPhoneProvide`);return this.api.post(t,e)}async confirmPhoneToSignup(e){let t=this.endpointsService.getPath(`registrationPhoneConfirmCode`);return this.api.post(t,e)}async resendPhoneCodeToSignup(e){let t=this.endpointsService.getPath(`registrationPhoneResendCode`);return this.api.post(t,e)}};cT=U([Y({model:Kn,fetch:`subaccounts`,single:`subaccount`,exportEndpoint:`subAccountExport`}),g(),h(),B(0,m(V.SerializerService)),B(1,m(V.Api)),B(2,m(V.EndpointsService)),B(3,m(V.LoggerService)),B(4,m(V.FilterQueryService)),B(5,m(V.WindowService)),B(6,m(V.UserAnalyticsFieldsRepository)),B(7,m(V.UserAnalyticsTraitsRepository)),B(8,m(V.UserSettingsRepository))],cT);var lT=cT,uT=class extends Q{getFieldsByForm(e){return this.query().where(`formId`,e).all()}findFieldArrayByIdOrFail(e){let t=this.findEntityByIdOrFail(e);if(!(t instanceof Of))throw new G(`field should be instanceof FieldArray`);return t}updateFieldArrayChildren(e,t){let n={id:e,children:t};return this.update([n])}};uT=U([Y({model:ef}),g(),h()],uT);var dT=uT,fT=class extends Q{getSortersByTableId(e){return this.query().where(t=>t.tableModelId===e).get()}};fT=U([Y({model:ff}),g(),h()],fT);var pT=fT,mT=class extends Q{};mT=U([Y({model:rf}),g(),h()],mT);var hT=mT,gT=class extends Q{};gT=U([Y({model:gf}),g(),h()],gT);var _T=gT,vT=class extends Q{async load(){this.logGroupStart(`load`);let e=this.getFetchPath(),t=await this.api.get(e);return this.log(t),this.logGroupEnd(),this.model().create({data:{id:1,schema:JSON.stringify(t.data)}})}async fillAll(e=!1){return(await this.load()).filtersSchema}async fillByFilter(){return this.fillAll()}};vT=U([Fp(),Y({model:Rf,fetch:`schemaFilters`}),g(),h()],vT);var yT=vT,bT=class extends Q{findByName(e){return this.query().where(`name`,e).first()}};bT=U([Y({model:mi,fetch:`countries`}),g(),h()],bT);var xT=bT,ST=class extends Q{fetchByFilter(e){return this.getApiSource().get(`${this.endpointsService.getPath(e)}?full=1`)}async readByFilter(){let e=await this.fetchByFilter(this.getSettingsFetch()),t=this.getItemsFromReadByFilterResponseData(e.data);return Np.normalizePayload(t,this.model())}};ST=U([Y({model:hn,fetch:`timezones`}),Fp(),g(),h()],ST);var CT=ST,wT=class extends Q{async loadColumns(e){let t=this.endpointsService.getPath(`columnsEntity`,[e]);return(await this.api.get(t)).data}async saveColumns(e,t){let n=this.endpointsService.getPath(`columns`),r={entity:t,columns:e};return this.api.post(n,r)}};wT=U([Y({model:nf}),g(),h()],wT);var TT=wT,ET=class extends Q{};ET=U([Y({model:hf}),g(),h()],ET);var DT=ET,OT=e=>qa(e)&&Object.keys(e).some(e=>Rc(e)),kT=e=>qa(e)&&Object.values(e).every(e=>OT(e)),AT=e=>qa(e)&&Object.values(e).every(e=>e===null||OT(e)),jT=e=>qa(e)&&Object.values(e).every(e=>AT(e)),MT=function(e){return e.top=`top`,e.initial=`initial`,e.bottom=`bottom`,e}({}),NT=`[ALL]`,PT=[Dr],FT=`array-value-is-empty`,IT=e=>Array.isArray(e)?e.every(e=>typeof e==`number`)?e.map(e=>e.toString()).toSorted():e.every(e=>typeof e==`string`)?e.toSorted():e:typeof e==`number`?e.toString():typeof e==`boolean`?e?`1`:`0`:e===null?``:e,LT=(e,t)=>nt(IT(e),IT(t)),RT=class{constructor(e,t,n,r,i){this.filterSchemaService=e,this.loggerService=t,this.filterStrategyManager=n,this.filterBuilderService=r,this.translateService=i,this._id=null,this.openOnAdd=!0,this.lastFieldOrder=0}initForm(e){return this.form=this.filterBuilderService.build(this.id,e??this.getFilters()),this.form}setId(e){this._id=e}get id(){if(!this._id)throw new G(`No id is assigned to the filter service. Please set it using setId() method before using the service`);return this._id}getServiceId(){return this.id}makeFieldVisible(e){let t=e.getName();this.openOnAdd&&this.setOpenOnAddFlag(e.id,!0),this.setFieldVisibility(t,!0)}setOpenOnAddFlag(e,t){let n=this.getForm().getFieldById(e);n&&n.openOnAdd!==t&&n.patch({openOnAdd:t})}makeFilterReadOnly(e){this.getForm().getFieldOrNull(e)?.patch({readonly:!0})}resetField(e){let t=this.getForm().getField(e);t.patch({value:``,innerValue:``,innerSelectedItemsValue:[],operation:t.initialOperation,innerOperation:t.initialOperation}),this.setFieldVisibility(e,!1)}getData(e=!0){return this.getActiveFilters(e).reduce((e,t)=>
2{let n=t.getApiValue();return n===`[ALL]`?e:{...e,[t.getName()]:n}},{})}toQuery(e=!0,t=null){return t||(t=this.getActiveFilters(e)),t.reduce((e,t)=>t.getApiValue()===`[ALL]`?e:{...e,[t.getName()]:this.filterToQueryPart(t)},{})}getSelectedItems(e=!0,t=null){return t??(t=this.getActiveFilters(e)),t.reduce((e,t)=>{let n=t.selectedItemsValue;if(Array.isArray(n)){let r=t.getName(),i=[];for(let e of n){let t=this.getEntityFromFilterOption(r,e);t&&i.push(t)}e.push({fieldName:r,items:i})}return e},[])}isDefaultState(e=!0){let t=this.toQuery(e);return!Object.keys(t).length}getActiveFilters(e=!0){let t=this.getForm();return t?t.getFields().reduce((t,n)=>((Array.isArray(n.value)?n.value.length>0:n.value!=null&&n.value!==``)&&(e||this.isObservableFilter(n))&&t.push(n),t),[]):[]}getObservableFilters(){return this.getFormFields(1)}getVisibleFilters(){return this.getObservableFilters().filter(e=>this.isVisibleFilter(e.name))}getInvisibleFilters(){return this.getObservableFilters().filter(e=>!this.isVisibleFilter(e.name))}reset(e=[]){this.getForm().getFields().filter(t=>!e.includes(t.getName())).forEach(e=>{e.patch({value:e.initialValue,innerValue:e.initialValue,operation:e.initialOperation,innerSelectedItemsValue:[],isApplied:!1})}),this.resetAllFilterVisibility()}getLabelFromFilterOption(e,t){return``}getEntityFromFilterOption(e,t){return null}populate(e,t=[],n=!0){n&&this.reset();let r={},i=this.getForm().getFields(),a={};i.forEach(n=>{let i=[],o=this.filterStrategyManager.getFilterStrategy(n),s=n.getName(),c=t?.find(e=>e.fieldName===s);c&&(i=c.items.map(e=>({text:this.getLabelFromFilterOption(s,e),value:e.id.toString()})));let l=o.getPopulateData(n,e,i);if(l){let e=LT(l.value,n.initialValue)&&l.operation===n.initialOperation;r[n.getName()]=n.isDefault||!e,a[n.getName()]=l}else n.isDefault?(r[n.getName()]=!0,a[n.getName()]=null):r[n.getName()]=!1,n.patch({value:``,innerValue:``,operation:n.initialOperation,innerOperation:n.initialOperation,innerSelectedItemsValue:[],isApplied:!1})}),this.setFieldsVisibility(r),this.getForm().populate(a,n)}populateFromUrl(e,t=[],n=!1){let r=Object.keys(e),i=this.getAppliedFilters().map(e=>e.getName()).filter(e=>!r.includes(e)).map(e=>({name:e,operation:this.getForm().getField(e).initialOperation,value:``,relatedField:``}));this.populate([...this.parseUrlFilter(e),...i],t,n)}getForm(){return this.form}isFilterChanged(e){return this.getForm().getField(e).isChangedAndApplied()}getAppliedFilters(){return this.getObservableFilters().filter(e=>{let{value:t,initialValue:n,operation:r,initialOperation:i}=e,a=r!==i;if(_d(e.operation)){let e=Su(t,!0,!1),r=Su(n,!0,!1);return a||e!==r}let o=!1;return o=Array.isArray(t)||Re(t)?!ge(t):t!=null&&t!==``,a||o&&!LT(t,n)})}setInnerSelectedItems(e,t){this.getForm().getField(e).patch({innerSelectedItemsValue:t,isApplied:!1})}setInnerValue(e,t){this.getForm().getField(e).patch({innerValue:t,isApplied:!1})}setValue(e,t){this.getForm().getField(e).patch({innerValue:t,value:t,isApplied:!0})}setSelectedItems(e,t){this.getForm().getField(e).patch({selectedItemsValue:t,isApplied:!0})}setInnerOperation(e,t){let n=this.getForm().getFieldOrNull(e);if(n&&n.availableOperations&&!n.availableOperations.includes(t))throw new fc(`Operation "${t}" is not available. Available operations are "${n.availableOperations.join(`, `)}"`);this.getForm().getField(e).patch({innerOperation:t,isApplied:!1})}applyFilterValue(e){let t=this.getForm().getField(e);t.patch({value:t.innerValue,selectedItemsValue:t.innerSelectedItemsValue,operation:t.innerOperation,isApplied:!0})}getFormField(e){return this.getForm().getField(e)}getFilterInnerValue(e){return this.getFormField(e).innerValue}getFilterInnerSelectedItems(e){return this.getFormField(e).innerSelectedItemsValue}getFilterSelectedItems(e){return this.getFormField(e).selectedItemsValue}getFilterValue(e){return this.getFormField(e).value}isVisibleFilter(e){return this.isDefaultFilter(e)||this.getFieldVisibility(e)}isDefaultFilter(e){return this.getForm().getFieldOrNull(e)?.isDefault===!0}isHiddenFilter(e){return typeof e==`string`?this.getForm().getFieldOrNull(e)?.isHidden===!0:e.isHidden}isObservableFilter(e){return!this.isHiddenFilter(e)}setApplied(e){for(let t of this.getForm().getFields())t.patch({isApplied:e})}toIdFilter(e){let t=this.filterBuilderService.createField({value:e,relatedFieldName:``});return this.filterToQueryPart(t)}parseUrlFilter(e){let t=[];PT.forEach(t=>{delete e[t]});let n=e=>e.map(e=>typeof e==`number`?e.toString():e);for(let r in e){let i=e[r];for(let e in i){let a={[e]:i[e]};if(kT(a)){let i=a[e];i===null?Rc(e)&&t.push({name:r,operation:e,value:null}
2):Object.entries(i).forEach(([i,a])=>{Rc(i)&&t.push({name:r,operation:i,value:Array.isArray(a)?n(a):a,relatedField:e})})}else if(OT(a)){let i=a[e];Rc(e)&&t.push({name:r,operation:e,value:Array.isArray(i)?n(i):i})}}}return t}buildForm(){throw new fc(`This method should not be called directly`)}submit(e){throw new fc(`This method should not be called directly`)}filterToQueryPart(e){return this.filterStrategyManager.getFilterStrategy(e).toQueryPart(e)}getFieldVisibility(e){return this.getForm().getFieldOrNull(e)?.isVisible===!0}getFieldOrder(){return this.getForm().getFields().filter(e=>e.isVisible).toSorted((e,t)=>e.order-t.order).map(e=>e.getName())}checkFilterValue(e,t){if(!e)throw new fc(`Filter not passed`);return this.filterStrategyManager.getFilterStrategy(e).checkFilterValue(e,t)}checkFilterValueByName(e,t){let n=this.getFormFieldByName(e);if(!n)throw new fc(`Filter "${e}" not found`);return this.checkFilterValue(n,t)}getPartial(){return{name:`filter:${this.id}`,type:`groupPartial`,items:this.getForm().getFields().filter(e=>!e.isHidden).map(e=>({name:e.name,params:{filterKey:this.id}}))}}setFieldsVisibility(e){let t=[],n=[];for(let[r,i]of Object.entries(e)){let e=this.getForm().getFieldOrNull(r);e&&!e.isHidden&&e.isVisible!==i&&(i?(this.lastFieldOrder+=1,e.patch({isVisible:!0,order:this.lastFieldOrder}),n.push(r)):(e.patch({isVisible:!1}),t.push(r)))}(t.length||n.length)&&this.log(`Hide "${t.join(`, `)}" filters and show "${n.join(`, `)}" inside "${this.id}" filter service`)}setFieldVisibility(e,t){this.setFieldsVisibility({[e]:t})}resetAllFilterVisibility(){this.log(`Reset filter visibility inside "${this.id}" filter service`);let e=this.getForm().getFields();e.forEach((e,t)=>{e.patch({isVisible:e.isDefault&&!e.isHidden,order:t})}),this.lastFieldOrder=e.length}log(e,t=`baseFilters`){this.loggerService.shouldLogByChannel(`filters`,[t])&&this.loggerService.log(`filters`,typeof e==`string`?e:JSON.stringify(e),t)}getFormFields(e=0){let t=this.getForm().getFields();return e===2?t.filter(e=>e.isHidden):e===1?t.filter(e=>!e.isHidden):t}getFormFieldByName(e){return this.getForm().getFieldOrNull(e)??void 0}destroy(){}};RT=U([g(),B(0,m(V.FilterSchemaService)),B(1,m(V.LoggerService)),B(2,m(V.FilterStrategyManager)),B(3,m(V.FilterBuilderService)),B(4,m(V.TranslateService))],RT);var zT=RT,BT=class{constructor(e,t,n,r,i,a){this.baseFilterStrategy=e,this.rangeFilterStrategy=t,this.arrayFilterStrategy=n,this.arrayWithIsEmptyFilterStrategy=r,this.rangeWithBoolFilterStrategy=i,this.loggerService=a,this.strategies=new Map([[jd,this.baseFilterStrategy],[Od,this.rangeFilterStrategy],[Nd,this.arrayFilterStrategy],[Ld,this.arrayWithIsEmptyFilterStrategy],[Id,this.rangeWithBoolFilterStrategy]])}getFilterStrategy(e){if(this.log(`Getting filter strategy for filter: ${e.getName()}`),!this.strategies.has(e.filterType))throw new vc(`Expected supported filter type`);return this.strategies.get(e.filterType)}log(e){this.loggerService.log(`filters`,e,`FilterStrategyManager`)}};BT=U([g(),B(0,m(V.BaseFilterStrategy)),B(1,m(V.RangeFilterStrategy)),B(2,m(V.ArrayFilterStrategy)),B(3,m(V.ArrayWithIsEmptyFilterStrategy)),B(4,m(V.RangeWithBoolFilterStrategy)),B(5,m(V.LoggerService))],BT);var VT=class{toQueryPart(e){return this.fieldDataToQueryPart({operation:e.getCurrentOperation(),relationField:e.getRelationField(),value:e.getApiValue()})}getPopulateData(e,t,n){let r=t.filter(t=>t.name===e.getName()),i=r.find(e=>e.value&&Array.isArray(e.value)?e.value.length!==0:_d(e.operation)?typeof e.value==`boolean`:!!e.value)??r[0];if(!i)return null;let a=e.selectedItemsValue??[],o=e.innerSelectedItemsValue??[],s=n&&n.length>0,c=this.getSelectedItemsFromOptions(e,i.value);return{isApplied:!0,operation:i.operation,innerOperation:i.operation,value:i.value,innerValue:i.value,selectedItemsValue:s?[...n]:this.preferKnownSelectedItems(a,c),innerSelectedItemsValue:s?[...n]:this.preferKnownSelectedItems(o,c)}}fieldDataToQueryPart(e){let t=_d(e.operation)?Su(e.value,`1`,`0`):e.value;return e.relationField?{[e.relationField]:{[e.operation]:t}}:{[e.operation]:t}}checkFilterValue(e,t){let n=e.getApiValue();return e.operation===`isEmpty`?!t&&n===t:e.operation===`isNull`?t===null&&n===t:e.operation===`in`?Array.isArray(n)&&!Array.isArray(t)?n.some(e=>nt(e,t)):Array.isArray(n)&&Array.isArray(t)?n.some(e=>
2t.some(t=>nt(e,t))):nt(n,t):e.operation===`eq`?nt(n,t):e.operation===`lt`?t<n:e.operation===`lte`?t<=n:e.operation===`gt`?t>n:e.operation===`gte`&&t>=n}preferKnownSelectedItems(e,t){return e.length>0?[...e]:t}getSelectedItemsFromOptions(e,t){if(!Array.isArray(e.options))return[];let n=Array.isArray(t)?t:[t];return e.options.filter(e=>n.some(t=>nt(t,e.value)))}};VT=U([g()],VT);var HT=e=>qa(e)&&`start`in e&&(typeof e.start==`string`||typeof e.start==`number`)&&`startOperation`in e&&Rc(e.startOperation),UT=e=>qa(e)&&`end`in e&&(typeof e.end==`string`||typeof e.end==`number`)&&`endOperation`in e&&Rc(e.endOperation),WT=e=>HT(e)&&UT(e),GT=e=>HT(e)||UT(e),KT=function(e){return e.All=`all`,e.Agent=`agent`,e.Customer=`customer`,e}({}),qT=-864e13,JT=864e13,YT=[`days`,`hours`,`minutes`,`weeks`,`months`],XT=e=>typeof e==`string`&&(lc().isValidDateString(e)||e===`now`||e.match(/^(today|yesterday|tomorrow)( midnight)?$/)!==null||e.match(RegExp(`^([+-])\\d+ (${YT.join(`|`)})( midnight)?$`))!==null),ZT=e=>typeof e==`string`&&YT.includes(e),QT=e=>HT(e)&&XT(e.start),$T=e=>UT(e)&&XT(e.end),eE=e=>QT(e)&&$T(e),tE=e=>QT(e)||$T(e),{lazyInject:nE}=f(Qo()),rE=e=>String(e??``),iE=class{constructor(e){this.baseFilterStrategy=e,this._filterValueCache=new WeakMap,this._filterKeys={}}toQueryPart(e){let t=e.getRelationField();if(e.operation===`isEmpty`)return this.baseFilterStrategy.fieldDataToQueryPart({operation:e.operation,relationField:t,value:e.value});let n=e.getApiValue();if(!GT(n))throw new fc(`Incorrect range value "${String(n)}" for filter "${e.getName()}"`);if([n.startOperation,n.endOperation].filter(Boolean).forEach(t=>{if(!e.availableOperations.includes(t))throw new fc(`Operation "${t}" is not available for filter "${e.getName()}"`)}),WT(n))return{...this.baseFilterStrategy.fieldDataToQueryPart({operation:n.startOperation,relationField:t,value:n.start}),...this.baseFilterStrategy.fieldDataToQueryPart({operation:n.endOperation,relationField:t,value:n.end})};if(HT(n))return this.baseFilterStrategy.fieldDataToQueryPart({operation:n.startOperation,relationField:t,value:n.start});if(UT(n))return this.baseFilterStrategy.fieldDataToQueryPart({operation:n.endOperation,relationField:t,value:n.end});throw new fc(`Incorrect range value "${n}" for filter "${e.getName()}"`)}getPopulateData(e,t,n){let r=new Set([`gt`,`gte`,`isNull`]),i=new Set([`lt`,`lte`]),a=t.filter(t=>t.name===e.getName()).find(e=>e.operation===`isEmpty`&&e.value!==null);if(a){let t=e.selectedItemsValue??[],r=e.innerSelectedItemsValue??[],i=n&&n.length>0;return{isApplied:!0,operation:`isEmpty`,innerOperation:`isEmpty`,value:a.value,innerValue:a.value,selectedItemsValue:i?[...n]:[...t],innerSelectedItemsValue:i?[...n]:[...r]}}let o=t.filter(t=>t.name===e.getName()).reduce((e,t)=>Ae(t.value)||t.value===``?e:(r.has(t.operation)&&!(e.start&&e.startOperation)&&(e.start=rE(t.value),e.startOperation=t.operation),i.has(t.operation)&&!(e.end&&e.endOperation)&&(e.end=rE(t.value),e.endOperation=t.operation),t.operation===ku.isEmpty&&(e.start=void 0,e.startOperation=void 0,e.end=void 0,e.endOperation=void 0,e[ku.isEmpty]=t.value),e),{});if(!GT(o))return null;let s={start:o.start,startOperation:o.startOperation,end:o.end,endOperation:o.endOperation},c=e.selectedItemsValue??[],l=e.innerSelectedItemsValue??[],u=n&&n.length>0;return{isApplied:!0,operation:`eq`,innerOperation:`eq`,value:s,innerValue:s,selectedItemsValue:u?[...n]:[...c],innerSelectedItemsValue:u?[...n]:[...l]}}checkFilterValue(e,t){let n=e.getApiValue();if(!n||!this.relativeDateTimeService.isValidDate(t))return!0;t instanceof Date||(t=this.dateTimeService.toDate(t));let r;try{let i=this.getCachedFilterKey(e),a=this._filterValueCache.get(i);if(n===a?.value&&a?.range)r=a.range;else if(tE(n))r=this.relativeDateTimeService.getDateRange(n),this._filterValueCache.set(i,{value:n,range:r});else return!0;let o=r.start,s=r.end;return!(!this.checkDate(r.startOperation,t,o)||!this.checkDate(r.endOperation,t,s))}catch{return!1}}checkDate(e,t,n){return e===`isNull`&&!t||!(e===`eq`&&t.getTime()!==n.getTime()||e===`gte`&&t.getTime()<n.getTime()||e===`gt`&&t.getTime()<=n.getTime()||e===`lte`&&t.getTime()>n.getTime()||e===`lt`&&t.getTime()>=n.getTime())}getCachedFilterKey(e){return this._filterKeys[e.name]||(this._filterKeys[e.name]={name:e.name}),this._filterKeys[e.name]}};U([nE(V.RelativeDateTimeService)],iE.prototype,`relativeDateTimeService`,void 0),U([nE(V.DateTimeService)],iE.prototype,`dateTimeService`,void 0),iE=U([g(),B(0,m(V.BaseFilterStrategy))],iE);var aE=class{constructor(e){this.baseFilterStrategy=e}toQueryPart(e){let t=e.getApiValue(),n=e.operation,r=e.getRelationField();return this.baseFilterStrategy.fieldDataToQueryPart({operation:n,relationField:r,value:t})}getPopulateData(e,t,n){return this.baseFilterStrategy.getPopulateData(e,t,n)}checkFilterValue(e,t){return this.baseFilterStrategy.checkFilterValue(e,t)}};aE=U([g(),B(0,m(V.BaseFilterStrategy))],aE);var oE=class{constructor(e){this.baseFilterStrategy=e}toQueryPart(e){let t=e.getApiValue();return this.isRelationIsEmptyValue(t)?this.baseFilterStrategy.fieldDataToQueryPart({operation:ku.isEmpty,value:1}):this.baseFilterStrategy.fieldDataToQueryPart({operation:ku.in,relationField:e.getRelationField(),value:t})}getPopulateData(e,t,n){let r=this.baseFilterStrategy.getPopulateData(e,t,n);return r&&r.operation===ku.isEmpty?{...r,value:FT,innerValue:FT}:r}checkFilterValue(e,t){return this.baseFilterStrategy.checkFilterValue(e,t)}isRelationIsEmptyValue(e){return e===`array-value-is-empty`||Array.isArray(e)&&e.includes(`array-value-is-empty`)}};oE=U([g(),B(0,m(V.BaseFilterStrategy))],oE);var sE=class extends iE{constructor(e){super(e),this.baseFilterStrategy=e}getPopulateData(e,t,n){return super.getPopulateData(e,this.normalizeBoolPayload(e,t),n)}normalizeBoolPayload(e,t){return t.map(t=>{if(t.name!==e.getName()||!_d(t.operation))return t;let n=Su(t.value,`1`,`0`);return n===t.value?t:{...t,value:n}})}};sE=U([g(),B(0,m(V.BaseFilterStrategy))],sE);var cE=class{constructor(e,t,n){this.em=e,this.filterSchemaService=t,this.loggerService=n,this._tableId=null,this._endpoint=null}getSchema(){return this.filterSchemaService.getFiltersSchema(this.endpoint)}init(e){let t=[],n=this.getSchema();ge(e)&&(e={}),this.getGroupingRepo().insert(this.initDataTransformer(t,n)),this.applyGroupingByUrlParams(e),this.log(`Grouping initialized with following params: "${JSON.stringify(e)}"`)}reset(e=[]){Object.values(this.getSchema().schema.groupBy).forEac
2h(t=>{e.indexOf(t.name)===-1&&this.getGroupingRepo().update([{id:this.getGroupingId(t.name),direction:``}])})}applyGroupingByUrlParams(e){if(ge(e))return;e=this.applyGroupingByUrlParamsTransformer(e);let[t,n]=Object.entries(e)[0];if(!lt(n))return this.applyGrouping(t,n);let[,r]=Object.entries(n)[0];this.log(`Apply grouping by URL: ${t} ${r}`),this.applyGrouping(t,r)}getAllGroupings(){return this.getGroupingRepo().query().where(e=>e.tableModelId===this.getTableId()).get()}getActiveGrouping(){return this.getAllGroupings().filter(e=>e.direction.length>0)}getCurrentGrouping(){let e=this.getActiveGrouping();if(e.length>1)throw new wu(`we trust - we will use only group by one column`);return e[0]}applyGrouping(e,t){let n=this.getGroupingId(e);this.reset([e]);let r=this.getGroupingRepo().findEntityByIdOrNull(n);if(!r)throw new Vo(`There is no available grouping for - ${e}`);let i=`asc`;t?i=t:r.direction&&(i=this.getOppositeGroupingDirection(r.direction)),this.log(`Apply grouping: "${n} ${i}"`),this.getGroupingRepo().update([{id:n,direction:i}])}toQuery(){return this.toQueryByGroupings(this.getActiveGrouping())}toQueryByGroupings(e){return e.reduce((e,t)=>t.relation?{...e,[t.relation]:{[t.name]:t.direction}}:{...e,[t.name]:t.direction},{})}setTableId(e){this._tableId=e}getTableId(){if(!this._tableId)throw new G(`No tableId is set for service`);return this._tableId}setEndpoint(e){this._endpoint=e}async loadGroupingFacets(e,t,n,r){}get endpoint(){if(!this._endpoint)throw new G(`No endpoint is set for service`);return this._endpoint}initDataTransformer(e,t){let n=[...e];return Object.values(t.schema.groupBy).forEach(e=>{n.push({id:this.getGroupingId(e.name),direction:``,name:e.name,relation:e.type===`relation`?e.fields[0].name:``,tableModelId:this.getTableId()})}),n}applyGroupingByUrlParamsTransformer(e){return e}getGroupingId(e){return[this.getTableId(),e].join(`.`)}getOppositeGroupingDirection(e){return e===`asc`?`desc`:`asc`}log(e,t=`internal`){this.loggerService.shouldLogByChannel(`grouping`,[t])&&this.loggerService.log(`grouping`,typeof e==`string`?e:JSON.stringify(e),t)}getGroupingRepo(){return this.em.getRepository(rf)}};cE=U([g(),B(0,m(V.EntityManager)),B(1,m(V.FilterSchemaService)),B(2,m(V.LoggerService))],cE);var lE=cE,uE=`createdAt`,dE=`desc`,fE=class{constructor(e,t,n,r){this.em=e,this.filterSchemaService=t,this.loggerService=n,this.sorterSerializerService=r}setDefaultSorter(e){let t=this.getSchema(),n=this.getSorterNames(t);e&&n.includes(e.name)?this.defaultSorter={name:e.name,direction:e.direction||dE}:n.length&&(this.defaultSorter={name:n.includes(uE)?uE:n[0],direction:dE})}convertSorterSettings(e){let t=Object.values(this.getSchema().schema.sort).find(t=>{let{name:n,type:r,fields:i}=t;return e.name===n&&r===`relation`&&i?.length&&i[0].name}),n=e.direction||dE,r=t?{[t.fields[0].name]:n}:n;return{[e.name]:r}}getDefaultSorter(){return this.defaultSorter&&this.convertSorterSettings(this.defaultSorter)}getSchema(){return this.filterSchemaService.getFiltersSchema(this.endpoint)}getSorterNames(e){return e.schema.sort.map(({name:e})=>e)}correctSortType(e,t={}){if(ge(t))return this.defaultSorter&&this.convertSorterSettings(this.defaultSorter);let n=this.getSorterNames(e),r=Object.keys(t)[0],i=r===this._entityName?Object.keys(t[r])[0]:r;return n.includes(i)?t:this.defaultSorter&&this.convertSorterSettings(this.defaultSorter)}init(e){let t=[],n=this.getSchema(),r=this.correctSortType(n,e);this.getSorterRepo().insert(this.initDataTransformer(t,n)),this.applySortByUrlParams(r),this.log(`Sorter initialized with following params: "${JSON.stringify(r)}"`)}reset(e=[]){Object.values(this.getSchema().schema.sort).forEach(t=>{e.includes(t.name)||this.getSorterRepo().update([{id:this.getSorterId(t.name),direction:``}])}),e.length||this.getSorterRepo().update([{id:this.getSorterId(this.defaultSorter.name),direction:this.defaultSorter.direction}])}applySort(e,t){let n=this.getSorterId(e);this.reset([e]);let r=this.getSorterRepo().findEntityByIdOrNull(n);if(!r)throw new wu(`There is no available sort for the "${e}" column`);let i=`asc`;t?i=t:r.direction&&(i=this.getOppositeSortDirection(r.direction)),this.log(`Apply sort: "${n} ${i}
2"`),this.getSorterRepo().update([{id:n,direction:i}])}applySortByUrlParams(e){if(ge(e))return;let[t,n]=Object.entries(e)[0];if(!lt(n))return this.applySort(t,n);let[r,i]=Object.entries(n)[0];this.log(`Apply sort by URL: ${t} ${i}`),t===this._entityName?this.applySort(r,i):this.applySort(t,i)}applySorts(e){e.forEach(({name:e})=>this.applySort(e))}getAllSorters(){return this.getSorterRepo().getSortersByTableId(this.getTableId())}getActiveSorter(e){return e.filter(e=>e.direction.length>0)}toQuery(){return this.toQueryBySorters(this.getActiveSorter(this.getAllSorters()))}getCurrentSorter(){let e=this.getActiveSorter(this.getAllSorters());if(e.length>1)throw new wu(`we trust - we will use only sort by one column`);return e[0]}toQueryBySorters(e){return e.reduce((e,t)=>({...e,...this.sorterSerializerService.getQueryForSorter(this._entityName,t)}),{})}isDefaultState(){let e=this.getDefaultSorter(),t=this.toQuery();return!e||(Object.keys(t)[0]===this._entityName&&(e={[this._entityName]:e}),nt(e,t))}setTableId(e){this._tableId=e}getTableId(){if(!this._tableId)throw new G(`No tableId is set for service`);return this._tableId}setEntityName(e){this._entityName=e}getEntityName(){if(!this._entityName)throw new G(`No entityName is set for service`);return this._entityName}setEndpoint(e){this._endpoint=e}get endpoint(){if(!this._endpoint)throw new G(`No endpoint is set for service`);return this._endpoint}initDataTransformer(e,t){let n=[...e];return Object.values(t.schema.sort).forEach(e=>{n.push({id:this.getSorterId(e.name),direction:``,name:e.name,entityName:this._entityName,relation:e.type===`relation`?e.fields[0].name:``,tableModelId:this.getTableId()})}),n}getSorterId(e){return[this.getTableId(),e].join(`.`)}getOppositeSortDirection(e){return e===`asc`?`desc`:`asc`}log(e,t=`internal`){this.loggerService.shouldLogByChannel(`sorter`,[t])&&this.loggerService.log(`sorter`,typeof e==`string`?e:JSON.stringify(e),t)}getSorterRepo(){return this.em.getRepository(ff)}};fE=U([g(),B(0,m(V.EntityManager)),B(1,m(V.FilterSchemaService)),B(2,m(V.LoggerService)),B(3,m(V.SorterSerializerService))],fE);var pE=fE,mE=class extends lE{init(e){}reset(e=[]){}applyGrouping(e,t){}getAllGroupings(){return[]}getActiveGrouping(){return[]}toQuery(){return{}}loadGroupingFacets(){return Promise.resolve()}};mE=U([g(),h()],mE);var hE=mE,gE=class extends pE{init(e){}reset(e=[]){}applySort(e,t){}applySorts(e){}getAllSorters(){return[]}getActiveSorter(){return[]}toQuery(){return{}}getSchema(){return{name:``,schema:{filter:[],sort:[],groupBy:[],searchFields:[]}}}};gE=U([g(),h()],gE);var _E=gE,vE=class{getInitColumns(){return{}}async reload(){}getColumn(e){throw new Jo(`Column ${e} does not exist`)}hasColumn(e){return!1}getColumnEditorColumns(){return[]}getColumns(){throw new Do(`No need for getColumns implementation`)}toQuery(){throw new Do(`No need for toQuery implementation`)}getDefaultColumns(){return{}}getPrependColumns(){return[]}getVisibleColumns(){return[]}getInvisibleColumns(){return[]}init(e){}async makeColumns(e){return[]}recoveryColumns(e){return this.makeColumns(e)}async saveColumns(e,t){return[]}async loadColumns(e){return[]}setTableId(e){this.tableId=e}reset(){}getTableId(){if(!this.tableId)throw new G(`No tableId is set for service`);return this.tableId}getSettings(){return{tableId:this.tableId}}columnsToPaginationUrlColumn(e){return e.map((e,t)=>({name:e.columnName,visible:e.visible,order:t+1}))}isNewSizingFlowEnabled(){return!1}isEditable(){return!1}isSortable(){return!1}isDefaultState(){return!0}isRowDisabled(){return!1}};vE=U([g()],vE);var yE=vE,bE=class{constructor(e,t){this.baseFilters=e,this.tableExpandService=t}build(e){let t=e.tableConstructor||$s,n={tableModelId:e.tableModelId,tableWrapperId:e.tableWrapperId};e.gridService&&(e.gridService.init?.(),n.gridService=e.gridService);let r=e.tableExpandService??this.tableExpandService;r.init(n.tableModelId);let i=new t(n);return i.setFilterServiceManager(e.filterServiceManager),i.setSorterManager(e.sorterManager),i.setGrouperManager(e.grouperManager),i.setPaginatorManager(e.paginatorManager),i.setSearcherManager(e.searcherManager),i.setColumnManager(e.columnManager),i.setBaseFilterService(this.baseFilters),i.setBulkService(e.bulk),i.setEntity(e.entity),i.setEm(e.em),i.setDomainManager(e.domainManager),i.setExportService(e.exp
2ort),i.setSubscriptionService(e.subscription),i.setPreloaderManager(e.preloaderManager),i.setFilterCompareService(e.filterCompareService),i.setExpandService(r),i.setSubscriptions(e.subscriptions),i.setNotificationService(e.notification),i.setHistoryService(e.history),i.setTableWrapperService(e.tableWrapperService),i.setLogger(e.logger),i.setKeyBuilder(e.keyBuilder),i.setCounterService(e.counter),i.setFacetSettings(e.facetSettings),i.setAlignment(e.alignment),i.setTableWrapperParamsToSave(e.tableWrapperParamsToSave),i.setCustomFiltersDefaultState(e.customFiltersDefaultState),i.setCanBeRestored(e.canBeRestored),i.setRecoveryService(e.recoveryService),i.setFastInsert(e.fastInsert),i.setNoSelectAll(e.noSelectAll),i.setAllowSelectAllWithNonDefaultFilters(e.allowSelectAllWithNonDefaultFilters),i.setShouldResetOnCreateOrDelete(e.shouldResetOnCreateOrDelete),i.setPreserveSelectionOnQueryChange(e.preserveSelectionOnQueryChange),i.setApplyFiltersOnExport(e.applyFiltersOnExport),i.setVariablePagination(e.variablePagination),i}};bE=U([g(),B(0,m(V.BaseFilters)),B(1,m(V.TableExpandService))],bE);var xE=bE,SE=class{constructor(e,t){this.em=e,this.loggerService=t,this.factories=new Set,this.availableFactories={},this.tableFactories={},this.services={},this.tables={}}getTableKey(e){return`${this.managerId}.${e}`}getTableServices(e){return this.tables[this.getTableKey(e)]}addTableService(e,t){let n=this.getTableKey(e);this.tables[n]?this.tables[n]?.add(t):this.tables[n]=new Set([t])}removeTableService(e,t){let n=this.getTableKey(e);this.tables[n]&&this.tables[n]?.delete(t)}addService(e){this.factories.add(e.id)}registerFactory(e,t){this.availableFactories={...this.availableFactories,[e]:t},this.log(`Registered new factory: "${e}"`,`registerFactory`)}validateFactory(e){return this.factories.has(e)}hasFactoryForTable(e){return e in this.tableFactories}getFactoryForTable(e){let t=this.tableFactories[e];if(!t)throw new Td(`No factory "${t}" is registered`,{tableId:e});let n=this.getFactoryByServiceId(t);if(!n)throw new Td(`Service factory for table must be set before getting it`,{tableId:e});return n}setFactoryForTable(e,t){if(this.hasFactoryForTable(e))return this.log(`Using existing service factory "${t}" for table "${e}"`,`setFactoryForTable`),this.getFactoryForTable(e);if(!this.validateFactory(t))throw new Ps(`The service "${t}" you've provided is not a valid factory`,{tableId:e});return this.tableFactories[e]=t,this.log(`Set table "${e}" service factory to "${t}"`,`setFactoryForTable`),this.getFactoryForTable(e)}hasServicesForTable(e){let t=this.getTableServices(e);return!!t&&t.size>0}hasServiceForTable(e,t){let n=this.getServiceIdForTableByKey(e,t),r=this.getTableServices(e);return!!r&&r.has(n)}getServicesForTable(e){let t=this.getTableServices(e);return t?Object.fromEntries([...t].map(e=>[e,this.getServiceByServiceId(e)])):{}}getServiceForTable(e,t){let n=this.getServiceIdForTableByKey(e,t);if(!this.getTableServices(e)?.has(n))throw new es(`There is no such service with key "${t}"`,{tableId:e});return this.getServiceByServiceId(n)}getFirstServiceForTable(e){return this.getServiceForTable(e,`0`)}removeFirstServiceForTable(e){return this.removeServiceForTable(e,`0`)}getServiceByServiceId(e){return this.services[e]}addServiceForTable(e,t={}){let n=this.getFactoryForTable(e)(),r=this.getNextServiceKeyForTable(e),i=this.getServiceIdForTableByKey(e,r);return this.services[i]=n,this.addTableService(e,i),this.log(`Add new service "${i}"`,`addServiceForTable`),{serviceId:i,instance:n}}removeAllServicesForTable(e){this.log(`Starting removing services for table "${e}"...`,`removeAllServicesForTable`),this.getTableServices(e)?.forEach(t=>this.removeServiceById(e,t)),this.log(`Removing services for table "${e}" completed`,`removeAllServicesForTable`)}removeServiceForTable(e,t){return this.removeServiceById(e,this.getServiceIdForTableByKey(e,t))}cleanup(){this.tableFactories={},this.services={},this.tables={}}getServiceIdForTableByKey(e,t){return[e,t].join(`.`)}parseServiceId(e){let[t,n]=e.split(`.`);return{tableId:t,serviceKey:n}}getNextServiceKeyForTable(e){let t=[...this.getTableServices(e)||[]].at(-1),{serviceKey:n}=t?this.parseServiceId(t):{serviceKey:null};return n?`${parseInt(n,10)+1}`:`0`}getFactoryByServiceId(e){return this.get(e)}removeServiceById(e,t){this.log(`Remove service "${t}"`,`removeServiceByServiceId`),this.removeTableService(e,t),delete this.services[t]}log(e,t){let n=t?`manager:${t}`:`manager`;
2this.loggerService.shouldLogByChannel(this.loggerChannel,[n])&&this.loggerService.log(this.loggerChannel,e,n)}};U([m(`GetLocator`)],SE.prototype,`get`,void 0),SE=U([g(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService))],SE);var CE=SE,wE=class extends CE{constructor(...e){super(...e),this.endpoints={}}getEndpointForTable(e){return this.endpoints[e]}setEndpointForTable(e,t){this.log(`Set table "${e}" endpoint to "${t}"`,`setEndpointForTable`),this.endpoints[e]=t}};wE=U([g(),h()],wE);var TE=wE,EE=class extends TE{constructor(e,t,n){super(e,t),this.em=e,this.loggerService=t,this.baseGrouperServiceFactory=n,this.managerId=`TableGrouperManager`,this.loggerChannel=`grouping`}getFactoryForTable(e){try{return super.getFactoryForTable(e)}catch(t){if(t instanceof Td)return this.log(`No explicitly set factory found for the "${e}" table. Falling back to default one.`),this.baseGrouperServiceFactory;throw t}}addServiceForTable(e){let{serviceId:t}=super.addServiceForTable(e);return this.services[t].setTableId(e),this.services[t].setEndpoint(this.getEndpointForTable(e)),{serviceId:t,instance:this.services[t]}}removeServiceById(e,t){let n=this.getServiceByServiceId(t);this.getGroupingRepo().deleteByCondition(e=>e.tableModelId===n.getTableId()),super.removeServiceById(e,t)}getGroupingRepo(){return this.em.getRepository(rf)}};EE=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService)),B(2,m(V.BaseGrouperServiceFactory))],EE);var DE=EE,OE=class{constructor(){this.tables={}}addTable(e){this.tables[e.getTableModelId()]=e}getTable(e){if(!this.hasTable(e))throw new Io(`Table "${e}" not found`);return this.tables[e]}hasTable(e){return!!this.tables[e]}removeTable(e){this.hasTable(e)&&delete this.tables[e]}getWrapperIdByTableId(e){return`${e}Wrapper`}getWrapperIdFromTable(e){return this.getTable(e).getTableWrapperId()}};OE=U([g()],OE);var kE=OE,AE=class extends CE{constructor(e,t,n){super(e,t),this.em=e,this.loggerService=t,this.basePaginatorServiceFactory=n,this.managerId=`TablePaginatorManager`,this.loggerChannel=`pagination`}getFactoryForTable(e){try{return super.getFactoryForTable(e)}catch(t){if(t instanceof Td)return this.log(`No explicitly set factory found for the "${e}" table. Falling back to default one.`),this.basePaginatorServiceFactory;throw t}}addServiceForTable(e,t){let{serviceId:n}=super.addServiceForTable(e);return this.services[n].setSettings(t),this.services[n].setTableId(e),{serviceId:n,instance:this.services[n]}}removeServiceById(e,t){let n=this.getServiceByServiceId(t);this.getPaginationRepository().deleteByCondition(e=>e.id===n.getTableId()),super.removeServiceById(e,t)}getPaginationRepository(){return this.em.getRepository(uf)}};AE=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService)),B(2,m(V.BasePaginatorServiceFactory))],AE);var jE=AE,ME=class extends TE{constructor(e,t,n){super(e,t),this.em=e,this.loggerService=t,this.baseSearcherServiceFactory=n,this.managerId=`TableSearcherManager`,this.loggerChannel=`search`}getFactoryForTable(e){try{return super.getFactoryForTable(e)}catch(t){if(t instanceof Td)return this.log(`No explicitly set factory found for the "${e}" table. Falling back to default one.`),this.baseSearcherServiceFactory;throw t}}addServiceForTable(e,t){let{serviceId:n}=super.addServiceForTable(e,t);return this.services[n].setSettings(t),this.services[n].setTableId(e),this.services[n].setEndpoint(this.getEndpointForTable(e)),{serviceId:n,instance:this.services[n]}}removeServiceById(e,t){let n=this.getServiceByServiceId(t);this.getSearcherRepo().deleteByCondition(e=>e.id===n.getTableId()),super.removeServiceById(e,t)}getSearcherRepo(){return this.em.getRepository(Df)}};ME=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService)),B(2,m(V.BaseSearcherServiceFactory))],ME);var NE=ME,PE=class{constructor(e,t){this.em=e,this.schema=t,this._tableId=null,this._endpoint=null}setSettings(e){this.settings=e,this.defaultValue=e.defaultValue||``}init(e){this.getRepo().init(this.tableId,this.schema.getSearchFilters(this.endpoint,this.settings.supportedSearchFields)),e&&this.applyByUrlParams(e)}apply(e){typeof e==`string`&&this.getRepo().setValue(this.tableId,e.trim())}applyByUrlParams(e){this.apply(e.search)}toQuery(){return{search:this.getRepo().getValue(this.tableId,this.defaultValue)}}reset(){this.apply(this.defaultValue)}getSearchFields(){return this.getRepo().getSearchFields(this.tableId)}getSearchQuery(){return this.getRepo().getValue(this.tableId,this.defaultValue)}
2isDefaultState(){return this.getSearchQuery()===this.defaultValue}isEmptyState(){return!1}setTableId(e){this._tableId=e}getTableId(){if(!this._tableId)throw new G(`No tableId is set for service`);return this._tableId}setEndpoint(e){this._endpoint=e}get endpoint(){if(!this._endpoint)throw new G(`No endpoint is set for service`);return this._endpoint}get tableId(){if(!this._tableId)throw new G(`No tableId is set for service`);return this._tableId}getRepo(){return this.em.getRepository(Df)}};PE=U([g(),B(0,m(V.EntityManager)),B(1,m(V.FilterSchemaService))],PE);var FE=PE,IE=class extends TE{constructor(e,t,n){super(e,t),this.em=e,this.loggerService=t,this.baseSorterServiceFactory=n,this.managerId=`TableSorterManager`,this.loggerChannel=`sorter`}getFactoryForTable(e){try{return super.getFactoryForTable(e)}catch(t){if(t instanceof Td)return this.log(`No explicitly set factory found for the "${e}" table. Falling back to default one.`),this.baseSorterServiceFactory;throw t}}addServiceForTable(e,t){let{serviceId:n}=super.addServiceForTable(e,t);return this.services[n].setEndpoint(this.getEndpointForTable(e)),this.services[n].setDefaultSorter(t.defaultSorter),this.services[n].setTableId(e),this.services[n].setEntityName(t.entityName),{serviceId:n,instance:this.services[n]}}removeServiceById(e,t){let n=this.getServiceByServiceId(t);this.getSorterRepo().deleteByCondition(e=>e.tableModelId===n.getTableId()),super.removeServiceById(e,t)}getSorterRepo(){return this.em.getRepository(ff)}};IE=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService)),B(2,m(V.BaseSorterServiceFactory))],IE);var LE=IE;E(),$t(),A();var RE={class:`body-text-regular-14 lh-20`},zE=O({__name:`TmEntityCreatedNotification`,props:{entity:{},route:{},openInNewTab:{type:Boolean},onClick:{type:Function}},emits:[`close`],setup(e){let t=e,n=Vu(),r=C(()=>n.getEntityLabel(t.entity.entity));return(t,n)=>(N(),k(G_,{type:`success`,onClose:n[0]||(n[0]=e=>t.$emit(`close`))},{default:x(()=>[S(`div`,RE,Zt(t.$t(`notifications.create.successful`,{entity:j(r)})),1),e.route||e.onClick?(N(),k(Ta,{key:0,class:`lh-20 primary--text`,to:e.route,"text-link":``,target:e.openInNewTab?`_blank`:void 0,onClick:e.onClick},{default:x(()=>[Rt(Zt(t.$t(`notifications.create.view`,{entity:j(r)})),1)]),_:1},8,[`to`,`target`,`onClick`])):P(``,!0)]),_:1}))}});E();var BE=class{constructor(e,t,n,r){this.translateService=e,this.loggerService=t,this.monitoringService=n,this.windowService=r}notify(e){e.group||(e.group=io.main),e.type||(e.type=`success`);let t=Date.now();return gt({id:t,...e,data:{component:e.component}}),t}close(e){gt.close(e)}notifyError(e,t,n){return this.notify({type:`error`,title:t,text:e,duration:n})}notifyWarning(e,t,n){return this.notify({type:`warning`,title:t,text:e,duration:n})}notifyInfo(e,t,n){return this.notify({type:`info`,title:t,text:e,duration:n})}notifySuccess(e,t,n){return this.notify({type:`success`,title:t,text:e,duration:n})}contactSupport(e){let t=`FOR DEBUG`;if(e instanceof Error&&(t=e.message),this.loggerService.log(`warn`,t,`forDebug`),e&&this.monitoringService.logError(e),e instanceof Za&&!e.shouldBeNotified())return;let n=this.translateService.t(`common.pleaseRetryLaterOrContactSupport`,{supportEmail:Ap});this.notifyError(n,`Internal error`)}permissionDenied(){return this.notifyWarning(this.translateService.t(`common.permissionDenied`))}success(e){return this.notify({type:`success`,text:e})}successT(e){return this.success(this.translateService.t(e))}entityCreated(e,t,n,r){return this.notify({component:()=>kt(zE,{entity:e,route:t,openInNewTab:n,onClick:r})})}entityDuplicated(e,t=1){return this.success(this.translateService.t(`notifications.duplicate.successful`,{entity:this.translateService.getEntityLabel(e.entity,t)}))}entityDeleted(e,t=1){return this.success(this.translateService.t(`notifications.delete.successful`,{entity:this.translateService.getEntityLabel(e.entity,t)}))}entityNotFound(e,t){return this.notify({type:`warning`,title:``,text:this.translateService.t(`notFound.entity`,{entity:this.translateService.getEntityLabel(e.entity,t)})})}entityUpdated(e,t=1){let n=this.translateService.getEntityLabel(e.entity,t),r=this.translateService.t(`notifications.update.successful`,{entity:n,count:t});return this.success(r)}entityCreatedOrUpdated(e,t,n){return n?this.entityUpdated(e,t):this.entityCreated(e)}notifyFromError(e){if(e instanceof ms){let e=this.translateService.t(`common.networkError`);this.notifyError(e);return}if(!(e instanceof js)){if(e instanceof qu){this.permissionDenied();return}if(e instanceof Ml){this.notifyError(e.message);return}if(e instanceof xs&&e.message){this.notifyError(e.message);return}if(e instanceof xo&&e.message){this.notifyError(e.message);return}if(e instanceof us&&e.message){this.notifyError(e.message);return}if(e instanceof as&&e.message){this.notifyError(e.message);return}if(e instanceof Ha){this.notifyError(this.translateService.t(`errors.tooManyRequests`));return}if(e instanceof rs){let t=e.getErrors()?.errors;if(t?.fields)return;let n=t?.common;if(n&&n.length>
20){n.forEach(e=>{this.notifyError(e)});return}if(e.message){this.notifyError(e.message);return}}e instanceof Nu||this.contactSupport(e)}}notifyNotImplemented(e=`Not implemented yet`){return this.notify({type:`info`,text:e})}confirmNative(e){return this.windowService.self().confirm(e)}confirmNativeT(e){return this.confirmNative(this.translateService.t(e))}};BE=U([g(),B(0,m(V.TranslateService)),B(1,m(V.LoggerService)),B(2,m(V.MonitoringService)),B(3,m(V.WindowService))],BE);var VE=BE,HE=class{constructor(e,t){this.em=e,this.tableManager=t}async exportByEntity(e,t,n,r){return this.em.getRepository(e).exportRequest(t,r)}downloadFile(e){let t=/filename(?:=|=")([^";\n]+)(?:";?)?/i.exec(e.headers[`content-disposition`])[1];Jd(e.data,t)}async exportToPdf(e,t){return this.em.getRepository(t).exportToPdfRequest(e)}async export(e,t,n,r,i){if(n)return this.tableManager.getTable(n).export(e,i);let a={searchQuery:``,fileFormat:e};return i&&(a.email=i),this.exportByEntity(t,a,n,r)}};HE=U([g(),B(0,m(V.EntityManager)),B(1,m(V.TableManager))],HE);var UE=HE,WE=class{constructor(e,t,n){this.em=e,this.endpointsService=t,this.loggerService=n,this.endpointsService=t,this.loggerService=n}findByName(e){let t=this.getFilterSchemaRepo().findEntityByIdOrNull(e);return t?t.schema:null}getFiltersSchema(e,t){let n=this.endpointsService.getPath(e,t);return this.findByName(n)||(this.loggerService.log(`warn`,`No schema for ${n}`),{name:n,schema:{filter:[],sort:[],groupBy:[],searchFields:[]}})}getSearchFilters(e,t){return qm(this.getFiltersSchema(e).schema.searchFields,t)}addSchemas(e){let t=this.getFilterSchemaRepo(),n=e.map(e=>({id:e.name,schema:e}));t.insert(n)}getFilterSchemaRepo(){return this.em.getRepository(Rf)}};WE=U([g(),B(0,m(V.EntityManager)),B(1,m(V.EndpointsService)),B(2,m(V.LoggerService))],WE);var GE=WE,KE=class{constructor(e,t,n){this.entityManager=e,this.subscription=t,this.preloaderManager=n}isSelfUpdating(){return!1}getDomainSettings(){throw new Wa(`Please use decorator @DomainSettings`)}getModel(){if(!this.getDomainSettings().model)throw new Wa(`Composite domain service must be without model`);return this.getDomainSettings().model}getDomainRepository(){if(!this.getDomainSettings().model)throw new Wa(`Composite domain service must be without repository`);return this.entityManager.getRepository(this.getDomainSettings().model)}async delete(e,t){await this.getDomainRepository().deleteRequest(e),await t?.(),this.deleteFromStore([e])}deleteFromStore(e){this.getDomainRepository().delete(e),this.notify(e,cl.DELETE)}deleteAllFromStore(){this.getDomainRepository().deleteAll(),this.notify([],cl.BULK_DELETE)}getPreloader(){return this.preloaderManager.getPreloader(this.getModel())}notify(e,t=cl.UPDATE,n=this.getModel()){this.subscription.emitByModel(n,{ids:e,eventType:t})}findEntitiesByIds(e,t=[]){return this.getDomainRepository().query().with(t).findIn(e)}async getEntityById(e,t=[],n){let r=this.findEntityByIdOrNull(e,t);if(r)return r;let i;return i=this.getDomainRepository().settings().single?await this.getDomainRepository().getRequest(e):(await this.getDomainRepository().readByFilter([{ids:{in:[e]}}]))[0],n?(n&&i&&await this.insertOrUpdate([i]),this.findEntityByIdOrNull(e,t)):i}fill(e,t=[]){return this.getDomainRepository().fill(e,t)}async fillAll(e=!1){return await this.getDomainRepository().fillAll(e),this.findAll()}findAll(){return this.getDomainRepository().all()}fetchAllItems(){return this.getDomainRepository().fetchAllItems()}
2insertOrUpdate(e){return this.getDomainRepository().insertOrUpdate(e)}insertOrUpdateItem(e){return this.insertOrUpdate([e])}updateItemIfExists(e){return this.getDomainRepository().updateItemIfExists(e)}isEmptyStore(){return this.getDomainRepository().isEmptyStore()}findEntityByIdOrFail(e,t){return this.getDomainRepository().findEntityByIdOrFail(e,t)}findEntityByIdOrNull(e,t){return this.getDomainRepository().findEntityByIdOrNull(e,t)}findEntityOrFail(e,t){return this.getDomainRepository().findEntityOrFail(e,t)}findEntityOrNull(e,t){return this.getDomainRepository().findEntityOrNull(e,t)}firstOrFail(){return this.getDomainRepository().firstOrFail()}firstOrNull(){return this.getDomainRepository().firstOrNull()}hasItems(){return!!this.firstOrNull()}getMissingIds(e){let t=e.map(e=>e.toString()),n=new Set(this.getDomainRepository().query().whereIdIn(t).get().map(e=>`${e.id}`));return Array.from(new Set(t.filter(e=>!n.has(e))))}getNonMissingIds(e){let t=e.map(e=>e.toString()),n=new Set(this.getDomainRepository().query().whereIdIn(t).get().map(e=>`${e.id}`));return Array.from(new Set(t.filter(e=>n.has(e))))}hasAllItemsByIds(e){let t=Array.from(new Set(e.map(String)));return t.length===0||this.getMissingIds(t).length===0}findOrFill(e,t=[]){return this.getDomainRepository().findOrFill(e,t)}addModelToStore(e){return this.getDomainRepository().addModelToStore(e)}};KE=U([g(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager))],KE);var qE=KE,JE=class{constructor(e,t,n,r,i,a){this.vuexService=e,this.cleanUpManager=t,this.preloaderManager=n,this.modelSubscriptionService=r,this.monitoringService=i,this.get=a,this.services={},this.cache={}}getAllDomains(){let e=[];return Object.keys(this.cache).forEach(t=>{if(this.cache[t].getDomainSettings().model){let n=this.vuexService.getModelByModelEntity(t);e.push(n)}}),e}gatherAllDomainsWithRelated(){return Np.gatherRelatedModelsByModels(this.getAllDomains())}getAllDomainWithRelated(e){return this.getAllDomainWithRelatedTo(e,this.getAllDomainWithRelatedFrom(e))}getAllDomainWithRelatedTo(e,t){return Np.gatherRelatedModels(e,t)}getAllDomainWithRelatedFrom(e){return this.getAllDomains().reduce((t,n)=>(Np.isDependsOn(n,e)&&t.push(n),t),[])}addService(e){let t=Reflect.getMetadata(Jl.DomainSettings,e.bindingValue);this.services[t.model.entity]||(this.services[t.model.entity]={id:e.id,model:t.model},this.addModelSubcsription(t.model))}getService(e){return this.getServiceByModelName(e.entity)}getSettingsService(e){return this.getServiceByModelName(e.entity)}getServiceByModelName(e){if(this.cache[e])return this.cache[e];if(!this.services[e])throw new Wa(`Not found service for ${e}`);let t=this.services[e],n=this.get(t.id),r=this.vuexService.getDB();return r&&!r.schemas[t.model.entity]&&r.register(t.model),this.cache[e]=n,n}getPreloadableService(e){let t=this.getService(e);if(Hr(t))return t;throw new Wa(`Not found preloadable service for ${e.entity}`)}isBulkFillableService(e){return`fillEntitiesByIds`in e}addModelSubcsription(e){this.modelSubscriptionService.subscribeByModel(e,t=>{let n;t.ids?n=t.ids:t.id&&(n=[t.id]),this.cleanUpManager.trigger([{model:e,ids:n}])},!0),this.modelSubscriptionService.subscribeByModel(e,t=>{let n=[];if(t.ids?n=t.ids:t.id&&(n=[t.id]),!n.length)return;let r=this.getService(e);if(t.eventType===cl.DELETE||t.eventType===cl.BULK_DELETE){r.getDomainRepository().delete(n);return}let i=this.preloaderManager.getPreloader(e);if(t.eventType===cl.CREATE){n.forEach(t=>r.findEntityByIdOrNull(t)?Promise.resolve():Hr(r)?r.preloadById(t):i.preloadById(e,t));return}if(t.eventType===cl.BULK_UPDATE){if(this.isBulkFillableService(r)){r.fillEntitiesByIds(n);return}this.monitoringService.logInfo(`Please implement IDataBulkFiller for "${e.name}" domain service`)}t.eventType===cl.UPDATE&&r.isSelfUpdating()||n.forEach(t=>r.findEntityByIdOrNull(t)?Hr(r)?r.reloadById(t):i.reloadById(e,t):Promise.resolve())},!0)}};JE=U([g(),B(0,m(V.VuexService)),B(1,m(V.CleanUpManager)),B(2,m(V.PreloaderManager)),B(3,m(V.ModelSubscriptionService)),B(4,m(V.MonitoringService)),B(5,m(`GetLocator`))],JE);var YE=JE,XE=class{constructor(e){this.form={},this.formId=e,this.logger=Pl(),this.log(`Init BaseForm constructor`)}buildForm(e){for(let t of e)this.form[t.getName()]=t;return this.log(`build form`),this.form}getRawForm(){return this.form}setFieldValue(e,t,n=!1){let r=this.getFieldOrNull(e);if(!r){let t=new Sd(`Field: ${e} is not added to the filter form ${this.formId}`);console.error(t,t.stack);return}let i={value:t,isApplied:!1};n&&(i.initialValue=t),r.patch(i)}populate(e,t=!0){for(let n in e){let r=this.getFieldOrNull(n),i=e[n];if(!r||!Re(i))continue;let a=i;t&&a.value!==void 0&&a.initialValue===void 0?r.patch({...a,initialValue:a.value}):r.patch(a)}}getFields(){return Object.values(this.form)}destroy(){this.log(`destroy form`),this.form={}}onInput(e,t){this.log(`onInput: ${e} ${t}`),this.setFieldValue(e,t)}getField(e){let t=this.getFieldOrNull(e);if(!t)throw new Sd(`Field: ${e} is not added to the form`);return t}getFieldOrNull(e){return this.form[e]??null}getFieldById(e){return this.getFields().find(t=>
2t.id===e)??null}log(e){this.logger.log(`forms`,e,this.formId)}},ZE=class{constructor(){this.id=``,this.formId=``,this.filterType=jd,this.name=``,this.label=``,this.relatedFieldName=`id`,this.isHidden=!1,this.isVisible=!1,this.order=0,this.value=``,this.selectedItemsValue=[],this.innerValue=``,this.innerSelectedItemsValue=[],this.initialValue=``,this.availableOperations=[],this.operation=`in`,this.innerOperation=`in`,this.initialOperation=`in`,this.isApplied=!0,this.options=[],this.readonly=!1,this.isDefault=!1,this.openOnAdd=!1,this.icon=``}patch(e){Object.assign(this,e)}getApiValue(){return this.value??``}reset(){this.value=``}getName(){return this.name}getFieldType(){return`text`}getCurrentOperation(){return this.operation}getRelationField(){return this.relatedFieldName}isChangedAndApplied(){return this.isApplied&&(!!this.initialValue||this.isChanged())}isChanged(){return!LT(this.value,this.initialValue)}};$t();var QE=new Map([[Nd,()=>({value:[],innerValue:[]})]]),$E=class{build(e,t){let n=new XE(e);return n.buildForm(this.createFields(e,t)),n}createField(e){let t=e.filterType??jd,n={...e,options:this.toFieldOptions(e.options)};return Mt(Object.assign(new ZE,QE.get(t)?.(),Qe(n,s)))}buildFieldId(e,t){return`${e}.${t}`}createFields(e,t){let n=[];for(let r of t){if(PT.includes(r.name))throw new fc(`"${r.name}" is reserved and can't be used as filter name`);if(r.disabled)continue;let t=this.extractOperation(r),i={id:this.buildFieldId(e,r.name),formId:e,filterType:r.filterType,name:r.name,label:r.label,icon:r.icon,availableOperations:r.availableOperations??(r.operation?[r.operation]:[]),relatedFieldName:r.relatedFieldName,readonly:r?.readonly??!1,isDefault:r?.isDefault,isHidden:r?.isHidden??!1,operation:t,innerOperation:t,initialOperation:t,options:[],innerSelectedItemsValue:[],selectedItemsValue:[]};n.push(this.createField(r.callback?r.callback(i):i))}return n}extractOperation(e){if(e.isOptionalOperation&&!e.operation)return``;let t=e.operation??`in`,n=e.availableOperations??(e.operation?[e.operation]:[]);return!n.includes(t)&&n[0]?n[0]:t}toFieldOptions(e){return typeof e==`function`?e():e}};$E=U([g()],$E);var eD=class{constructor(e,t,n,r){this.em=e,this.logger=t,this.baseFilters=n,this.subscriptionService=r}async preloadByCustomParams(e,t,n){let r=this.getRepository(t);if(!kC(r))throw new zl(`Repository is not ByCustomParamsFillable`);if(this.isPreloaded(e,Mo.PRELOADERS))return r.findByCustomParams(n);this.startPreloading(e,t,Mo.PRELOADERS);try{let t=await r.fillByCustomParams(n);return this.markAsPreloaded(e),t}catch(n){throw n instanceof Us&&this.logger.error(`preloader`,`Repository isn't registered ${t.entity}`),n instanceof Zs&&this.markAsFailed(e),n}}async preloadByParams(e,t,n=[],r=Mo.PRELOADERS){if(this.isPreloaded(e,r))return[];this.startPreloading(e,t,r);try{let r=Object.values(n).length>0?await this.getRepository(t).fillByFilter(n):await this.getRepository(t).fillAll();return this.markAsPreloaded(e),r}catch(n){throw n instanceof Us&&this.logger.error(`preloader`,`Repository isn't registered ${t.entity}`),n instanceof Zs&&this.markAsFailed(e),n}}async preloadByIds(e,t,n=Mo.PRELOADERS){let r=t.filter(t=>!this.isPreloaded(this.getIdByModel(e,t),n));if(r.length===0)return this.getRepository(e).findIn(t);r.forEach(t=>{this.startPreloading(this.getIdByModel(e,t),e,n)});try{return(await this.getRepository(e).fillByFilter([{ids:this.baseFilters.toIdFilter(r)}])).forEach(({id:t})=>{this.markAsPreloaded(this.getIdByModel(e,t))}),this.getRepository(e).findIn(t)}catch(t){throw t instanceof Us&&this.logger.error(`preloader`,`Repository isn't registered ${e.entity}`),t instanceof Zs&&r.forEach(t=>{this.markAsFailed(this.getIdByModel(e,t))}),t}}async preloadById(e,t,n=Mo.PRELOADERS){let r=this.getIdByModel(e,t);if(this.isPreloaded(r,n))return Promise.resolve();let i=this.getRepository(e);if(!i.hasSingleSetting())return Promise.resolve();this.startPreloading(r,e,n);try{let e=await i.fill(t);return this.markAsPreloaded(r),e}catch(e){throw(e instanceof Zs||e instanceof xs)&&this.markAsFailed(r),e}}async reloadById(e,t,n=Mo.PRELOADERS){let r=this.getIdByModel(e,t);return this.markAsNotPreloaded(r),this.preloadById(e,t,n)}async reload(e,t=[],n=Mo.PRELOADERS){let r=this.getKeyByModel(e);return this.markAsNotPreloaded(r),this.preloadByParams(r,e,t,n)}async reset(e,t=[]){return this.reload(e,t)}async preload(e,t=Mo.PRELOADERS){return this.preloadByParams(this.getKeyByModel(e),e,[])}startPreloading(e,t,n=Mo.PRELOADERS){return this.getPreloadRepo().insertOrUpd
2ateRaw([{id:e,isPreloaded:!1,isLoading:!0,preloaderType:n,modelName:t.entity,updatedAt:new Date().toISOString()}],hf)}markAsPreloaded(e){this.getPreloadRepo().update([{id:e,isPreloaded:!0,isLoading:!1,isFailed:!1,updatedAt:new Date().toISOString()}]),this.subscriptionService.emit(hf.entity,{ids:[e],eventType:cl.PRELOADED})}createAndMarkAsPreloaded(e,t,n=Mo.PRELOADERS){this.startPreloading(e,t,n),this.markAsPreloaded(e)}markAsNotPreloaded(e){this.getPreloadRepo().update([{id:e,isPreloaded:!1,isLoading:!1,updatedAt:new Date().toISOString()}])}markAsNotPreloadedByCondition(e){this.getPreloadRepo().updateByCondition({isPreloaded:!1,isLoading:!1,updatedAt:new Date().toISOString()},t=>t.id?e(t.id):!1)}find(e){return this.getPreloadRepo().findEntityByIdOrNull(e)}findAll(){return this.getPreloadRepo().all()}isPreloaded(e,t=Mo.PRELOADERS){let n=this.find(e);return!!n&&n.isPreloaded&&n.preloaderType===t}deletePreloadersByModel(e,t=Mo.PRELOADERS){return this.getPreloadRepo().deleteByCondition(n=>n.modelName===e.entity&&n.preloaderType===t)}isFailedByIds(e,t,n=Mo.PRELOADERS){return t.some(t=>this.isFailedById(e,t,n))}isFailedById(e,t,n=Mo.PRELOADERS){return this.isFailed(this.getIdByModel(e,t),e,n)}isFailedByModel(e,t=Mo.PRELOADERS){return this.isFailed(this.getKeyByModel(e),e,t)}isFailed(e,t,n=Mo.PRELOADERS){let r=this.getPreloadRepo().query().where(r=>r.modelName===t.entity&&r.preloaderType===n&&r.id===e).first();return!!r&&r.isFailed}markAsFailed(e){this.getPreloadRepo().update([{id:e,isFailed:!0,isLoading:!1,isPreloaded:!1,updatedAt:new Date().toISOString()}])}getIdByModel(e,t){return e.entity+t}getKeyByModel(e){return e.entity}getRepository(e){return this.em.getRepository(e)}getPreloadRepo(){return this.em.getRepository(hf)}};eD=U([g(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService)),B(2,m(V.BaseFilters)),B(3,m(V.SubscriptionService))],eD);var tD=eD,nD=class{constructor(e){this.wrapperManagerService=e,this.confirmationConfig={},this.wrapperId=`confirmation`}getWrapperId(){return this.wrapperId}getConfirmationConfig(){return this.confirmationConfig}resolve(e=!0){this.resolver&&this.resolver(e)}confirm(e,t=`confirmation`,n){return new Promise(r=>{this.wrapperId=t,this.confirmationConfig=e,this.resolver=r,this.wrapperManagerService.open(this.wrapperId,e),n&&this.wrapperManagerService.setModules(this.wrapperId,n)})}getFormId(){return``}close(){this.wrapperManagerService.close(this.wrapperId)}};nD=U([g(),B(0,m(V.WrapperManagerService))],nD);var rD=nD,iD=class{constructor(e,t){this.baseWrapperService=e,this.modalRepository=t,this.wrapperType=`modal`,this.model=gf}async open(e,t){return this.modalRepository.update([{id:e,isOpen:!0,params:t||{},openTimestamp:Date.now()}])}async close(e){this.modalRepository.update([{id:e,isOpen:!1,params:{}}])}closeAllModals(){this.modalRepository.getAllRaw().forEach(e=>{e.isOpen&&this.close(e.id)})}build(e,t){this.baseWrapperService.build(e,t,this.model)}getWrapperData(e){return this.baseWrapperService.getWrapperData(e,this.model)}setParams(e,t){this.baseWrapperService.setParams(e,t,this.model)}patchParams(e,t){return this.baseWrapperService.patchParams(e,t,this.model)}getParams(e){return this.baseWrapperService.getParams(e,this.model)}removeParams(e,t){this.baseWrapperService.removeParams(e,t,this.model)}clearParams(e){this.baseWrapperService.clearParams(e,this.model)}destroy(e){this.baseWrapperService.destroy(e,this.model)}isOpen(e){return this.modalRepository.findEntityByIdOrFail(e).isOpen}hasOpenModals(){return this.modalRepository.getAllRaw().some(e=>e.isOpen)}isExist(e,t=af){return this.baseWrapperService.isExist(e,t||this.model)}setModules(e,t){return this.modalRepository.update([{id:e,modules:t}])}};iD=U([g(),B(0,m(V.BaseWrapperService)),B(1,m(V.ModalRepository))],iD);var aD=iD;function oD(e){return function(t){return Reflect.defineMetadata(Jl.DomainSettings,e,t),t.prototype.getDomainSettings=function(){return e},t}}function sD(e){return function(t){return t.prototype.getSearchSettings=function(){return e},t.prototype.search=function(e,n){this.emptyState===void 0&&(this.emptyState=!1);let r=t.prototype.getDomainRepository.call(this),i=this.getSearchSettings(),a=i.supportedSearchFields,o=i.supportedQueryField,s=r.query();a.forEach(t=>{s.where(n=>!!n[t]&&n[t]?.toLowerCase().includes(e.toLowerCase()))}),o&&n&&s.where(e=>e[o]===n);let c=s.all();this.emptyState=c.length===0;let l=r.query();a.forEach(t=>{l.where(n=>!!n[t]&&!n[t]?.toLowerCase().includes(e.toLowerCase()))}),o&&n&&l.where(e=>
2e[o]===n),l.all().forEach(e=>{e.$update({isVisible:!1})}),c.forEach(e=>{e.$update({isVisible:!0})})},t.prototype.isEmptyState=function(){return this.emptyState===void 0&&(this.emptyState=!1),this.emptyState},t.prototype.setIsEmptyState=function(e){this.emptyState=e},t}}var cD=e=>{if(typeof URL.canParse==`function`)return URL.canParse(e);try{let t=new URL(e);return lt(t)}catch{return!1}},lD=`openAccountDomainEvent`,uD=class extends qE{constructor(e,t,n,r,i,a,o,s){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.countryService=r,this.authService=i,this.loggerService=a,this.windowService=o,this.browserIdentifierService=s,this.statusesOfEnabledUser=[Wr.ST_ACTIVE,Wr.ST_TRIAL,Wr.ST_WIZARD],this.maxQuantityInvitesPerSingleRequest=25}loadUser(){if(!this.currentUser())throw new G(`No authorized`)}currentUser(e=[]){let t=this.authService.getCurrentUser(e);if(!t)throw new G(`Current user id not found`);return t}getCurrentUserOrNull(e=[]){return this.authService.getCurrentUser(e)||null}currentUserId(){return this.authService.getCurrentUser()?.id??null}getCurrentTimezone(){try{return this.currentUser([`timezone`]).timezone}catch(e){this.loggerService.error(`exception`,e.message);return}}isAllowWizardForCurrentUser(){let e=this.currentUser();return e.status===Wr.ST_WIZARD||e.status===Wr.ST_TRIAL}getCurrentUserCountryId(){return this.getDomainRepository().getCurrentUserCountryId()}async refreshCurrentUser(){let e=this.currentUser();if(!e)throw new Wa(`There is no user`);return this.preloaderManager.getPreloader(Kn).reloadCurrentUser(e.id)}createPutBody(e,t){let n=this.getDomainRepository().findEntityByIdOrFail(e);return{...dt(n,[`username`,`firstName`,`lastName`,`email`,`phone`,`displayTimeFormat`]),timezone:+n.timezoneId,...t}}fillCurrentUser(){return this.getDomainRepository().fillCurrentUser()}async updateCurrentUser(e,t){return await this.getDomainRepository().updateCurrentUser(this.createPutBody(e,t),this.browserIdentifierService.getUid()),this.getDomainRepository().fillCurrentUser()}updateCurrentUserInStore(e){let t=this.currentUser().id;return this.getDomainRepository().updateCurrentUserInStore({...e,id:t})}updateUserInStore(e,t){return this.insertOrUpdate([{...t,id:e}])}isFailedByToken(){return this.preloaderManager.getPreloader(Kn).isFailed()}async autocomplete(e,t,n,r){return this.preloaderManager.getAutocompletePreloader(Kn).autocomplete(Kn,e,[`firstName`,`lastName`,`email`],t,n,r)}getUserById(e,t=[]){return this.getDomainRepository().query().with(t).find(e)}isUserCountrySupportsAllSenderSettings(){return this.countryService.checkCountrySupportsAllSenderSettings(this.currentUser().countryId)}hasUserPhone(){return!!this.currentUser().phone}async updateSubAccountFromFormData(e,t){let n=await this.getDomainRepository().putForFormRequest({id:e,...t});return this.notify([e],cl.UPDATE),n}getTaxNumbers(){return this.getDomainRepository().getTaxNumbers()}updateVatNumber(e,t){return this.getDomainRepository().updateVatNumber(e,t)}async inviteSubAccount(e){let t=await this.getDomainRepository().inviteSubAccount(e);return this.notify([],cl.CREATE),t}async resendInvitationSubAccount(e,t,n){let r=n!==t;await this.getDomainRepository().resendInvitationSubAccount({email:t,newEmail:r?n:null}),r&&await this.getPreloader().reloadById(Kn,e)}isStatusImpersonatable(e){return this.statusesOfEnabledUser.filter(e=>e!==Wr.ST_WIZARD).includes(e)}isUserImpersonatable(e){let t=this.getUserById(e);return t&&this.isStatusImpersonatable(t.status)}isUserStatusEnabled(e){return this.statusesOfEnabledUser.includes(e)}getStatusesForActiveSubAccount(){return[...this.statusesOfEnabledUser,Wr.ST_SUB_INVITED]}getStatusesForAllSubAccount(){return[...this.getStatusesForActiveSubAccount(),...this.getStatusesForClosedSubAccount()]}getStatusesForEnabledSubAccount(){return[...this.statusesOfEnabledUser]}getStatusesForClosedSubAccount(){return[Wr.ST_CLOSED,Wr.ST_SUSPEND,Wr.ST_FRAUD]}closeAccount(e){return this.getDomainRepository().closeAccount(e)}async closeSubAccounts(e,t=!1){let n=this.currentUserId();if(!n)throw new G(`current user id is null`);let r=e.includes(n);await this.getDomainRepository().closeSubAccounts(e,t),!r&&this.notify(e,cl.UPDATE,Kn)}getMessagesRetentionPeriod(){return this.getDomainRepository().getMessagesRetentionPeriod()}updateMessagesRetentionPeriod(e){return this.getDomainRepository().updateMessagesRetentionPeriod(e)}deleteAllMessages(e){return this.getDomainRepository().deleteAllMessages(e)}deleteAllContacts(e){return this.getDomainRepository().deleteAllContacts(e)}async openSubAccount(e){await this.getDomainRepository().openSubAccount(e),this.notify([e],cl.UPDATE,Kn),this.subscription.emit(lD,{})}getUsersFacets(e){return this.getDomainRepository().getUsersFacets(e)}
2fetchSubAccountsWithPagination(e,t,n=``){return this.getDomainRepository().fetchSubAccountsWithPagination(e,t,n)}async getSubAccountsTotalCountByFilter(e,t=``){return(await this.fetchSubAccountsWithPagination({page:1,perPage:1},e,t)).pagination.totalCount}async fetchSubAccounts(e){return this.getDomainRepository().fetchSubAccounts(e)}async fetchSubAccountsIfNotFound(e){return this.findEntityByIdOrNull(e)||(await this.fetchSubAccounts({}),this.findEntityByIdOrNull(e))}async fetchAllSubAccounts(e){let t=Object.values(Wr).filter(e=>e!==``);return this.fetchSubAccounts({statuses:t,includeRemoved:e})}getSubAccounts(e){let{id:t}=this.currentUser();return this.getDomainRepository().getSubAccounts(e,t)}acceptPrivacyPolicy(){return this.getDomainRepository().acceptPrivacyPolicy()}preloadSubAccounts(e){return this.preloaderManager.getPreloader(Kn).preloadSubAccounts(e)}runImpersonateMode(e){return this.getDomainRepository().runImpersonateMode(e)}async stopImpersonateMode(){try{await this.getDomainRepository().stopImpersonateMode()}catch(e){throw e instanceof _s&&e.redirectUrl&&cD(e.redirectUrl)&&this.windowService.redirect(e.redirectUrl),e}}getFullNameAndEmail(e){let t=Kn.getFullName(e);return t===e.email?t:`${t} - ${e.email}`}castToOption(e){return{text:this.getFullNameAndEmail(e),value:e.id,entity:e}}castListToOptions(e){return e.map(e=>this.castToOption(e))}isCurrentUser(e){return this.currentUser().id===e}calcNotEnoughSum(e){let t=this.currentUser();return Math.max(0,e-t.balance)}cancelPhoneVerification(){return this.getDomainRepository().cancelPhoneVerification()}isNotEnoughCredit(e){let{balance:t}=this.currentUser();return t<e}isAllowInviteSubAccount(){return this.currentUser().status!==Wr.ST_TRIAL}findAssignableUsers(){return this.getDomainRepository().all().filter(e=>e.status===Wr.ST_ACTIVE||e.status===Wr.ST_SUB_INVITED||e.status===Wr.ST_TRIAL)}hasMinQuantityAssignableUsers(){return this.findAssignableUsers().length>1}getAssigneeList(e,t,n){return this.getDomainRepository().getAssigneeList(e,t,n)}async verifyCurrentUserPhoneByCode(e){let t=this.currentUser().id;return this.getDomainRepository().verifyPhoneByCode(t,e)}};uD=U([oD({model:Kn}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.CountryService)),B(4,m(V.AuthService)),B(5,m(V.LoggerService)),B(6,m(V.WindowService)),B(7,m(V.BrowserIdentifierService))],uD);var dD=uD,fD=class extends pl{};U([v()],fD.prototype,`id`,void 0),U([y(null)],fD.prototype,`industry`,void 0),U([y(null)],fD.prototype,`useCase`,void 0),U([y(null)],fD.prototype,`source`,void 0),U([y(null)],fD.prototype,`description`,void 0),U([y()],fD.prototype,`status`,void 0),fD=U([Be(md.MARKETING_DATA)],fD);var pD=fD,mD=class extends Q{constructor(...e){super(...e),this.id=`1`}async fetchMarketingData(){let e=this.endpointsService.getPath(`userMarketingData`),t=await this.getApiSource().get(e);if(!t.data)throw new Ml(`Response data expected`);return await this.insertOrUpdate([{id:this.id,...t.data}]),this.findEntityByIdOrFail(this.id)}getMarketingData(){return this.findEntityByIdOrNull(this.id)}async saveMarketingData(e){let t=this.endpointsService.getPath(`userMarketingData`);await this.getApiSource().post(t,e)}async skipMarketingData(){let e=this.endpointsService.getPath(`userMarketingDataSkip`);await this.getApiSource().post(e)}};mD=U([Y({model:pD}),g(),h()],mD);var hD=mD,gD=class extends qE{constructor(e,t,n){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.restrictedRoutes=[`payment.congratsRedirect`,`payment.congrats`,`payment.congratsNew`,`user.automations.flowDetails`,_i.tollFreeRegisterBrand,_i.tollFreeBase,_i.tollFreeRegisterCampaign,_i.tollFreeSummary,_i.tollFreeSuccess,_i.tollFreeInfo]}getRestrictedRoutes(){return this.restrictedRoutes}getMarketingData(){return this.getDomainRepository().getMarketingData()}isStalePreconditionError(e){return e instanceof Tc||e instanceof lo}async fetchMarketingData(){try{return await this.getDomainRepository().fetchMarketingData()}catch(e){if(this.isStalePreconditionError(e))return null;throw e}}async submit(e){await this.getDomainRepository().saveMarketingData(e)}async skip(){try{await this.getDomainRepository().skipMarketingData()}catch(e){if(this.isStalePreconditionError(e))return;throw e}}};gD=U([oD({model:pD}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager))],gD);var _D=gD,vD=class{constructor(e,t,n,r){this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.typedBuilder=null,this.beforeSubmitActions=[],this.builder=e()}addBeforeSubmitAction(e){this.beforeSubmitActions.push(e)}getBeforeSubmitActions(){return this.beforeSubmitActions.length===0?null:this.beforeSubmitActions}removeBeforeSubmitAction(e){this.beforeSubmitActions=this.beforeSubmitActions.filter(t=>t!==e)}async doBuild(e){try{await this.buildForm(e),this.setIsFormLoading(!1)}catch(e){let t=e instanceof Error?e.message:String(e);throw this.setFormBuildErrorMessage(t),e}}getBuilder(){return this.builder}
2getTypedBuilder(){if(this.typedBuilder===null){let e=this.typedFormBuilderFactoryService();e.setDependencys(this.builder),this.typedBuilder=e}return this.typedBuilder}onInput(e,t){this.log(`onInput: ${e} ${t}`);let n=this.getField(e),{field:r}=n;this.triggerHook(`beforeEach`,r,t),this.triggerHook(`afterEach`,r,t);let i=t;if(n.config.inputHandler){let a=n.config.inputHandler(t,e,r.parentIndex);if(a){let{value:e,prevent:t}=a;if(i=e,t)return}}this.setFieldValue(e,i),this.triggerHook(`afterEach`,r,t)}onChange(e){this.log(`onChange: ${e}`);let{field:t}=this.getField(e);this.triggerHook(`change`,t,t.value)}setFieldValue(e,t,n=!1){this.log(`set field value for ${e} value: ${t}`);let{field:r}=this.getField(e);this.updateFieldValue(r,t,n)}setFieldValueById(e,t,n=!1){this.log(`set field value for ${e} value: ${t}`);let{field:r}=this.getFieldById(e);this.updateFieldValue(r,t,n)}setFieldOptions(e,t){let{field:n}=this.getField(e);this.updateFieldOptions(n,t)}getFieldOptions(e){let{field:t}=this.getField(e);return t.options}getForm(){return this.builder.getForm()}getField(e){return this.builder.getField(e)}getFieldOrNull(e){try{return this.builder.getField(e)}catch{return null}}isArrayField(e){return this.builder.isArrayField(e)}isGroupField(e){return this.builder.isGroupField(e)}hasField(e){return this.builder.hasField(e)}hasFieldByName(e){return this.builder.hasFieldByName(e)}serverErrorSerializer(e){return e}hasErrorField(e,t){return this.builder.hasErrorField(e,t)}getFieldById(e){return this.builder.getFieldById(e)}getErrorFieldName(e){return this.builder.getErrorFieldName(e)}getFieldDataById(e){if(!this.hasField(e))throw new Sd(`Not exists field ${e}`);return this.getFieldData(this.getFieldById(e))}getFieldDataByName(e){return this.getFieldData(this.getField(e))}getFormData(e=`object`){switch(e){case`object`:return this.getForm().childrens.reduce((e,t)=>(e[t.field.name]=this.getFieldData(t),e),{});case`array`:return this.getForm().childrens.map(e=>this.getFieldData(e),{});default:throw new Sd(`Unknown type ${e}`)}}initForm(){this.builder.init(this.getFormId())}buildField(e){throw new Sd(`Implement build field method for ${this.getFormId()}`)}getFormId(){throw new Sd(`Implement "getFormId" method for ${this.constructor.name}`)}setFormErrorMessageFrom400(e){this.clearFormSuccessMessage(),this.setFormState(`formErrorMessage`,e.message)}setFormErrorMessage(e){this.clearFormSuccessMessage(),this.setFormState(`formErrorMessage`,e)}clearFormErrorMessage(){this.setFormState(`formErrorMessage`,``)}clearFormSuccessMessage(){this.setFormState(`formSuccessMessage`,``)}setIsLoading(e){this.setFormState(`isLoading`,e)}setIsFormLoading(e){this.setFormState(`isFormLoading`,e)}setFormBuildErrorMessage(e){this.setFormState(`formBuildErrorMessage`,e)}setFieldLoading(e,t){let{field:n}=this.getField(e),r={loading:t};this.updateField([{id:n.id,...r}])}async loadOptions(e,t){this.setFieldLoading(e,!0);let n=await t();this.setFieldOptions(e,n),this.setFieldLoading(e,!1)}selectFirstOption(e){let t=this.getFieldOptions(e);t.length&&this.setFieldValue(e,t[0].value)}selectFirstOptionIfEmpty(e){this.isFieldValueEmpty(e)&&this.selectFirstOption(e)}setInitialFieldValuesByCurrentValues(){this.getForm().toArray().forEach(e=>this.setInitialFieldValueByCurrentValue(e.field))}setInitialFieldValueByCurrentValue(e){this.updateField([{id:e.id,initialValue:e.value}])}getFieldLoadingState(e){let{field:t}=this.getField(e);return!!this.getFieldRepository().findEntityByIdOrNull(t.id)?.loading}clearFieldError(e){let{field:t,childrens:n}=this.getField(e);this.getFieldRepository().updateItem({id:t.id,errors:[],serverErrors:[],invalid:!1,valid:!0,validated:!1}),n.forEach(t=>{let n=`${e}.${t.field.name}`;this.clearFieldError(n)})}clearFieldsErrors(){this.getFields().forEach(({field:{name:e}})=>this.clearFieldError(e))}setFieldServerError(e,t=``){let{field:{id:n}}=this.getField(e),r={id:n,serverErrors:[t]};this.updateField([r])}setIsFormSent(e){this.setFormState(`isFormSent`,e)}getFormEntity(){return this.getFormRepository().findEntityByIdOrNull(this.getFormId())}getFormState(){let e=this.getFormEntity();if(!e)throw new Sd(`Form model not created yet. Form id = ${this.getFormId()}`);let{formState:t,...n}=e;return{...t,...n}}getFocusedField(){return this.getFormState().focusedField}setFormState(e,t){this.log(`Set formState [${e}
2]: ${t}`),this.getFormRepository().update([{id:this.getFormId(),formState:{...this.getFormState(),[e]:t}}])}setFocusedField(e){this.setFormState(`focusedField`,e)}setErrorScrollField(e){this.setFormState(`errorScrollField`,e)}setEditingId(e){this.setFormState(`editingId`,e)}getEditingId(){return this.getFormState().editingId}destroy(){this.log(`destroy`),this.beforeSubmitActions=[],this.setIsFormLoading(!0),this.setFormBuildErrorMessage(null),this.getFieldRepository().deleteByCondition(e=>e.formId===this.getFormId()),this.builder.destroy()}isInit(){return this.builder.isInit()}isChanged(){return this.getFieldRepository().query().where(`formId`,this.getFormId()).get().some(e=>e.isChanged())}getChangeset(e){let t=[];for(let n of this.getForm().toArray())t.push({id:n.field.id,...e});return t}getFieldChangeset(e,t){let{field:n}=this.getField(t);return{id:n.id,...e}}triggerServerErrorHandler(e,t){this.log(`triggerServerErroHandler: ${e}`);let{serverErrorHandler:n}=this.getField(e).config;if(n)throw new Sd("Please implement `serverErrorHandler`")}buildByData(e,t=``){this.builder.buildByData(e,t)}populate(e,t=!0){this.log(`Populate form`),this.buildByData(e),this.populateWithoutBuild(e,t)}populateFromEntityId(e){let t=this.getFormId();throw new Sd(`Please implement \`populateFromEntityId\` in form with id ${t}`)}initializeWithCurrentData(){this.populate(this.getFormData(),!0)}extendArray(e,t){let n=this.getBuilder().extendArray(e);return t&&n.childrens.forEach(e=>{Object.prototype.hasOwnProperty.call(t,e.field.name)&&this.setFieldValueById(e.field.id,t[e.field.name],!0)}),n}removeField(e){this.getBuilder().removeField(e)}removeFieldById(e){this.getBuilder().removeFieldById(e)}reorderArrayItems(e){this.getBuilder().reorderArrayItems(e)}getNameById(e){return this.getBuilder().getNameById(e)}getName(e,t=``){return this.getBuilder().getNameById(this.getBuilder().getFieldId(e,t))}getFieldPath(e){return this.getBuilder().getFieldPath(e)}save(){this.getForm().childrens.forEach(e=>{this.saveField(e)})}saveField(e){this.log(`Save field`),this.isArrayField(e)||this.isGroupField(e)?e.childrens.forEach(e=>this.saveField(e)):this.updateFieldValue(e.field,e.field.value,!0)}discard(e){this.discardNestedFields(this.getForm().childrens,e)}discardField(e,t){this.log(`Discard field`),this.isArrayField(e)&&t===`clear`?(e.childrens.forEach(({id:e})=>this.removeFieldById(e)),e.field.children=[]):this.isArrayField(e)||this.isGroupField(e)?this.discardNestedFields(e.childrens):(this.updateFieldValue(e.field,e.field.initialValue),e.field.value=e.field.initialValue),this.triggerHook(`discard`,e.field,null)}discardFieldById(e,t){this.log(`Discard field initial values (get name by id and call discartField)`),this.discardFieldByName(this.getNameById(e),t)}setHook(e,t){this.getBuilder().setHook(e,t)}getFieldValueSafe(e,t=``){return this.getFormState().isFormLoading?t:this.getField(e).field.value}isFieldValueEmpty(e){return!this.getFieldValueSafe(e)}getFieldSafe(e){return this.getFormState().isFormLoading?{}:this.getField(e).field}getFieldInitialValueSafe(e,t=``){return this.getFormState().isFormLoading?t:this.getField(e).field.initialValue}getPartial(){return{name:this.getFormId(),type:`groupPartial`,items:[]}}getInputIds(e){return this.getFieldById(e).field.inputIds}addInputId(e,t){this.getFieldRepository().update([{id:e,inputIds:[...this.getInputIds(e),t]}])}removeInputId(e,t){this.hasField(e)&&this.getFieldRepository().update([{id:e,inputIds:this.getInputIds(e).filter(e=>e!==t)}])}setFormEventCallback(e){this.formEventCallback=e}removeFormEventCallback(){delete this.formEventCallback}triggerFormEventCallback(){if(!this.formEventCallback)return;let e=this.getInvalidFieldNames();this.formEventCallback(e)}clearArrayField(e){if(!this.hasFieldByName(e))return;let t=this.getField(e);if(!this.isArrayField(t))throw new Sd(`Field is not an array`);t.childrens.forEach(({id:e})=>this.removeFieldById(e))}getFields(){return this.getForm().childrens}getInvalidFieldNames(){return this.builder.getInvalidFieldNames()}getFieldRaws(){return this.builder.getFieldRaws()}discardNestedFields(e,t){for(let n of e)this.discardFieldById(n.field.id,t??n.config.discardStrategy)}discardFieldByName(e,t){let n=this.getField(e);this.discardField(n,t)}
2populateWithoutBuild(e,t=!1,n=``){for(let r in e){let i=this.getBuilder().getFieldId(r,n);if(this.hasField(i)){let n=this.getFieldById(i),a=this.getNameById(n.field.id);n.field instanceof zf||n.field instanceof Of?this.populateWithoutBuild(e[r],t,a):this.setFieldValue(a,e[r],t)}}}getFormRepository(){return this.em.getRepository(df)}getFieldRepository(){return this.em.getRepository(ef)}log(e){this.logger.log(`forms`,e,this.getFormId())}updateField(e){this.getFieldRepository().update(e)}getFieldData(e){let t=this.getFieldRepository().findEntityByIdOrFail(e.field.id);if(t instanceof Of){let n=e.childrens.map(e=>this.getFieldData(e));return e.config.exportHandler?e.config.exportHandler(n,t.name):n}if(t instanceof zf){let n=e.childrens.reduce((e,t)=>(e[t.field.name]=this.getFieldData(t),e),{});return e.config.exportHandler?e.config.exportHandler(n,t.name):n}return e.config.exportHandler?e.config.exportHandler(t.getApiValue(),t.name):t.getApiValue()}updateFieldValue(e,t,n=!1){let r={value:t},{value:i,initialValue:a}=e;n&&a===t&&i===t||(n||i!==t)&&(n&&(r.initialValue=r.value),this.updateField([{id:e.id,...r}]))}updateFieldOptions(e,t){this.updateField([{id:e.id,options:t}])}triggerHook(e,t,n){this.getBuilder().getHook(e).forEach(e=>e(t,n))}};U([m(V.TypedFormBuilderFactoryService)],vD.prototype,`typedFormBuilderFactoryService`,void 0),vD=U([g(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService))],vD);var yD=vD,bD=function(e){return e.PRE_FILLED=`PRE-FILLED`,e.ACTIVE=`ACTIVE`,e.COMPLETED=`COMPLETED`,e.CLOSED=`CLOSED`,e.SKIPPED=`SKIPPED`,e}({}),xD=`Other`,SD=1e3,CD=[`Real Estate`,`Healthcare`,`Energy`,`Entertainment`,`Retail`,`Agriculture`,`Insurance`,`Education`,`Hospitality`,`Financial`,`Gambling`,`Construction`,`NGO`,`Manufacturing`,`Government`,`Technology`,`Communication`,`Legal`,`Professional`,`Human Resources`,`Political`,`Postal`,`Transportation`],wD=`2FA.App Notifications.Appointments.Auctions.Auto Repair Services.Bank Transfers.Billing.Booking Confirmations.Business Updates.Career Training.Chatbot.Conversational / Alerts.Courier Services & Deliveries.COVID-19 Alerts.Emergency Alerts.Events & Planning.Financial Services.Fraud Alerts.Fundraising.General Marketing.General School Updates.Healthcare Alerts.Housing Community Updates.HR / Staffing.Insurance Services.Job Dispatch.Legal Services.Mixed.Motivational Reminders.Notary Notifications.Order Notifications.Political.Public Works.Real Estate Services.Religious Services.Repair and Diagnostics Alerts.Rewards Program.Surveys.System Alerts.Voting Reminders.Waitlist Alerts.Webinar Reminders.Workshop Alerts`.split(`.`),TD=[{value:`Affiliate / Partner`},{value:`AI (ChatGPT, Claude, Gemini, etc)`,label:`AI (ChatGPT, Claude, Gemini, etc.)`},{value:`App Store / Marketplace`},{value:`Blog / Article`},{value:`Comparison Website`},{value:`Email Newsletter`},{value:`Online Review Site (G2, Capterra, etc.)`},{value:`Recommendation from a Friend / Colleague`},{value:`Reddit or Forum`},{value:`Search - Bing`,label:`Search â Bing`},{value:`Search - Google`,label:`Search â Google`},{value:`Search - Google Ads`,label:`Search â Google Ads`},{value:`Social Media - Facebook`,label:`Social Media â Facebook`},{value:`Social Media - Instagram`,label:`Social Media â Instagram`},{value:`Social Media - LinkedIn`,label:`Social Media â LinkedIn`},{value:`Social Media - X (Twitter)`,label:`Social Media â X (Twitter)`},{value:`YouTube`},{value:xD}],ED=class extends yD{constructor(e,t,n,r,i){super(e,t,n,r),this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.marketingDataService=i}async buildForm(){let e=this.getBuilder(),t=this.marketingDataService.getMarketingData();e.control({fieldType:`select`,name:`industry`,value:t?.industry??``,options:()=>this.toSelectOptions(CD),validators:this.validationRulesBuilderService.createRules().required({messagePath:`marketingDataModal.errors.industryRequired`}),componentProps:{menuFit:()=>!1}}),e.control({fieldType:`select`,name:`useCase`,value:t?.useCase??``,options:()=>this.toSelectOptions(wD),validators:this.validationRulesBuilderService.createRules().required({messagePath:`marketingDataModal.errors.useCaseRequired`}),componentProps:{menuFit:()=>!1}}),e.control({fieldType:`select`,name:`source`,value:t?.source??``,options:()=>TD.map(e=>({value:e.value,text:e.label??e.value})),validators:this.validationRulesBuilderService.createRules().required({messagePath:`marketingDataModal.errors.sourceRequired`}),componentProps:{menuFit:()=>!1}}),e.control({fieldType:`textarea`,name:`description`,value:t?.description??``,validators:this.validationRulesBuilderService.createRules().maxLength(SD,{messagePath:`marketingDataModal.errors.descriptionMaxLength`}).custom(`requiredWhenOther`,(e,t)=>t?.source!==`Other`||typeof e==`string`&&e.trim().length>0,{messagePath:`marketingDataModal.errors.descriptionRequired`})})}
2async submit(e){let t=e.source===xD;await this.marketingDataService.submit({industry:e.industry,useCase:e.useCase,source:e.source,description:t?e.description:null})}toSelectOptions(e){return e.map(e=>({value:e,text:e}))}};ED=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.MarketingDataService))],ED);var DD=ED,OD=class{constructor(e,t,n){this.marketingDataService=e,this.userSettingsService=t,this.monitoringService=n}async resolve(){if(this.userSettingsService.currentUserSettingsOrNull()?.showMarketingDataModal)try{await this.marketingDataService.fetchMarketingData()}catch(e){this.monitoringService.logError(e)}}async unresolve(){this.marketingDataService.deleteAllFromStore()}};OD=U([g(),B(0,m(V.MarketingDataService)),B(1,m(V.UserSettingsService)),B(2,m(V.MonitoringService))],OD);var kD=OD,AD=class{constructor(e,t){this.preloaderManager=e,this.entityManager=t}async resolve(e){await _w.default.withConcurrency(5).for(e).handleError(async e=>{throw e}).process(async e=>{this.preloaderManager.isPreloadableEntity(e)?await this.preloaderManager.getPreloader(e).preload(e):await this.entityManager.getRepository(e).fillAll()})}isFailed(e){return e.some(e=>this.preloaderManager.getPreloader(e).isFailedByModel(e))}};AD=U([g(),B(0,m(V.PreloaderManager)),B(1,m(V.EntityManager))],AD);var jD=AD,MD=class{constructor(e){this.userService=e}async resolve(){this.userService.loadUser()}isFailed(){return this.userService.isFailedByToken()}};MD=U([g(),B(0,m(V.UserService))],MD);var ND=MD,PD=class extends pl{};U([y()],PD.prototype,`actionsPermissions`,void 0),U([y()],PD.prototype,`messagingPermissions`,void 0),U([y()],PD.prototype,`channelsPermissions`,void 0),U([y()],PD.prototype,`contactsPermissions`,void 0),U([y()],PD.prototype,`servicesPermissions`,void 0),U([y()],PD.prototype,`accountPermissions`,void 0),U([y()],PD.prototype,`reportingPermissions`,void 0),PD=U([Be(md.SUB_ACCOUNT_PERMISSIONS)],PD);var FD=PD,ID=class{constructor(e,t,n,r){this.userService=e,this.globalStateService=t,this.permissionsService=n,this.modelSubscriptionService=r,this.subscriptionKeys=null}async resolve(){await this.updateGlobalState(),this.subscriptionKeys=this.modelSubscriptionService.subscribeByModels([Kn,FD],()=>{this.updateGlobalState()})}async unresolve(){this.subscriptionKeys&&this.modelSubscriptionService.unsubscribe(this.subscriptionKeys)}async updateGlobalState(){if(!this.permissionsService.isActivePermission(`subaccountSettings`))await this.globalStateService.setFieldValueIfChanged(`subAccountsTotalCount`,1);else{let e=await this.userService.getSubAccountsTotalCountByFilter({other:{statuses:this.userService.getStatusesForEnabledSubAccount()}});await this.globalStateService.setFieldValueIfChanged(`subAccountsTotalCount`,e)}}};ID=U([g(),B(0,m(V.UserService)),B(1,m(V.GlobalStateService)),B(2,m(V.PermissionsService)),B(3,m(V.ModelSubscriptionService))],ID);var LD=ID,RD=class{constructor(e){this.entityManager=e}getOrder(e){return this.getRepository().findEntityByIdOrNull(e)}async setOrder(e,t){await this.getRepository().setOrder(e,t)}getRepository(){return this.entityManager.getRepository(bf)}};RD=U([g(),B(0,m(V.EntityManager))],RD);var zD=RD,BD=class{constructor(e){this.entityManager=e}getVisibility(e){return this.getRepository().findEntityByIdOrNull(e)}async setVisibility(e,t){await this.getRepository().setVisibility(e,t)}getRepository(){return this.entityManager.getRepository(Bf)}};BD=U([g(),B(0,m(V.EntityManager))],BD);var VD=BD,HD={en:/^[A-Z]*$/i,cs:/^[A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ]*$/i,da:/^[A-ZÃÃÃ
]*$/i,de:/^[A-ZÃÃÃÃ]*$/i,es:/^[A-ZÃÃÃÃÃÃÃ]*$/i,fr:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß]*$/i,it:/^[A-Z\xC0-\xFF]*$/i,lt:/^[A-ZÄÄÄÄĮŠŲŪŽ]*$/i,nl:/^[A-ZÃÃÃÃÃÃ]*$/i,hu:/^[A-ZÃÃÃÃÃÅÃÃŰ]*$/i,pl:/^[A-ZÄÄÄÅÅÅÃŻŹ]*$/i,pt:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ]*$/i,ru:/^[Ð-ЯÐ]*$/i,sk:/^[A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ]*$/i,sr:/^[A-ZÄÄŽŠÄ]*$/i,sv:/^[A-ZÃ
ÃÃ]*$/i,tr:/^[A-ZÃÄİıÃÅÃ]*$/i,uk:/^[Ð-ЩЬЮЯÐÐÐÒ]*$/i,ar:/^[Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°]*$/,az:/^[A-ZÃÆÄİıÃÅÃ]*$/i,ug:/^[A-ZÚÛÛØ±ØªÙÛÚÙپھسداÛÙÙÙÙØ²Ø´ØºÛبÙÙ
ÚÙÚ¯Ø®Ø¬ÛØ¦]*$/i},UD={en:/^[A-Z\s]*$/i,cs:/^[A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ\s]*$/i,da:/^[A-ZÃÃÃ
\s]*$/i,de:/^[A-ZÃÃÃÃ\s]*$/i,es:/^[A-ZÃÃÃÃÃÃÃ\s]*$/i,fr:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß\s]*$/i,it:/^[A-Z\xC0-\xFF\s]*$/i,lt:/^[A-ZÄÄÄÄĮŠŲŪŽ\s]*$/i,nl:/^[A-ZÃÃÃÃÃÃ\s]*$/i,hu:/^[A-ZÃÃÃÃÃÅÃÃŰ\s]*$/i,pl:/^[A-ZÄÄÄÅÅÅÃŻŹ\s]*$/i,pt:/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ\s]*$/i,ru:/^[Ð-ЯÐ\s]*$/i,sk:/^[A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ\s]*$/i,sr:/^[A-ZÄÄŽŠÄ\s]*$/i,sv:/^[A-ZÃ
ÃÃ\s]*$/i,tr:/^[A-ZÃÄİıÃÅÃ\s]*$/i,uk:/^[Ð-ЩЬЮЯÐÐÐÒ\s]*$/i,ar:/^[Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°\s]*$/,az:/^[A-ZÃÆÄİıÃÅÃ\s]*$/i,ug:/^[A-ZÚÛÛØ±ØªÙÛÚÙپھسداÛÙÙÙÙØ²Ø´ØºÛبÙÙ
ÚÙÚ¯Ø®Ø¬ÛØ¦\s]*$/i},WD={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ]*$/i,da:/^[0-9A-ZÃÃÃ
]$/i,de:/^[0-9A-ZÃÃÃÃ]*$/i,es:/^[0-9A-ZÃÃÃÃÃÃÃ]*$/i,fr:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß]*$/i,it:/^[0-9A-Z\xC0-\xFF]*$/i,lt:/^[0-9A-ZÄÄÄÄĮŠŲŪŽ]*$/i,hu:/^[0-9A-ZÃÃÃÃÃÅÃÃŰ]*$/i,nl:/^[0-9A-ZÃÃÃÃÃÃ]*$/i,pl:/^[0-9A-ZÄÄÄÅÅÅÃŻŹ]*$/i,pt:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ]*$/i,ru:/^[0-9Ð-ЯÐ]*$/i,sk:/^[0-9A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ]*$/i,sr:/^[0-9A-ZÄÄŽŠÄ]*$/i,sv:/^[0-9A-ZÃ
ÃÃ]*$/i,tr:/^[0-9A-ZÃÄİıÃÅÃ]*$/i,uk:/^[0-9Ð-ЩЬЮЯÐÐÐÒ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°]*$/,az:/^[0-9A-ZÃÆÄİıÃÅÃ]*$/i,ug:/^[0-9A-ZÚÛÛØ±ØªÙÛÚÙپھسداÛÙÙÙÙØ²Ø´ØºÛبÙÙ
ÚÙÚ¯Ø®Ø¬ÛØ¦]*$/i},GD={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ_-]*$/i,da:/^[0-9A-ZÃÃÃ
_-]*$/i,de:/^[0-9A-ZÃÃÃÃ_-]*$/i,es:/^[0-9A-ZÃÃÃÃÃÃÃ_-]*$/i,fr:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß_-]*$/i,it:/^[0-9A-Z\xC0-\xFF_-]*$/i,lt:/^[0-9A-ZÄÄÄÄĮŠŲŪŽ_-]*$/i,nl:/^[0-9A-ZÃÃÃÃÃÃ_-]*$/i,hu:/^[0-9A-ZÃÃÃÃÃÅÃÃŰ_-]*$/i,pl:/^[0-9A-ZÄÄÄÅÅÅÃŻŹ_-]*$/i,pt:/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃ_-]*$/i,ru:/^[0-9Ð-ЯÐ_-]*$/i,sk:/^[0-9A-ZÃÃÄÄÃÃĹĽÅÃÅŠŤÃÃŽ_-]*$/i,sr:/^[0-9A-ZÄÄŽŠÄ_-]*$/i,sv:/^[0-9A-ZÃ
ÃÃ_-]*$/i,tr:/^[0-9A-ZÃÄİıÃÅÃ_-]*$/i,uk:/^[0-9Ð-ЩЬЮЯÐÐÐÒ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°_-]*$/,az:/^[0-9A-ZÃÆÄİıÃÅÃ_-]*$/i,ug:/^[0-9A-ZÚÛÛØ±ØªÙÛÚÙپھسداÛÙÙÙÙØ²Ø´ØºÛبÙÙ
ÚÙÚ¯Ø®Ø¬ÛØ¦_-]*$/i},KD=e=>{if(e)return Array.isArray(e)?e[0]:e.locale},qD=(e,t)=>{if(si(e))return!0;let n=KD(t);if(Array.isArray(e))return e.every(e=>qD(e,{locale:n}));let r=String(e);return n?(HD[n]||HD.en).test(r):Object.keys(HD).some(e=>HD[e].test(r))},JD=(e,t)=>{if(si(e))return!0;let n=KD(t);if(Array.isArray(e))return e.every(e=>JD(e,{locale:n}));let r=String(e);return n?(GD[n]||GD.en).test(r):Object.keys(GD).some(e=>GD[e].test(r))},YD=(e,t)=>{if(si(e))return!0;let n=KD(t);if(Array.isArray(e))return e.every(e=>YD(e,{locale:n}));let r=String(e);return n?(WD[n]||WD.en).test(r):Object.keys(WD).some(e=>WD[e].test(r))},XD=(e,t)=>{if(si(e))return!0;let n=KD(t);if(Array.isArray(e))return e.every(e=>XD(e,{locale:n}));let r=String(e);return n?(UD[n]||UD.en).test(r):Object.keys(UD).some(e=>UD[e].test(r))};function ZD(e){return e?Array.isArray(e)?{min:e[0],max:e[1]}:e:{min:0,max:0}}var QD=(e,t)=>{if(si(e))return!0;let{min:n,max:r}=ZD(t);if(Array.isArray(e))return e.every(e=>!!QD(e,{min:n,max:r}));let i=Number(e);return Number(n)<=i&&Number(r)>=i},$D=(e,t)=>{let n=_a(t,`target`);return String(e)===String(n)},eO=(e,t)=>{if(si(e))return!0;let n=_a(t,`length`);if(Array.isArray(e))return e.every(e=>eO(e,{length:n}));let r=String(e);return/^[0-9]*$/.test(r)&&r.length===Number(n)},tO=(e,t,n)=>{let r=window.URL||window.webkitURL;return new Promise(i=>{let a=new Image;a.onerror=()=>i(!1),a.onload=()=>i(a.width===t&&a.height===n),a.src=r.createObjectURL(e)})};function nO(e){return e?Array.isArray(e)?{width:Number(e[0]),height:Number(e[1])}:{width:Number(e.width),height:Number(e.height)}:{width:0,height:0}}var rO=(e,t)=>{if(si(e))return!0;let{width:n,height:r}=nO(t),i=[],a=Array.isArray(e)?e:[e];for(let e=0;e<a.length;e++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(a[e].name))return Promise.resolve(!1);i.push(a[e])}return Promise.all(i.map(e=>tO(e,n,r))).then(e=>e.every(e=>e))},iO=(e,t=!1)=>
2{if(si(e))return!0;let n=t?/^\s*(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))\s*$/:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return Array.isArray(e)?e.every(e=>n.test(String(e))):n.test(String(e))},aO=(e,t)=>{if(si(e))return!0;t||(t=[]);let n=RegExp(`.(${t.join(`|`)})$`,`i`);return Array.isArray(e)?e.every(e=>n.test(e.name)):n.test(e.name)},oO=e=>{if(si(e))return!0;let t=/\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;return Array.isArray(e)?e.every(e=>t.test(e.name)):t.test(e.name)},sO=e=>si(e)?!0:Array.isArray(e)?e.every(e=>/^-?[0-9]+$/.test(String(e))):/^-?[0-9]+$/.test(String(e)),cO=/^(?=\d+\.\d+\.\d+\.\d+$)(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.?){4}$/,lO=/^((?=\d+\.\d+\.\d+\.\d+(\/[0-9]{1,3})?$)(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.?){4})(\/([0-9]|[12][0-9]|3[0-2]))?$/,uO=/^(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}$|^(?:[a-fA-F0-9]{1,4}:){1,6}:[a-fA-F0-9]{1,4}$|^(?:[a-fA-F0-9]{1,4}:){1,5}(?::[a-fA-F0-9]{1,4}){1,2}$|^(?:[a-fA-F0-9]{1,4}:){1,4}(?::[a-fA-F0-9]{1,4}){1,3}$|^(?:[a-fA-F0-9]{1,4}:){1,3}(?::[a-fA-F0-9]{1,4}){1,4}$|^(?:[a-fA-F0-9]{1,4}:){1,2}(?::[a-fA-F0-9]{1,4}){1,5}$|^[a-fA-F0-9]{1,4}:(?::[a-fA-F0-9]{1,4}){1,6}$|^:(?::[a-fA-F0-9]{1,4}){1,7}$|^::$|^(?:[a-fA-F0-9]{1,4}:){1,7}:$|^(?:[a-fA-F0-9]{1,4}:){6}:[a-fA-F0-9]{1,4}$|^(?:[a-fA-F0-9]{1,4}:){0,4}:((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})$/,dO=/^(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^(?:[a-fA-F0-9]{1,4}:){1,6}:[a-fA-F0-9]{1,4}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^(?:[a-fA-F0-9]{1,4}:){1,5}(?::[a-fA-F0-9]{1,4}){1,2}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^(?:[a-fA-F0-9]{1,4}:){1,4}(?::[a-fA-F0-9]{1,4}){1,3}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^(?:[a-fA-F0-9]{1,4}:){1,3}(?::[a-fA-F0-9]{1,4}){1,4}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^(?:[a-fA-F0-9]{1,4}:){1,2}(?::[a-fA-F0-9]{1,4}){1,5}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^[a-fA-F0-9]{1,4}:(?::[a-fA-F0-9]{1,4}){1,6}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^:(?::[a-fA-F0-9]{1,4}){1,7}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^::$|^(?:[a-fA-F0-9]{1,4}:){1,7}:(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^(?:[a-fA-F0-9]{1,4}:){6}:[a-fA-F0-9]{1,4}(?:\/(?:12[0-8]|[1-9]?[0-9]))?$|^(?:[a-fA-F0-9]{1,4}:){0,4}:((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})(?:\/(?:12[0-8]|[1-9]?[0-9]))?$/,fO=/^(https?:\/\/)?[a-zA-Z0-9-]{0,61}[a-zA-Z0-9]\.[a-zA-Z0-9]{2,}([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/,pO=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,mO=/\b(bit\.ly|goo\.gl|tinyurl\.com|tiny\.cc|lc\.chat|is\.gd|soo\.gd|s2r\.co|clicky\.me|budurl\.com|bc\.vc|shorturl\.com|shorturl\.at|alturl\.com)\b/i,hO=(e,t,r,i)=>si(e)?!0:n(i,[`data`,`withSubnetMask`])?lO.test(e)||dO.test(e):cO.test(e)||uO.test(e),gO=(e,t)=>e===_a(t,`other`),_O=(e,t)=>e!==_a(t,`other`),vO=(e,t)=>{let n=_a(t,`length`);return!Xi(e)&&(typeof e==`number`&&(e=String(e)),e.length||(e=Array.from(e)),e.length===Number(n))},yO=(e,t)=>
2{if(si(e))return!0;let n=_a(t,`length`);return Array.isArray(e)?e.every(e=>yO(e,{length:n})):String(e).length<=Number(n)},bO=(e,t)=>{if(si(e))return!0;let n=_a(t,`max`);return Array.isArray(e)?e.length>0&&e.every(e=>bO(e,{max:n})):Number(e)<=Number(n)},xO=(e,t)=>{if(si(e))return!0;t||(t=[]);let n=RegExp(`${t.join(`|`).replace(`*`,`.+`)}$`,`i`);return Array.isArray(e)?e.every(e=>n.test(e.type)):n.test(e.type)},SO=(e,t)=>{if(si(e))return!0;let n=_a(t,`length`);return Array.isArray(e)?e.every(e=>SO(e,{length:n})):String(e).length>=Number(n)},CO=(e,t)=>{if(si(e))return!0;let n=_a(t,`min`);return Array.isArray(e)?e.length>0&&e.every(e=>CO(e,{min:n})):Number(e)>=Number(n)},wO=(e,t)=>si(e)?!0:Array.isArray(e)?e.every(e=>wO(e,t)):Array.from(t).some(t=>t==e),TO=(e,t)=>si(e)?!0:!wO(e,t),EO=/^[٠١٢٣٤٥٦٧٨٩]+$/,DO=/^[0-9]+$/,OO=e=>{if(si(e))return!0;let t=e=>{let t=String(e);return DO.test(t)||EO.test(t)};return Array.isArray(e)?e.every(t):t(e)},kO=(e,t)=>{if(si(e))return!0;let n=_a(t,`regex`);return typeof n==`string`&&(n=new RegExp(n)),Array.isArray(e)?e.every(e=>kO(e,{regex:n})):n.test(String(e))},AO=e=>e instanceof Of?e.children.length!==0:Xi(e)||hi(e)||e===!1?!1:!!String(e).trim().length,jO=(e,t)=>{if(si(e))return!0;let n=_a(t,`size`);if(n=Number(n),Number.isNaN(n))return!1;let r=n*1024;if(!Array.isArray(e))return e.size<=r;for(let t=0;t<e.length;t++)if(e[t].size>r)return!1;return!0},MO=e=>{if(si(e))return!0;try{new URL(e)}catch{return!1}return!0},NO={alpha_dash:JD,alpha_num:YD,alpha_spaces:XD,alpha:qD,between:QD,confirmed:$D,digits:eO,dimensions:rO,ext:aO,image:oO,integer:sO,ip:hO,is_not:_O,is:gO,length:vO,max_value:bO,max:yO,mimes:xO,min_value:CO,min:SO,not_one_of:TO,numeric:OO,one_of:wO,regex:kO,required:AO,size:jO,url:MO,urlRegex:e=>kO(e,{regex:fO})},PO=class{constructor(e,t,n){this.translateService=e,this.validationRulesBuilderService=t,this.loggerService=n,this.registeredRules=new Map,this.validateList=async e=>(await this.validateFieldsList(e)).map(t=>this.formatFieldValidationResults(t,e.validators)),this.extend()}addService(e){this.get(e.id).register((e,t)=>this.addRule(e,t))}async validate(e){let t=await this.validateFields(e);return this.formatFieldValidationResults(t,e.validators)}validateFields({value:e,validators:t,localValidators:n,formValues:r,crossFieldValues:i,validationInitiator:a}){return Promise.all(t.map(t=>this.validateField(e,t,{crossFieldValues:i,values:r},n,a)))}formatFieldValidationResults(e,t){return{valid:e.every(({valid:e})=>e),errors:e.reduce((e,{errors:t})=>(e=e.concat(t),e),[]),rulesResults:t.reduce((t,n,r)=>(t[this.parseRule(n.name).ruleName]=e[r].valid,t),{})}}validateFieldsList({value:e,...t}){return Promise.all(e.map(e=>this.validateFields({value:e,...t})))}addRule(e,t){this.registeredRules.set(e,t)}extend(){Object.keys(NO).forEach(e=>{this.addRule(e,NO[e])})}async isPhone(e){return e.toString().startsWith(`+`)||(e=`+${e}`),(await this.validate({value:e,validators:this.validationRulesBuilderService.createRules().phone().getRules(),formValues:{}})).valid}async isEmail(e){return(await this.validate({value:e,validators:this.validationRulesBuilderService.createRules().email().getRules(),formValues:{}})).valid}getValidationMessage(e,t=[]){if(e.messagePath){let n=this.generateErrorWithParams(e.name,e.messagePath,t);return e.messageParams&&(n.message.params=e.messageParams),n}return this.getDefaultError(e.name,t)}composeErrorMessageWithRule(e,t){let n={...e};return t?.messagePath&&(n.path=t.messagePath),t?.messageParams&&(n.params=t.messageParams),n}getRuleParams(e){return e.reduce((e,t,n)=>(e[`params${n}`]=t,e),{})}getDefaultError(e,t){return this.translateService.exists(`commonValidationRegistrator.${e}`)?this.generateErrorWithParams(e,`commonValidationRegistrator.${e}`,t):{ruleName:e,message:{path:`commonValidationRegistrator.defaultMessage`}}}generateErrorWithParams(e,t,n){return{ruleName:e,message:{path:t,params:{...this.getRuleParams(n)}}}}async validateField(e,t,n,r,i){let{ruleName:a,ruleParams:o}=this.parseRule(t.name,n.crossFieldValues),s=r?.get(a)||this.registeredRules.get(a),c=[];if(s){let r=await s(e,o,n.values,t,i);
2if(lt(r)&&(Array.isArray(r)?r:[r]).forEach(e=>{e.message=this.composeErrorMessageWithRule(e.message,t),c.push({ruleName:a,...e})}),ye(r)&&!r){let e=this.getValidationMessage(t,o);t.ignoreOnSubmit&&(e.payload={ignoreOnSubmit:!0}),c.push(e)}}else this.loggerService.error(`formValidation`,`ValidationService: Rule not found: ${a}`);return{errors:c,valid:!c.length}}parseRule(e,t){let n=[],r=e.split(`:`)[0];return e.includes(`:`)&&(n=e.split(`:`).slice(1).join(`:`).split(`,`).map(e=>e[0]===`@`?t?.[e.substring(1)]??``:e)),{ruleName:r,ruleParams:n}}};U([m(`GetLocator`)],PO.prototype,`get`,void 0),PO=U([g(),B(0,m(V.TranslateService)),B(1,m(V.ValidationRulesBuilderService)),B(2,m(V.LoggerService))],PO);var FO=PO,IO=e=>/[a-zA-Z]/.test(e),LO=e=>{if(!e)return null;let t=tp(e);if(t.type===ep.Listed){let e=t.topLevelDomains.join(`.`),n=t.domain;return!e||!n?null:`${n}.${e}`}return null},RO=e=>{if(!e)return null;let t=tp(e);return t.type===ep.Listed&&t.subDomains.join(`.`)||null},zO=(e,t)=>{if(!e.endsWith(t))return e;let n=`.${t}`;return e.slice(0,-n.length)},BO=e=>{if(!e)return!1;let t=tp(e);return!!(t.type===ep.Listed&&t.topLevelDomains.length&&t.domain)},VO=class{register(e){e(`fullNameRequired`,e=>e.firstName?e.lastName?!0:{message:{path:`commonValidationRegistrator.fullName.lastName`}}:{message:{path:`commonValidationRegistrator.fullName.firstName`}}),e(`confirmation`,(e,[t])=>e===t||{message:{path:`commonValidationRegistrator.confirmation`}}),e(`equal`,(e,[t])=>e===t||{message:{path:`commonValidationRegistrator.equal`}}),e(`noEqual`,(e,[t])=>e!==t||{message:{path:`commonValidationRegistrator.noEqual`}}),e(`hasLetters`,e=>IO(e)?!0:{message:{path:`commonValidationRegistrator.hasLetters`,tc:1}}),e(`hasNumbers`,e=>/[0-9]/.test(e)?!0:{message:{path:`commonValidationRegistrator.hasNumbers`,tc:1}}),e(`hasSpecialChars`,e=>/[^0-9a-zA-Z]/.test(e)?!0:{message:{path:`commonValidationRegistrator.hasSpecialChars`,tc:1}}),e(`hasLowercaseAndUppercase`,e=>/[a-z]/.test(e)&&/[A-Z]/.test(e)?!0:{message:{path:`commonValidationRegistrator.hasLowercaseAndUppercase`}}),e(`hasLowercase`,e=>/[a-z]/.test(e)?!0:{message:{path:`commonValidationRegistrator.hasLowercas`}}),e(`hasUppercase`,e=>/[A-Z]/.test(e)?!0:{message:{path:`commonValidationRegistrator.hasUppercase`}}),e(`hasAtLeastOne`,e=>e.fieldsIndexes.length>0||{message:{path:`commonValidationRegistrator.hasAtLeastOne`}}),e(`hasNoText`,(e,[t])=>!e.toLowerCase().includes(t.toLowerCase())||{message:{path:`commonValidationRegistrator.hasNoText`}}),e(`minValue`,(e,[t])=>{let n=Number(t);return parseFloat(e)>=n||{message:{path:`commonValidationRegistrator.mustBeGreaterOrEqual`,tc:n}}}),e(`domain`,e=>this.isDomain(e)?!0:{message:{path:`commonValidationRegistrator.domain`}}),e(`domainOrEmail`,e=>this.isDomain(e)||iO(e)?!0:{message:{path:`commonValidationRegistrator.domainOrEmail`}}),e(`email`,e=>iO(e)?!0:{message:{path:`commonValidationRegistrator.emailNotValid`}}),e(`requiredNested`,(e,[t])=>AO(n(e,t))?!0:{message:{path:`commonValidationRegistrator.required`}}),e(`maxLenNested`,(e,[t,r])=>yO(n(e,t),{length:r})?!0:{message:{path:`commonValidationRegistrator.noMoreThanCharactersLong`,params:{count:r}}}),e(`lessThan`,(e,[t])=>parseInt(e,10)<parseInt(t,10)||{message:{path:`commonValidationRegistrator.lessThan`,params:{max:t}}})}isDomain(e){return typeof e==`string`&&BO(e)}};VO=U([g()],VO);var HO=VO,UO=class{constructor(e,t,n,r){this.accessControlService=e,this.globalStateService=t,this.subscriptionService=n,this.serverSubscriptionService=r,this.subscribeKey=null}async resolve(){this.subscribeKey=this.subscriptionService.subscribe(aa,()=>{this.serverSubscriptionService.disconnectIfConnected()}),await this.accessControlService.install(),this.globalStateService.getLoadedState()||await this.globalStateService.init()}async unresolve(){this.subscribeKey!==null&&this.subscriptionService.unsubscribe(this.subscribeKey)}};UO=U([g(),B(0,m(V.AccessControlService)),B(1,m(V.GlobalStateService)),B(2,m(V.SubscriptionService)),B(3,m(V.ServerSubscriptionService))],UO);var WO=e=>{if(!e)return``;let t=`${e}`;return t.startsWith(`+`)?t:`+${t}`},GO=class{constructor(e,t,n){this.userService=e,this.countryService=t,this.monitoringService=n,this.tmFakePhoneNumberPrefix=`+999`,this.asYouTypeFormatters=new Map}isLibphonenumberUnsupportedCountryCode(e){return!!{AN:!0}[e]}isValidTextMagicPhone(e){let t=this.clearPhone(this.tmFakePhoneNumberPrefix);return RegExp(`^\\+?${t}\\d{1,12}$`).test(e)}isFakePhoneNumber(e){return e.startsWith(this.tmFakePhoneNumberPrefix)}getPhoneWithLeadingPlus(e){return e?e.startsWith(`00`)?WO(e.slice(2)):WO(e):``}replaceLeadingZerosWithPlus(e){return e.replace(/^00/,`+`)}isLeadingCountryCallingCode(e,t){return t?e.startsWith(t):!1}getPhoneWithCountryCode(e,t){return t!==`ZZ`&&!this.isLibphonenumberUnsupportedCountryCode(t)&&this.isLocalPhoneFormat(e)&&be(e,t)?.number||e}format(e,t=`US`){return this.canBeParsed(e)?this.formatPhone(this.getPhoneWithLeadingPlus(e),t):e}canBeParsed(e){return!!Se(e).length}isValidPhoneNumber(e,t){let n=this.getPhoneWithLeadingPlus(e);return this.isFakePhoneNumber(n)||t===`ZZ`?n.length>4&&n.length<17:this.isValidRealPhoneNumber(e,t)}cleanPhoneNumber(e){return e.replace(/\D/g,``)}getExceptionalPhoneCountryCode(e){let t=this.cleanPhoneNumber(e),n=t.length;if(t.startsWith(`49`)&&[`13`,`55`,`99`,`00`,`50`,`33`].includes(t.slice(5,7))&&n===14)return`DE`;if(t.startsWith(`315`)&&n===10)return`NL`;if((t.startsWith(`46719`)||t.startsWith(`46710`))&&n===15)return`SE`;if(t.startsWith(`62`)&&n===11)return`ID`;
2if(t.startsWith(`475800`)&&n===14||t.startsWith(`4759`)&&n===10)return`NO`;if(t.startsWith(`230`)&&n>=10&&n<=11)return`MU`;if(t.startsWith(`337`)&&n>=14&&n<=16)return`FR`;if(t.startsWith(`34590`)&&n===15)return`ES`;if(n===11){let e=[`1645`,`1728`,`1945`],n=t.slice(0,4);if(e.includes(n))return`US`}return null}isValidRealPhoneNumberForLibphonenumberUnsupportedCountry(e,t){let n=this.countryService.getCountryPhone(t);if(!n)return this.monitoringService.logError(new G(`Phone data not found for country code ${t}`)),!1;let r=this.getPhoneWithLeadingPlus(e),i=this.clearPhone(r);if(!i)return!1;let a=n.code,o=r.startsWith(`+`);if(o&&!i.startsWith(a))return!1;let s=o?i.slice(a.length):i,c=Array.isArray(n.mask)?n.mask:[n.mask],l=e=>(e.match(/#/g)??[]).length;return c.some(e=>s.length===l(e))}isValidRealPhoneNumber(e,t){let n=this.getPhoneWithLeadingPlus(e);if(this.getExceptionalPhoneCountryCode(n))return!0;if(t&&this.isLibphonenumberUnsupportedCountryCode(t))return this.isValidRealPhoneNumberForLibphonenumberUnsupportedCountry(e,t);try{if(!this.canBeParsed(n))return!1;let r=be(t?e:n,t);return t&&r&&r.country!==t?!1:r?r.isValid():!1}catch{return!1}}getCountryCodeByPhone(e){return e?this.isFakePhoneNumber(this.getPhoneWithLeadingPlus(e))?`ZZ`:this.getPhoneDataCountry(e):null}getCountryByPhone(e){let t=this.getCountryCodeByPhone(e);return t?this.countryService.findEntityByIdOrNull(t):null}getPhoneData(e){try{let t=this.getPhoneWithLeadingPlus(e);return be(t)??null}catch{return null}}getPhoneDataCountry(e){let t=this.getPhoneData(e);return t?.country?t?.country:this.getExceptionalPhoneCountryCode(e)}formatPhoneNumberIfPossible(e,t){try{let n=be(this.getPhoneWithLeadingPlus(e));if(!n)return e;switch(t){case Pu.INTERNATIONAL:return n.formatInternational();case Pu.NATIONAL:return n.formatNational();case Pu.RFC3966:return n.getURI();default:return e}}catch{return e}}getPhoneWithCountryCodeByPhoneNumber(e,t){let n=this.getCountryCodeByPhone(e)||t;if(!n)throw new G(`Country code not found`);return{phone:e,countryCode:n}}getPhoneWithoutCountryCodeByPhoneNumber(e,t){let n=t??this.getCountryCodeByPhone(e);if(!n)return e;let r=this.getPhoneLeadCodeByCountryCode(n);return e.startsWith(r)?e.replace(r,``):e.startsWith(`+`)?e.replace(`+`,``):e}clearPhone(e){return e.replaceAll(/\D/g,``)}clearPhoneAndSavePlus(e){return e.replace(/[^\d+]/g,``)}clearPhoneAndAddPlus(e){return WO(this.clearPhone(e))}isLikelyPhone(e){return!RegExp(`[^${_u}]`).test(e)}isLocalPhoneFormat(e){return!e.startsWith(`+`)&&!e.startsWith(`00`)}getExampleNumberForLibphonenumberUnsupportedCountry(e){if(e===`AN`)return{number:`+59994651234`,nationalNumber:`94651234`};throw new Qa(e)}getExamplePhoneNational(e){return this.isFakeCountry(e)?`99999999999`:this.isLibphonenumberUnsupportedCountryCode(e)?this.getExampleNumberForLibphonenumberUnsupportedCountry(e).nationalNumber:rt(e,c)?.nationalNumber.toString()}getExamplePhoneForITU(e){if(this.isFakeCountry(e))return`+99999999999`;if(this.isLibphonenumberUnsupportedCountryCode(e))return this.getExampleNumberForLibphonenumberUnsupportedCountry(e).number;let t=rt(e,c);return t?t.number:``}formatPhoneForLibphonenumberUnsupportedCountry(e,t){let n=this.countryService.getCountryPhone(t);if(!n)return this.monitoringService.logError(new G(`Phone data not found for country code ${t}`)),e;let r=this.clearPhone(e);if(!r)return e;let i=n.code,a=e.startsWith(`+`)&&r.startsWith(i),o=a?r.slice(i.length):r;if(!o)return`+${i}`;let s=Array.isArray(n.mask)?n.mask:[n.mask],c=e=>(e.match(/#/g)??[]).length,l=[...s].sort((e,t)=>c(e)-c(t)),u=l.find(e=>o.length<=c(e))??l[l.length-1],d=``,f=0;for(let e of u){if(f>=o.length)break;e===`#`?(d+=o[f],f+=1):d+=e}return f<o.length&&(d+=o.slice(f)),a?`+${i} ${d}`:d}formatPhone(e,t){if(this.isFakeCountry(t))return e;if(this.isLibphonenumberUnsupportedCountryCode(t))return this.formatPhoneForLibphonenumberUnsupportedCountry(e,t);if(!this.asYouTypeFormatters.has(t)){let e=new tt(t);this.asYouTypeFormatters.set(t,e)}let n=this.asYouTypeFormatters.get(t);return n.reset(),n.input(e)}isSenderId(e){return/[a-zA-Z]/.test(e)}isNationalFormatCountry(e){return Sl.includes(e)}isFakeCountry(e){return e===`ZZ`}isEmptyPhoneNumber(e,t){return!this.getPhoneWithoutCountryCodeByPhoneNumber(e,t)}getCountryCallingCodeForLibphonenumberUnsupportedCountry(e){if(e===`AN`)return`599`;throw new Qa(e)}getCountryCallingCode(e){return this.isLibphonenumberUnsupportedCountryCode(e)?this.getCountryCallingCodeForLibphonenumberUnsupportedCountry(e):r(e)}formatFakePhoneNumber(e){return e.replace(/(.999)(\d{3})(\d+)/,`$1 $2 $3`)}getPhoneNumberFormat(e){let t=this.userService.getCurrentUserCountryId();return e&&this.isNationalFormatCountry(e)&&this.isNationalFormatCountry(t)?Pu.NATIONAL:Pu.INTERNATIONAL}preparePhoneForDisplay(e,t){let n=this.getPhoneWithLeadingPlus(e);if(this.isFakePhoneNumber(n))return this.formatFakePhoneNumber(n);let r=t??this.getCountryCodeByPhone(n),i=this.getPhoneNumberFormat(r);return this.formatPhoneNumberIfPossible(n,i)}getPhoneLeadCodeByCountryCode(e){let t=this.countryService.getCountryPhone(e);if(!t)throw new G(`Country with code "${e}" not found in "countryService"`);return WO(t.code)}getPhoneWithCountryCodeByCountryCode(e){return{phone:this.getPhoneLeadCodeByCountryCode(e),countryCode:e}}isTollFreePhone(e,t){return!dd(t)||!this.isValidRealPhoneNumber(e,t)?!1:be(e,t)?.getType()===`TOLL_FREE`}prepareFormDataPhoneNumber({phone:e,countryCode:t}){if(e.trim()===this.getPhoneLeadCodeByCountryCode(t))return``;let n=this.getPhoneWithCountryCode(e,t);return this.clearPhoneAndAddPlus(n)}
2splitTextIntoPhoneChunks(e){return e.split(/[^\d+]/).filter(Boolean)}simpleValidPhone(e){let t=e.includes(`+`),n=e.length-+t,r=n>4&&n<=15;return(!t||e.startsWith(`+`))&&r?e:null}getPotentialPhonesFromArray(e){let t=[];return e.forEach((e,n,r)=>{let i=e.includes(`+`),a=e.length-+i;if(a>=4&&a<15&&t.push({indexes:[n],phone:this.replaceLeadingZerosWithPlus(e)}),a<15){let i=e,a=[n];for(let e=n+1;e<r.length&&i.length<15;e+=1)i+=r[e],a.push(e),this.simpleValidPhone(i)&&t.push({indexes:a.slice(),phone:this.replaceLeadingZerosWithPlus(i)})}}),t}getValidOrTextmagicPhoneForLibphonenumberUnsupportedCountry(e,t){if(this.isValidTextMagicPhone(e))return WO(e);if(!this.isValidRealPhoneNumberForLibphonenumberUnsupportedCountry(e,t))return null;let n=this.getCountryCallingCodeForLibphonenumberUnsupportedCountry(t),r=this.clearPhone(this.getPhoneWithLeadingPlus(e));return r.startsWith(n)?`+${r}`:`+${n}${r}`}getValidOrTextmagicPhone(e,t){let n=t?this.getCountryCallingCode(t):void 0,r;return t&&this.isLibphonenumberUnsupportedCountryCode(t)?this.getValidOrTextmagicPhoneForLibphonenumberUnsupportedCountry(e,t):(!this.isValidTextMagicPhone(e)&&(this.isLocalPhoneFormat(e)||this.isLeadingCountryCallingCode(e,n))&&(r=ve(e,t)),r=r||ve(WO(e)),r&&r.isValid()||this.isValidTextMagicPhone(e)?r?.number||WO(e):null)}getPhonesFromText(e,t){let n=[];return e.match(ed)?.forEach(e=>{let r=!1,i=this.replaceLeadingZerosWithPlus(this.clearPhoneAndSavePlus(e));if(this.simpleValidPhone(i)){let e=this.getValidOrTextmagicPhone(i,t);e&&(n.push(e),r=!0)}if(!r){let r=[],i=this.splitTextIntoPhoneChunks(e);this.getPotentialPhonesFromArray(i).forEach(({indexes:e,phone:i})=>{if(!Zm(r,e)){let a=this.getValidOrTextmagicPhone(i,t);a&&(n.push(a),r=e)}})}}),n.filter(e=>this.isValidPhoneNumber(e))}validateContactPhone({phone:e,countryCode:t}){let n=e?.trim();return!n||this.isEmptyPhoneNumber(n,t)?!0:this.validatePhone({phone:e,countryCode:t})}validatePhone({phone:e,countryCode:t}){let n=e?.trim();if(!n)return!0;let r=t;if(!r&&(r=this.getCountryCodeByPhone(e),!r))return!1;if(n===this.getPhoneLeadCodeByCountryCode(r))return!0;let i=this.getPhoneWithCountryCode(e,r);if(!i)return!1;let a=this.clearPhoneAndAddPlus(i);return this.isValidPhoneNumber(a,r)}};GO=U([g(),B(0,m(V.UserService)),B(1,m(V.CountryService)),B(2,m(V.MonitoringService))],GO);var KO=GO,qO=(e,t=0)=>{let n=[`Bytes`,`KB`,`MB`,`GB`,`TB`];if(e===0)return`0 Byte`;let r=Math.floor(Math.log(e)/Math.log(1024));return t?`${(e/1024**r).toFixed(t).replace(/\.?0+$/,``)} ${n[r]}`:`${Math.round(e/1024**r)} ${n[r]}`},JO=[`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,`application/vnd.ms-excel`,`text/csv`],YO={".pdf":`application/pdf`,".txt":`text/plain`,".docx":`application/vnd.openxmlformats-officedocument.wordprocessingml.document`},XO={".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".png":`image/png`,".webp":`image/webp`,".mp4":[`video/mp4`,`audio/mp4`],".aac":[`audio/aac`,`audio/x-aac`,`audio/x-hx-aac-adts`,`audio/aacp`],".m4a":[`audio/m4a`,`audio/x-m4a`],".ogg":`video/ogg`,".wav":[`audio/wav`,`audio/x-wav`],".gif":`image/gif`,".avi":`video/avi`,".mov":`video/quicktime`,".webm":`video/webm`},ZO={...XO,".pdf":`application/pdf`,".txt":`text/plain`,".doc":`application/msword`,".docx":`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,".xls":`application/vnd.ms-excel`,".xlsx":`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,".ppt":`application/vnd.ms-powerpoint`,".pptx":`application/vnd.openxmlformats-officedocument.presentationml.presentation`},QO=10485760,$O=3670016,ek=537600,tk=10485760,nk=5242880,rk=16777216,ik=104857600,ak=8388608,ok=26214400,sk=26214400,ck=class{register(e){e(`maxFileSize`,(e,t,n,r)=>{if(!e||Zn(e))return!0;let i=QO;if(r?.data){let t=Object.keys(r.data).find(t=>e.type.startsWith(t));if(!t&&r.data[`*`]&&(t=`*`),t){let e=Number(r.data[t]);Number.isNaN(e)||(i=e)}}return(e.size??0)<=i||{message:{path:`fileValidationRegistrator.maxFileSize`,params:{fileSize:qO(i,1)}}}}),e(`isImage`,e=>e?[`image/jpeg`,`image/png`,`image/gif`].includes(e.type)?!0:{message:{path:`fileValidationRegistrator.isImage`}}:!1),e(`fileAllowed`,e=>!e||![`application/x-binary`,`application/octet-stream`,`application/x-msdownload`,`application/x-mach-binary`,`application/x-elf`].includes(e.type)||{message:{path:`fileValidationRegistrator.fileAllowed`}}),e(`isTableDocument`,e=>!e||JO.includes(e.type)||{message:{path:`fileValidationRegistrator.isTableDocument`}}),e(`isMessagesAttachment`,e=>this.fileAttachmentRule(e,Ud)),e(`isMmsAttachment`,e=>this.fileAttachmentRule(e,Wd)),e(`isWhatsAppFileAttachment`,e=>this.fileAttachmentRule(e,Hd)),e(`isPointAiFileAttachment`,e=>this.fileAttachmentRule(e,YO)),e(`isWhatsAppMediaAttachment`,e=>this.fileAttachmentRule(e,qd)),e(`isInstagramMediaAttachment`,e=>this.fileAttachmentRule(e,XO)),e(`isFileOrResponse`,(e,t)=>{if(!e)return!0;let n=e instanceof File?e.type:e.mimeType;return t.includes(n)?!0:{message:{path:`fileValidationRegistrator.isImage`}}})}fileAttachmentRule(e,t){if(!e)return!0;let n={message:{path:`fileValidationRegistrator.isMessagesAttachment`,params:{formats:Object.keys(t).join(`, `).replace(/^(.*)(,\s)(\..*)$/,`$1 & $3`)}}};return Object.keys(t).includes(Xd(e.name))&&Object.values(t).flat().includes(e?.type)||n}};ck=U([g()],ck);var lk=ck,uk=class{get(e){return window[e]}self(){return window}
2getLocation(){return window.location}redirect(e){this.getLocation().href=e}replace(e){this.getLocation().replace(e)}open(e,t=`_self`,n){let r;if(n){let e=[];Object.keys(n).forEach(t=>{e.push(`${t}=${n[t]}`)}),r=e.join(`, `)}window.open(e,t,r)}reload(){this.getLocation().reload()}setAttribute(e,t){window[e]=t}getStyle(e){return window.getComputedStyle(e)}setDocumentTitle(e){document.title=e}};uk=U([g()],uk);var dk=uk,fk=class{constructor(e){this.windowService=e}has(e){return!!this.get(e)}get(e){return this.windowService.self().document.querySelector(`${vr}[${Qn}="${e}"]`)}getOrFail(e){let t=this.get(e);if(!(t instanceof HTMLElement))throw new Za(`There is no scrollbar ${e}`);return t}scroll(e,t={top:0,left:0}){this.getOrFail(e).scroll(t)}getPosition(e){let{scrollTop:t,scrollLeft:n,offsetTop:r,offsetLeft:i}=this.getOrFail(e);return{scrollTop:t,scrollLeft:n,offsetTop:r,offsetLeft:i}}getSize(e){let{scrollWidth:t,scrollHeight:n,offsetWidth:r,offsetHeight:i}=this.getOrFail(e);return{scrollWidth:t,scrollHeight:n,offsetWidth:r,offsetHeight:i}}};fk=U([g(),B(0,m(V.WindowService))],fk);var pk=class{getTableScrollbarId(e){return`TABLE_${e}`}};pk=U([g()],pk);var mk=class{async resolve(e){await this.load(e)}async unresolve(e){await this.unload(e)}async load({src:e,attributes:t}){await Gd(e,t)}unload({src:e,disableUnresolve:t}){return t?Promise.resolve():new Promise(t=>{let n=document.querySelector(`script[src="${e}"]`);if(!n){t(!1);return}document.head.removeChild(n),t(!0)})}};mk=U([g()],mk);var hk=mk,gk=[{searchString:`af93Afghanistan`,value:`AF`,code:`93`,text:`Afghanistan`,mask:`##-###-####`},{searchString:`al355Albania`,value:`AL`,code:`355`,text:`Albania`,mask:`(###) ###-###`},{searchString:`dz213Algeria`,value:`DZ`,code:`213`,text:`Algeria`,mask:`##-###-####`},{searchString:`as1AmericanSamoa`,value:`AS`,code:`1`,text:`American Samoa`,mask:`(###) ###-####`},{searchString:`ad376Andorra`,value:`AD`,code:`376`,text:`Andorra`,mask:`###-###`},{searchString:`ao244Angola`,value:`AO`,code:`244`,text:`Angola`,mask:`(###) ###-###`},{searchString:`ai1Anguilla`,value:`AI`,code:`1`,text:`Anguilla`,mask:`(###) ###-####`},{searchString:`ag1AntiguaandBarbuda`,value:`AG`,code:`1`,text:`Antigua and Barbuda`,mask:`(###) ###-####`},{searchString:`ar54Argentina`,value:`AR`,code:`54`,text:`Argentina`,mask:`(###) ###-####`},{searchString:`am374Armenia`,value:`AM`,code:`374`,text:`Armenia`,mask:`##-###-###`},{searchString:`aw297Aruba`,value:`AW`,code:`297`,text:`Aruba`,mask:`###-####`},{searchString:`au61Australia`,value:`AU`,code:`61`,text:`Australia`,mask:`#-####-####`},{searchString:`at43Austria`,value:`AT`,code:`43`,text:`Austria`,mask:`(###) ###-####`},{searchString:`az994Azerbaijan`,value:`AZ`,code:`994`,text:`Azerbaijan`,mask:`##-###-##-##`},{searchString:`bs1Bahamas`,value:`BS`,code:`1`,text:`Bahamas`,mask:`(###) ###-####`},{searchString:`bh973Bahrain`,value:`BH`,code:`973`,text:`Bahrain`,mask:`####-####`},{searchString:`bd880Bangladesh`,value:`BD`,code:`880`,text:`Bangladesh`,mask:`####-######`},{searchString:`bb1Barbados`,value:`BB`,code:`1`,text:`Barbados`,mask:`(###) ###-####`},{searchString:`by375Belarus`,value:`BY`,code:`375`,text:`Belarus`,mask:`(##) ###-##-##`},{searchString:`be32Belgium`,value:`BE`,code:`32`,text:`Belgium`,mask:`(###) ###-###`},{searchString:`bz501Belize`,value:`BZ`,code:`501`,text:`Belize`,mask:`###-####`},{searchString:`bj229Benin`,value:`BJ`,code:`229`,text:`Benin`,mask:`##-##-####`},{searchString:`bm1Bermuda`,value:`BM`,code:`1`,text:`Bermuda`,mask:`(###) ###-####`},{searchString:`bt975Bhutan`,value:`BT`,code:`975`,text:`Bhutan`,mask:[`##-###-###`,`##-###-###`,`#-###-###`]},{searchString:`bo591Bolivia`,value:`BO`,code:`591`,text:`Bolivia`,mask:`#-###-####`},{searchString:`ba387BosniaandHerzegovina`,value:`BA`,code:`387`,text:`Bosnia and Herzegovina`,mask:[`##-####`,`##-#####`]},{searchString:`bw267Botswana`,value:`BW`,code:`267`,text:`Botswana`,mask:`##-###-###`},{searchString:`br55Brazil`,value:`BR`,code:`55`,text:`Brazil`,mask:[`(##) ####-####`,`(##) #####-####`]},{searchString:`io246BritishIndianOceanTerrito`,value:`IO`,code:`246`,text:`British Indian Ocean Territory`,mask:`###-####`},{searchString:`vg1BritishVirginIslands`,value:`VG`,code:`1`,text:`British Virgin Islands`,mask:`(###) ###-####`}
2,{searchString:`bn673Brunei`,value:`BN`,code:`673`,text:`Brunei`,mask:`###-####`},{searchString:`bg359Bulgaria`,value:`BG`,code:`359`,text:`Bulgaria`,mask:`(###) ###-###`},{searchString:`bf226BurkinaFaso`,value:`BF`,code:`226`,text:`Burkina Faso`,mask:`##-##-####`},{searchString:`bi257Burundi`,value:`BI`,code:`257`,text:`Burundi`,mask:`##-##-####`},{searchString:`kh855Cambodia`,value:`KH`,code:`855`,text:`Cambodia`,mask:`##-###-###`},{searchString:`cm237Cameroon`,value:`CM`,code:`237`,text:`Cameroon`,mask:`####-####`},{searchString:`ca1Canada`,value:`CA`,code:`1`,text:`Canada`,mask:`(###) ###-####`},{searchString:`cv238CapeVerde`,value:`CV`,code:`238`,text:`Cape Verde`,mask:`(###) ##-##`},{searchString:`ky1CaymanIslands`,value:`KY`,code:`1`,text:`Cayman Islands`,mask:`(###) ###-####`},{searchString:`cf236CentralAfricanRepublic`,value:`CF`,code:`236`,text:`Central African Republic`,mask:`##-##-####`},{searchString:`td235Chad`,value:`TD`,code:`235`,text:`Chad`,mask:`##-##-##-##`},{searchString:`cl56Chile`,value:`CL`,code:`56`,text:`Chile`,mask:`#-####-####`},{searchString:`cn86China`,value:`CN`,code:`86`,text:`China`,mask:[`(###) ####-###`,`(###) ####-####`,`##-#####-#####`]},{searchString:`co57Colombia`,value:`CO`,code:`57`,text:`Colombia`,mask:`(###) ###-####`},{searchString:`km269Comoros`,value:`KM`,code:`269`,text:`Comoros`,mask:`##-#####`},{searchString:`ck682CookIslands`,value:`CK`,code:`682`,text:`Cook Islands`,mask:`##-###`},{searchString:`cr506CostaRica`,value:`CR`,code:`506`,text:`Costa Rica`,mask:`####-####`},{searchString:`hr385Croatia`,value:`HR`,code:`385`,text:`Croatia`,mask:`##-###-###`},{searchString:`cu53Cuba`,value:`CU`,code:`53`,text:`Cuba`,mask:`#-###-####`},{searchString:`cy357Cyprus`,value:`CY`,code:`357`,text:`Cyprus`,mask:`##-###-###`},{searchString:`cz420CzechRepublic`,value:`CZ`,code:`420`,text:`Czech Republic`,mask:`(###) ###-###`},{searchString:`cd243DemocraticRepublicoftheCo`,value:`CD`,code:`243`,text:`Democratic Republic of the Congo`,mask:`(###) ###-###`},{searchString:`dk45Denmark`,value:`DK`,code:`45`,text:`Denmark`,mask:`##-##-##-##`},{searchString:`dj253Djibouti`,value:`DJ`,code:`253`,text:`Djibouti`,mask:`##-##-##-##`},{searchString:`dm1Dominica`,value:`DM`,code:`1`,text:`Dominica`,mask:`(###) ###-####`},{searchString:`do1DominicanRepublic`,value:`DO`,code:`1`,text:`Dominican Republic`,mask:[`(###) ###-####`,`(###) ###-####`,`(###) ###-####`]},{searchString:`tl670EastTimor`,value:`TL`,code:`670`,text:`East Timor`,mask:[`###-####`,`###-#####`,`###-#####`]},{searchString:`ec593Ecuador`,value:`EC`,code:`593`,text:`Ecuador`,mask:[`#-###-####`,`##-###-####`]},{searchString:`eg20Egypt`,value:`EG`,code:`20`,text:`Egypt`,mask:`(###) ###-####`},{searchString:`sv503ElSalvador`,value:`SV`,code:`503`,text:`El Salvador`,mask:`##-##-####`},{searchString:`gq240EquatorialGuinea`,value:`GQ`,code:`240`,text:`Equatorial Guinea`,mask:`##-###-####`},{searchString:`er291Eritrea`,value:`ER`,code:`291`,text:`Eritrea`,mask:`#-###-###`},{searchString:`ee372Estonia`,value:`EE`,code:`372`,text:`Estonia`,mask:[`###-####`,`####-####`]},{searchString:`et251Ethiopia`,value:`ET`,code:`251`,text:`Ethiopia`,mask:`##-###-####`},{searchString:`fk500FalklandIslands`,value:`FK`,code:`500`,text:`Falkland Islands`,mask:`#####`},{searchString:`fo298FaroeIslands`,value:`FO`,code:`298`,text:`Faroe Islands`,mask:`###-###`},{searchString:`fj679Fiji`,value:`FJ`,code:`679`,text:`Fiji`,mask:`##-#####`},{searchString:`fi358Finland`,value:`FI`,code:`358`,text:`Finland`,mask:`(###) ###-##-##`},{searchString:`fr33France`,value:`FR`,code:`33`,text:`France`,mask:`(###) ###-###`},{searchString:`pf689FrenchPolynesia`,value:`PF`,code:`689`,text:`French Polynesia`,mask:`##-##-##`},{searchString:`ga241Gabon`,value:`GA`,code:`241`,text:`Gabon`,mask:`#-##-##-##`},{searchString:`gm220Gambia`,value:`GM`,code:`220`,text:`Gambia`,mask:`(###) ##-##`},{searchString:`ge995Georgia`,value:`GE`,code:`995`,text:`Georgia`,mask:`(###) ###-###`},{searchString:`de49Germany`,value:`DE`,code:`49`,text:`Germany`,mask:[`###-###`,`(###) ##-##`,`(###) ##-###`,`(###) ##-####`,`(###) ###-####`,`(####) ###-####`]},{searchString:`gh233Ghana`,value:`GH`,code:`233`,text:`Ghana`,mask:`(###) ###-###`},{searchString:`gi350Gibraltar`,value:`GI`,code:`350`,text:`Gibraltar`,mask:`###-#####`},{searchString:`gr30Greece`,value:`GR`,code:`30`,text:`Greece`,mask:`(###) ###-####`},{searchString:`gl299Greenland`,value:`GL`,code:`299`,text:`Greenland`,mask:`##-##-##`},{searchString:`gd1Grenada`,value:`GD`,code:`1`,text:`Grenada`,mask:`(###) ###-####`},{searchString:`gu1Guam`,value:`GU`,code:`1`,text:`Guam`,mask:`(###) ###-####`},{searchString:`gt502Guatemala`,value:`GT`,code:`502`,text:`Guatemala`,mask:`#-###-####`},{searchString:`gg44Guernsey`,value:`GG`,code:`44`,text:`Guernsey`,mask:`(####) ######`},{searchString:`gn224Guinea`,value:`GN`,code:`224`,text:`Guinea`,mask:`##-###
2-###`},{searchString:`gw245Guinea-Bissau`,value:`GW`,code:`245`,text:`Guinea-Bissau`,mask:`#-######`},{searchString:`gy592Guyana`,value:`GY`,code:`592`,text:`Guyana`,mask:`###-####`},{searchString:`ht509Haiti`,value:`HT`,code:`509`,text:`Haiti`,mask:`##-##-####`},{searchString:`hn504Honduras`,value:`HN`,code:`504`,text:`Honduras`,mask:`####-####`},{searchString:`hk852HongKong`,value:`HK`,code:`852`,text:`Hong Kong`,mask:`####-####`},{searchString:`hu36Hungary`,value:`HU`,code:`36`,text:`Hungary`,mask:`(###) ###-###`},{searchString:`is354Iceland`,value:`IS`,code:`354`,text:`Iceland`,mask:`###-####`},{searchString:`in91India`,value:`IN`,code:`91`,text:`India`,mask:`(####) ###-###`},{searchString:`id62Indonesia`,value:`ID`,code:`62`,text:`Indonesia`,mask:[`##-###-##`,`##-###-###`,`##-###-####`,`(###) ###-###`,`(###) ###-##-###`]},{searchString:`ir98Iran`,value:`IR`,code:`98`,text:`Iran`,mask:`(###) ###-####`},{searchString:`iq964Iraq`,value:`IQ`,code:`964`,text:`Iraq`,mask:`(###) ###-####`},{searchString:`ie353Ireland`,value:`IE`,code:`353`,text:`Ireland`,mask:`(###) ###-###`},{searchString:`im44IsleofMan`,value:`IM`,code:`44`,text:`Isle of Man`,mask:`(####) ######`},{searchString:`il972Israel`,value:`IL`,code:`972`,text:`Israel`,mask:[`#-###-####`,`##-###-####`]},{searchString:`it39Italy`,value:`IT`,code:`39`,text:`Italy`,mask:`(###) ####-###`},{searchString:`ci225IvoryCoast`,value:`CI`,code:`225`,text:`Ivory Coast`,mask:`##-###-###`},{searchString:`jm1Jamaica`,value:`JM`,code:`1`,text:`Jamaica`,mask:`(###) ###-####`},{searchString:`jp81Japan`,value:`JP`,code:`81`,text:`Japan`,mask:[`(###) ###-###`,`##-####-####`]},{searchString:`je44Jersey`,value:`JE`,code:`44`,text:`Jersey`,mask:`(####) ####-######`},{searchString:`jo962Jordan`,value:`JO`,code:`962`,text:`Jordan`,mask:`#-####-####`},{searchString:`kz7Kazakhstan`,value:`KZ`,code:`7`,text:`Kazakhstan`,mask:[`(###) ###-##-##`,`(###) ###-##-##`]},{searchString:`ke254Kenya`,value:`KE`,code:`254`,text:`Kenya`,mask:`###-######`},{searchString:`ki686Kiribati`,value:`KI`,code:`686`,text:`Kiribati`,mask:`##-###`},{searchString:`xk383Kosovo`,value:`XK`,code:`383`,text:`Kosovo`,mask:[`##-###-###`,`###-###-###`]},{searchString:`kw965Kuwait`,value:`KW`,code:`965`,text:`Kuwait`,mask:`####-####`},{searchString:`kg996Kyrgyzstan`,value:`KG`,code:`996`,text:`Kyrgyzstan`,mask:`(###) ###-###`},{searchString:`la856Laos`,value:`LA`,code:`856`,text:`Laos`,mask:[`##-###-###`,`(####) ###-###`]},{searchString:`lv371Latvia`,value:`LV`,code:`371`,text:`Latvia`,mask:`##-###-###`},{searchString:`lb961Lebanon`,value:`LB`,code:`961`,text:`Lebanon`,mask:[`#-###-###`,`##-###-###`]},{searchString:`ls266Lesotho`,value:`LS`,code:`266`,text:`Lesotho`,mask:`#-###-####`},{searchString:`lr231Liberia`,value:`LR`,code:`231`,text:`Liberia`,mask:`##-###-###`},{searchString:`ly218Libya`,value:`LY`,code:`218`,text:`Libya`,mask:[`##-###-###`,`##-###-####`]},{searchString:`li423Liechtenstein`,value:`LI`,code:`423`,text:`Liechtenstein`,mask:`(###) ###-####`},{searchString:`lt370Lithuania`,value:`LT`,code:`370`,text:`Lithuania`,mask:`(###) ##-###`},{searchString:`lu352Luxembourg`,value:`LU`,code:`352`,text:`Luxembourg`,mask:`(###) ###-###`},{searchString:`mo853Macau`,value:`MO`,code:`853`,text:`Macau`,mask:`####-####`},{searchString:`mk389Macedonia`,value:`MK`,code:`389`,text:`Macedonia`,mask:`##-###-###`},{searchString:`mg261Madagascar`,value:`MG`,code:`261`,text:`Madagascar`,mask:`##-##-#####`},{searchString:`mw265Malawi`,value:`MW`,code:`265`,text:`Malawi`,mask:[`#-###-###`,`#-####-####`]},{searchString:`my60Malaysia`,value:`MY`,code:`60`,text:`Malaysia`,mask:[`#-###-###`,`##-###-###`,`(###) ###-###`,`##-###-####`]},{searchString:`mv960Maldives`,value:`MV`,code:`960`,text:`Maldives`,mask:`###-####`},{searchString:`ml223Mali`,value:`ML`,code:`223`,text:`Mali`,mask:`##-##-####`},{searchString:`mt356Malta`,value:`MT`,code:`356`,text:`Malta`,mask:`####-####`},{searchString:`mh692MarshallIslands`,value:`MH`,code:`692`,text:`Marshall Islands`,mask:`###-####`},{searchString:`mr222Mauritania`,value:`MR`,code:`222`,text:`Mauritania`,mask:`##-##-####`},{searchString:`mu230Mauritius`,value:`MU`,code:`230`,text:`Mauritius`,mask:`###-####`},{searchString:`yt262Mayotte`,value:`YT`,code:`262`,text:`Mayotte`,mask:`#####-####`},{searchString:`mx52Mexico`,value:`MX`,code:`52`,text:`Mexico`,mask:[`##-##-####`,`(###) ###-####`]},{searchString:`fm691Micronesia`,value:`FM`,code:`691`,text:`Micronesia`,mask:`###-####`},{searchString:`md373Moldova`,value:`MD`,code:`373`,text:`Moldova`,mask:`####-####`},{searchString:`mc377Monaco`,value:`MC`,code:`377`,text:`Monaco`,mask:[`##-###-###`,`(###) ###-###`]},{searchString:`mn976Mongolia`,value:`MN`,code:`976`,text:`Mongolia`,mask:`##-##-####`},{searchString:`me382Montenegro`,value:`ME`,code:`382`,text:`Montenegro`,mask:`##-###
2-###`},{searchString:`ms1Montserrat`,value:`MS`,code:`1`,text:`Montserrat`,mask:`(###) ###-####`},{searchString:`ma212Morocco`,value:`MA`,code:`212`,text:`Morocco`,mask:`##-####-###`},{searchString:`mz258Mozambique`,value:`MZ`,code:`258`,text:`Mozambique`,mask:`##-###-###`},{searchString:`mm95Myanmar`,value:`MM`,code:`95`,text:`Myanmar`,mask:[`###-###`,`#-###-###`,`##-###-###`]},{searchString:`na264Namibia`,value:`NA`,code:`264`,text:`Namibia`,mask:`##-###-####`},{searchString:`nr674Nauru`,value:`NR`,code:`674`,text:`Nauru`,mask:`###-####`},{searchString:`np977Nepal`,value:`NP`,code:`977`,text:`Nepal`,mask:`##-###-###`},{searchString:`nl31Netherlands`,value:`NL`,code:`31`,text:`Netherlands`,mask:`##-###-####`},{searchString:`an599NetherlandsAntilles`,value:`AN`,code:`599`,text:`Netherlands Antilles`,mask:[`###-####`,`####-####`]},{searchString:`cw599Curacao`,value:`CW`,code:`599`,text:`Curaçao`,mask:`###-####`},{searchString:`bq599BonaireSintEustatiusAndSaba`,value:`BQ`,code:`599`,text:`Caribbean Netherlands`,mask:`###-####`},{searchString:`nc687NewCaledonia`,value:`NC`,code:`687`,text:`New Caledonia`,mask:`##-####`},{searchString:`nz64NewZealand`,value:`NZ`,code:`64`,text:`New Zealand`,mask:[`#-###-###`,`(###) ###-###`,`(###) ###-####`]},{searchString:`ni505Nicaragua`,value:`NI`,code:`505`,text:`Nicaragua`,mask:`####-####`},{searchString:`ne227Niger`,value:`NE`,code:`227`,text:`Niger`,mask:`##-##-####`},{searchString:`ng234Nigeria`,value:`NG`,code:`234`,text:`Nigeria`,mask:[`##-###-##`,`##-###-###`,`(###) ###-####`]},{searchString:`nu683Niue`,value:`NU`,code:`683`,text:`Niue`,mask:`####`},{searchString:`nf672NorfolkIsland`,value:`NF`,code:`672`,text:`Norfolk Island`,mask:`####`},{searchString:`kp850NorthKorea`,value:`KP`,code:`850`,text:`North Korea`,mask:[`###-###`,`####-####`,`##-###-###`,`###-####-###`,`###-###-####`,`####-#############`]},{searchString:`mp1NorthernMarianaIslands`,value:`MP`,code:`1`,text:`Northern Mariana Islands`,mask:`(###) ###-####`},{searchString:`no47Norway`,value:`NO`,code:`47`,text:`Norway`,mask:`(###) ##-###`},{searchString:`om968Oman`,value:`OM`,code:`968`,text:`Oman`,mask:`##-###-###`},{searchString:`pk92Pakistan`,value:`PK`,code:`92`,text:`Pakistan`,mask:`(###) ###-####`},{searchString:`pw680Palau`,value:`PW`,code:`680`,text:`Palau`,mask:`###-####`},{searchString:`ps970Palestine`,value:`PS`,code:`970`,text:`Palestine`,mask:`##-###-####`},{searchString:`pa507Panama`,value:`PA`,code:`507`,text:`Panama`,mask:`###-####`},{searchString:`pg675PapuaNewGuinea`,value:`PG`,code:`675`,text:`Papua New Guinea`,mask:`(###) ##-###`},{searchString:`py595Paraguay`,value:`PY`,code:`595`,text:`Paraguay`,mask:`(###) ###-###`},{searchString:`pe51Peru`,value:`PE`,code:`51`,text:`Peru`,mask:`(###) ###-###`},{searchString:`ph63Philippines`,value:`PH`,code:`63`,text:`Philippines`,mask:`(###) ###-####`},{searchString:`pl48Poland`,value:`PL`,code:`48`,text:`Poland`,mask:`(###) ###-###`},{searchString:`pt351Portugal`,value:`PT`,code:`351`,text:`Portugal`,mask:`##-###-####`},{searchString:`pr1PuertoRico`,value:`PR`,code:`1`,text:`Puerto Rico`,mask:[`(###) ### ####`,`(###) ### ####`]},{searchString:`qa974Qatar`,value:`QA`,code:`974`,text:`Qatar`,mask:`####-####`},{searchString:`cg242RepublicoftheCongo`,value:`CG`,code:`242`,text:`Republic of the Congo`,mask:`##-#####`},{searchString:`re262Reunion`,value:`RE`,code:`262`,text:`Reunion`,mask:`#####-####`},{searchString:`ro40Romania`,value:`RO`,code:`40`,text:`Romania`,mask:`##-###-####`},{searchString:`ru7Russia`,value:`RU`,code:`7`,text:`Russia`,mask:`(###) ###-##-##`},{searchString:`rw250Rwanda`,value:`RW`,code:`250`,text:`Rwanda`,mask:`(###) ###-###`},{searchString:`kn1SaintKittsandNevis`,value:`KN`,code:`1`,text:`Saint Kitts and Nevis`,mask:`(###) ###-####`},{searchString:`lc1SaintLucia`,value:`LC`,code:`1`,text:`Saint Lucia`,mask:`(###) ###-####`},{searchString:`pm508SaintPierreandMiquelon`,value:`PM`,code:`508`,text:`Saint Pierre and Miquelon`,mask:`##-####`},{searchString:`vc1SaintVincentandtheGrenadi`,value:`VC`,code:`1`,text:`Saint Vincent and the Grenadines`,mask:`(###) ###-####`},{searchString:`ws685Samoa`,value:`WS`,code:`685`,text:`Samoa`,mask:`##-####`},{searchString:`sm378SanMarino`,value:`SM`,code:`378`,text:`San Marino`,mask:`####-######`},{searchString:`st239SaoTomeandPrincipe`,value:`ST`,code:`239`,text:`Sao Tome and Principe`,mask:`##-#####`},{searchString:`sa966SaudiArabia`,value:`SA`,code:`966`,text:`Saudi Arabia`,mask:[`#-###-####`,`##-####-####`]},{searchString:`sn221Senegal`,value:`SN`,code:`221`,text:`Senegal`,mask:`##-###
2-####`},{searchString:`rs381Serbia`,value:`RS`,code:`381`,text:`Serbia`,mask:`##-###-####`},{searchString:`sc248Seychelles`,value:`SC`,code:`248`,text:`Seychelles`,mask:`#-###-###`},{searchString:`sl232SierraLeone`,value:`SL`,code:`232`,text:`Sierra Leone`,mask:`##-######`},{searchString:`sg65Singapore`,value:`SG`,code:`65`,text:`Singapore`,mask:`####-####`},{searchString:`sx1SintMaarten`,value:`SX`,code:`1`,text:`Sint Maarten`,mask:`(###) ###-####`},{searchString:`sk421Slovakia`,value:`SK`,code:`421`,text:`Slovakia`,mask:`(###) ###-###`},{searchString:`si386Slovenia`,value:`SI`,code:`386`,text:`Slovenia`,mask:`##-###-###`},{searchString:`sb677SolomonIslands`,value:`SB`,code:`677`,text:`Solomon Islands`,mask:[`#####`,`###-####`]},{searchString:`so252Somalia`,value:`SO`,code:`252`,text:`Somalia`,mask:[`#-###-###`,`##-###-###`]},{searchString:`za27SouthAfrica`,value:`ZA`,code:`27`,text:`South Africa`,mask:`##-###-####`},{searchString:`kr82SouthKorea`,value:`KR`,code:`82`,text:`South Korea`,mask:`##-###-####`},{searchString:`ss211SouthSudan`,value:`SS`,code:`211`,text:`South Sudan`,mask:`##-###-####`},{searchString:`es34Spain`,value:`ES`,code:`34`,text:`Spain`,mask:`(###) ###-###`},{searchString:`lk94SriLanka`,value:`LK`,code:`94`,text:`Sri Lanka`,mask:`##-###-####`},{searchString:`sd249Sudan`,value:`SD`,code:`249`,text:`Sudan`,mask:`##-###-####`},{searchString:`sr597Suriname`,value:`SR`,code:`597`,text:`Suriname`,mask:[`###-###`,`###-####`]},{searchString:`sz268Swaziland`,value:`SZ`,code:`268`,text:`Swaziland`,mask:`##-##-####`},{searchString:`se46Sweden`,value:`SE`,code:`46`,text:`Sweden`,mask:`##-###-####`},{searchString:`ch41Switzerland`,value:`CH`,code:`41`,text:`Switzerland`,mask:`##-###-####`},{searchString:`sy963Syria`,value:`SY`,code:`963`,text:`Syria`,mask:`##-####-###`},{searchString:`tw886Taiwan`,value:`TW`,code:`886`,text:`Taiwan`,mask:[`####-####`,`#-####-####`]},{searchString:`tj992Tajikistan`,value:`TJ`,code:`992`,text:`Tajikistan`,mask:`##-###-####`},{searchString:`tz255Tanzania`,value:`TZ`,code:`255`,text:`Tanzania`,mask:`##-###-####`},{searchString:`th66Thailand`,value:`TH`,code:`66`,text:`Thailand`,mask:[`##-###-###`,`##-###-####`]},{searchString:`tg228Togo`,value:`TG`,code:`228`,text:`Togo`,mask:`##-###-###`},{searchString:`tk690Tokelau`,value:`TK`,code:`690`,text:`Tokelau`,mask:`####`},{searchString:`to676Tonga`,value:`TO`,code:`676`,text:`Tonga`,mask:`#####`},{searchString:`tt1TrinidadandTobago`,value:`TT`,code:`1`,text:`Trinidad and Tobago`,mask:`(###) ###-####`},{searchString:`tn216Tunisia`,value:`TN`,code:`216`,text:`Tunisia`,mask:`##-###-###`},{searchString:`tr90Turkey`,value:`TR`,code:`90`,text:`Turkey`,mask:`(###) ###-####`},{searchString:`tm993Turkmenistan`,value:`TM`,code:`993`,text:`Turkmenistan`,mask:`#-###-####`},{searchString:`tc1TurksandCaicosIslands`,value:`TC`,code:`1`,text:`Turks and Caicos Islands`,mask:`(###) ###-###`},{searchString:`tv688Tuvalu`,value:`TV`,code:`688`,text:`Tuvalu`,mask:[`#####`,`######`]},{searchString:`vi1USVirginIslands`,value:`VI`,code:`1`,text:`U.S. Virgin Islands`,mask:`(###) ###-####`},{searchString:`ug256Uganda`,value:`UG`,code:`256`,text:`Uganda`,mask:`(###) ###-###`},{searchString:`ua380Ukraine`,value:`UA`,code:`380`,text:`Ukraine`,mask:`(##) ###-##-##`},{searchString:`ae971UnitedArabEmirates`,value:`AE`,code:`971`,text:`United Arab Emirates`,mask:[`#-###-####`,`##-###-####`]},{searchString:`gb44UnitedKingdom`,value:`GB`,code:`44`,text:`United Kingdom`,mask:`##-####-####`},{searchString:`us1UnitedStates`,value:`US`,code:`1`,text:`United States`,mask:`(###) ###-####`},{searchString:`uy598Uruguay`,value:`UY`,code:`598`,text:`Uruguay`,mask:`#-###-##-##`},{searchString:`uz998Uzbekistan`,value:`UZ`,code:`998`,text:`Uzbekistan`,mask:`##-###-####`},{searchString:`vu678Vanuatu`,value:`VU`,code:`678`,text:`Vanuatu`,mask:[`#####`,`##-#####`]},{searchString:`ve58Venezuela`,value:`VE`,code:`58`,text:`Venezuela`,mask:`(###) ###-####`},{searchString:`vn84Vietnam`,value:`VN`,code:`84`,text:`Vietnam`,mask:[`##-####-###`,`(###) ####-###`]},{searchString:`ye967Yemen`,value:`YE`,code:`967`,text:`Yemen`,mask:[`#-###-###`,`##-###-###`,`###-###
2-###`]},{searchString:`zm260Zambia`,value:`ZM`,code:`260`,text:`Zambia`,mask:`##-###-####`},{searchString:`zw263Zimbabwe`,value:`ZW`,code:`263`,text:`Zimbabwe`,mask:`#-######`},{searchString:`zz999TextMagic`,value:`ZZ`,code:`999`,text:`Textmagic`,mask:`#####`}],_k=class{constructor(e=25,t){this.cache=new Map,this.size=e,this.ttl=t}get(e){let t=this.cache.get(e);return t?this.ttl&&Date.now()-t.createdAt>this.ttl?(this.cache.delete(e),null):(this.set(e,t.value),t.value):null}set(e,t){if(this.cache.delete(e),this.cache.size>=this.size){let e=this.cache.keys().next().value;typeof e==`string`&&this.cache.delete(e)}this.cache.set(e,{value:t,createdAt:Date.now()})}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}};_k=U([g()],_k);var vk=class extends qE{constructor(e,t,n){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.countriesWithThePrefix=[`US`,`GB`,`NL`,`PH`,`BS`,`GM`,`MV`,`CD`,`CG`,`CF`,`CZ`,`AE`,`KM`,`MH`,`SC`],this.topCountries=[`US`,`GB`,`AU`,`CA`],this.countryNameCache=new _k(25,1e4)}getSelectOptionCountries(e=!1){let t=this.getDomainRepository().all().map((e,t)=>({country:e,[cf]:e.id,[Nf]:e.name,index:t+1})),n=this.filterCountryOptions(t,e);return this.sortCountryOptions(n)}getCountryPhoneDataOptions(e=!1){let t=this.filterCountryOptions(gk,e);return this.sortCountryOptions(t)}getCountryPhone(e){return gk.find(({value:t})=>t===e)}getFirstCountryPhone(){return gk[0]}getCountryName(e){return this.countryNameCache.get(e)||this.countryNameCache.set(e,this.findEntityByIdOrNull(e)?.name||``),this.countryNameCache.get(e)}checkCountrySupportsAllSenderSettings(e){return!Zl.includes(e)}isValidCountryCode(e){return this.getDomainRepository().findEntityByIdOrNull(e)!==null}filterCountryOptions(e,t){return t?e.filter(({value:e})=>e!==`ZZ`):e}sortCountryOptions(e){let t=[...this.topCountries].reverse();return e.sort((e,n)=>{let r=t.indexOf(e.value);return t.indexOf(n.value)-r})}getFormattedCountryName(e){let t=this.getCountryName(e);return this.countriesWithThePrefix.includes(e)?`the ${t}`:t}};vk=U([oD({model:mi}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager))],vk);var yk=vk,bk=class{createRules(e,t){return new Ck(e,t)}compose(...e){let t=[],n=new Map;for(let r of e)t.push(...r.getRules()),r.getLocalValidators().forEach((e,t)=>{n.set(t,e)});return this.createRules(_t(t,`name`),n)}};bk=U([g()],bk);var xk=bk,Sk=class{constructor(e=[],t=new Map){this.rules=e,this.localValidators=t}addRule(e,t){return this.rules.some(t=>t.name===e)||this.rules.push({name:e,...t}),this}removeRule(e){return this.rules=this.rules.filter(t=>t.name!==e),this}getRule(e){return this.rules.find(t=>t.name===e)}getRules(){return this.rules}getLocalValidators(){return this.localValidators}custom(e,t,n){return this.localValidators.set(e,(e,n,r,i,a)=>t(e,r,i,a)),this.addRule(e,n),this}},Ck=class extends Sk{required(e){return this.addRule(`required`,e)}optional(){return this.removeRule(`required`)}minLength(e,t){return this.addRule(`min:${e}`,t)}maxLength(e,t){return this.addRule(`max:${e}`,t)}lessThan(e,t){return this.addRule(`lessThan:${e}`,t)}hasLetters(e){return this.addRule(`hasLetters`,e)}hasNumbers(e){return this.addRule(`hasNumbers`,e)}
2hasSpecialChars(e){return this.addRule(`hasSpecialChars`,e)}hasLowercaseAndUppercase(e){return this.addRule(`hasLowercaseAndUppercase`,e)}hasUppercase(e){return this.addRule(`hasUppercase`,e)}hasLowercase(e){return this.addRule(`hasLowercase`,e)}numeric(e){return this.addRule(`numeric`,e)}alphaNumeric(e){return this.addRule(`alpha_num`,e)}minValue(e,t){return this.addRule(`minValue:${e}`,t)}email(e){return this.addRule(`email`,e)}hasEveryValid(e){return this.addRule(`hasEveryValid`,e)}hasSomeValid(e){return this.addRule(`hasSomeValid`,e)}hasNoText(e,t){return this.addRule(`hasNoText:${e}`,t)}confirmation(e,t){return this.addRule(`confirmation:@${e}`,t)}noEqual(e,t){return this.addRule(`noEqual:@${e}`,t)}vat(e,t){return this.addRule(`vat:@${e}`,t)}phone(e,t){let n=e?`phoneNumber:${e}`:`phoneNumber`;return this.addRule(n,t)}phoneRequired(e){return this.addRule(`phoneRequired`,e)}phoneValid(e){return this.addRule(`phoneValid`,e)}contactPhoneValid(e){return this.addRule(`contactPhoneValid`,e)}oneOf(e,t){return this.addRule(`one_of:${e.join(`,`)}`,t)}fileAllowed(e){return this.addRule(`fileAllowed`,e)}fileMaxSize(e){return this.addRule(`maxFileSize`,e)}fileIsImage(e){return this.addRule(`isImage`,e)}domain(e){return this.addRule(`domain`,e)}domainOrEmail(e){return this.addRule(`domainOrEmail`,e)}someOfValidators(...e){return this.addRule(`someOfValidators:${e.map(e=>e.getRules().map(e=>e.name).join(`|`)).join(`,`)}`)}fileIsTableDocument(e){return this.addRule(`isTableDocument`,e)}fileIsMessagesAttachment(e){return this.addRule(`isMessagesAttachment`,e)}fileIsMmsAttachment(e){return this.addRule(`isMmsAttachment`,e)}fileIsWhatsAppFileAttachment(e){return this.addRule(`isWhatsAppFileAttachment`,e)}fileIsWhatsAppMediaAttachment(e){return this.addRule(`isWhatsAppMediaAttachment`,e)}fileIsInstagramMediaAttachment(e){return this.addRule(`isInstagramMediaAttachment`,e)}fileIsPointAiFileAttachment(e){return this.addRule(`isPointAiFileAttachment`,e)}notOverlapWithFields(e,...t){for(let n of t)this.addRule(`notOverlapWithFields:@${n}`,e);return this}isUniqueInArray(e,t){return this.addRule(`isUniqueInArray:@${e}`,t)}url(e){return this.addRule(`url`,e)}urlRegex(e){return this.addRule(`urlRegex`,e)}ip(e){return this.addRule(`ip`,e)}hasComposeContent(e){return this.addRule(`hasComposeContent`,e)}composeAvailableTags(e){return this.addRule(`composeAvailableTags`,e)}fullNameRequired(e){return this.addRule(`fullNameRequired`,e)}requiredFilters(e){return this.addRule(`requiredFilters`,e)}requiredColumns(e){return this.addRule(`requiredColumns`,e)}requiredNested(e,t){return this.addRule(`requiredNested:${e}`,t)}maxLengthNested(e,t,n){return this.addRule(`maxLenNested:${e},${t}`,n)}isFileOrResponse(e,t){return this.addRule(`isFileOrResponse:${e.join(`,`)}`,t)}richEditorRequired(e){return this.addRule(`richEditorRequired`,e)}dateIsEarlierThan(e,t){return this.addRule(`dateIsEarlierThan:${e}`,t)}textCustomField(e){return this.addRule(`textCustomField`,e)}numericCustomField(e){return this.addRule(`numericCustomField`,e)}monetaryCustomField(e){return this.addRule(`monetaryCustomField`,e)}dateCustomField(e){return this.addRule(`dateCustomField`,e)}dateTimeCustomField(e){return this.addRule(`dateTimeCustomField`,e)}},wk=class extends DC{constructor(e,t,n){super(e,n),this.transport=e,this.localStorageAdapter=t,this.loggerService=n}getRequestSync(e){let t=this.settings().single;return this.localStorageAdapter.getJSON(t)?.[e]}};wk=U([g(),h(),B(0,m(V.LocalStorageTransport)),B(1,m(V.LocalStorageAdapter)),B(2,m(V.LoggerService))],wk);var Tk=wk,Ek=class extends Tk{async setOrder(e,t){await this.postRequest({id:e,order:t}),await this.fill(e)}};Ek=U([Y({model:bf,create:`Order`,single:`Order`}),g(),h()],Ek);var Dk=Ek,Ok=class extends Tk{async setVisibility(e,t){await this.postRequest({id:e,visibility:t}),await this.fill(e)}};Ok=U([Y({model:Bf,fetch:`Visibility`,single:`Visibility`}),g(),h()],Ok);var kk=Ok,Ak=[Mo.PRELOADERS,Mo.PRELOADERS_TABLE,Mo.PRELOADERS_AUTOCOMPLETE],jk=e=>qa(e)?`preloadByIds`in e&&`isFailedByIds`in e:!1,Mk=class{constructor(e,t,n,r,i,a){this.basePreloaderService=e,this.tablePreloaderService=t,this.autocompletePreloaderService=n,this.loggerService=r,this.em=i,this.get=a,this.preloaders={},this.cache={};for(let e of Ak)this.preloaders[e]={},this.cache[e]={};this.cache[Mo.PRELOADERS][`*`]=e,this.cache[Mo.PRELOADERS_TABLE][`*`]=t,this.cache[Mo.PRELOADERS_AUTOCOMPLETE][`*`]=n}addService(e,t=Mo.PRELOADERS){let n=Reflect.getMetadata(Jl.PreloaderSettings,e.bindingValue);if(!n)throw Pl().raw(`error`,e),new zl(`Please use @PreloaderSettings decorator`);this.addPreloaderByModel(n.models,e,t),this.isAliasGuard(n)&&this.addPreloaderByAlias(n.alias,e,t)}getPreloader(e,t=Mo.PRELOADERS){return this.getPreloaderByName(e.entity,t)}getPreloaderByAlias(e,t=Mo.PRELOADERS){return this.getPreloaderByName(e,t)}getTablePreloader(e){return this.getPreloaderByName(e.entity,Mo.PRELOADERS_TABLE)}getTablePreloaderByAlias(e){return this.getPreloaderByName(e,Mo.PRELOADERS_TABLE)}getAutocompletePreloader(e){return this.getPreloaderByName(e.entity,Mo.PRELOADERS_AUTOCOMPLETE)}getAutocompletePreloaderByAlias(e){return this.getPreloaderByName(e,Mo.PRELOADERS_AUTOCOMPLETE)}getBasePreloader(){return this.basePreloaderService}isPreloadableEntity(e){return this.em.getRepository(e)instanceof Q}getPreloaderByName(e,t=Mo.PRELOADERS){if(this.cache[t][e])return this.cache[t][e];if(!this.preloaders[t][e])return this.loggerService.log(`preloader`,`For ${e} use default preloader`,`manager`),this.cache[t][`*`];this.loggerService.log(`preloader`,`For ${e} using preloader`,`manager`),this.loggerService.raw(`preloader`,this.preloaders[e]);let n=this.get(this.preloaders[t][e]);return this.cache[t][e]=n,n}getByIdsPreloader(e){let t=this.getPreloader(e);if(!jk(t))throw new zl(`Preloader for "${e.entity}" is not PreloadableByIds`);return t}
2addPreloaderByModel(e,t,n=Mo.PRELOADERS){e.forEach(e=>{this.loggerService.log(`preloader`,`Add preloader for ${e.entity}`),this.loggerService.raw(`preloader`,t),this.preloaders[n][e.entity]=t.id})}addPreloaderByAlias(e,t,n=Mo.PRELOADERS){this.loggerService.log(`preloader`,`Add preloader for alias ${e}`),this.loggerService.raw(`preloader`,t),this.preloaders[n][e]=t.id}isAliasGuard(e){return typeof e.alias==`string`&&e.alias.length>0}};Mk=U([g(),B(0,m(V.ModelPreloaderService)),B(1,m(V.TablePreloaderService)),B(2,m(V.AutocompletePreloaderService)),B(3,m(V.LoggerService)),B(4,m(V.EntityManager)),B(5,m(`GetLocator`))],Mk);var Nk=Mk,Pk=class{constructor(e,t,n){this.loggerService=e,this.em=t,this.get=n,this.features={},this.callbacks=[]}trigger(e){this.loggerService.log(`cleanUp`,`Trigger for ...`,`trigger`),this.loggerService.raw(`cleanUp`,e),Object.values(this.features).forEach(t=>{this.get(t).trigger(e)})}cleanUp(){this.em.getAllRepos(Mo.REPOSITORIES).forEach(e=>{try{let t=this.em.getRepositoryByModelNameNew(e,Mo.REPOSITORIES);t.isPublic()||t.deleteByCondition(()=>!0)}catch(t){if(t instanceof Us){this.loggerService.error(`cleanUp`,`Failed to clean repository for entity ${e}: ${t.message}`);return}throw t}});let e=this.callbacks.pop();for(;e;){try{e()}catch{this.loggerService.error(`cleanUp`,`Error in callback ${e}`)}e=this.callbacks.pop()}}addService(e,t){if(t&&this.features[t])throw new G(`Duplicate registration cleanuper for feature ${t}`);t&&(this.loggerService.log(`cleanUp`,`Use cleanUper for feature ${t}`),this.loggerService.raw(`cleanUp`,e.id),this.features[t]=e.id)}addOneTimeCallback(e){this.callbacks.indexOf(e)<0&&this.callbacks.push(e)}};Pk=U([g(),B(0,m(V.LoggerService)),B(1,m(V.EntityManager)),B(2,m(`GetLocator`))],Pk);var Fk=Pk,Ik=class{constructor(e,t,n){this.modelPreloaderService=e,this.em=t,this.tableKeyBuilder=n}deleteTablePreloadersByCondition(e){this.getRepository().deleteByCondition(t=>t.accessoryId===e)}updateTablePreloaders(e,t,n,r){this.getRepository().updatePreload({model:r,key:this.tableKeyBuilder.key(e,t),pageKey:e,accessoryId:t,ids:n,updatedAt:new Date().toISOString(),preloaderType:Mo.PRELOADERS_TABLE}),this.modelPreloaderService.createAndMarkAsPreloaded(r.entity,r)}findTablePreloader(e){return this.getRepository().findEntityByIdOrNull(e)}isPreloaded(e){let t=this.findTablePreloader(e);return!!t&&t.isPreloaded&&t.preloaderType===Mo.PRELOADERS_TABLE}allTablePreloaders(e){return this.getRepository().query().where(`modelName`,e.entity).where(`preloaderType`,Mo.PRELOADERS_TABLE).all()}isFailed(e,t){return this.modelPreloaderService.isFailed(e,t,Mo.PRELOADERS_TABLE)}markAsFailed(e,t,n){this.getRepository().markAsFailed({model:n,key:this.tableKeyBuilder.key(e,t),pageKey:e,accessoryId:t,updatedAt:new Date().toISOString(),preloaderType:Mo.PRELOADERS_TABLE})}getRepository(){return this.em.getRepository(Lf)}};Ik=U([g(),B(0,m(V.ModelPreloaderService)),B(1,m(V.EntityManager)),B(2,m(V.TableKeyBuilder))],Ik);var Lk=Ik,Rk=class extends Q{updatePreload({model:e,key:t,pageKey:n,accessoryId:r,ids:i,updatedAt:a,preloaderType:o}){this.add({id:t,map:i,pageKey:n,modelName:e.entity,accessoryId:r,isPreloaded:!0,isFailed:!1,isLoading:!1,preloaderType:o,updatedAt:a,payload:void 0})}markAsFailed({model:e,key:t,pageKey:n,accessoryId:r,updatedAt:i,preloaderType:a}){this.add({id:t,map:[],pageKey:n,modelName:e.entity,accessoryId:r,isPreloaded:!1,isFailed:!0,isLoading:!1,preloaderType:a,updatedAt:i,payload:void 0})}cleanUp(e,t){this.lowLevelDeleteByCondition(n=>n.preloaderType===e&&n.accessoryId===t)}add(e){this.insertOrUpdateRaw([e],Lf)}};Rk=U([Y({model:Lf}),g(),h()],Rk);var zk=Rk;function Bk(e){return function(t){return Reflect.defineMetadata(Jl.PreloaderSettings,e,t),t.prototype.settings=function(){return e},t}}var Vk=class{constructor(e,t){this.modelPreloaderService=e,this.userService=t}isPreloaded(e,t){return this.modelPreloaderService.isPreloaded(e,t)}startPreloading(e,t,n){return this.modelPreloaderService.startPreloading(e,t,n)}markAsPreloaded(e,t){return this.modelPreloaderService.markAsPreloaded(e)}preload(e){return this.modelPreloaderService.preload(e)}preloadById(e,t){return this.modelPreloaderService.preloadById(e,t)}preloadByIds(e,t){return this.modelPreloaderService.preloadByIds(e,t)}async preloadCurrentUser(e){let t=this.getKey();if(this.modelPreloaderService.isPreloaded(t,Mo.PRELOADERS)){let t=this.userService.findEntityByIdOrNull(e);if(!t)throw new zl(`User preloaded but not in store`);return t}this.modelPreloaderService.startPreloading(t,Kn);try{let e=await this.userService.fillCurrentUser();return this.modelPreloaderService.markAsPreloaded(t),e}catch(e){throw e instanceof Zs&&this.modelPreloaderService.markAsFailed(t),e}}async reloadCurrentUser(e){return this.modelPreloaderService.markAsNotPreloaded(this.getKey()),this.preloadCurrentUser(e)}isFailed(){return this.modelPreloaderService.isFailed(this.getKey(),Kn)}isFailedByModel(){return this.modelPreloaderService.isFailedByModel(Kn)}isFailedById(e,t,n=Mo.PRELOADERS){return this.modelPreloaderService.isFailedById(e,t,n)}isFailedByIds(e,t){return this.modelPreloaderService.isFailedByIds(e,t)}reloadById(e,t){return this.modelPreloaderService.reloadById(e,t)}markAsNotPreloaded(e,t){this.modelPreloaderService.markAsNotPreloaded(e)}markAsFailed(e){this.modelPreloaderService.markAsFailed(e)}createAndMarkAsPreloaded(e,t){throw new G(`Method not implemented.`)}async preloadSubAccounts(e){let t=`subAccounts-${e.statuses?.sort().join(``)}-${[e.includeRemoved,e.includeParent,e.includeSelf].join(`-`)}`;if(this.modelPreloaderService.isPreloaded(t,Mo.PRELOADERS))return this.userService.getSubAccounts(e);this.modelPreloaderService.startPreloading(t,Kn);
2try{let n=await this.userService.fetchSubAccounts(e);return this.modelPreloaderService.markAsPreloaded(t),n}catch(e){throw e instanceof Zs&&this.modelPreloaderService.markAsFailed(t),e}}getKey(){return`currentUser`}};Vk=U([Bk({models:[Kn],alias:`user`}),g(),B(0,m(V.ModelPreloaderService)),B(1,m(V.UserService))],Vk);var Hk=Vk,Uk=class{constructor(e,t,n,r,i){this.em=e,this.loggerService=t,this.get=n,this.modalService=r,this.wrappersConfigService=i,this.services=new Set}addService(e){this.services.add(e.id)}setWrapper(e,t){this.getOrCreateWrapperModel(e,t),this.getWrapperRepository().update([{id:e,wrapperType:t}])}build(e,t){let n=t||this.getWrapperTypeFromConfig(e);return n&&this.setWrapper(e,n),this.getWrapperService(e).build(e)}completeBuilds(){this.services.forEach(e=>{let t=this.get(e);t.completeBuilds&&t.completeBuilds()})}getWrapperData(e){return this.getWrapperService(e).getWrapperData(e)}open(e,t={},n){this.isBuilt(e)?n&&this.setWrapper(e,n):this.build(e,n);let r=this.getWrapperService(e);if(r.open)r.open(e,t||{});else throw new vo(`Open is not implemented in ${r.getWrapperData(e)?.wrapperType}`)}isOpened(e){return this.getWrapperService(e).isOpen(e)}setModules(e,t){this.modalService.setModules(e,t)}close(e){this.isBuilt(e)||this.build(e);let t=this.getWrapperService(e);if(t.close)t.close(e);else throw new vo(`Close is not implemented in ${t.getWrapperData(e)?.wrapperType}`)}setParams(e,t){this.getWrapperService(e).setParams(e,t)}getTableParams(e){return this.getParams(e)}getParams(e){return this.getWrapperService(e).getParams(e)}patchParams(e,t){return this.getWrapperService(e).patchParams(e,t)}removeParams(e,t){this.getWrapperService(e).removeParams(e,t)}clearParams(e){this.getWrapperService(e).clearParams(e)}destroy(e){this.getWrapperService(e).destroy(e)}destroyGroup(e){let t=this.getWrapperServiceByType(e.type);if(this.isGrouped(t))t.destroyGroup(e);else throw new vo(`closeGroup is not implemented`)}closeGroup(e,t){let n=this.getWrapperServiceByType(t.type);if(this.isGrouped(n))n.closeGroup(e,t);else throw new vo(`closeGroup is not implemented`)}openGroup(e,t){let n=this.getWrapperServiceByType(t.type);if(this.isGrouped(n))n.openGroup(e,t);else throw new vo(`openGroup is not implemented`)}buildGroup(e){this.loggerService.log(`partialUI`,`Build group`),this.loggerService.raw(`partialUI`,e);let t=this.getWrapperServiceByType(e.type);this.isGrouped(t)&&t.buildGroup(e)}openedInGroup(e){let t=this.getWrapperServiceByType(e.type);if(this.isGrouped(t))return t.openedInGroup(e);throw new vo(`openedInGroup is not implemented in ${t.getWrapperData(e.type)?.wrapperType}`)}isExist(e){return this.getWrapperService(e).isExist(e)}isExistGroup(e){let t=this.getWrapperServiceByType(e.type);if(this.isGrouped(t))return t.isExistGroup(e);throw new vo(`isExistGroup is not implemented`)}isBuilt(e){return this.getWrapperRepository().findEntityByIdOrNull(e)!==null}setParamsByTableData(e,t,n,r){let i=this.getWrapperService(e);if(this.isTableWrapper(i))return i.setParamsByTableData(e,t,n,r);throw new vo(`setParamsByTableData is not implemented for ${e}`)}getTableParamKey(e,t){let n=this.getWrapperService(t);if(this.isTableWrapper(n))return n.getTableParamKey(e,t);throw new vo(`getParamKey is not implemented for ${t}`)}removeParamsByTableKeys(e,t,n=!1){let r=this.getWrapperService(e);if(this.isTableWrapper(r))return r.removeParamsByTableKeys(e,t,n);throw new vo(`removeParamsByTableKeys is not implemented for ${e}`)}getTableParam(e,t){let n=this.getWrapperService(e);if(this.isTableWrapper(n))return n.getTableParam(e,t);throw new vo(`getParam is not implemented for ${e}`)}getAllTableParamsKeys(e){let t=this.getWrapperService(e);if(this.isTableWrapper(t))return t.getAllTableParamsKeys(e);throw new vo(`getAllTableParamsKeys is not implemented for ${e}`)}canBeRestored(e){let t=this.getWrapperService(e);if(this.isTableWrapper(t))return t.canBeRestored(e);throw new vo(`canBeRestored is not implemented for ${e}`)}applyDefaults(e,t,n){let r=this.getWrapperService(e);this.isTableWrapper(r)&&r.applyDefaults(e,t,n)}isGrouped(e){return e.closeGroup&&e.buildGroup&&e.openGroup&&e.openedInGroup}isTableWrapper(e){return!!(qa(e)&&e.setParamsByTableData&&typeof e.setParamsByTableData==`function`&&e.getTableParamKey&&typeof e.getTableParamKey==`function`&&e.getTableParam&&typeof e.getTableParam==`function`&&e.removeParam
2sByTableKeys&&typeof e.removeParamsByTableKeys==`function`&&e.isBuilt&&typeof e.isBuilt==`function`)}getWrapperService(e,t){let n=this.getOrCreateWrapperModel(e,t).wrapperType;return this.getWrapperServiceByType(n)}getWrapperServiceByType(e){return this.get(zp[e])}getOrCreateWrapperModel(e,t){let n=this.getWrapperRepository().findEntityByIdOrNull(e);if(n)return n;let r=t||this.getWrapperTypeFromConfig(e);return this.getWrapperRepository().insert([{id:e,params:{},wrapperType:r||`wrapper`}]),this.getWrapperRepository().findEntityByIdOrFail(e)}getWrapperTypeFromConfig(e){return this.wrappersConfigService.getWrapperType(e)}getWrappersByTypes(e){return this.getWrapperRepository().getAllRaw().filter(t=>e.includes(t.wrapperType))}getWrapperRepository(){return this.em.getRepository(af)}};Uk=U([g(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService)),B(2,m(`GetLocator`)),B(3,m(V.ModalService)),B(4,m(V.WrappersConfigService))],Uk);var Wk=Uk,Gk=class extends Q{};Gk=U([Y({model:af}),g(),h()],Gk);var Kk=Gk,qk=e(u()),Jk=(e,t)=>{let r=Xe(e,t);for(let e of t)if(e.split(`.`).length>1){let t=oe(e.split(`.`)).join(`.`),i=n(r,t);Array.isArray(i)&&We(r,t,i.filter(e=>!!e))}return r},Yk=class{constructor(e){this.em=e}build(e,t,n=af){return this.getRepository(n).findEntityByIdOrNull(e)||this.getRepository(n).insertOrUpdateRaw([{id:e,wrapperType:t||`wrapper`}])}getWrapperData(e,t=af){return this.getRepository(t).findEntityByIdOrFail(e)}setParams(e,t,n=af){this.getRepository(n).update([{id:e,params:t}])}patchParams(e,t,n=af){let r=(0,qk.default)(this.getParams(e),t||{});return this.setParams(e,r),r}getParams(e,t=af){return this.getRepository(t).findEntityByIdOrFail(e).params}removeParams(e,t,n=af){let r=this.getParams(e);this.getRepository(n).update([{id:e,params:Jk(r,t)}])}clearParams(e,t=af){this.getRepository(t).update([{id:e,params:{}}])}destroy(e,t=af){this.getRepository(t).update([{id:e,params:{}}])}delete(e,t=af){this.getRepository(t).delete([e])}isExist(e,t=af){return!!this.getRepository(t).findEntityByIdOrNull(e)}getRepository(e){return this.em.getRepository(e)}};Yk=U([g(),B(0,m(V.EntityManager))],Yk);var Xk=Yk,Zk=class{constructor(e,t,n){this.loggerService=e,this.faceterFactory=t,this.get=n,this.faceters={}}getFaceter(e){this.faceters[e.entity]||(this.loggerService.log(`facet`,`Use default faceter for ${e.entity}`,`getFaceter`),this.faceters[e.entity]=this.faceterFactory());let t=this.faceters[e.entity],n=typeof t==`string`?this.get(t):t;return n.setSettings({entityName:e.entity}),n}addService(e){Reflect.getMetadata(Jl.FaceterSettings,e.bindingValue).models.forEach(t=>{this.loggerService.log(`facet`,`Add faceter for model ${t.entity}`),this.loggerService.raw(`facet`,e.id),this.faceters[t.entity]=e.id})}};Zk=U([g(),B(0,m(V.LoggerService)),B(1,m(V.FaceterService)),B(2,m(`GetLocator`))],Zk);var Qk=Zk,$k=class{constructor(e){this.em=e}setSettings(e){this.settings={...this.settings,...e}}patchSettings(e){let{entityName:t}=this.settings;if(!t)throw Error(`Settings must be initialized first`);this.setSettings({entityName:t,...e})}getFacets(){let e=this.settings?.entityName;return this.getFacetRepository().findEntityByIdOrNull(e)||this.getFacetRepository().insert([{id:e,payload:{}}]),this.getFacetRepository().findEntityByIdOrNull(e)}hasFacets(){return!!this.getFacets()}getFacet(e){let t=this.getFacets();if(!t?.payload)return null;let n=t.payload[e];return n!==null&&n>=0?n:null}async fetchFacets(e){let t=await this.getEntityRepository().facetsRequest(this.settings.endpointParams,e);this.mergeFacets(e?Object.fromEntries(e.map(e=>[e,t[e]])):t)}storeFacets(e){if(bd(e))this.getFacetRepository().insertOrUpdateRaw([...this.getFacetRepository().getAllRaw(),{id:this.settings.entityName,payload:e}]);else throw new Us(`Broken contract with backend`)}clearFacets(){this.getFacetRepository().insertOrUpdateRaw([{id:this.settings.entityName,payload:void 0}])}mergeFacets(e){let t=this.getFacets()||{payload:{}};return this.storeFacets({...t.payload,...e})}getFacetRepository(){return this.em.getRepository(vf)}getEntityRepository(){return this.em.getRepositoryByModelNameNew(this.settings.entityName)}};$k=U([g(),B(0,m(V.EntityManager))],$k);var eA=$k,tA=class extends Q{};tA=U([Y({model:vf}),g(),h()],tA);var nA=tA,rA=class{constructor(e,t,n,r){this.preloaderManager=e,this.tableManager=t,this.loggerService=n,this.domainManagerService=r}trigger(e){let t=[];e.forEach(({model:e})=>{let n=this.domainManagerService.getAllDomainWithRelated(e);this.loggerService.log(`cleanUp`,`Gathered models from related`,`table`),this.loggerService.raw(`cleanUp`,n),n.forEac
2h(e=>{this.loggerService.log(`cleanUp`,`With related`,`table`),this.loggerService.raw(`cleanUp`,e);let n=this.preloaderManager.getTablePreloader(e);n.allTablePreloaders(e).forEach(r=>{this.tableManager.hasTable(r.accessoryId)&&!this.tableManager.getTable(r.accessoryId).isActive()&&t.indexOf(e.entity)===-1?(n.deleteTablePreloadersByCondition(r.accessoryId),t.push(e.entity),this.loggerService.log(`cleanUp`,`Clean up for table id ${r.accessoryId}`,`table`)):this.loggerService.log(`cleanUp`,`Abort clean up for table id ${r.accessoryId}`,`table`)})})})}};rA=U([g(),B(0,m(V.PreloaderManager)),B(1,m(V.TableManager)),B(2,m(V.LoggerService)),B(3,m(V.DomainManagerService))],rA);var iA=rA,aA=class{constructor(e,t,n){this.preloaderManager=e,this.loggerService=t,this.baseResolverService=n}async resolve(e){let t=this.baseResolverService.getId(e);if(!t)return this.loggerService.log(`resolver`,`Not found id for ${e.source}`);let n=this.baseResolverService.getDomainService(e.model);if(Hr(n))return e.cache===!1?n.reloadById(t):n.preloadById(t);let r=this.preloaderManager.getPreloader(e.model);return e.cache===!1?r.reloadById(e.model,t):r.preloadById(e.model,t)}isFailed(e){let t=this.baseResolverService.getId(e);return t?this.preloaderManager.getPreloader(e.model).isFailedById(e.model,t):!1}};aA=U([g(),B(0,m(V.PreloaderManager)),B(1,m(V.LoggerService)),B(2,m(V.BaseResolverService))],aA);var oA=aA,sA=class{constructor(e,t){this.loggerService=e,this.bulkService=t,this.bulks={},this.bulks[`*`]=t}addService(e){let t=Reflect.getMetadata(Jl.BulkSettings,e.bindingValue);if(!t)throw Pl().raw(`error`,e),new G(`Please use @BulkSettings decorator`);this.bulks[t.model.entity]=e.id}getService(e){return this.bulks[e.entity]?(this.loggerService.log(`bulk`,`Use bulk for ${e.entity}`,`get`),this.loggerService.raw(`bulk`,this.bulks[e.entity]),this.get(this.bulks[e.entity])):(this.loggerService.log(`bulk`,`Use default bulk for ${e.entity}`,`get`),this.bulks[`*`])}};U([m(`GetLocator`)],sA.prototype,`get`,void 0),sA=U([g(),B(0,m(V.LoggerService)),B(1,m(V.BulkService))],sA);var cA=sA,lA=class{constructor(e,t,n){this.em=e,this.modelSubscriptionService=t,this.baseFilters=n}async bulkDelete(e,t,n=!1,r,i,a,o){let s=this.prepareFiltersForDelete(n,r),c=this.prepareDeleteParams(t,n);await this.em.getRepository(i).bulkDelete(e,s,{...a??{},...c},o),this.notify(i,t,cl.BULK_DELETE)}prepareFiltersForDelete(e,t){return this.prepareFilters([],e,t)}async bulkUpdate(e,t,n=!1,r,i){let a=this.prepareFilters(t,n,r);await this.em.getRepository(i).bulkUpdate(e,t,n,a),this.notify(i,t,cl.BULK_UPDATE)}prepareDeleteParams(e,t=!1){return{ids:e,all:t}}prepareFilters(e,t=!1,n){let r=[...n];return e&&e.length>0&&!t&&(r=r.length>0?r.map(t=>({...t,id:this.baseFilters.toIdFilter(e)})):[{id:this.baseFilters.toIdFilter(e)}]),r}notify(e,t,n){this.modelSubscriptionService.emitByModel(e,{ids:t,eventType:n})}};lA=U([g(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.BaseFilters))],lA);var uA=lA,dA=class{constructor(e,t,n){this.baseWrapperService=e,this.em=t,this.loggerService=n}build(e,t){this.loggerService.log(`partialUI`,`Build wrapper - ${e} with type ${t}`),!this.isExist(e)&&this.baseWrapperService.build(e,t)}open(e){this.loggerService.log(`partialUI`,`Open partial ${e}`,`open`),this.trigger(e,!0)}close(e){this.loggerService.log(`partialUI`,`Close partial ${e}`,`close`),this.trigger(e,!1)}getWrapperData(e){return this.baseWrapperService.getWrapperData(e)}setParams(e,t){this.loggerService.log(`partialUI`,`Set params partial ${e}`,`setParams`),this.loggerService.raw(`partialUI`,t),this.baseWrapperService.setParams(e,t)}patchParams(e,t){return this.loggerService.log(`partialUI`,`Patch params partial ${e}`,`patchParams`),this.loggerService.raw(`partialUI`,t),this.baseWrapperService.patchParams(e,t)}getParams(e){return this.baseWrapperService.getParams(e)}removeParams(e,t){this.loggerService.log(`partialUI`,`Remove params partial ${e}`,`removeParams`),this.baseWrapperService.removeParams(e,t)}clearParams(e){this.loggerService.log(`partialUI`,`Clear params partial ${e}`,`clearParams`),this.baseWrapperService.clearParams(e)}destroy(e){this.loggerService.log(`partialUI`,`Destroy partial ${e}`,`destroy`),this.getRepository().delete([e])}isOpen(e){let t=this.getWrapperData(e);return t&&t.isOpen}isExist(e){let t=this.getRepository().findEntityByIdOrNull(e);return t||this.loggerService.log(`partialUI`,`Non-exists partial ${e}`,`isExists`),!!t}getRepository(){return this.em.getRepository(af)}trigger(e,t){if(!this.isExist(e))throw new vo(`Partial wrapper doesn't exist: ${e}`);this.getRepository().update([{id:e,isOpen:t}])}};dA=U([g(),B(0,m(V.BaseWrapperService)),B(1,m(V.EntityManager)),B(2,m(V.LoggerService))],dA);var fA=dA,pA=class{constructor(e){this.partialUIWrapperService=e}buildGroup(e){this.checkUniqueness(e),this.build(e.name,e.type),e.items.forEac
2h(t=>{this.build(this.getName(e.name,t.name),e.type),t.isInitiallyOpen&&this.openGroup([t.name],e)})}openGroup(e,t){e.forEach(e=>{this.partialUIWrapperService.open(this.getName(t.name,e))})}closeGroup(e,t){e.forEach(e=>{this.partialUIWrapperService.close(this.getName(t.name,e))})}destroyGroup(e){this.partialUIWrapperService.destroy(e.name),e.items.forEach(t=>{this.partialUIWrapperService.destroy(this.getName(e.name,t.name))})}groupAction(e,t){this.openGroup(t.filter(e=>e.isOpen).map(e=>e.name),e),this.closeGroup(t.filter(e=>!e.isOpen).map(e=>e.name),e)}build(e,t){this.partialUIWrapperService.build(e,t)}clearParams(e){this.partialUIWrapperService.clearParams(e)}destroy(e){this.partialUIWrapperService.destroy(e)}getParams(e){return this.partialUIWrapperService.getParams(e)}getWrapperData(e){return this.partialUIWrapperService.getWrapperData(e)}patchParams(e,t){return this.partialUIWrapperService.patchParams(e,t)}removeParams(e,t){return this.partialUIWrapperService.removeParams(e,t)}setParams(e,t){return this.partialUIWrapperService.setParams(e,t)}openedInGroup(e){return e.items.reduce((t,n)=>(t[n.name]=this.partialUIWrapperService.isOpen(this.getName(e.name,n.name)),t),{})}isExistGroup(e){return this.partialUIWrapperService.isExist(e.name)&&e.items.every(t=>this.partialUIWrapperService.isExist(this.getName(e.name,t.name)))}checkUniqueness(e){let t=e.items.reduce((e,t)=>(e[t.name]=t.name,e),{});if(Object.values(t).length!==e.items.length)throw new vo(`Duplicate items in partial ${e.name}`)}getName(e,t){return`${e}.${t}`}};pA=U([g(),B(0,m(V.PartialUIWrapperService))],pA);var mA=pA,hA=class{constructor(e,t,n,r){this.partialUIWrapperService=e,this.em=t,this.newQueryParamsService=n,this.loggerService=r}build(e,t){this.partialUIWrapperService.build(e,t);let n=this.newQueryParamsService.getQueryParams();if(!n.partial||!Array.isArray(n.partial))return;let r=n.partial.find(t=>t.id===e);r&&(this.partialUIWrapperService.patchParams(e,r.params),this.partialUIWrapperService.open(e))}async open(e,t){let n=this.newQueryParamsService.getQueryParams().partial;if(n&&n.length>0&&(n=n.filter(e=>e)),n&&n.filter(t=>t.id===e).length>0)return;let r=n?{partial:[...n,{id:e,params:t}]}:{partial:[{id:e,params:t}]};r.partial=r.partial.filter(e=>e),this.loggerService.log(`partialUI`,`Open query ${e}`,`partialQuery`),this.loggerService.log(`partialUI`,`Query to set`,`partialQuery`),this.loggerService.raw(`partialUI`,r),await this.newQueryParamsService.extendQuery(r,!0),this.trigger(e,!0)}async close(e){let t=this.newQueryParamsService.getQueryParams()?.partial,n=`partial`;if(t){let r=t.findIndex(t=>t?.id===e);n=t.length===1?n:`${n}.${r}`}this.loggerService.log(`partialUI`,`Close query ${e}`,`partialQuery`),this.loggerService.log(`partialUI`,`Query to remove${n}`,`partialQuery`),await this.newQueryParamsService.removeQuery([n],!0),this.trigger(e,!1)}getWrapperData(e){return this.partialUIWrapperService.getWrapperData(e)}setParams(e,t){this.partialUIWrapperService.setParams(e,t)}patchParams(e,t){return this.partialUIWrapperService.patchParams(e,t)}getParams(e){return this.partialUIWrapperService.getParams(e)}removeParams(e,t){this.partialUIWrapperService.removeParams(e,t)}clearParams(e){this.partialUIWrapperService.clearParams(e)}destroy(e){this.partialUIWrapperService.destroy(e)}isOpen(e){let t=this.getWrapperData(e);return t&&t.isOpen}isExist(e){return this.partialUIWrapperService.isExist(e)}getRepository(){return this.em.getRepository(af)}trigger(e,t){this.getRepository().update([{id:e,isOpen:t}])}};hA=U([g(),B(0,m(V.PartialUIWrapperService)),B(1,m(V.EntityManager)),B(2,m(V.NewQueryParamsService)),B(3,m(V.LoggerService))],hA);var gA=hA,_A=class extends mA{constructor(e){super(e),this.partialUIWrapperService=e}};_A=U([g(),h(),B(0,m(V.PartialQueryUIWrapperService))],_A);var vA=_A,yA=class{constructor(e,t,n,r){this.localValidators=new Map,this.parent=null,this.childrens=[],this.config=e,this.field=t,n&&(this.parent=n),r&&(this.localValidators=r),this.hash=Math.random()}setField(e){this.field=e}addItemPrototype(e){this.itemPrototype=e}addChild(e,t){this.childrens=this.childrens.filter(e=>e.id!==t),e.parent=this,e.id=t,this.childrens.push(e)}toObject(){return{name:this.config.name,field:this.field,childrens:this.childrens.map(e=>e.toObject())}}toArray(){return this.flatten(this.childrens)}getLocalValidators(){return this.localValidators}flatten(e){return e.length===0?[]:[...e,...e.reduce((e,t)=>
2(e=[...e,...this.flatten(t.childrens)],e),[])]}},bA=`ARRAY_PROTO_FIELD`,xA=class{constructor(e){this.childrens=[],this.hooks={beforeEach:[],afterEach:[],change:[],discard:[],changeArray:[],removeField:[]},this.config=e,this.hash=Math.random()}addChild(e,t){this.childrens=this.childrens.filter(e=>e.id!==t),e.parent=this,e.id=t,this.childrens.push(e)}toObject(){return{name:this.config.name,childrens:this.childrens.map(e=>e.toObject())}}toArray(){return this.flatten(this.childrens)}flatten(e){return e.length===0?[]:[...e,...e.reduce((e,t)=>(e=[...e,...this.flatten(t.childrens)],e),[])]}},SA=e=>e.join(`.`),CA=`<ROOT>`,wA=class{constructor(e,t,n,r,i){this.logger=e,this.validationRulesBuilderService=t,this.fieldMapper=n,this.baseFormRepository=r,this.baseFieldRepository=i,this.fields={}}init(e){return this.formId=e,this.root=new xA({name:this.getFieldId(CA)}),this.baseFormRepository.insert([{id:e,formState:_f}]),this.log(`init for ${e}`),this.logRaw(this.root),this}array(e,t=``){let n=this.control({...e,modelType:`fieldArray`,validators:e.validators||this.validationRulesBuilderService.createRules().hasSomeValid()},t);return this.log(`array() for ${t}`),this.logRaw(e),this.logRaw(n),this.getArrayModifier(this.toFieldId(t,e.name,``))}group(e,t=``){let n=this.control({...e,modelType:`fieldGroup`,validators:e.validators||this.validationRulesBuilderService.createRules().hasSomeValid()},t);return this.log(`group() for ${t}`),this.logRaw(e),this.logRaw(n),this.groupModifier(this.toFieldId(t,e.name,``))}control(e,t=``){this.checkInit();let n=this.getFieldId(e.name,t),r=this.fieldMapper.getType(e.modelType);this.persist(n,e,r);let i=this.baseFieldRepository.findEntityByIdOrFail(n);return this.fields[n]=new yA(e,i,void 0,e.validators?.getLocalValidators()),this.log(`new ${n}`),this.logRaw(this.fields[n]),t.length===0&&this.getForm().addChild(this.fields[n],n),this.fields[n]}getGroupModifier(e){return this.groupModifier(e)}extendArray(e,t=``){return this.getArrayModifier(this.getNameById(this.getFieldId(e,t))).clone()}removeField(e){return this.removeFieldById(this.getFieldId(e)),this}decreaseArrayIndexInFieldId(e){let t=this.getFieldPath(e),n=t[t.length-1],r=+n;if(Number.isNaN(r))throw new vd(`Can't convert array index to Number. String array index = "${n}"`);return t[t.length-1]=(r-1).toString(),SA(t)}removeItemFromFieldArray(e,t){let n=[],r=!1;return e.forEach(e=>{if(r){let t=this.decreaseArrayIndexInFieldId(e);n.push(t)}else e===t?r=!0:n.push(e)}),n}cloneField(e,t){let n=this.getFieldPath(t),r=n[n.length-1],i=this.baseFieldRepository.findEntityByIdOrNull(e.id)??e,a=i.$toJson();a.id=t,a.name=r;let o=this.fieldMapper.getFieldType(i);return o?this.baseFieldRepository.insert([a],o):this.baseFieldRepository.insert([a]),this.baseFieldRepository.findEntityByIdOrFail(a.id)}updateFieldAfterRemoved(e,t){let n=e.id;this.fields[t]=this.fields[e.id],e.id=t;let r=this.cloneField(e.field,t);e.setField(r),n!==t&&(this.baseFieldRepository.delete([n]),delete this.fields[n])}removeFieldById(e){this.checkInit();let t=this.fields[e];if(this.log(`removeFieldById ${e}`),!t)throw new vd(`Non-exist field ${e}`);this.log(`deepRemove`),this.deepRemove(t),delete this.fields[e],this.triggerHook(`removeField`,t.field,t.field.value);let{parent:n}=t;if(n){if(n instanceof yA&&this.isArrayFieldById(n.field.id)){let t=n.field.id,r=e,i=de(this.baseFieldRepository.findFieldArrayByIdOrFail(t).children),a=this.removeItemFromFieldArray(i,r);this.baseFieldRepository.updateFieldArrayChildren(t,a);let o=[],s=!1;this.fields[t].childrens.forEach(e=>{if(s){let t=this.decreaseArrayIndexInFieldId(e.id);this.updateFieldAfterRemoved(e,t),e.childrens.forEach(e=>{this.updateFieldAfterRemoved(e,SA([t,e.field.name]))}),o.push(e)}else e.id===r?s=!0:o.push(e)}),this.fields[t].childrens=o,this.triggerHook(`changeArray`,n.field,n.field.value),this.log(`Actualize parent array`)}else if(n instanceof yA)this.removeGroupItem(n.field.id,e),this.log(`Actualize parent group`);else{let t=this.getForm();t.childrens=t.childrens.filter(t=>t.id!==e)}this.logRaw(n)}return this.logRaw(this.root),this}reorderArrayItems(e){let t=this.fields[e[0]];if(!t.parent)throw new vd(`Can't reorder non array field`);if(t.parent instanceof xA)throw new vd(`Can't reorder field if parent instanceof RootBaseForm`);let n=t.parent.field.id;return this.fields[n].childrens=e.map(e=>this.fields[e]),this.baseFieldRepository.updateFieldArrayChildren(n,e),this}hasField(e){return this.checkInit(),!!this.fields[e]}hasFieldByName(e){return this.hasField(this.getFieldId(e))}hasErrorField(e,t){return this.checkInit(),this.hasField(e)?!0:!!this.getErrorFieldNameOrNull(t)}getFieldById(e){this.checkInit();let t=this.fields[e];if(!t)throw new Dc(`No field with id ${e}`);return t.field=this.baseFieldRepository.findEntityByIdOrFail(e),t}getErrorFieldName(e){return this.getErrorFieldNameOrNull(e)??e}getFormId(){return this.formId}getForm(){if(this.root)return this.root;throw new vd(`Form is not init`)}getField(e){return this.getFieldById(this.getFieldId(e))}destroy(){this.log(`destroy`,this.getFormId()),this.root=null,this.fields={}}isInit(){return this.baseFormRepository.query().where(`id`,this.formId).exists()&&!!this.root}
2triggerHook(e,t,n){this.getHook(e).forEach(e=>e(t,n))}buildByData(e,t=``){for(let n in e){let r=this.getFieldId(n,t);if(this.hasField(r)){let{field:i}=this.getFieldById(r);if(i instanceof zf)this.buildByData(e[n],this.getNameById(i.id));else if(i instanceof Of&&ht(e[n])){let r=e[n].length-i.children.length;for(this.triggerHook(`changeArray`,i,[]);r>0;)this.extendArray(i.name,t),--r}}}}isArrayField(e){return e.field instanceof Of}isGroupField(e){return e.field instanceof zf}isArrayFieldById(e){return this.getFieldById(e).field instanceof Of}setHook(e,t){if(!this.root)throw new Sd(`Please init form`);return this.root.hooks[e].push(t),this}getHook(e){if(!this.root)throw new Sd(`Please init form`);return this.root.hooks[e]}getNameById(e){return e.replace(`${this.getFormId()}.`,``)}getFieldId(e,t=``){return this.toFieldId(t,e,this.getFormId())}getFieldPath(e){return e.split(`.`)}getArrayModifier(e){let t=this.fields[this.getFieldId(e)];return{initGroup:(n={})=>{this.log(`initGroup`);let r=this.group({...n,name:bA},e);return t.addItemPrototype(r.instance),r},initArray:n=>{this.log(`initArray`);let r=this.array({...n,name:bA},e);return t.addItemPrototype(r.instance),r},initControl:n=>{this.log(`initControl`);let r={...n,name:bA},i=this.control(r,e);return t.addItemPrototype(i),i},clone:()=>{if(!this.isArrayField(t))throw new vd(`Trying clone non-array field`);this.log(`clone`);let n=t.itemPrototype;if(!n)throw new vd(`Nothing to clone`);let r=this.deepClone(n,e,this.getNextIndex(t));return this.newArrayItem(t,r),r},instance:t}}createField(e,t,n,r){let i={name:e,...n,fieldType:t};return r?this.getGroupModifier(this.getNameById(r.field.id)).addControl(i).instance:this.control(i,``)}getInvalidFieldNames(){this.checkInit();let e=Object.keys(this.fields);return this.baseFieldRepository.getRaws(e).filter(({invalid:e})=>e).map(({id:e})=>this.getNameById(e))}getFieldRaws(){let e=Object.keys(this.fields);return this.baseFieldRepository.getRaws(e)}toSubtreeConfigByPath(e){if(e=e.filter(e=>e),e.length===0)throw new vd(`Empty path`);let t=e.shift();return{...this.getField(t).config,fields:e.length>0?[this.toSubtreeConfigByPath(e)]:[]}}unpersist(e){this.log(`unpersist ${e}`),this.baseFieldRepository.delete([this.getFieldId(e,``)])}persist(e,t,n){this.log(`persist ${e}`),this.baseFieldRepository.insert([{id:e,formId:this.getFormId(),name:t.name,value:t.value,initialValue:t.value,validators:t.validators?t.validators.getRules():[],validationMode:t.validationMode||tf.eager,options:`options`in t&&t.options?t.options():[],fieldType:t.fieldType,crossField:t.crossField??[],serverErrorFields:t.serverErrorFields??[],errorCustomMessage:t.errorCustomMessage?t.errorCustomMessage:``}],n)}toFieldId(e,t,n=``){return[n,e,t].filter(e=>e.length>0).join(`.`)}deepClone(e,t,n){if(this.log(`deepClone for ${t} and index = ${n}`),this.logRaw(e),e.field instanceof zf||e.field instanceof Of){if(n===void 0)throw new vd(`No index to clone nested array`);let r=this.control({...e.config,name:n.toString()},t);return e.childrens.forEach(e=>{let i=this.toFieldId(t,n.toString()),a=this.toFieldId(i,e.config.name,this.getFormId()),o=this.deepClone(e,i);r.addChild(o,a)}),r}return this.control(n===void 0?e.config:{...e.config,name:n.toString()},t)}deepRemove(e){e.field instanceof zf?(this.log(`deepRemove group ${e.field.id}`),e.childrens.forEach(e=>{this.deepRemove(e)}),e.childrens=[],this.baseFieldRepository.delete([e.field.id])):(delete this.fields[e.field.id],this.baseFieldRepository.delete([e.field.id]))}groupModifier(e){let t=this.fields[this.getFieldId(e)];if(!t)throw new vd(`Non-exist field: ${e}`);if(!t.config.modelType||t.config.modelType&&![`fieldGroup`,`fieldArray`].includes(t.config.modelType))throw new vd(`Control is not modifiable`);return this.groupChainBuilder(e,t)}groupChainBuilder(e,t){return{addControl:n=>{this.log(`Add control`),this.logRaw(n);let r=this.control(n,e);return t.addChild(r,this.getFieldId(r.config.name,e)),this.groupChainBuilder(e,t)},addGroup:n=>{this.log(`Add group`),this.logRaw(n);let r=this.group(n,e);return t.addChild(r.instance,this.getFieldId(r.instance.config.name,e)),this.groupModifier(this.toFieldId(e,n.name,``))},addArray:n=>{this.log(`Add array`),this.logRaw(n);let r=this.array(n,e);return t.addChild(r.instance,this.getFieldId(r.instance.config.name,e)),this.getArrayModifier(this.toFieldId(e,n.name,``))},instance:t}}newArrayItem(e,t){let n=this.baseFieldRepository.findFieldArrayByIdOrFail(e.field.id),r=de(n.children);r.push(t.field.id),this.baseFieldRepository.updateFieldArrayChildren(e.field.id,r),e.addChild(t,t.field.id),this.log(`newArrayItem`)}removeGroupItem(e,t){this.fields[e].childrens=this.fields[e].childrens.filter(e=>e.id!==t)}checkInit(){if(!this.isInit())throw new td(`Not init form for ${this.getFormId()}`)}log(e,t){this.logger.log(`formBuilder`,e,t||``)}logRaw(e){this.logger.raw(`formBuilder`,e)}
2getNextIndex(e){if(!this.isArrayFieldById(e.field.id))throw new vd(`Cannot get new index for non-array field`);let t=e.field.children.map(e=>parseInt(this.getFieldById(e).field.name,10));return t.length?Math.max(...t)+1:0}getErrorFieldNameOrNull(e){return Object.entries(this.fields).find(t=>t[1].config.serverErrorFields?.includes(e))?.[1].config.name||null}};wA=U([g(),B(0,m(V.LoggerService)),B(1,m(V.ValidationRulesBuilderService)),B(2,m(V.FieldMapper)),B(3,m(V.BaseFormRepository)),B(4,m(V.BaseFieldRepository))],wA);var TA=wA,EA=class{constructor(e,t){this.get=e,this.formFactoryManager=t,this.formServices=new Set}addService(e){this.formServices.add(e.id)}getForm(e){if(this.formFactoryManager.hasForm(e))return this.formFactoryManager.getForm(e);if(!this.formServices.has(e))throw new Sd(`Not exist form ${e}`);return this.get(e)}};EA=U([g(),B(0,m(`GetLocator`)),B(1,m(V.FormFactoryManager))],EA);var DA=EA,OA=class{constructor(e,t){this.formManager=e,this.attachmentFileService=t}getAttachedFiles(e,t){let n=this.getForm(e);return this.getFileIdsArrayField(e,t).field.children.reduce((e,t)=>{let r=n.getFieldValueSafe(n.getNameById(t)),i=this.attachmentFileService.findEntityByIdOrNull(r);return i&&e.push({relatedId:t,file:i}),e},[])}removeFileId(e,t){this.getForm(e).removeFieldById(t)}addFileId(e,t,n){let r=this.getForm(e),i=this.getFileIdsArrayField(e,t),a=r.extendArray(i.field.name);r.setFieldValueById(a.field.id,n)}getFileIdsArrayField(e,t){let n=this.getForm(e),r=n.getField(t);if(!n.isArrayField(r))throw new Sd(`"${e}.${t}" field is not an array`);return r}getForm(e){return this.formManager.getForm(e)}};OA=U([g(),B(0,m(V.FormManager)),B(1,m(V.AttachmentFileService))],OA);var kA=OA,AA=e=>{let t=e.payload;return!t||typeof t!=`object`?!1:t.ignoreOnSubmit===!0},jA={valid:!1,invalid:!1,changed:!1,touched:!1,untouched:!0,pristine:!0,dirty:!1,pending:!1,required:!1,validated:!1,passed:!1,failed:!1},MA={...jA,errors:[],serverErrors:[],subfieldServerErrors:{},hasSomeValid:!1,hasEveryValid:!0},NA=class{constructor(e,t,n,r,i,a,o,s){this.validationService=e,this.subscriptionService=t,this.validationRulesBuilderService=n,this.loggerService=r,this.formManager=i,this.monitoringService=a,this.baseFormRepository=o,this.baseFieldRepository=s,this.validationErrorsSuccessHandlersMap=[],this.actionsMap={input(e){return{dirty:!0,pristine:!1,changed:e.initialValue!==e.value}},focus(e){return{untouched:!1}},blur(e){return{touched:!0}}},this.replaceIndex=(e,t)=>e.map(e=>({...e,name:e.name.replace(/\{index\}/g,String(t.parentIndex))}))}async onInputAction(e,t,n){this.loggerService.log(`formValidation`,`Start; fieldName=${e}, actionType=${t}`,`onInputAction`);let r=this.formManager.getForm(n),i=this.getFormField(r,e,t);if(!i)return;let a=this.actionsMap[t](i);if(t===`input`){let e={touched:!0,untouched:!1,pristine:!1};this.updateField([{id:i.id,...a}]),this.updateForm({id:n,...e})}if(this.shouldValidate(i,t)&&(this.loggerService.log(`formValidation`,`Field ${e} should validate`,`onInputAction`),await this.validate({id:e,formId:n,validationInitiator:`field`})),i.crossField.length){this.loggerService.log(`formValidation`,`Field ${e} has crossField`,`onInputAction`);for(let e of i.crossField)await this.validate({id:r.getBuilder().getFieldId(e,``),formId:n,validationInitiator:`crossField`})}this.loggerService.log(`formValidation`,`Finish; fieldName=${e}, actionType=${t}`,`onInputAction`),this.updateField([{id:i.id,...a}])}shouldValidate(e,t){let{validationMode:n}=e,r=t===`blur`,i=t===`input`;if(n===`aggressive`)return!0;if(n===`lazy`)return r;if(n===`eager`){if(!e.validated)return r;if(e.invalid)return r||i;if(e.valid)return r}return n===`onSubmit`&&e.invalid&&i}async validateByName({name:e,...t}){let{field:n}=this.formManager.getForm(t.formId).getField(e);return this.validate({...t,id:n.id})}async validate({id:e,formId:t,shouldValidateChild:n=!0,formData:r,shouldSyncFormValidation:i=!0,validationInitiator:a}){this.loggerService.log(`formValidation`,`Start; fieldName=${e}`,`validate`);let o=this.formManager.getForm(t),s=r??o.getFormData(`object`),c=o.getFieldById(e),{field:l}=c,u=c.getLocalValidators(),d=this.isFieldGroup(e,t);
2if(!l.validators&&!d)return this.loggerService.log(`formValidation`,`field ${e} is not a group and has no validators`,`validate`),this.loggerService.log(`formValidation`,`Finish, name=${e}, valid=true`,`validate`),!0;if(d&&n)return this.validateGroup({id:e,formId:t,formData:s,shouldSyncFormValidation:i,validationInitiator:a});this.updateField([{id:l.id,pending:!0}]);let{validator:f,values:p}=this.getValidationValues(l,t,e),ee=d?l:l.value;this.loggerService.log(`formValidation`,`validationService.validate result: fieldName=${e}, validator=${f.toString()}`,`validate`),this.loggerService.raw(`formValidation`,ee);let{valid:te,errors:ne,rulesResults:re}=await this.validationService.validate({value:ee,validators:f,formValues:s,crossFieldValues:p,localValidators:u,validationInitiator:a});this.loggerService.log(`formValidation`,`validationService.validate result: fieldName=${e}, valid=${te}`,`validate`);let ie=ne.some(e=>!AA(e)),ae=a===`submit`;!te&&(ie||!ae)&&this.emitValidationFailed(t,{name:o.getNameById(l.id),errors:ne,initiator:a}),this.updateField([{id:l.id,pending:!1,validated:!0,valid:te,invalid:!te,passed:te,failed:!te,errors:ne,serverErrors:[],subfieldServerErrors:{},validationRulesResults:re}]),i&&this.syncFormValidation(t);let oe=ae?!ie:te;return this.loggerService.log(`formValidation`,`Finish, name=${e}, valid=${te}, blockingValid=${oe}`,`validate`),oe}async validateGroup({id:e,formId:t,formData:n,shouldSyncFormValidation:r=!0,validationInitiator:i}){let a=this.formManager.getForm(t).getFieldById(e);return this.groupValidator(t,a,n,r,i)}async groupValidator(e,t,n,r=!0,i){let a={id:t.field.id,hasSomeValid:!1,hasEveryValid:!0},o=await Promise.all(t.childrens.map(t=>{let{id:a}=t.field;return this.isFieldGroup(a,e)?this.groupValidator(e,t,n,r,i):this.validate({id:a,formId:e,formData:n,shouldSyncFormValidation:r,validationInitiator:i})}));return o.length||(a.hasSomeValid=!0),o.forEach(e=>{e?a.hasSomeValid=!0:a.hasEveryValid=!1}),this.updateField([a]),this.validate({id:t.field.id,formId:e,shouldValidateChild:!1,formData:n,shouldSyncFormValidation:r,validationInitiator:i})}async validateForm(e,t=`form`){this.resetFormValidator(e);let n=this.formManager.getForm(e),r=n.getForm().toArray(),i=this.formManager.getForm(e).getFormData(`object`);this.updateForm({id:e,pending:!0,valid:!0,invalid:!1});let a=!0;return(await Promise.all(r.map(n=>{let{id:r}=n.field;return this.isFieldGroup(r,e)?this.groupValidator(e,n,i,!1,t):this.validate({id:r,formId:e,formData:i,shouldSyncFormValidation:!1,validationInitiator:t})}))).some(e=>!e)&&(a=!1),this.updateForm({id:e,pending:!1,validated:!0,valid:a,invalid:!a,passed:a,failed:!a}),a||n.triggerFormEventCallback(),a}isValidForm(e){return!this.formManager.getForm(e).getForm().toArray().some(e=>e.field.invalid)}setServerErrors(e,t){if(this.initSuccessHandlers(),e.errors&&e.errors.fields){if(this.setErrors({...e.errors,fields:e.errors.fields},t),!this.isFullyHandled())throw new Ml(`Form contains invalid fields`,e)}else e.errors&&e.errors.common?e.errors.common.forEach(e=>{this.setFormErrorMessage(e,t)}):e.message&&this.setFormErrorMessage(e.message,t)}setFormErrorMessage(e,t){this.formManager.getForm(t).setFormErrorMessage(e)}setErrors(e,t,n=[]){let r=!Array.isArray(e)&&typeof e!=`string`,i=this.formManager.getForm(t);if(r){Object.entries(e.fields).forEach(([a,o])=>{let s=i.getErrorFieldName(a),c=[t,...n,a].join(`.`);i.hasErrorField(c,a)?this.setErrors(o,t,[...n,s]):(r&&this.monitoringService.logInfo(`No supported field for form ${t} by server error response ${JSON.stringify(e)}`,Ba.ERROR),typeof e==`string`&&this.monitoringService.logInfo(`No supported field for form ${t} by server error response ${e}`,Ba.ERROR),this.addSuccessHandler(!1))});return}this.setError(e,t,n,`server`)}setError(e,t,n,r){let i=this.calcErrorsList(e),a=this.calcSubfieldServerErrors(e);this.setServerError(i,a,t,n,r)}setServerError(e,t,n,r,i){let a=this.formManager.getForm(n),o=r.join(`.`),s=[n,...r].join(`.`);a.triggerServerErrorHandler(o,e);let c=[{id:s,valid:!1,invalid:!0,serverErrors:e,subfieldServerErrors:t}];this.updateField(c),this.emitValidationFailed(n,{errors:e,name:a.getNameById(s),initiator:i})}makeRequired(e,t){let n=this.getFieldByName(e,t);this.baseFieldRepository.update([{id:n.id,validators:this.validationRulesBuilderService.createRules(n.validators).required().getRules()}])}makeOptional(e,t,n=!1){let r=this.formManager.getForm(e),i=r.getField(t),{field:a}=i;this.baseFieldRepository.update([{id:a.id,validators:this.validationRulesBuilderService.createRules(a.validators).optional().getRules()}]),this.resetFieldValidator(e,t),n&&r.isGroupField(i)&&i.childrens.forEach(t=>this.makeOptional(e,r.getNameById(t.field.id),n))}changeValidationMode(e,t,n){let{field:r}=this.formManager.getForm(e).getField(t);
2this.baseFieldRepository.update([{id:r.id,validationMode:n}])}makeAggresiveMode(e,t){this.changeValidationMode(e,t,tf.aggressive)}getValidationFailedEventName(e){return`/field-validation-failed/${e}`}emitValidationFailed(e,t){this.loggerService.log(`formValidation`,`fieldName: ${t.name}, errors: ${JSON.stringify(t.errors)}`,`emitValidationFailed`),this.subscriptionService.emit(this.getValidationFailedEventName(e),t)}subscribeToValidationFailed(e,t){return this.subscriptionService.subscribe(this.getValidationFailedEventName(e),t)}unsubscribeFromValidationFailed(e){this.subscriptionService.unsubscribe(e)}resetFormValidator(e){let t=this.formManager.getForm(e),n=t.getChangeset(MA);return this.updateForm({id:t.getFormId(),...jA}),this.baseFieldRepository.update(n)}resetFieldValidator(e,t){let n=this.formManager.getForm(e).getFieldChangeset(MA,t);this.baseFieldRepository.update([n])}getFirstError(e,t){let n=this.formManager.getForm(t).getFieldById(e);if(this.isFieldGroup(e,t))for(let e of n.childrens){let{errors:t}=e.field;if(t.length>0)return t[0]}let{errors:r}=n.field;return r.length>0?r[0]:null}getValidationValues(e,t,n){if(!e.validators)throw new gl(`Empty validators`);let r={},i=this.replaceIndex(e.validators,e);i.forEach(e=>{let n=e.name.match(/@[\w.]+/gi);if(n&&n.length){let e=this.formManager.getForm(t);n.forEach(t=>{let n=t.substring(1);r[n]=e.getFieldDataByName(n)})}});let a=Object.keys(r);return a.length&&this.updateField([{id:e.id,crossField:ct([...this.getField(t,n).crossField,...a])}]),{validator:i,values:r}}isFieldGroup(e,t){let n=this.formManager.getForm(t).getFieldById(e).config,r=n.modelType?n.modelType:`field`;return r===`fieldGroup`||r===`fieldArray`}getField(e,t){return this.formManager.getForm(e).getFieldById(t).field}getFieldByName(e,t){return this.formManager.getForm(e).getField(t).field}updateField(e){return this.baseFieldRepository.update(e)}updateForm(e){let t=this.baseFormRepository.findEntityByIdOrNull(e.id);if(!(t&&l(t,e)))return this.baseFormRepository.update([e])}initSuccessHandlers(){this.validationErrorsSuccessHandlersMap=[]}isFullyHandled(){return this.validationErrorsSuccessHandlersMap.find(e=>!e)===void 0}addSuccessHandler(e){this.validationErrorsSuccessHandlersMap.push(e)}syncFormValidation(e){let t=this.baseFieldRepository.getFieldsByForm(e).every(({id:e,valid:t})=>t||e.includes(`.ARRAY_PROTO_FIELD`));this.updateForm({id:e,valid:t,invalid:!t})}calcErrorsList(e){return Array.isArray(e)?e:typeof e==`string`?[e]:[]}calcSubfieldServerErrors(e){return Array.isArray(e)||typeof e==`string`||e.fields.fields?{}:e.fields}getFormField(e,t,n){try{let{field:n}=e.getFieldById(t);return n}catch(e){if(n===`blur`)return;throw e}}};NA=U([g(),B(0,m(V.ValidationService)),B(1,m(V.SubscriptionService)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.FormManager)),B(5,m(V.MonitoringService)),B(6,m(V.BaseFormRepository)),B(7,m(V.BaseFieldRepository))],NA);var PA=NA,FA=class{static map(){return{field:wf,fieldArray:Of,fieldGroup:zf,fieldMultiEntity:Tf}}static getType(e){return e?this.map()[e]:this.map().field}static getFieldType(e){return e instanceof wf?wf:e instanceof Of?Of:e instanceof zf?zf:e instanceof Tf?Tf:null}};FA=U([g()],FA);var IA=class extends Q{};IA=U([Y({model:Af}),g(),h()],IA);var LA=IA,RA=class{constructor(e,t){this.entityManager=e,this.autocompleteKeyBuilder=t}async autocomplete(e,t,n,r,i=1,a=[],o,s,c){let l=this.getDomainRepository(e),u=!t&&i===1,d=this.autocompleteKeyBuilder.autocompleteFiltersKey(a);if(u&&this.isPreloaded(e,i,a))return this.getPreloadedAutocompleteResult(e,i,d);try{let{items:f,pagination:p}=await l.autocompleteRequest(t,n,r,i,a,o,s,c);await l.insertOrUpdate(f);let ee=p?.pageCount||1;return u&&await this.savePreloadedResult(e,i,d,f,ee),{items:f,pageCount:ee}}catch(t){throw this.markAsFailed(e,i,d),t}}isPreloaded(e,t,n=[]){let r=this.findPreloader(e,t,this.autocompleteKeyBuilder.autocompleteFiltersKey(n));return!!(r&&r.isPreloaded&&r.preloaderType===Mo.PRELOADERS_AUTOCOMPLETE)}cleanUp(e){this.getPageMapPreloadRepository().cleanUp(Mo.PRELOADERS_AUTOCOMPLETE,e.entity),this.getAutocompleteRepository().deleteByCondition(t=>this.autocompleteKeyBuilder.entityFromAutocompleteKey(t.id)===e.entity)}async savePreloadedResult(e,t,n,r,i){await this.getDomainRepository(e).insertOrUpd
2ate(r),await this.getAutocompleteRepository().insertOrUpdate([{id:this.autocompleteKeyBuilder.autocompleteKey(e,n),allPagesCount:i}]),this.getPageMapPreloadRepository().updatePreload({model:e,key:this.autocompleteKeyBuilder.pageMapKey(e,t,n),pageKey:String(t),accessoryId:e.entity,ids:r.map(({id:e})=>e),updatedAt:new Date().toISOString(),preloaderType:Mo.PRELOADERS_AUTOCOMPLETE})}markAsFailed(e,t,n){this.getPageMapPreloadRepository().markAsFailed({model:e,key:this.autocompleteKeyBuilder.pageMapKey(e,t,n),pageKey:String(t),accessoryId:e.entity,updatedAt:new Date().toISOString(),preloaderType:Mo.PRELOADERS_AUTOCOMPLETE})}getPreloadedAutocompleteResult(e,t,n){let r=this.findPreloader(e,t,n).map;return{items:this.getDomainRepository(e).findIn(r,[`${e.entity}.*`]),pageCount:this.findAutocomplete(e,n).allPagesCount}}findPreloader(e,t,n){let r=this.autocompleteKeyBuilder.pageMapKey(e,t,n);return this.getPageMapPreloadRepository().findEntityByIdOrFail(r)}findAutocomplete(e,t){let n=this.autocompleteKeyBuilder.autocompleteKey(e,t);return this.getAutocompleteRepository().findEntityByIdOrFail(n)}getPageMapPreloadRepository(){return this.entityManager.getRepository(Lf)}getAutocompleteRepository(){return this.entityManager.getRepository(Af)}getDomainRepository(e){return this.entityManager.getRepository(e)}};RA=U([g(),B(0,m(V.EntityManager)),B(1,m(V.AutocompleteKeyBuilder))],RA);var zA=RA,BA=class{constructor(e){this.preloaderManager=e}trigger(e){e.forEach(({model:e})=>{this.preloaderManager.getAutocompletePreloader(e).cleanUp(e)})}};BA=U([g(),B(0,m(V.PreloaderManager))],BA);var VA=BA,HA=function(e){let t=0,n,r;if(e.length===0)return t;for(n=0;n<e.length;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t|=0;return t},UA=class{pageMapKey(e,t,n){return[`autocomplete`,e.entity,n,t].filter(Boolean).join(`-`)}autocompleteKey(e,t){return[e.entity,t].filter(Boolean).join(`-`)}entityFromAutocompleteKey(e){return e.split(`-`)[0]}autocompleteFiltersKey(e){return e.length?String(HA(JSON.stringify(e))):``}};UA=U([g()],UA);var WA=e=>Oo().htmlToRichEditorJSON(e),GA=e=>Oo().richEditorJsonToHTML(e),KA=e=>Oo().richEditorJsonToText(e),qA=e=>Oo().htmlToText(e),JA=class{constructor(e,t,n){this.validationService=e,this.formValidationService=t,this.formManager=n}register(e){e(`someOfValidators`,async(e,t,n)=>{let r=!1;for(let i of t){let{valid:t}=await this.validationService.validate({value:e,validators:[{name:i}],formValues:n});if(t){r=!0;break}}return r}),e(`hasSomeValid`,e=>e.hasSomeValid?!0:{message:{path:`commonValidationRegistrator.hasSomeValid`}}),e(`hasEveryValid`,(e,t,n,r)=>{if(e.hasEveryValid)return!0;if(r&&r.showFirstMessageFromNested){let t=this.formValidationService.getFirstError(e.id,e.formId);if(t)return t}return{message:{path:`commonValidationRegistrator.hasEveryValid`}}}),e(`notOverlapWithFields`,(e,[t])=>{if(pe(e))return!e||!t.includes(e);let n=this.formManager.getForm(e.formId).getFieldDataById(e.id),r=p(n,t);return r.length===0||{message:{path:`specialValidationRegistrator.overlaps`,params:{overlaps:r.join(`, `)}}}}),e(`isUniqueInArray`,(e,[t])=>!e||t.indexOf(e)===t.lastIndexOf(e)||{message:{path:`specialValidationRegistrator.unique`}}),e(`richEditorRequired`,e=>AO(KA(e)))}};JA=U([g(),B(0,m(V.ValidationService)),B(1,m(V.FormValidationService)),B(2,m(V.FormManager))],JA);var YA=JA,XA=class{constructor(e){this.loggerService=e,this.loggerChannel=`filters`,this.services=new Map,this.managerId=`FilterServiceManager`}getAllFilterServicesForServiceId(e){return this.getAllFilterServiceIdsByServiceId(e).map(e=>this.services.get(e))}getFilterServiceForServiceId(e,t){let n=this.getFilterServiceId(e,t);if(this.services.has(n))return this.log(`Service "${n}" exists. Returning its instance.`,`getFilterServiceForServiceId`),this.services.get(n);throw this.log(`Service "${n}" does not exists`,`getFilterServiceForServiceId`),new ad(`Service "${n}" does not exists`)}getFilterServiceForServiceIdOrNull(e,t){try{return this.getFilterServiceForServiceId(e,t)}catch(e){if(e instanceof ad)return null;throw e}}getFirstFilterServiceForServiceId(e){let t=this.getAllFilterServiceIdsByServiceId(e);if(!t.length)throw new ad(`No filter services for service "${e}"`);
2if(!this.services.has(t[0]))throw new ad(`Service "${t[0]}" does not exists`);return this.services.get(t[0])}getFilterServiceById(e){if(!this.services.has(e))throw new ad(`Service "${e}" does not exists`);return this.services.get(e)}resetAllFilterServicesForServiceId(e,t=[]){this.getAllFilterServicesForServiceId(e).forEach(e=>{e.reset(t)})}addFilterServiceForServiceId(e,t){this.log(`Add new service "${e}"`,`addServiceForServiceId`);let n=t(),r=this.getNextFilterServiceIndexByServiceId(e),i=this.getFilterServiceId(e,r);return n.setId(i),this.services.set(i,n),n.initForm(),n.resetAllFilterVisibility(),{serviceId:i,instance:n}}removeFilterServiceForServiceId(e,t){let n=this.getFilterServiceId(e,t);this.log(`Removing "${n}" filter service`,`removeFilterServiceForServiceId`);let r=this.getFilterServiceForServiceIdOrNull(e,t);r&&(r.getForm().destroy(),r.destroy()),this.services.delete(n)}removeAllFilterServicesForServiceId(e){this.log(`Removing filter services for service "${e}"`,`removeAllFilterServicesForServiceId`),this.getAllFilterServiceIdsByServiceId(e).forEach(e=>{let t=this.services.get(e);t&&(t.getForm().destroy(),t.destroy()),this.services.delete(e)})}removeFirstFilterServiceForServiceId(e){this.log(`Removing first filter service for service "${e}"`,`removeFirstFilterServiceForServiceId`);let t=this.getAllFilterServiceIdsByServiceId(e);if(!t.length)throw new ad(`No filter services for service "${e}"`);let n=this.services.get(t[0]);n&&(n.getForm().destroy(),n.destroy()),this.services.delete(t[0])}hasFilterServicesForServiceId(e){return this.getAllFilterServiceIdsByServiceId(e).length>0}hasFilterServiceForServiceId(e,t){return this.services.has(this.getFilterServiceId(e,t))}cleanup(){this.log(`Cleanup`,`cleanup`),this.services.forEach(e=>{e.getForm().destroy(),e.destroy()}),this.services.clear()}parseFilterServiceId(e){let[,t,n]=e.split(`.`);return{serviceId:t,index:Number(n)}}getQuery(e,t=!0){return this.getAllFilterServicesForServiceId(e).map(e=>e.toQuery(t)).filter(e=>Object.keys(e).length)}populateFromUrl(e,t,n,r=[],i=!1){this.log(`Populate "${e}" with following params: ${JSON.stringify(n)}`);let a=Object.keys(this.getAllFilterServicesForServiceId(e));for(let t=a.length;t>n.length;t--){let n=String(t-1);this.removeFilterServiceForServiceId(e,n)}n.forEach((n,o)=>{(a[o]?this.getFilterServiceForServiceId(e,a[o]):this.addFilterServiceForServiceId(e,t).instance).populateFromUrl(n,r,i)})}getNextFilterServiceIndexByServiceId(e){let t=this.getAllFilterServiceIdsByServiceId(e);if(t.length){let e=t[t.length-1],{index:n}=this.parseFilterServiceId(e);return String(n+1)}return`0`}getAllFilterServiceIdsByServiceId(e){return Array.from(this.services.keys()).filter(t=>t.startsWith(`${this.managerId}.${e}.`))}getFilterServiceId(e,t){return`${this.managerId}.${e}.${t}`}log(e,t){let n=t?`manager:${t}`:`manager`;this.loggerService.shouldLogByChannel(this.loggerChannel,[n])&&this.loggerService.log(this.loggerChannel,e,n)}};XA=U([g(),B(0,m(V.LoggerService))],XA);var ZA=class{constructor(e,t){this.loggerService=e,this.filterServiceManager=t,this.factories=new Set,this.tableFactories=new Map}registerFactory(e,t){}setEndpointForTable(e,t){throw new vu}getEndpointForTable(e){throw new vu}setFactoryForTable(e,t){if(this.hasFactoryForTable(e))return this.log(`Using existing service factory "${t}" for table "${e}"`,`setFactoryForTable`),this.getFactoryForTable(e);if(!this.validateFactory(t))throw new Ps(`The service "${t}" you've provided is not a valid factory`,{tableId:e});return this.tableFactories.set(e,t),this.log(`Set table "${e}" service factory to "${t}"`,`setFactoryForTable`),this.getFactoryForTable(e)}hasFactoryForTable(e){return this.tableFactories.has(e)}getFactoryForTable(e){try{let t=this.tableFactories.get(e);if(!t)throw new Td(`No factory "${t}" is registered`,{tableId:e});let n=this.getFactoryByServiceId(t);if(!n)throw new Td(`Service factory for table must be set before getting it`,{tableId:e});return n}catch(t){throw t instanceof Td?new Ql(`No factory is set for "${e}" table`):t}}validateFactory(e){return this.factories.has(e)}addService(e){this.factories.add(e.id)}removeAllServicesForTable(e){this.filterServiceManager.removeAllFilterServicesForServiceId(e)}removeFirstServiceForTable(e){this.filterServiceManager.removeFirstFilterServiceForServiceId(e)}getFirstServiceForTable(e){return this.filterServiceManager.getFirstFilterServiceForServiceId(e)}addServiceForTable(e){let{serviceId:t,instance:n}=this.filterServiceManager.addFilterServiceForServiceId(e,this.getFactoryForTable(e));return{serviceId:t,instance:n}}resetFiltersForTable(e,t=[]){return this.filterServiceManager.resetAllFilterServicesForServiceId(e,t)}getQueryForTable(e,t=!0){return this.filterServiceManager.getQuery(e,t)}getServiceForTable(e,t){return this.filterServiceManager.getFilterServiceForServiceId(e,t)}getServicesForTable(e){return Object.fromEntries(this.filterServiceManager.getAllFilterServicesForServiceId(e).map(e=>{let{index:t}=this.filterServiceManager.parseFilterServiceId(e.getServiceId());return[t,e]}))}hasServicesForTable(e){return this.filterServiceManager.hasFilterServicesForServiceId(e)}hasServiceForTable(e,t){return this.filterServiceManager.hasFilterServiceForServiceId(e,t)}removeServiceForTable(e,t){return this.filterServiceManager.removeFilterServiceForServiceId(e,t)}getServiceByServiceId(e){return this.filterServiceManager.getFilterServiceById(e)}populateFromUrl(e,t,n=[],r=!1){this.log(`Populate "${e}" with following params: ${JSON.stringify(t)}`),this.hasFactoryForTable(e)&&this.filterServiceManager.populateFromUrl(e,this.getFactoryForTable(e),t,n,r)}getAppliedFiltersForTable(e){return Array.prototype.concat(...Object.values(this.getServicesForTable(e)).map(e=>e.getAppliedFilters()))}cleanup(){this.tableFactories=new Map,this.filterServiceManager.cleanup()}getFactoryByServiceId(e){return this.get(e)}log(e,t){let n=t?`manager:${t}`:`manager`;
2this.loggerService.shouldLogByChannel(`filters`,[n])&&this.loggerService.log(`filters`,e,n)}};U([m(`GetLocator`)],ZA.prototype,`get`,void 0),ZA=U([g(),B(0,m(V.LoggerService)),B(1,m(V.FilterServiceManager))],ZA);var QA=class{constructor(e,t,n){this.em=e,this.loggerService=n,this.defaultColumns={},this.columnRepository=this.em.getRepository(nf),this.noColumnsService=t()}async reload(){}async makeColumns(e,t){let n={},r=this.extendColumns(this.defaultColumns);t&&Array.isArray(t)?(n=t.filter(e=>this.hasColumn(e.name)).reduce((e,t)=>(e[t.name]=r[t.name],e[t.name].columnOrder=t.order,e[t.name].visible=t.visible??!0,e),{}),this.log(`makeColumns from url`,this.getSettings().tableId)):n=r;let i=this.toStoreValue(n);return this.log(`makeColumns`,this.getSettings().tableId),this.logRaw(i),this.updateStore(i),i}recoveryColumns(e,t){return this.makeColumns(e,t)}async loadColumns(e){return[]}async saveColumns(e,t){return this.updateStore(e.sort((e,t)=>e.columnOrder-t.columnOrder).map((e,t)=>({name:e.columnName,isVisible:e.visible}))),this.columnsToPaginationUrlColumn(e.map(e=>({...this.getColumn(e.columnName),columnOrder:e.columnOrder,visible:e.visible})))}getColumn(e){let t=this.defaultColumns[e];if(!t)throw new Jo(`Column ${e} does not exist`);return t}toQuery(){return this.getColumns().columns.map((e,t)=>({name:e.name,visible:e.isVisible,order:t+1}))}hasColumn(e){return!!this.defaultColumns[e]}getColumnEditorColumns(){let e=this.getColumns().columns,t=Object.values(this.getDefaultColumns());return e.length&&e.length<t.length&&e.every(e=>e.isVisible)?t.sort((e,t)=>e.columnOrder-t.columnOrder).map((t,n)=>({...t,columnOrder:n+1,visible:e.filter(({isVisible:e})=>e).findIndex(({name:e})=>e===t.columnName)!==-1})):t.sort((t,n)=>{let r=e.findIndex(e=>e.name===t.columnName),i=e.findIndex(e=>e.name===n.columnName);return r!==-1&&i!==-1?r-i:r!==-1&&i===-1?-1:i!==-1&&r===-1?1:t.columnOrder-n.columnOrder}).map((t,n)=>({...t,columnOrder:n+1,visible:e.find(({name:e})=>e===t.columnName)?.isVisible??!1}))}getColumns(){return this.getColumnsFromRepo()??{id:this.getSettings().tableId,columns:[]}}getDefaultColumns(){return this.defaultColumns}getInitColumns(){throw new Jo("Please implement `getInitColumns`")}getVisibleColumns(){return this.getColumnEditorColumns().filter(e=>e.visible)}getInvisibleColumns(){return this.getColumnEditorColumns().filter(e=>!e.visible)}async init(e){this.getColumnsFromRepo()||this.getColumnRepository().insert([{id:this.getSettings().tableId}]);let t=this.extendColumns(e||this.getInitColumns());this.log(`new default columns`,`init:${this.getSettings().tableId}`),this.logRaw(t),this.defaultColumns=t}setTableId(e){this.noColumnsService.setTableId(e)}getTableId(){return this.noColumnsService.getTableId()}getSettings(){return this.noColumnsService.getSettings()}updateStore(e){let t=this.getColumnsFromRepo();t&&this.isColumnsEqual(t.columns,e)||this.getColumnRepository().update([{id:this.getSettings().tableId,columns:e}])}getColumnRepository(){return this.em.getRepository(nf)}columnsToPaginationUrlColumn(e){return this.noColumnsService.columnsToPaginationUrlColumn(e)}reset(){this.log(`reset`),this.makeColumns(this.getTableId())}isNewSizingFlowEnabled(){return!1}isEditable(){return!1}isSortable(){return!1}isDefaultState(e=!0){let t=Object.values(this.getDefaultColumns()).sort((e,t)=>e.columnOrder-t.columnOrder).filter(e=>e.visible).map(e=>e.columnName),n=Object.values(this.getVisibleColumns()).sort((e,t)=>e.columnOrder-t.columnOrder).map(e=>e.columnName);return e?nt(t.toSorted(),n.toSorted()):nt(t,n)}isRowDisabled(){return!1}toStoreValue(e){return Object.values(e).sort((e,t)=>e.columnOrder-t.columnOrder).map(e=>({name:e.columnName,isVisible:e.visible}))}extendColumns(e){if(ge(e))return{};for(let[t,n]of Object.entries(e))n.columnName||(n.columnName=t),n.label===void 0&&(n.label=`tableColumns.${n.columnName}`);return re(e)}getColumnsFromRepo(){return this.getColumnRepository().findEntityByIdOrNull(this.getSettings().tableId)}getRepository(e){return this.em.getRepository(e)}log(e,t){this.loggerService.log(`columns`,e,t)}logRaw(e){this.loggerService.raw(`columns`,e)}isColumnsEqual(e,t){return e.length===t.length&&e.every((e,n)=>e.name===t[n].name&&e.isVisible===t[n].isVisible)}};QA=U([g(),B(0,m(V.EntityManager)),B(1,m(V.NoColumnsServiceFactory)
2),B(2,m(V.LoggerService))],QA);var $A=QA,ej=class{constructor(e){this.validationRulesBuilderService=e}createBaseEditFields(e){e.createField(Vf.name,`text`,{validators:this.validationRulesBuilderService.createRules().required(),value:``}),e.createField(Vf.color,`text`,{value:Dn.orange}),e.createField(Vf.style,`text`,{value:Mi.filled})}};ej=U([g(),B(0,m(V.ValidationRulesBuilderService))],ej);var tj=ej,nj=class{constructor(e){this.em=e,this.repo=this.em.getRepository(uf),this.cursorPageRepo=this.em.getRepository(Mf)}moveToPrevPage(){throw new $a(`moveToPrevPage method doesn't implemented`)}changePerPage(e){throw new $a(`changePerPage method doesn't implemented`)}setTableId(e){this.tableModelId=e}getTableId(){if(!this.tableModelId)throw new G(`No tableId is set for service`);return this.tableModelId}setSettings(e){this.settings=e}setData(e){this.repo.update([e])}getData(){return this.repo.findEntityByIdOrFail(this.tableModelId)}getDataOrNull(){return this.repo.findEntityByIdOrNull(this.tableModelId)}setLastId(e){}reset(){this.setData(this.getDefaultModelData())}applyUrlParams(e,t=!0){this.setData({...e,id:this.tableModelId,pageKey:this.pageKey(e)});let n=this.getData();t&&n.totalCount&&e.perPage>0&&(n.pageCount=Math.ceil(n.totalCount/e.perPage),this.setData({...n,id:this.tableModelId}))}getPerPage(){return this.getData()?.perPage??this.settings.perPage}moveToPage(e){return this.repo.update([this.buildModelData(e.requestParams)]),e}
2getCurrentPage(){return this.pageRequestParams()}clonePagination(e){if(typeof e==`function`){let t=re(this.getCurrentPage());return e(t),t}return xt({},this.getCurrentPage(),e)}cleanUp(){this.repo.cleanUpByTableId(this.tableModelId)}};nj=U([g(),B(0,m(V.EntityManager))],nj);var rj=nj,ij=class extends rj{constructor(e){super(e),this.em=e}isFirstPage(){let{page:e}=this.getData();return e===1}init(e){return this.repo.insertOrUpdateRaw([this.buildModelData({page:this.getDefaultModelData().page,perPage:this.getDefaultModelData().perPage,...e||{}})]),!0}toQuery(){let{page:e,perPage:t}=this.getData()||this.getDefaultModelData();return{page:e,perPage:t}}changePerPage(e){this.setData(this.buildModelData({page:1,perPage:e}))}pageRequestParams(){let{page:e,perPage:t}=this.getData();return this.buildPageParams(e,t)}computeNextPage(e){let t=this.pageRequestParams(),{page:n}=this.getData(),{pageCount:r}=this.getData();return e&&(r=Math.ceil(e.total/t.requestParams.perPage)),n>=r?t:this.buildPageParams(t.requestParams.page+1,t.requestParams.perPage)}
2computePrevPage(){let e=this.pageRequestParams(),{page:t}=this.getData();return t===1?this.pageRequestParams():this.buildPageParams(e.requestParams.page-1,e.requestParams.perPage)}moveToFirstPage(){return this.moveToPage(this.getFirstPage())}moveToPrevPage(){return this.moveToPage(this.computePrevPage())}moveToNextPage(e){return this.moveToPage(this.computeNextPage(e.counterServiceData))}getCurrentPage(){return this.pageRequestParams()}getFirstPage(){return this.buildPageParams(this.getDefaultModelData().page,this.pageRequestParams().requestParams.perPage)}pageKey({page:e,perPage:t}){return[e,t].join(`-`)}isDefaultState(){let{page:e}=this.getDefaultModelData(),{page:t}=this.getCurrentPage().requestParams;return t===e}getDefaultModelData(){return this.buildModelData({page:1,perPage:this.settings.perPage})}buildPageParams(e,t){return{requestParams:{page:e,perPage:t},pageKey:this.pageKey({page:e,perPage:t})}}getTotal(){return this.getData().totalCount}buildModelData({page:e,perPage:t}){return{id:this.tableModelId,page:e,perPage:t,pageKey:this.pageKey({page:e,perPage:t})}}onDataLoad(e){}setTotalCount(e){}};ij=U([g(),h(),B(0,m(V.EntityManager))],ij);var aj=ij,oj=class extends CE{constructor(e,t){super(e,t),this.em=e,this.loggerService=t,this.managerId=`TableColumnManager`,this.loggerChannel=`columns`}getFactoryForTable(e){try{return super.getFactoryForTable(e)}catch(t){throw t instanceof Td?new ul(`No factory is set for "${e}" table`):t}}addServiceForTable(e){let{serviceId:t}=super.addServiceForTable(e);return this.services[t].setTableId(e),{serviceId:t,instance:this.services[t]}}removeServiceById(e,t){let n=this.getServiceByServiceId(t);this.getColumnRepo().deleteByCondition(e=>e.id===n.getTableId()),super.removeServiceById(e,t)}getColumnRepo(){return this.em.getRepository(nf)}};oj=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.LoggerService))],oj);var sj=oj,cj=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.userService=r}isSelfUpdating(){return!0}async createNote(e,t){let n=await this.getDomainRepository().createNote(e,t);return await this.insertOrUpdateItem(n.data),this.notify([n.data.id.toString()],cl.CREATE),n}async updateNote(e,t){e.id=t;let n=await this.getDomainRepository().putForFormRequest(e);return await this.insertOrUpdateItem(n.data),this.notify([n.data.id.toString()],cl.UPDATE),n}getNotesByIds(e,t){return this.getDomainRepository().getNotesByIds(e,t)}getTotalCount(e){return this.getDomainRepository().getTotalCount(e)}isAllowEditNote(e){return this.userService.currentUserId()===e}
2addNote(e){return this.getDomainRepository().queueInsertOrUpdate([e])}};cj=U([oD({model:Rn}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.UserService))],cj);var lj=cj,uj=class extends rj{constructor(e){super(e),this.em=e}init(e){return this.repo.insertOrUpdateRaw([this.buildModelData({...this.getDefaultModelData(),...e||{}})]),!0}isFirstPage(){let{lastId:e}=this.getData();return e===kd}moveToPrevPage(){let{currentPage:e,perPage:t}=this.getData(),n=e-1,r=this.getCursorPageData(n)?.prevId||kd,i=e-1;return r===kd&&n!==1?(this.reset(),this.moveToPage({requestParams:{currentPage:1,lastId:kd,perPage:t},pageKey:this.pageKey({currentPage:1,lastId:kd,perPage:t})})):this.moveToPage({requestParams:{currentPage:i,lastId:r,perPage:t},pageKey:this.pageKey({currentPage:i,lastId:r,perPage:t})})}moveToFirstPage(){return this.moveToPage(this.getFirstPage())}moveToNextPage({lastId:e}){let{currentPage:t,perPage:n}=this.getData(),r=this.getCursorPageData(t),i=e,a={currentPage:t+1,lastId:e,perPage:n};return r&&(a={...a,lastId:r.nextId},i=r.nextId),this.moveToPage({requestParams:a,pageKey:this.pageKey({currentPage:t+1,lastId:i,perPage:n})})}
2pageRequestParams(){let{currentPage:e,lastId:t,perPage:n}=this.getData();return this.buildPageParams(e,t,n)}getFirstPage(){return this.buildPageParams(1,kd,this.pageRequestParams().requestParams.perPage)}toQuery(){let{currentPage:e,lastId:t,perPage:n}=this.getData()||this.getDefaultModelData();return{currentPage:e,lastId:t,perPage:n}}pageKey({currentPage:e,lastId:t,perPage:n}){return`${t||kd}-${n}`}changePerPage(e){this.setData(this.buildModelData({currentPage:1,lastId:kd,perPage:e}))}buildPageParams(e,t,n){return{requestParams:{currentPage:e,lastId:t,perPage:n},pageKey:this.pageKey({currentPage:e,lastId:t,perPage:n})}}applyUrlParams(e,t){let{currentPage:n,perPage:r,lastId:i}=e;this.setData({id:this.tableModelId,currentPage:n,perPage:r,lastId:i,pageKey:this.pageKey({currentPage:n,lastId:i,perPage:r})})}isDefaultState(){let{lastId:e,currentPage:t}=this.getDefaultModelData(),{lastId:n,currentPage:r}=this.getCurrentPage().requestParams;return e===n&&t===r}reset(){this.setData(this.getDefaultModelData()),this.resetCursor()}setLastId(e){this.setData({id:this.tableModelId,lastId:e})}resetCursor(){this.cursorPageRepo.deleteAllById(`${this.tableModelId}%`)}onDataLoad(e){let{currentPage:t}=this.getData(),{prevId:n,nextId:r,perPage:i}=e;this.setCursorPageData(this.buildCursorPageModelData({currentPage:t,lastId:n,nextId:r,perPage:i}))}getTotal(){return this.getData().totalCount}setTotalCount(e){this.setData({id:this.tableModelId,totalCount:e})}buildModelData({currentPage:e,lastId:t,perPage:n}){return{id:this.tableModelId,currentPage:e,perPage:n,lastId:t,pageKey:this.pageKey({currentPage:e,lastId:t,perPage:n})}}getDefaultModelData(){return this.buildModelData({currentPage:1,lastId:kd,perPage:this.settings.perPage})}buildCursorPageModelData({currentPage:e,lastId:t,nextId:n,perPage:r}){return{id:this.getCursorId(e,r),page:e,prevId:t,nextId:n}}setCursorPageData(e){this.cursorPageRepo.insertOrUpdateRaw([e])}getCursorPageData(e){let{perPage:t}=this.getData();return this.cursorPageRepo.findEntityByIdOrNull(this.getCursorId(e,t))}getCursorId(e,t){return`${this.tableModelId}-${e}-${t}`}};uj=U([g(),h(),B(0,m(V.EntityManager))],uj);var dj=uj,fj=e=>{let t;switch(e.type){case`choice`:t=[{name:`choices`,value:e.value}];break;default:t=[]}return{type:e.type,options:t}},pj=e=>e.map(e=>{let t=typeof e==`string`,n=t?e:e.name,r=t?[]:[fj(e.constraints)];return{name:n,type:`field`,fields:null,operators:[{name:`eq`,constraints:r},{name:`in`,constraints:r},{name:`notIn`,constraints:r},{name:`gt`,constraints:r},{name:`gte`,constraints:r},{name:`lt`,constraints:r},{name:`lte`,constraints:r},{name:`anyOf`,constraints:r},{name:`allOf`,constraints:r},{name:`noneOf`,constraints:r},{name:`isNull`,constraints:r}]}}),mj=e=>e.map(e=>{let t=typeof e==`string`?{name:e}:e;return t.fields?{name:t.name,type:`relation`,values:null,fields:mj(t.fields)}:{name:t.name,type:`field`,values:t.values??[`desc`,`asc`],fields:null}}),$=({name:e,sort:t,filter:n})=>({name:e,schema:{filter:n?pj(n):[],sort:t?mj(t):[],searchFields:[],groupBy:[]}}),hj=[`All`,`Today`,`Yesterday`,`This week`,`Last week`,`This month`,`Previous month`,`Last 30 days`,`Last 60 days`,`Pick date range`],gj=[`All`,`Today`,`Yesterday`,`This week`,`Last week`,`This month`,`Previous month`,`Last 60 days`,`Pick date range`],_j=`Pick date range`,vj={from:`from`,to:`to`,options:`dateRange`},yj=[{name:vj.from,operation:`eq`,relatedFieldName:``},{name:vj.to,operation:`eq`,relatedFieldName:``},{name:vj.options,operation:`eq`,relatedFieldName:``}],bj=[vj.from,vj.to,vj.options],xj=Fd,Sj=`reportingCallsTableId`,Cj=[`calls`,`talksTime`,`costs`],wj={responsive:!0,maintainAspectRatio:!1,interaction:{mode:`index`,intersect:!1},plugins:{legend:{display:!1},tooltip:{enabled:!0,bodyAlign:`center`,displayColors:!1},title:{display:!0,padding:36,font:{size:16,lineHeight:1.25,weight:600,family:Yd},color:ai.gray7}},elements:{line:{borderWidth:2,borderColor:ai.chartColorBlue},point:{pointStyle:`circle`,pointHoverBorderColor:`#fff`,pointBorderWidth:0,pointRadius:5,pointHoverBorderWidth:0,pointHoverRadius:5,pointBackgroun
2dColor:ai.chartColorBlue}},scales:{y:{position:`left`,grid:{color:ai.gray3,drawTicks:!1},border:{display:!1},ticks:{color:ai.gray5,padding:12,align:`end`,maxTicksLimit:10,font:{size:12,style:`normal`,weight:`600`}}},x:{grid:{display:!1},offset:!0,ticks:{color:ai.gray5,maxTicksLimit:20,padding:12,maxRotation:0,minRotation:0,font:{size:12,style:`normal`,weight:`600`}}}}},Tj=`reportingMessagesTableId`,Ej=Md,Dj=Fd,Oj=[`sent`,`received`,`deliveryRate`,`replyRate`,`costs`],kj=[{question:`questionId`}.question],Aj=`smsSurveyRecipients`,jj={phones:`phones`,contacts:`contacts`,lists:`lists`,filteredViews:`filteredViews`},Mj=[{name:jj.phones,operation:`eq`},{name:jj.contacts,operation:`eq`},{name:jj.lists,operation:`eq`},{name:jj.filteredViews,operation:`eq`}],Nj=[jj.phones,jj.contacts,jj.lists,jj.filteredViews],Pj=[$({name:J.notes}),$({name:J.sentSmsShort,sort:[`messageTime`],filter:[{name:`onlyWithoutInbound`,constraints:{type:`choice`,value:[`false`,`true`]}},`userId`,...bj]}),$({name:J.emailCampaignsFetch,sort:[`startAt`]}),$({name:J.bulkSentSms,sort:[`fromNumber`,`to`,`country`],filter:[{name:`onlyWithoutInbound`,constraints:{type:`choice`,value:[`false`,`true`]}},{name:`statuses`,constraints:{type:`choice`,value:[`d`,`j`]}}]}),$({name:J.blockedContacts,sort:[`fullName`,`dateBlocked`]}),$({name:J.contacts,sort:[`id`,`email`,`fullName`,`firstName`,`lastName`,`companyName`,`creationDate`,`phone`,`whatsappPhone`,`country`,`owner`,`createdAt`,`updatedAt`],filter:[`shared`,{name:`letter`,constraints:{type:`length`}}]}),$({name:J.unsubscribedContacts,sort:[`fullName`,`phone`,`reason`,`unsubscribeText`,`unsubscribeTime`]}),$({name:J.unsubscribedEmailContacts,sort:[`fullName`,`email`,`reasonType`,`createdAt`]}),$({name:J.contactImports,sort:[`fileName`,`countImported`,`status`,`createdAt`]}),$({name:J.contactImportResults,sort:[`firstName`,`lastName`,`phone`,`email`]}),$({name:J.lists,sort:[`name`,`membersCount`,`shared`,`createdAt`,`lastUpdatedAt`,`isHidden`]}),$({name:J.receivedSms,sort:[`messageTime`],filter:[{name:`onlyWithoutOutbound`,constraints:{type:`choice`,value:[`false`,`true`]}},`userId`,...bj]}),$({name:J.templates,sort:[{name:`name`,values:[`asc`,`desc`]},{name:`category`,fields:[`name`]},{name:`content`,values:[`asc`,`desc`]},`usedAt`,`lastModified`],filter:[{name:`category`,constraints:{type:`length`}}]}),$({name:J.surveys,sort:[`name`,`createdAt`]}),$({name:J.inboundCalls,sort:[`fromNumber`,`toNumber`,`length`,`callTime`]}),$({name:J.outboundCalls,sort:[`fromNumber`,`toNumber`,`length`,`callTime`]}),$({name:J.forwardedCalls,sort:[`fromNumber`,`usersInboundNumber`,`toNumber`,`length`,`callTime`]}),$({name:J.audios,sort:[`originalName`,`length`,`fileSize`,`uploadedAt`]}),$({name:J.schedulesFetchLight,sort:[`nextSend`,`lastSent`]}),$({name:J.scheduledFetchNotSent,sort:[`failedAt`]}),$({name:J.userCustomFields,sort:[`fieldName`,`createdAt`]}),$({name:J.customFieldSchemaAll,sort:[`id`,`title`,`createdAt`,`updatedAt`]}),$({name:J.phoneNumbers,sort:[`phone`,`label`,`user`,`price`,`expireAt`,`forwardCallsTo`]}),$({name:J.invoices,sort:[`id`,`amount`,`paymentMethod`,`date`,`status`]}),$({name:J.senderIdsFetch,sort:[{name:`user`,fields:[`firstName`]},`senderId`,`status`,`explanation`]}),$({name:J.activityCalls,sort:[`id`,`callTime`]}),$({name:J.messengerContactThread,sort:[`id`,`messageTime`]}),$({name:J.allowedEmails,sort:[`email`,`dateAdded`,`dateActive`]}),$({name:J.subAccountImportSessionsFetch,sort:[`fileName`,`countImported`,`status`,`createdAt`]}),$({name:J.subAccountImportDetails,sort:[`firstName`,`email`,`role`]}),$({name:J.subaccounts,sort:[`name`,`email`,`subaccountType`,`status`]}),$({name:J.auditLogs,filter:[`userId`,`userIds`,...bj]}),$({name:J.senderSettingsCountries}),$({name:J.reportingNumbers,sort:[`phone`,`messagesSent`,`messagesReceived`,`callsForwarded`],filter:[`userId`,...bj]}),$({name:J.statementsFetch,filter:[`userId`,...bj]}),$({name:J.reportingSubAccounts,sort:[`fullName`],filter:bj}),$({name:J.reportingUsers,sort:[`fullName`]}),$({name:J.distributions,sort:[`name`,`email`,`membersCount`]}),$({name:J.loginHistory,sort:[`country`,`ip`,`active`,`loginTime`]}),$({name:J.apiV2TokensFetch,sort:[`appName`,`apiKey`]}),$({name:J.reportingCalls,filter:xj}),$({name:J.reportingMessages,filter:Dj}),$({name:J.reportingEmailTrends,filter:Fd}),$({name:J.automationRuleLogs,sort:[`sender`,`receiver`,`status`,`executedAt`]}),$({name:J.emailLookupFetch,sort:[`email`,`isValid`,`deliverability`,`isDisposable`,`createdAt`]}
2),$({name:J.carrierLookupBulkFetch,sort:[`fileName`,`status`,`createdAt`]}),$({name:J.emailLookupBulkFetch,sort:[`fileName`,`fileSize`,`status`,`createdAt`]}),$({name:J.carrierLookupFetch,sort:[`phone`,`valid`,`type`,`country`,`carrier`,`createdAt`]}),$({name:J.formClickToTextFetch,sort:[`name`,`clicks`,`submits`,`phone`]}),$({name:J.formSubscribeFetch,sort:[`name`,`submits`]}),$({name:J.automationRules,sort:[`user`,`name`,`responseType`,`status`]}),$({name:J.automationRulesKeywords,sort:[`keyword`,`status`,`createdAt`]}),$({name:J.tenDlcPhoneNumbers,sort:[`purchased`]}),$({name:J.tollFreePhoneNumbers,sort:[`purchasedAt`]}),$({name:J.tenDlcCampaign,sort:[`id`]}),$({name:J.surveyReplies,filter:kj}),$({name:J.surveyRecipientCountries,filter:Nj}),$({name:J.byocCarrierFetch,sort:[`id`,`label`,`provider`,`phonesCount`,`senderIdsCount`,`createdAt`]}),$({name:J.byocCarrierPhoneFetch,sort:[`phone`,`label`,`voice`,`sms`,`mms`,`provider`]}),$({name:J.byocCarrierSenderIdFetch,sort:[`senderId`,`provider`]}),$({name:J.whatsappAccountFetch,sort:[`id`,`name`,`accountId`,`status`]}),$({name:J.whatsappPhonesFetch,sort:[`id`,`name`,`phone`,`qualityRating`,`status`,`messagingLimitTier`]}),$({name:J.byocProviderPhoneIndex,sort:[]}),$({name:J.byocProviderSenderIdIndex,sort:[]}),$({name:J.userAdmins}),$({name:J.webWidgets,sort:[`name`,`lastUpdatedAt`,`status`]}),$({name:J.tasksFetch,sort:[`id`,`priority`,`title`,{name:`stage`,fields:[`name`]},{name:`assignee`,fields:[`fullName`]},`dueDate`,`updatedAt`]}),$({name:J.tasks}),$({name:J.contactTasksFetch,sort:[`updatedAt`]}),$({name:J.activityCalls,filter:[...bj]}),$({name:J.messengerContactThread,filter:[...bj]}),$({name:J.ticketsFetch,sort:[`id`,`priority`,`subject`,`createdAt`,`updatedAt`,`dueDate`,{name:`status`,fields:[`name`]},{name:`requester`,fields:[`email`]},{name:`assignee`,fields:[`fullName`]},{name:`inbox`,fields:[`email`]}],filter:[`inbox`,`status`,`assignee`,`requester`,`priority`,`createdAt`,`updatedAt`,`solvedAt`,`subject`,`dueDate`]}),$({name:J.filteredViewsFetch,sort:[`name`,`ticketsCount`,`sharingType`,`updatedAt`]}),$({name:J.deals,sort:[]}),$({name:J.dealsFetch,sort:[`createdAt`,`title`,`amount`]}),$({name:J.pointAiWebsite,sort:[`url`,`synchronizedAt`]}),$({name:J.files,sort:[`originalName`,`createdAt`]}),$({name:J.dealTimelineItemFetch,sort:[`id`]}),$({name:J.pointAiWebsiteDownloaded,sort:[`url`,`createdAt`]}),$({name:J.filteredViewsCreate,sort:[`name`,`createdAt`,`updatedAt`,`type`]}),$({name:J.facebookMessengerPagesFetch,sort:[`id`,`name`,`platformPageId`,`status`]}),$({name:J.instagramAccountsFetch,sort:[`id`,`name`,`platformAccountName`,`status`]}),$({name:J.emailCampaignsMessages,sort:[`recipientFullName`,`status`]}),$({name:J.emailCampaignsOpen,sort:[`createdAt`,`recipientFullName`,`recipientEmail`]}),$({name:J.emailCampaignsUnsubscribe,sort:[`createdAt`,`recipientFullName`,`recipientEmail`]}),$({name:J.emailCampaignsClickSummary,sort:[`link`,`clicks`]}),$({name:J.emailCampaignsClick,sort:[`createdAt`,`recipientFullName`,`recipientEmail`,`link`]}),$({name:J.emailCampaignsDomains}),$({name:J.emailCampaignsEmailSenders}),$({name:J.scheduledEmailFetch,sort:[`nextSendAt`]}),$({name:J.scheduledEmailFailedFetch,sort:[`failedAt`]}),$({name:J.tags,sort:[`title`]}),$({name:J.emailTemplates,sort:[`usedAt`,`updatedAt`]}),$({name:J.taskCommentFetch}),$({name:J.scheduledContactMessage}),$({name:J.automationFlowFetch,sort:[`name`,`status`,`lastTriggeredAt`,`updatedAt`]}),$({name:J.stripoPrebuiltTemplatesFetch}),$({name:J.automationLogs,sort:[`fullName`,`phone`,`email`,`createdAt`,`finishedAt`]}),$({name:J.automationTemplates}),$({name:J.externalIntegrationCustomersSync,sort:[`firstName`,`lastName`,`email`,`phone`,`providerCustomerId`]}),$({name:J.reportingEmailSenders,sort:[`from`,`sent`,`deliveryRate`,`openRate`,`clickRate`,`bounceRate`,`unsubscribeRate`,`spamRate`,`costs`]}),$({name:J.reportingEmailLinks,sort:[`link`,`timesSent`,`totalClicks`,`uniqueClicks`,`clickRate`]}),$({name:J.reportingEmailUsers,sort:[`fullName`,`email`,`sent`,`deliveryRate`,`openRate`,`clickRate`,`bounceRate`,`unsubscribeRate`,`spamRate`,`costs`]})],Fj=class{constructor(e){this.entityManager=e}resolve(){this.entityManager.getRepository(Rf).insert(Pj.map(e=>({id:e.name,schema:e})))}};Fj=U([g(),B(0,m(V.EntityManager))],Fj);var Ij=Fj,Lj=class extends Tk{constructor(...e){super(...e),this.id=`1`}
2async getCredentials(){return{username:(await this.getRequest(this.id)).username}}async getCredentialsWithAdditionalData(){return this.getRequest(this.id)}async storeCredentialsWithAdditionalData(e,t){let n={id:this.id,username:e,...t};await this.postRequest(n),await this.fill(this.id)}removeCredentials(){this.delete([this.id])}};Lj=U([Y({model:pf,fetch:pf.entity,create:pf.entity,single:pf.entity}),g(),h()],Lj);var Rj=Lj,zj={model:Ri,single:`sipCallSingle`,bulkDeleteEndpoint:`sipCallsBulkDelete`,exportEndpoint:`sipCallExport`,pdfDownloadEndpoint:`sipCallPdf`},Bj=class extends Q{};Bj=U([g(),h()],Bj);var Vj=Bj,Hj=class extends Vj{constructor(e,t,n,r,i,a){super(e,t,n,r,i),this.serializerService=e,this.api=t,this.endpointsService=n,this.loggerService=r,this.filterQueryService=i,this.filterBracketNotationQueryService=a}decorateFilterToStrictQueryPart(e){return this.filterBracketNotationQueryService.decorateFilterToStrictQueryPart(e)}};Hj=U([Y(zj),g(),h(),B(0,m(V.SerializerService)),B(1,m(V.Api)),B(2,m(V.EndpointsService)),B(3,m(V.LoggerService)),B(4,m(V.FilterQueryService)),B(5,m(V.FilterBracketNotationQueryService))],Hj);var Uj=Hj,Wj=class extends qE{async preloadById(e){let t=this.getDomainSettings().model;return this.preloaderManager.getPreloader(t).preloadById(t,e)}async reloadById(e){let t=this.getDomainSettings().model;return this.preloaderManager.getPreloader(t).reloadById(t,e)}};Wj=U([oD({model:pl}),g(),h()],Wj);var Gj=Wj,Kj=class extends Gj{isCallContact(e){return!!e.contactId}isCallAnswered(e){return e.length>0}};Kj=U([oD({model:Ri}),g(),h()],Kj);var qj=Kj,Jj=class{constructor(e,t,n){this.baseResolverService=e,this.entityManager=t,this.routerService=n}async resolve(){}isFailed(e){let t=this.baseResolverService.getId(e),n=!this.entityManager.getRepository(e.model).findEntityByIdOrNull(t);return n&&e.redirectToIfNotFound?(this.routerService.push(e.redirectToIfNotFound),!0):n}};Jj=U([g(),B(0,m(V.BaseResolverService)),B(1,m(V.EntityManager)),B(2,m(V.RouterService))],Jj);var Yj=Jj,Xj=class{constructor(){this.entityMap=[]}addRouteToEntityMap(e){this.entityMap.push(e)}getDetailedPageByModel(e){let t=this.entityMap.find(t=>t.model.entity===e.entity);if(!t)throw new G(`${e.entity} is not mapped in RouteEntitiesService`);return t}};Xj=U([g()],Xj);var Zj=class{constructor(e){this.routeEntitiesService=e}pipe(e){return e.map(e=>{if(e.children?.length&&(e.children=this.pipe(e.children)),!e.meta?.detailsPage)return e;let t=re(e),n={...e.meta?.detailsPage,redirectToIfNotFound:e.meta?.redirectToIfNotFound,redirectToIfAccessError:e.meta?.redirectToIfAccessError};if(!n)throw new G(`Detailed paged without resolvers`);let r={params:n,service:`NotFoundResolverService`},i=`${t.name}.notFoundResolver`;return t.children=[{name:i,path:``,component:e.component,children:e.children,redirect:e.redirect,meta:{resolverComponent:()=>Promise.resolve(e.meta?.redirectToIfNotFound?Ky:rb),resolvers:[r],tabTitle:e.meta?.tabTitle}}],t.component=sa,t.redirect={name:i},t.meta.resolvers||(t.meta.resolvers=[]),t.meta.resolvers.push({params:n,service:e.meta?.detailsPageResolver??`RedirectableSingleModelResolverService`}),t.meta.resolverComponent||(t.meta.resolverComponent=JS.DetailsPageResolver),this.routeEntitiesService.addRouteToEntityMap({model:n.model,paramsKey:n.requestParam,detailsPage:t.name||``}),t})}};Zj=U([g(),B(0,m(V.RouteEntitiesService))],Zj);var Qj=Zj,$j=class{constructor(e){this.monitoringLoggerService=e}decorateFilterToStrictQueryPart(e){let t={};return e.forEach(e=>{Object.keys(e).forEach(n=>{this.reportDroppedOperations(n,Object.keys(e[n]));let r=Object.values(e[n]).shift(),i=this.getFilterValue(r,n);t={...t,[n]:i}})}),t}prepareFilterForRequest(e){return[Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{[Array.isArray(t)?`in`:`eq`]:t}]))]}formatDate(e){let t=e.getFullYear(),n=(e.getMonth()+1).toString();n.length<2&&(n=`0${n}`);let r=e.getDate().toString();return r.length<2&&(r=`0${r}`),`${t}-${n}-${r}`}serializeFiltersToBracketNotation(e,t=``,n={}){for(let r in e){let i=e[r],a=t?`${t}[${r}]`:r;typeof i==`object`?this.serializeFiltersToBracketNotation(i,a,n):i!=null&&(n[a]=String(i))}return n}getFilterValue(e,t){return Array.isArray(e)?e.join(`,`):lt(e)?(this.reportDroppedOperations(t,Object.keys(e)),Ob
2ject.values(e).shift()):String(e)}reportDroppedOperations(e,t){if(t.length<2)return;let n=t.slice(1).join(`", "`);this.monitoringLoggerService.logAndCapture(new G(`Filter "${e}" is serialized to the flat query format: "${t[0]}" is kept, "${n}" dropped`),Ba.WARNING,`filterQueryService`)}};$j=U([g(),B(0,m(V.MonitoringLoggerService))],$j);var eM=$j,tM=class extends eM{decorateFilterToStrictQueryPart(e){return super.serializeFiltersToBracketNotation({filters:e})}};tM=U([g(),h()],tM);var nM=tM,rM=class extends qE{constructor(e,t,n,r,i,a,o){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.translateService=r,this.sessionShortService=i,this.smsSessionRecipientsService=a,this.dataTimeService=o}getSessionSourceText(e){if(e.source===Sr.NONE)return this.translateService.t(`status.session.none`);if(e.source===Sr.EMAIL)return this.translateService.t(`status.session.email`);if(e.source===Sr.MAGICMESSAGE)return this.translateService.t(`status.session.e2s`);if(e.source===Sr.TM_ONLINE)return this.translateService.t(`status.session.webApp`);if(e.source===Sr.TM_MESSENGER)return this.translateService.t(`status.session.messenger`);if(e.source===Sr.TM_TEXTME)return this.translateService.t(`status.session.list`);if(e.source===Sr.API)return this.translateService.t(`status.session.api`);if(e.source===Sr.TM_WIDGET)return this.translateService.t(`status.session.widget`);if(e.source===Sr.TM_MOBILE)return this.translateService.t(`status.session.mobile`);if(e.source===Sr.AUTOMATION)return this.translateService.t(`status.session.automation`);if(e.source===Sr.IOS_MOBILE)return this.translateService.t(`status.session.iosMobile`);if(e.source===Sr.ANDROID_MOBILE)return this.translateService.t(`status.session.androidMobile`);if(e.source===Sr.WS_CHAT)return this.translateService.t(`status.session.smsChat`);if(e.source===Sr.SURVEY)return this.translateService.t(`status.session.survey`);if(e.source===Sr.AUTOMATION_FLOW)return this.translateService.t(`status.session.automationFlow`);if(e.source===Sr.DESKTOP)return this.translateService.t(`status.session.desktop`);if(e.source===Sr.MCP)return this.translateService.t(`status.session.mcp`);if(e.source===Sr.RESERVED_0)return this.translateService.t(`status.session.reserved`);throw new Qa(e.source)}isSms(e){return e.destination===wa.DEST_TEXT_SMS}isMms(e){return e.destination===wa.DEST_MMS}isVoiceBroadcast(e){return e.destination===wa.DEST_VOICE_BROADCAST}isBulkSession(e){return e.numbersCount>1}isBulkSessionById(e){return this.findAnyTypeEntityByIdOrFail(e).numbersCount>1}async archive(e){await this.getDomainRepository().archive(e),this.notify([e])}async unarchive(e){await this.getDomainRepository().unarchive(e),this.notify([e])}async bulkArchive(e){await this.getDomainRepository().bulkArchive(e),this.notify([])}async bulkUnarchive(e){await this.getDomainRepository().bulkUnarchive(e),this.notify([])}async updateTitle(e,t){await this.getDomainRepository().updateTitle(e,t),await this.updateItemIfExists({id:e,title:t})}findAnyTypeEntityById(e,t=[]){return this.findEntityByIdOrNull(e,t)||this.findSessionShortByIdOrNull(e,t)}findSessionShortByIdOrNull(e,t=[]){return this.sessionShortService.findEntityByIdOrNull(e,t)}findAnyTypeEntityByIdOrFail(e){let t=this.findAnyTypeEntityById(e);if(!t)throw new ad(e);return t}async findOrFillSessionWithRecipients(e){let[t,n]=await Promise.all([this.findOrFill(e),this.smsSessionRecipientsService.findOrFill(e,[`contacts`,`groups`,`filteredViews`])]);return{session:t,recipients:n}}canShowDownloadE2sEmailBlock(e){let t=this.findEntityByIdOrFail(e);return t.emailToSms&&t.emailToSms.emailFileDeletedAt!==null&&this.dataTimeService.isAfter(this.dataTimeService.toDate(t.emailToSms.emailFileDeletedAt),this.dataTimeService.n
2ow())}async downloadOriginalEmail(e){let t=await this.getDomainRepository().downloadOriginalEmail(e);Jd(t,`source-email.eml`)}};rM=U([oD({model:di}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TranslateService)),B(4,m(V.SessionShortService)),B(5,m(V.SmsSessionRecipientsService)),B(6,m(V.DateTimeService))],rM);var iM=rM,aM=class extends Q{async updateTitle(e,t){let n=this.getPath(`sessionsIndexUpdateTitle`,e);await this.getApiSource().put(n,{title:t})}async archive(e){let t=this.getApiSource(),n=this.getPath(`sessionArchive`,e);await t.post(n)}async unarchive(e){let t=this.getApiSource(),n=this.getPath(`sessionUnarchive`,e);await t.post(n)}async bulkArchive(e){let t=this.getApiSource(),n=this.endpointsService.getPath(`sessionBulkArchive`);await t.post(n,e)}async bulkUnarchive(e){let t=this.getApiSource(),n=this.endpointsService.getPath(`sessionBulkUnarchive`);await t.post(n,e)}async downloadOriginalEmail(e){let t=this.endpointsService.getPath(`sessionsEmailToSmsEmail`,[e]),{data:n}=await this.getApiSource().getFile(t);return n}};aM=U([Y({model:di,single:`sessionSingle`}),g(),h()],aM);var oM=aM,sM=class extends Q{};sM=U([Y({model:ga}),g(),h()],sM);var cM=sM,lM=class extends Q{async fetchCount(e,t,n,r,i){if(!this.hasCountEndpoint())throw new Us(`Please define count endpoint in settings()`);
2let a=this.buildCountRequestParams(t,n,r,i),o=this.endpointsService.getPath(this.getEndpoint()),s=await this.fetchRequestCount(o,a);await this.insertOrUpdate([{...s.data,id:e}])}buildCountRequestParams(e,t,n,r){return Object.assign(this.createGridRequestParams(e,t,n,r),this.filterQueryService.serializeFiltersToBracketNotation({filters:e.filter}))}fetchRequestCount(e,t){return this.getApiSource().get(e,{params:t,paramsSerializer:e=>_p(e)})}async fetchCountWithBody(e,t){if(!this.hasCountEndpoint())throw new Us(`Please define count endpoint in settings()`);let n=this.endpointsService.getPath(this.getEndpoint()),r=await this.getApiSource().post(n,t);await this.insertOrUpdate([{...r.data,id:e}])}getEndpoint(){return this.settings().countEndpoint}hasCountEndpoint(){return!!this.getEndpoint()}};lM=U([Y({model:Cf}),g(),h()],lM);var uM=lM,dM=class extends Q{deleteAllById(e){this.query().where(`id`,e).deleteAll()}};dM=U([Y({model:Mf}),g(),h()],dM);var fM=dM,pM,mM=pM=class extends pl{get recipientsCount(){return pM.getRecipientsCount(this)}get canadianRecipientsCount(){return pM.getCanadianRecipientsCount(this)}get americanRecipientsCount(){return pM.getAmericanRecipientsCount(this)}static getRecipientsCount(e){return e.countries?Object.keys(e.countries).reduce((t,n)=>(t+=e.countries[n].count,t),0):0}static getCanadianRecipientsCount(e){return e.countries?.CA?.count||0}static getAmericanRecipientsCount(e){return e.countries?.US?.count||0}};U([v()],mM.prototype,`id`,void 0),U([y([])],mM.prototype,`loading`,void 0),U([ft(0)],mM.prototype,`total`,void 0),U([y(null)],mM.prototype,`countries`,void 0),U([y(null)],mM.prototype,`requestParams`,void 0),mM=pM=U([Be(md.MESSAGES_PRICE)],mM);var hM=mM,gM=class extends Q{async getMessagesPrice(e){let t=this.endpointsService.getPath(`messagesPrice`);return this.getApiSource().get(t,{params:e})}createMessageFromFormData(e){return this.postRequest(e)}};gM=U([Y({model:hM,create:`messagesPriceCreate`}),g(),h()],gM);var _M=gM,vM=()=>{let e=null,t=async n=>{e=n;try{await n}catch{}return e===n?n:t(e)};return t},yM=e=>!!(e.type===`tag`||e.content&&e.content.find(e=>yM(e))),bM=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.serializerService=r,this.id=`MessagesPriceRepository`,this.initialState={total:0,countries:null,loading:[]},this.lastPromise=vM()}async getMessagesPrice(e){if(!e.contacts&&!e.lists&&!e.phones&&!e.filteredViews)return this.initialState;let t=await this.getDomainRepository().getMessagesPrice(e);return this.serializerService.serialize(this.getModel(),t.data||{})}init(){return this.getDomainRepository().create({id:this.id})}getState(){return this.getDomainRepository().findEntityByIdOrNull(this.id)}getProperty(e){let t=this.getState();if(t)return t[e]}updateState(e){this.getDomainRepository().update([{...this.getState(),...e}])}resetState(){this.updateState(this.initialState)}setLoading(e){this.updateState({loading:e})}async updateMessagesPrice(e,t){try{this.setLoading(t);let n=await this.lastPromise(this.getMessagesPrice(e));this.updateState({...n,requestParams:e,loading:[],total:!e.text&&e.destination!==`mms`?0:n.total})}catch(e){throw this.setLoading([]),e}}async sendMessageFromFormData(e){let t=!!e.sendingDateTime,n=await this.getDomainRepository().createMessageFromFormData(e);return t&&this.subscription.emitByModel(Ir,{ids:[],eventType:cl.CREATE}),n}async fetchRecipientsCount(e){let t=await this.getMessagesPrice(e);return hM.getRecipientsCount(t)}getRecipientCountryIds(){return Object.keys(this.getState()?.countries??{})}isApproximatePrice(e){return yM(e)}};bM=U([oD({model:hM}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.SerializerService))],bM);var xM=bM,SM=class extends Q{async uploadFile(e){let t=new FormData;return t.append(`file`,e,e.name??`file`),this.postRequest(t)}downloadFile(e){let t=this.endpointsService.getPath(`audioDownload`,[e]);return this.getApiSource().getFile(t)}};SM=U([Y({model:Yr,fetch:`audios`,single:`audio`,create:`audioUpload`}),g(),h()],SM);var CM=SM,wM=class extends pl{get hasDedicatedNumbers(){return this.dedicated.length>0}get hasSenderIds(){return this.senderIds.length>0}get hasVerifiedUserOwnNumber(){return this.userNumbers.length>0}};U([y([])],wM.prototype,`dedicated`,void 0),U([y([])],wM.prototype,`shared`,void 0),U([y([])],wM.prototype,`userNumbers`,void 0),U([y([])],wM.prototype,`senderIds`,void 0),U([y([])],wM.prototype,`userCarrierTwilio`,void 0),U([y([])],wM.prototype,`userCarrierVonage`,void 0),U([y([])],wM.prototype,`userCarrierSinch`,void 0),U([y([])],wM.prototype,`userCarrierBandwidth`,void 0),U([y([])],wM.prototype,`userCarrierInfobip`,void 0),U([y([])],wM.prototype,`userCarrierMessageBird`,void 0),U([y([])],wM.prototype,`userCarrierAws`,void 0),U([y([])],wM.prototype,`userCarrierTelnyx`,void 0),U([y([])],wM.prototype,`userCarrierTwilioSenderId`,void 0),wM=U([Be(md.USER_NUMBERS)],wM);var TM=wM,EM=function(e){return e.TWILIO=`twilio`,e.VONAGE=`vonage`,e.BANDWIDTH=`bandwidth`,e.SINCH=`sinch`,e.INFOBIP=`infobip`,e.MESSAGEBIRD=`messagebird`,e.AWS=`aws`,e.TELNYX=`telnyx`,e}({}),DM=class extends qE{constructor(e,t,n,r,i){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.byocHelperService=r,this.userService=i,this.providerMap={[EM.TWILIO]:`userCarrierTwilio`,[EM.VONAGE]:`userCarrierVonage`,[EM.SINCH]:`userCarrierSinch`,[EM.BANDWIDTH]:`userCarrierBandwidth`,[EM.INFOBIP]:`userCarrierInfobip`,[EM.MESSAGEBIRD]:`userCarrierMessageBird`,[EM.AWS]:`userCarrierAws`,[EM.TELNYX]:`userCarrierTelnyx`}}async fetchAndGetParsedUserNumbers({userId:e,enableByocSenderId:t}){let n=await this.getDomainRepository().fetchUserNumbers(e);return this.parseUserNumbers(n,t)}async fetchUserNumbers(){await this.getDomainRepository().fetchUserNumbers()}findUserNumbersOrFail(e){return this.getDomainRepository().findUserNumbersOrFail(e)}findUserNumbersOrNull(e){return this.getDomainRepository().findUserNumbersOrNull(e)}getByocSenderSourceByPhone(e,t){return this.findByocSenderSources(e).find(e=>e.phone===t)}getSenderSourceByPhone(e,t){return this.getFlattenedSenderSources(e).find(e=>e.phone===t)}byocParseNumbers(e,t){return Object.keys(this.providerMap).reduce((n,r)=>{let i=this.providerMap[r];if(t&&this.byocHelperService.doesProviderSupportSenderId(r)){let t=`${i}SenderId`;n[r]=[...e[i]||[],...e[t]||[]]}else n[r]=e[i]||[];return n},{})}hasByocNumbers(e){return this.findByocSenderSources(e,!0).length>0}hasNumbersForCurrentUserCountry(e){let t=this.userService.getCurrentUserCountryId();return[`US`,`CA`,`PR`].includes(t)?e.hasDedicatedNumbers||this.hasByocNumbers(e):![`GB`,`AU`].includes(t)||e.hasDedicatedNumbers||this.hasByocNumbers(e)||e.hasSenderIds}parseUserNumbers(e,t){let{dedicated:n,shared:r,userNumbers:i,senderIds:a}=e;return{dedicated:n||[],shared:r||[],userNumbers:i||[],senderIds:a||[],byoc:this.byocParseNumbers(e,t)}}findByocSenderSources(e,t){let n=this.byocParseNumbers(e,t);return Object.values(n).flat()}getFlattenedSenderSources(e){let t=Object.values(e),n=[];
2return t.forEach(e=>{typeof e==`object`&&n.push(e)}),n.flat()}canSendSms(e){return!!(this.hasNumbersForCurrentUserCountry(e)||this.userService.getCurrentUserCountryId()===`GB`&&e.hasVerifiedUserOwnNumber&&this.hasPaidInvoices())}hasPaidInvoices(){return this.userService.currentUser().status===Wr.ST_ACTIVE}isSenderId(e){return e.type.endsWith(`SENDER_ID`)}};DM=U([oD({model:TM}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.ByocHelperService)),B(4,m(V.UserService))],DM);var OM=DM,kM=[`whatsApp`,`widgets`,`facebook`,`instagram`],AM=e=>kM.includes(e),jM=e=>AM(e.numberType),MM=function(e){return e.USERS_PHONE=`USERS_PHONE`,e.REPLY_PHONE=`REPLY_PHONE`,e.SENDER_ID=`SENDER_ID`,e.INBOUND=`INBOUND`,e.USER_CARRIER_TWILIO=`USER_CARRIER_TWILIO`,e.USER_CARRIER_VONAGE=`USER_CARRIER_VONAGE`,e.USER_CARRIER_BANDWIDTH=`USER_CARRIER_BANDWIDTH`,e.USER_CARRIER_SINCH=`USER_CARRIER_SINCH`,e.USER_CARRIER_INFOBIP=`USER_CARRIER_INFOBIP`,e.USER_CARRIER_MESSAGE_BIRD=`USER_CARRIER_MESSAGE_BIRD`,e.USER_CARRIER_AWS=`USER_CARRIER_AWS`,e.USER_CARRIER_TELNYX=`USER_CARRIER_TELNYX`,e.USER_CARRIER_TWILIO_SENDER_ID=`USER_CARRIER_TWILIO_SENDER_ID`,e.USER_CARRIER_VONAGE_SENDER_ID=`USER_CARRIER_VONAGE_SENDER_ID`,e.USER_CARRIER_BANDWIDTH_SENDER_ID=`USER_CARRIER_BANDWIDTH_SENDER_ID`,e.USER_CARRIER_SINCH_SENDER_ID=`USER_CARRIER_SINCH_SENDER_ID`,e.USER_CARRIER_INFOBIP_SENDER_ID=`USER_CARRIER_INFOBIP_SENDER_ID`,e.USER_CARRIER_MESSAGE_BIRD_SENDER_ID=`USER_CARRIER_MESSAGE_BIRD_SENDER_ID`,e.USER_CARRIER_AWS_SENDER_ID=`USER_CARRIER_AWS_SENDER_ID`,e.USER_CARRIER_TELNYX_SENDER_ID=`USER_CARRIER_TELNYX_SENDER_ID`,e}({}),NM=function(e){return e.REGISTERED=`Registered`,e.NOT_REGISTERED=`Not registered`,e.IN_REVIEW=`In review`,e.ACTION_REQUIRED=`Action required`,e.FAILED=`Failed`,e}({}),PM=function(e){return e.tollFree=`tollfree`,e.tenDlc=`tendlc`,e}({}),FM=class extends pl{};U([v()],FM.prototype,`phone`,void 0),U([y(null)],FM.prototype,`label`,void 0),U([at()],FM.prototype,`sms`,void 0),U([at()],FM.prototype,`voice`,void 0),U([at()],FM.prototype,`mms`,void 0),U([v()],FM.prototype,`byocCarrierId`,void 0),FM=U([Be(md.BYOC_PHONE)],FM);var IM=FM,LM=function(e){return e.LINKED=`linked`,e.FAILED=`failed`,e}({}),RM=class extends IM{};U([y()],RM.prototype,`userCarrier`,void 0),U([v()],RM.prototype,`status`,void 0),U([v()],RM.prototype,`carrierStatus`,void 0),U([v()],RM.prototype,`forwardingType`,void 0),U([v(null)],RM.prototype,`forwardedTo`,void 0),U([v()],RM.prototype,`forwardAudioId`,void 0),U([Ge(Yr,`forwardAudioId`)],RM.prototype,`forwardAudio`,void 0),RM=U([Be(md.BYOC_CARRIER_PHONE)],RM);var zM=RM,BM=e=>e.replace(/([^\w])/g,`\\$1`),VM=class{constructor(e,t,n,r,i,a,o,s,c,l,u){this.userNumbersPreloaderService=e,this.userNumbersService=t,this.translateService=n,this.userService=r,this.senderSettingsRouteHelperService=i,this.phoneService=a,this.userSettingsService=o,this.byocHelperService=s,this.byocService=c,this.phoneNumbersService=l,this.senderChannelManager=u,this.optionsCache={}}async fetchData(e,t){let[n,r,i,a,o]=await Promise.all([this.fetchUserNumbers(e),this.fetchChannel(`whatsApp`,t),this.fetchChannel(`widgets`,t),this.fetchChannel(`facebook`,t),this.fetchChannel(`instagram`,t)]);return await this.preloadByocSettings(n.byoc),{...n,whatsApp:r,widgets:i,facebook:a,instagram:o}}async preloadByocSettings(e){if(Object.values(e).some(e=>e.length))try{await this.byocService.getSettings()}catch{}}async fetchUserNumbers(e){await this.userNumbersPreloaderService.preload();let t=this.userNumbersService.findUserNumbersOrFail();return this.userNumbersService.parseUserNumbers(t,e)}async fetchChannel(e,t){return t?.includes(e)?[]:(await this.senderChannelManager.resolveProvider(e)).fetchSenders()}getSenderSourceRegistrationBadge(e){return{[NM.REGISTERED]:{color:`green`,label:this.translateService.t(`fieldSelectSearchSenderSettings.registrationStatuses.registered`)},[NM.IN_REVIEW]:{color:`blue`,label:this.translateService.t(`fieldSelectSearchSenderSettings.registrationStatuses.inReview`)},[NM.ACTION_REQUIRED]:{color:`orange`,label:this.translateService.t(`f
2ieldSelectSearchSenderSettings.registrationStatuses.actionRequired`)},[NM.NOT_REGISTERED]:{color:`orange`,label:this.translateService.t(`fieldSelectSearchSenderSettings.registrationStatuses.notRegistered`)},[NM.FAILED]:{color:`red`,label:this.translateService.t(`fieldSelectSearchSenderSettings.registrationStatuses.failed`)}}[e]}getDefaultOption(){return{[Nf]:this.translateService.t(`fieldSelectSearchSenderSettings.defaultCallerSelectValue`),[cf]:``}}getOverrideOptionMap(){return{isNoAvailable:{senderIds:{overrideOption:!0,type:`string`,text:this.translateService.t(`fieldSelectSearchSenderSettings.noAvailableSenderIds`),value:`senderIds`,disabled:!0}},isNotSupportedSenderIdMap:{senderIds:{overrideOption:!0,type:`string`,text:this.translateService.t(`fieldSelectSearchSenderSettings.senderIDisNotSupported`),value:`senderIds`,disabled:!0}},isNotSupportedUserNumbersMap:{userNumbers:{overrideOption:!0,type:`string`,text:this.translateService.t(`fieldSelectSearchSenderSettings.ownMobileSettingIsNotSupported`),value:`userNumbers`,disabled:!0}},isNotSupportedSharedNumbersMap:{shared:{overrideOption:!0,type:`string`,text:this.translateService.t(`fieldSelectSearchSenderSettings.sharedMobileSettingIsNotSupported`),value:`shared`,disabled:!0}},isNotSupportedCountryMap:{senderIds:{overrideOption:!0,type:`string`,text:this.translateService.t(`fieldSelectSearchSenderSettings.senderIDisNotSupported`),value:`senderIds`,disabled:!0},userNumbers:{overrideOption:!0,type:`string`,text:this.translateService.t(`fieldSelectSearchSenderSettings.ownMobileSettingIsNotSupported`),value:`userNumbers`,disabled:!0}},senderSettingsEmptyMap:{dedicated:e=>({overrideOption:!0,type:`button`,to:this.senderSettingsRouteHelperService.getBuyNumberNumberRoute(e),text:this.translateService.t(`fieldSelectSearchSenderSettings.buyTextmagicDedicatedNumber`),value:`dedicated`}),senderIds:()=>({overrideOption:!0,type:`button`,to:{name:L.SmsVoiceSenderIds},text:this.translateService.t(`fieldSelectSearchSenderSettings.applyForSenderID`),value:`senderIds`}),userNumbers:()=>({overrideOption:!0,type:`button`,to:{name:`user.accounts.settings.profile`},text:this.userService.hasUserPhone()?this.translateService.t(`fieldSelectSearchSenderSettings.verifyYourMobileNumber`):this.translateService.t(`fieldSelectSearchSenderSettings.addYourMobileNumberUnderAccount`),value:`userNumbers`}),byocNumbers:()=>({overrideOption:!0,type:`button`,to:{name:L.SmsVoiceByocFlow},text:this.translateService.t(`fieldSelectSearchSenderSettings.connectCPaaSProvider`),value:`byocNumbers`})}}}getOverrideOptionForCountry(e,t,n=!0){let r=this.getOverrideOptionMap();return!n&&r.isNoAvailable[e]?r.isNoAvailable[e]??null:t&&!t.ssiAllowSenderId&&r.isNotSupportedSenderIdMap[e]?r.isNotSupportedSenderIdMap[e]??null:t&&!t.ssiAllowMobilePhone&&r.isNotSupportedUserNumbersMap[e]?r.isNotSupportedUserNumbersMap[e]??null:t&&!t.ssiAllowShared&&r.isNotSupportedSharedNumbersMap[e]?r.isNotSupportedSharedNumbersMap[e]??null:!t&&!this.userService.isUserCountrySupportsAllSenderSettings()&&r.isNotSupportedCountryMap[e]?r.isNotSupportedCountryMap[e]??null:null}getOptionsMap(e){return e.reduce((e,t)=>(`value`in t&&(e[t[cf]]=t),e),{})}getSubItems(e,t,n,r,i,a,o,s,c){let l=[];if(o?.includes(n))return l;let u={subheader:e,text:n,value:n,disabled:!0},d=this.userSettingsService.currentUserSettingsOrFail(),f=this.getOverrideOptionForCountry(n,r,d.showSenderIds);if(f&&i?.includes(n))return l;if(f)return l.push(u),l.push(f),l;if(t.length)return s?.includes(n)||l.push(u),l.push(...t),l;if(a?.includes(n))return l;let p=this.getEmptyOverrideOption(n,r?.countryId);return p&&(l.push(u),p.openInNewTab=c,l.push(p)),l}getEmptyOverrideOption(e,t){let n=this.getOverrideOptionMap().senderSettingsEmptyMap[e];if(n)return n(t);if(AM(e))return this.senderChannelManager.getProviderOrNull(e)?.getConnectOption?.()}async getOptions(e){let{getDefaultOption:t,hideOverrideOptionsFor:n=[],hideEmptyOptionsFor:r=[],hideOptionsFor:i=[`whatsApp`,`widgets`,`facebook`,`instagram`],hideTitleOptionsFor:a=[],enableByocSenderId:o,isOpenBuyTMDedicatedNumberInNewTab:s,senderSettings:c}=e,l=[],u=await this.fetchData(o,i),d;c&&(d=c.countries.find(e=>e.id===c.countryId));let f=t?t():this.getDefaultOption();f&&l.push({...f,isDefaultOption:!0});let p=e=>{let t=e.senderSources.map(t=>this.mapSenderSourcesToSubItems({numberType:e.numberType,sender:t,senderSettingsCountry:d}
2)).filter(Boolean);l.push(...this.getSubItems(e.title,t,e.numberType,d,n,r,i,a,s))};return u.byoc&&Object.values(u.byoc).some(e=>e.length)?Object.entries(u.byoc).forEach(([e,t])=>{if(!t.length)return;let n=e,r=this.byocHelperService.getProviderLabel(n),i=this.translateService.t(`fieldSelectSearchSenderSettings.byoc`,{provider:r});p({title:i,numberType:n,senderSources:t})}):p({title:this.translateService.t(`fieldSelectSearchSenderSettings.byocNumbers`),numberType:`byocNumbers`,senderSources:[]}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.dedicated`),numberType:`dedicated`,senderSources:u.dedicated}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.whatsApp`),numberType:`whatsApp`,senderSources:u.whatsApp}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.widgets`),numberType:`widgets`,senderSources:u.widgets}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.facebook`),numberType:`facebook`,senderSources:u.facebook}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.instagram`),numberType:`instagram`,senderSources:u.instagram}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.senderIds`),numberType:`senderIds`,senderSources:u.senderIds}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.userNumbers`),numberType:`userNumbers`,senderSources:u.userNumbers}),p({title:this.translateService.t(`fieldSelectSearchSenderSettings.shared`),numberType:`shared`,senderSources:u.shared}),l}getCachedOptions(e){return e?this.optionsCache[e]??null:null}setCachedOptions(e,t){this.optionsCache[e]=t}clearCache(e){e?delete this.optionsCache[e]:this.optionsCache={}}isValueChannelFilterValue(e){return!!e&&typeof e==`object`&&`type`in e}filterOption(e,t,n){let r=e=>{let t;if(this.isValueChannelFilterValue(e)?(t=e.value,t??(t=e.type)):t=e,!t)return!1;let r=(n.trim().startsWith(`+`)?WO(t):t).replace(/[\s()./-]/g,``),i=n.replace(/[\s()./-]/g,``);return new RegExp(BM(i)).test(r)},{subheader:i}=e,{text:a,additionalData:o,value:s,country:c}=e;if(i)return!0;let l=a&&t.test(a);if(l)return l;let u=o&&t.test(o);if(u)return u;let d=r(s);if(d)return d;if(c){let e=new RegExp(BM(n),`i`).test(c.name);if(e)return e}return!1}filterOptions(e,t){let n=new RegExp(BM(t),`i`),r=[];return e.forEach(e=>{this.filterOption(e,n,t)&&r.push(e)}),r}async getCallsOptions(e={}){let{hideEmptyOptionsFor:t=[],hideTitleOptionsFor:n=[]}=e,r=[],i=await this.phoneNumbersService.getVoiceableNumbers(),a=`dedicated`,o=i.items.map(e=>this.mapSenderSourcesToSubItems({numberType:a,sender:e})).filter(Boolean);return r.push(...this.getSubItems(this.translateService.t(`fieldSelectSearchSenderSettings.voiceEnabled`),o,a,void 0,void 0,t,void 0,n)),r}getSenderAdditionalDataLabel(e,t){return e.label||t?.name||``}mapSenderSourcesToSubItems(e){if(jM(e)){let t=this.senderChannelManager.getProviderOrNull(e.numberType);return t?t.mapToSubItem(e.sender):null}let{numberType:t,sender:n,senderSettingsCountry:r}=e,i=!1,a=Wc.DEDICATED,o,s,c,l=!1,u,d=!1,f=new mi,p;if(t===`dedicated`){if(f=this.phoneService.getCountryByPhone(n.phone)??void 0,f&&r?.isNativeDedicatedOnly&&!r?.allowedPhoneNumberCountryForNativeDedicatedOnly.includes(f.id))return null;o=this.phoneService.preparePhoneForDisplay(n.phone),s=this.getSenderAdditionalDataLabel(n,f),c=n.phone,`registration`in n&&(u=n.registration?.registrationStatus)}else if(t===`senderIds`)f=void 0,l=!0,o=n.phone,s=n.label??``,c=n.phone,p=n.type;else if(t===`userNumbers`||t===`shared`)f=this.phoneService.getCountryByPhone(n.phone)??void 0,l=!1,o=this.phoneService.preparePhoneForDisplay(n.phone),s=this.getSenderAdditionalDataLabel(n,f),c=n.phone,p=n.type;else if(t===`byocNumbers`||t===`twilio`||t===`vonage`||t===`bandwidth`||t===`sinch`||t===`infobip`||t===`messagebird`||t===`aws`||t===`telnyx`)l=this.userNumbersService.isSenderId(n),f=this.phoneService.getCountryByPhone(n.phone)??void 0,i=!0,a=Wc.BYOC,o=l?n.phone:this.phoneService.preparePhoneForDisplay(n.phone),s=this.getSenderAdditionalDataLabel(n,f),c=n.phone,u=n.registration?.registrationStatus,d=n.carrierStatus===Aa.FAILED,p=n.type;else throw new Qa(t);o===s&&(s=``);let ee={isSenderSettings:!0,isByoc:i,sourceType:p,isSenderId:l,value:c,text:o,additionalData:s,id:n.id,country:f,phoneType:a,badge:u?this.get
2SenderSourceRegistrationBadge(u):void 0,numberType:t},te=n.status===LM.FAILED;return d||te?(ee.disabled=!0,ee.error=!0,ee.icon=`error`,ee.tooltip={isSimple:!0,keypath:d?`byocProviderCell.failedAuth`:`byocPhoneCell.tooltip`}):i&&!this.byocService.isSendingAllowed()&&(ee.disabled=!0,ee.icon=`error`,ee.tooltip={isSimple:!0,keypath:`fieldSelectSearchSenderSettings.byocSendingNotAllowed`}),ee}};VM=U([g(),B(0,m(V.UserNumbersPreloaderService)),B(1,m(V.UserNumbersService)),B(2,m(V.TranslateService)),B(3,m(V.UserService)),B(4,m(V.SenderSettingsRouteHelperService)),B(5,m(V.PhoneService)),B(6,m(V.UserSettingsService)),B(7,m(V.ByocHelperService)),B(8,m(V.ByocService)),B(9,m(V.PhoneNumbersService)),B(10,m(V.SenderChannelManager))],VM);var HM=VM,UM={whatsApp:H.WhatsApp,widgets:H.WebWidgets,facebook:H.Facebook,instagram:H.Instagram},WM=class{constructor(e){this.appModuleResolverService=e,this.channels=new Map,this.pending=new Map}addService(e){let t=e.bindingValue?.numberType;if(!t)throw new G(`${String(e.id)}: sender channel provider must declare static numberType`);this.channels.has(t)||this.channels.set(t,e.id)}resolveProvider(e){let t=this.getProviderOrNull(e);if(t)return Promise.resolve(t);let n=this.pending.get(e);if(n)return n;let r=this.loadChannel(e);return this.pending.set(e,r),r}getProviderOrNull(e){let t=this.channels.get(e);return!t||!Ms(t)?null:Fo(t)}async loadChannel(e){try{await this.appModuleResolverService.resolve({modules:[UM[e]]});let t=this.channels.get(e);if(!t)throw new G(`SenderChannelProvider for "${e}" was not registered after loading module "${UM[e]}".`);return Fo(t)}finally{this.pending.delete(e)}}};WM=U([g(),B(0,m(V.AppModuleResolverService))],WM);var GM=class extends Q{constructor(e,t,n,r,i){super(e,t,n,r,i),this.serializerService=e,this.api=t,this.endpointsService=n,this.loggerService=r,this.filterQueryService=i}async fetchUserNumbers(e){let t=this.getApiSource(),n=this.endpointsService.getPath(`userNumbers`),r={userId:e},i=await t.get(n,{params:r});if(!i.data)throw new Ml(`Response data expected`);return await this.insertOrUpdateRaw([{...i.data,id:this.getUserNumbersId(e)}]),this.findUserNumbersOrFail(e)}findUserNumbersOrFail(e){return this.findEntityByIdOrFail(this.getUserNumbersId(e))}findUserNumbersOrNull(e){return this.findEntityByIdOrNull(this.getUserNumbersId(e))}getUserNumbersId(e){return e?`user-${e}`:`all`}};GM=U([Y({model:TM}),g(),h(),B(0,m(V.SerializerService)),B(1,m(V.Api)),B(2,m(V.EndpointsService)),B(3,m(V.LoggerService)),B(4,m(V.FilterQueryService))],GM);var KM=GM,qM=class{constructor(e){this.preloadRepository=e,this.key=`strictPreloaderService`}async preload(){if(!this.isPreloaded()){this.startPreloading();try{let e=await this.loadData();this.markAsPreloaded(e)}catch(e){throw this.markAsFailed(),e}}}isPreloaded(){return this.getPreload()?.isPreloaded||!1}getPayload(){return this.getPreload()?.payload}startPreloading(){this.preloadRepository.insertItems([{id:this.key,isLoading:!0,isFailed:!1,isPreloaded:!1,updatedAt:new Date().toISOString()}])}markAsFailed(){this.preloadRepository.updateItem({id:this.key,isLoading:!1,isFailed:!0,isPreloaded:!1,updatedAt:new Date().toISOString()})}markAsPreloaded(e){this.preloadRepository.updateItem({id:this.key,isLoading:!1,isFailed:!1,isPreloaded:!0,updatedAt:new Date().toISOString(),payload:e})}markAsNotPreloaded(){this.preloadRepository.updateItem({id:this.key,isLoading:!1,isFailed:!1,isPreloaded:!1,updatedAt:new Date().toISOString()})}getPreload(){return this.preloadRepository.findEntityByIdOrNull(this.key)}};qM=U([g(),B(0,m(V.PreloadRepository))],qM);var JM=qM,YM=class extends JM{constructor(e,t){super(t),this.userNumbersService=e,this.preloadRepository=t,this.key=`userNumbersPreloaderService`}async loadData(){await this.userNumbersService.fetchUserNumbers()}};YM=U([g(),h(),B(0,m(V.UserNumbersService)),B(1,m(V.PreloadRepository))],YM);var XM=YM,ZM=class extends Cf{};ZM=U([Be(md.DELIVERED_SMS_COUNTER)],ZM);var QM=ZM,$M=class extends uM{};$M=U([Y({model:QM}),g(),h()],$M);var eN=$M,tN=class extends Cf{};tN=U([Be(md.FAILED_SMS_COUNTER)],tN);var nN=tN,rN=class extends uM{};rN=U([Y({model:nN}),g(),h()],rN);var iN=rN,aN=class extends Cf{};aN=U([Be(md.REJECTED_SMS_COUNTER)],aN);var oN=aN,sN=class extends uM{};sN=U([Y({model:oN}),g(),h()],sN);var cN=sN,lN=class extends Q{updatePhoneLabel(e,t){let n=this.endpointsService.getPath(`phoneNumberLabelUpdate`,[e]);return this.getApiSource().put(n,{label:t})}
2getNumberById(e){return this.getRequest(e)}async getNumberByPhone(e){let t=this.endpointsService.getPath(`phoneNumberByPhone`,[e]),n=await this.getApiSource().get(t);return await this.insertOrUpdate([n.data]),this.findEntityByIdOrFail(`${n.data.id}`)}async buyNumber(e){let t=this.endpointsService.getPath(`phoneNumberBuy`);return(await this.getApiSource().post(t,e)).data.id}async changeForwardingNumber(e){let t=this.endpointsService.getPath(`phoneNumberChangeForwarding`);await this.getApiSource().put(t,e)}async fetchPhoneNumbers(e,t){let n=await this.gridRequest({filter:[],other:e},t);return this.insertOrUpdate(n.items),n}restoreNumber(e){let t=this.endpointsService.getPath(`phoneNumbersRestore`,[e]);return this.getApiSource().put(t)}cancelNumber(e){let t=this.endpointsService.getPath(`phoneNumbersSingle`,[e]);return this.getApiSource().delete(t)}};lN=U([Y({model:Oi,fetch:`phoneNumbers`,single:`phoneNumbersSingle`}),g(),h()],lN);var uN=lN,dN=class{constructor(e,t,n){this.em=e,this.loggerService=n,this.columnsFromStore=t()}applyDefaultValuesToColumns(e){return Object.keys(e).reduce((t,n)=>(t[n]={growRatio:1,minWidth:100,...e[n]},t),{})}async init(e){let t=this.applyDefaultValuesToColumns(e||this.getInitColumns());await this.columnsFromStore.init(t)}async reload(){await this.init()}getInitColumns(){return this.columnsFromStore.getInitColumns()}getVisibleColumns(){return this.columnsFromStore.getVisibleColumns()}getInvisibleColumns(){return this.columnsFromStore.getInvisibleColumns()}getColumnEditorColumns(){return this.columnsFromStore.getColumnEditorColumns()}getColumns(){return this.columnsFromStore.getColumns()}toQuery(){return this.columnsFromStore.toQuery()}async makeColumns(e,t,n){if(this.isEditable()&&this.columnsFromStore.getColumns().columns.length>0)return this.columnsFromStore.makeColumns(e,t);try{let r=await this.loadColumns(e);if(ge(r))return this.log(`empty data from back`,`makeColumns:${e}`),await this.columnsFromStore.makeColumns(e,t);let i=r.map(e=>({name:e.columnName,isVisible:e.visible}));return this.columnsFromStore.updateStore(i),n?.(r),i}catch{return this.log(`error on load columns`,`makeColumns:${e}`),this.columnsFromStore.makeColumns(e,t)}}async recoveryColumns(e,t,n){let r=await this.columnsFromStore.recoveryColumns(e,t);return this.makeColumns(e,t,n),r}async loadColumns(e){if(this.isEditable())return this.columnsFromStore.getColumnRepository().loadColumns(e);let t=this.columnsFromStore.getColumns();return t.columns.length>0?t.columns.map((e,t)=>
2({columnName:e.name,columnOrder:t,visible:e.isVisible})):[]}async saveColumns(e,t,n){try{this.log(`To save`,`saveColumns${this.getSettings().tableId}`),this.logRaw(e);let[r]=await Promise.all([this.columnsFromStore.saveColumns(e,t),n?Promise.resolve():this.columnsFromStore.getColumnRepository().saveColumns(e,t)]);return r}catch(e){if(e instanceof Error)throw new Jo(e.toString())}return[]}getDefaultColumns(){return this.columnsFromStore.getDefaultColumns()}getColumn(e){return this.columnsFromStore.getColumn(e)}hasColumn(e){return this.columnsFromStore.hasColumn(e)}setTableId(e){this.columnsFromStore.setTableId(e)}getTableId(){return this.columnsFromStore.getTableId()}getSettings(){return this.columnsFromStore.getSettings()}columnsToPaginationUrlColumn(e){return this.columnsFromStore.columnsToPaginationUrlColumn(e)}reset(){this.columnsFromStore.reset()}isNewSizingFlowEnabled(){return!1}isEditable(){return!1}isSortable(){return!1}hideHeaderSorting(){return!1}isDefaultState(e=!0){return this.columnsFromStore.isDefaultState(e)}isRowDisabled(e){return!1}filterVisibleColumns(e){return e.filter(e=>{if(!e||!e.columnName||!this.hasColumn(e.columnName))return!1;let t=this.getColumn(e.columnName);return typeof e.columnOrder==`number`&&(t.columnOrder=e.columnOrder),t&&e.visible})}log(e,t){this.loggerService.log(`columns`,e,t)}logRaw(e){this.loggerService.raw(`columns`,e)}};dN=U([g(),B(0,m(V.EntityManager)),B(1,m(V.ColumnsFromStoreFactory)),B(2,m(V.LoggerService))],dN);var fN=dN,pN=class extends fN{getInitColumns(){let e=this.getStructuredColumns();return Object.entries(e).reduce((e,[t,n],r)=>({...e,[t]:{columnOrder:r,visible:n.visible===void 0||n.visible,required:!0,...n}}),{})}};pN=U([g(),h()],pN);var mN=pN,hN=class extends mN{constructor(e,t,n,r){super(e,t,n),this.em=e,this.loggerService=n,this.columnsSizeService=r}getStructuredColumns(){return{originalName:{label:`tableColumns.fileName`,growRatio:4,minWidth:200},length:{},fileSize:{},uploadedAt:{label:`tableColumns.uploadTime`,minWidth:this.columnsSizeService.getDateMinWidth()},action:{hideHeaderName:!0,growRatio:0,minWidth:92}}}};hN=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ColumnsFromStoreFactory)),B(2,m(V.LoggerService)),B(3,m(V.ColumnsSizeService))],hN);var gN=hN,_N=class extends qE{async uploadFile(e){return this.getDomainRepository().uploadFile(e)}downloadFile(e){return this.getDomainRepository().downloadFile(e)}};_N=U([oD({model:Yr}),g(),h()],_N);var vN=_N,yN=class extends pl{};U([v()],yN.prototype,`id`,void 0),U([v()],yN.prototype,`number`,void 0),U([v()],yN.prototype,`accountId`,void 0),U([y()],yN.prototype,`accountName`,void 0),U([v()],yN.prototype,`accountEmail`,void 0),U([y()],yN.prototype,`campaignId`,void 0),U([y()],yN.prototype,`campaignName`,void 0),U([y()],yN.prototype,`requestId`,void 0),U([y()],yN.prototype,`requestStatus`,void 0),U([y()],yN.prototype,`status`,void 0),U([y()],yN.prototype,`countryId`,void 0),U([Ge(mi,`countryId`)],yN.prototype,`country`,void 0),U([y()],yN.prototype,`campaignStatus`,void 0),U([y()],yN.prototype,`numberStatus`,void 0),U([at()],yN.prototype,`canLink`,void 0),U([v()],yN.prototype,`expireAt`,void 0),U([at()],yN.prototype,`isCanceled`,void 0),yN=U([Be(md.TEN_DLC_PHONE_NUMBER)],yN);var bN=yN,xN=class{constructor(e){this.em=e,this.campaignId=null}setCampaignId(e){this.campaignId=e}getFetchEndpointParams(){return[]}async gridRequest(e,t,n,r){if(this.campaignId===null)throw new G(`campaignId is null`);return this.getRepo().gridRequest({...e,other:{campaignId:this.campaignId}},t,n,r)}getRepo(){return this.em.getRepository(bN)}};xN=U([g(),B(0,m(V.EntityManager))],xN);var SN=xN,CN=`phoneNumberLabel`,wN=function(e){return e.smsChat=`SMS Chat`,e.notSupported=`NOT SUPPORTED`,e.activateForwarding=`Activate forwarding`,e.activating=`Activating...`,e.externalDevice=`EXTERNAL DEVICE`,e}({}),TN=function(e){return e.forwardDirectionOff=`off`,e.forwardDirectionChat=`chat`,e.forwardDirectionPhone=`phone`,e.forwardDirectionStub=`chat_to_stub`,e}({}),EN=class extends qE{constructor(e,t,n,r,i,a,o,s){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.userService=r,this.teamWorkflowService=i,this.userSettingsService=a,this.userNumbersPreloaderService=o,this.monitoringService=s}isAllowBuyCaLocalNumber(){return!1}async updatePhoneLabel(e,t){await this.getDomainRepository().updatePhoneLabel(e,t),this.notify([e],cl.UPDATE)}async buyNumber(e){let t=await this.getDomainRepository().buyNumber(e);return this.userNumbersPreloaderService.markAsNotPreloaded(),t}getNumberById(e){return this.getDomainRepository().getNumberById(e)}getNumberByPhone(e){return this.getDomainRepository().getNumberByPhone(e)}fill(e){return this.getDomainRepository().fill(e)}findEntityWithAll(e){return this.getDomainRepository().query().withAll().find(e)}async changeForwardingNumber(e){await this.getDomainRepository().changeForwardingNumber(e),this.notify([e.numberId],cl.UPDATE)}async fetchPhoneNumbersByUserId(e){let t={userId:e},{items:n}=await this.getDomainRepository().fetchPhoneNumbers(t,{requestParam
2s:{page:1,perPage:1e3},pageKey:``});return n}async getVoiceableNumbers(){let e=this.userService.currentUser(),t=this.userSettingsService.currentUserSettingsOrFail().parentId,n=this.teamWorkflowService.isUsersWorkflow()?t:e.id,r=1e3,i=await this.getNumbersByFilter({filter:[],other:{userId:n,voiceable:!0}},{pageKey:`1-${r}`,requestParams:{page:1,perPage:r}});if(i.pagination.totalCount>i.pagination.perPage){let e=new G(`Voiceable numbers do not fit into a single page. totalCount = ${i.pagination.totalCount}, perPage = ${i.pagination.perPage}`);if(this.monitoringService.logError(e),Ko)throw e}return i}getNumbersByFilter(e,t){return this.getDomainRepository().gridRequest(e,t)}isAllowSetUpCallForwarding(e){return e.voiceAvailable&&e.forwardCallsTo!==wN.notSupported}async restoreNumber(e){await this.getDomainRepository().restoreNumber(e),this.userNumbersPreloaderService.markAsNotPreloaded(),this.notify([e],cl.UPDATE)}async cancelNumber(e){await this.getDomainRepository().cancelNumber(e),this.userNumbersPreloaderService.markAsNotPreloaded(),this.notify([e],cl.UPDATE)}};EN=U([oD({model:Oi}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.UserService)),B(4,m(V.TeamWorkflowService)),B(5,m(V.UserSettingsService)),B(6,m(V.UserNumbersPreloaderService)),B(7,m(V.MonitoringService))],EN);var DN=EN,ON=t(((e,t)=>{t.exports={AED:`د.Ø¥`,AFN:`Ø`,ALL:`L`,AMD:`Ö`,ANG:`Æ`,AOA:`Kz`,ARS:`$`,AUD:`$`,AWG:`Æ`,AZN:`â¼`,BAM:`KM`,BBD:`$`,BDT:`à§³`,BGN:`лв`,BHD:`.د.ب`,BIF:`FBu`,BMD:`$`,BND:`$`,BOB:`$b`,BOV:`BOV`,BRL:`R$`,BSD:`$`,BTC:`â¿`,BTN:`Nu.`,BWP:`P`,BYN:`Br`,BYR:`Br`,BZD:`BZ$`,CAD:`$`,CDF:`FC`,CHE:`CHE`,CHF:`CHF`,CHW:`CHW`,CLF:`CLF`,CLP:`$`,CNH:`Â¥`,CNY:`Â¥`,COP:`$`,COU:`COU`,CRC:`â¡`,CUC:`$`,CUP:`â±`,CVE:`$`,CZK:`KÄ`,DJF:`Fdj`,DKK:`kr`,DOP:`RD$`,DZD:`دج`,EEK:`kr`,EGP:`£`,ERN:`Nfk`,ETB:`Br`,ETH:`Î`,EUR:`â¬`,FJD:`$`,FKP:`£`,GBP:`£`,GEL:`â¾`,GGP:`£`,GHC:`âµ`,GHS:`GHâµ`,GIP:`£`,GMD:`D`,GNF:`FG`,GTQ:`Q`,GYD:`$`,HKD:`$`,HNL:`L`,HRK:`kn`,HTG:`G`,HUF:`Ft`,IDR:`Rp`,ILS:`âª`,IMP:`£`,INR:`â¹`,IQD:`ع.د`,IRR:`ï·¼`,ISK:`kr`,JEP:`£`,JMD:`J$`,JOD:`JD`,JPY:`Â¥`,KES:`KSh`,KGS:`лв`,KHR:`á`,KMF:`CF`,KPW:`â©`,KRW:`â©`,KWD:`KD`,KYD:`$`,KZT:`â¸`,LAK:`â`,LBP:`£`,LKR:`â¨`,LRD:`$`,LSL:`M`,LTC:`Å`,LTL:`Lt`,LVL:`Ls`,LYD:`LD`,MAD:`MAD`,MDL:`lei`,MGA:`Ar`,MKD:`ден`,MMK:`K`,MNT:`â®`,MOP:`MOP$`,MRO:`UM`,MRU:`UM`,MUR:`â¨`,MVR:`Rf`,MWK:`MK`,MXN:`$`,MXV:`MXV`,MYR:`RM`,MZN:`MT`,NAD:`$`,NGN:`â¦`,NIO:`C$`,NOK:`kr`,NPR:`â¨`,NZD:`$`,OMR:`ï·¼`,PAB:`B/.`,PEN:`S/.`,PGK:`K`,PHP:`â±`,PKR:`â¨`,PLN:`zÅ`,PYG:`Gs`,QAR:`ï·¼`,RMB:`ï¿¥`,RON:`lei`,RSD:`Ðин.`,RUB:`â½`,RWF:`Râ£`,SAR:`ï·¼`,SBD:`$`,SCR:`â¨`,SDG:`ج.س.`,SEK:`kr`,SGD:`S$`,SHP:`£`,SLL:`Le`,SOS:`S`,SRD:`$`,SSP:`£`,STD:`Db`,STN:`Db`,SVC:`$`,SYP:`£`,SZL:`E`,THB:`฿`,TJS:`SM`,TMT:`T`,TND:`د.ت`,TOP:`T$`,TRL:`â¤`,TRY:`âº`,TTD:`TT$`,TVD:`$`,TWD:`NT$`,TZS:`TSh`,UAH:`â´`,UGX:`USh`,USD:`$`,UYI:`UYI`,UYU:`$U`,UYW:`UYW`,UZS:`лв`,VEF:`Bs`,VES:`Bs.S`,VND:`â«`,VUV:`VT`,WST:`WS$`,XAF:`FCFA`,XBT:`É`,XCD:`$`,XOF:`CFA`,XPF:`â£`,XSU:`Sucre`,XUA:`XUA`,YER:`ï·¼`,ZAR:`R`,ZMW:`ZK`,ZWD:`Z$`,ZWL:`$`}}));t(((e,t)=>{var n=ON();t.exports=function(e){if(typeof e!=`string`)return;let t=e.toUpperCase();if(Object.prototype.hasOwnProperty.call(n,t))return n[t]},t.exports.currencySymbolMap=n}))();var kN=e=>e>=1?2:3,AN=(e,t,n=gd,r)=>{let i=jN(Number.isInteger(r)?r:kN(e)),a={style:t?`currency`:`decimal`,currency:t,maximumFractionDigits:i};try{return new Intl.NumberFormat(n,a).format(e)}catch(t){if(t instanceof RangeError)return new Intl.NumberFormat(n,{...a,minimumFractionDigits:0}).format(e);throw t}},jN=e=>Math.max(Math.min(e,20),0),MN=(e,t=gd)=>new Intl.NumberFormat(t,{style:`currency`,currency:e}).format(0).replace(/\d|\s|\.|,/g,``).trim(),NN=e=>{if(e===``||/^\d{1,12}(\.\d{0,2})?$/.test(e))return!0;let t=e.split(`,`);if(t.length>4)return!1;let n=t[t.length-1],r=t[0],i=t.slice(1);return!(n===``&&(i.length===0||!t.slice(0,-1).every((e,t)=>t===0?/^\d{1,3}$/.test(e):/^\d{3}$/.test(e)))||t.length===1&&!/^\d{1,3}$/.test(r)||!i.every((e,t)=>t===i.length-1?/^\d{3}(\.\d{0,2})?$/.test(e)||/^\d{1,3}?$/.test(e)||e===``:/^\d{3}$/.test(e)))},PN=e=>e*100,FN=e=>e.trim().replace(`,`,`.`),IN=(e,t=2)=>{let n=FN(e);return n===``||RegExp(`^\\d+(\\.\\d{1,${t}})?$`).test(n)},LN=class{constructor(e,t){this.translateService=e,this.userService=t}formatInteger(e){return this.translateService.n(e,kl.INTEGER)}formatDecimalWithFractional(e){return this.translateService.n(e,kl.DECIMAL)}formatDecimal(e){return Number.isInteger(e)?this.formatInteger(e):this.formatDecimalWithFractional(e)}formatNumber(e,t=1){if(e<0)return`-${this.formatNumber(Math.abs(e),t)}`;if(e<1e3)return e.toString();let n=+(e/1e3).toFixed(t);return n<1e3?`${n}K`:`${+(e/1e6).toFixed(t)}M`}
2formatToCommasNumber(e){return e.toLocaleString(`en`)}formatMoneyForCurrentUser(e,t=gd,n){return AN(e,this.userService.currentUser().currency?.id??`USD`,t,n)}getOrdinalSuffix(e){return{one:`st`,two:`nd`,few:`rd`,other:`th`}[new Intl.PluralRules(`en`,{type:`ordinal`}).select(e)]}formatOrdinal(e){return`${e}${this.getOrdinalSuffix(e)}`}};LN=U([g(),B(0,m(V.TranslateService)),B(1,m(V.UserService))],LN);var RN=LN,zN=class{constructor(e,t){this.baseWrapperService=e,this.loggerService=t}build(e,t,n){this.baseWrapperService.build(e,t,af),this.log(e,`build`)}clearParams(e){this.baseWrapperService.clearParams(e),this.log(e,`clearParams`)}destroy(e){this.baseWrapperService.destroy(e),this.log(e,`destroy`)}getParams(e){return this.baseWrapperService.getParams(e)}getTableParams(e){return this.getParams(e)}getTableParam(e,t){return this.getParam(e,t)}getParam(e,t){return this.getParams(e)[t]}getWrapperData(e){return this.baseWrapperService.getWrapperData(e)}isExist(e){return this.baseWrapperService.isExist(e)}patchParams(e,t){return this.log({wrapperId:e,params:t},`patchParams`),t=this.replaceParams(e,t??{}),t}removeParams(e,t){this.log({wrapperId:e,paramsToDelete:t},`removeParams`),this.baseWrapperService.removeParams(e,t)}setParams(e,t){this.log({wrapperId:e,params:t},`setParams`),this.baseWrapperService.setParams(e,t)}async setParamsByTableData(e,t,n,r=!1){this.log({wrapperId:e,params:t},`setParamsByTableData`);let i={};for(let[n,r]of Object.entries(t))ge(r)?(this.log(`remove key${n}`,`setParamsByTableData:remove`),this.removeParams(e,[n])):(this.log({[n]:r},`setParamsByTableData:extend`),i[n]=r);return this.log(i,`setParamsByTableData:resultQuery`),this.replaceParams(e,i),{canBeRestored:!1}}replaceParams(e,t){let n={...this.getParams(e)};return Object.entries(t).forEach(([e,t])=>{n[e]=t}),this.setParams(e,n),n}getTableParamKey(e,t){return e}async removeParamsByTableKeys(e,t,n=!1){this.log({wrapperId:e,keysToRemove:t},`removeParamsByTableKeys`),this.removeParams(e,t)}applyDefaults(e,t,n){}canBeRestored(e){return!1}isBuilt(e){return this.baseWrapperService.isExist(e)}getAllTableParamsKeys(){return[Is,fo,rd,to,cd,Vs]}log(e,t){this.loggerService.log(`tableWrapper`,JSON.stringify(e),t)}};zN=U([g(),B(0,m(V.BaseWrapperService)),B(1,m(V.LoggerService))],zN);var BN=zN,VN=class extends BN{constructor(e,t,n){super(e,t),this.baseWrapperService=e,this.loggerService=t,this.storageService=n}build(e,t,n){super.build(e,t,af);let r=this.getStorageParams(e);super.setParams(e,r)}async setParamsByTableData(e,t,n,r=!0){let i=this.extractDataToStorage(t,n),a=this.transformStorage(i,e);this.setStorageParams(e,a,r);let o=this.extractDataToStore(t);return{...await super.setParamsByTableData(e,o,n,r),canBeRestored:this.canBeRestored(e)}}canBeRestored(e){return i(this.prepareToCompare(this.getStorageParams(e)),this.prepareToCompare(this.getParams(e)))}getTableParamKey(e,t){return BC(e,t)}getTableParams(e){return this.getParams(e)}async removeParamsByTableKeys(e,t,n=!0){return this.removeStorageParams(e,t,n),super.removeParamsByTableKeys(e,t,n)}transformStorage(e,t){return e}getStorageParams(e){return this.storageService.getParams(e)}setStorageParams(e,t,n=!0){return this.storageService.setParams(e,t,n)}removeStorageParams(e,t,n=!0){return this.storageService.removeParams(e,t,n)}extractDataToStore(e){return this.filterParams(e)}extractDataToStorage(e,t){let n=Object.fromEntries(Object.entries(e).map(([e,n])=>[e,this.pickByParamsToSave(n,t[e])]));return this.filterParams(n)}pickByParamsToSave(e,t){return!t||ge(e)?e:Array.isArray(e)?e.map(e=>dt(e,t)).filter(e=>!ge(e)):dt(e,t)}filterParams(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,ge(t)?null:t]))}prepareToCompare(e){return Object.fromEntries(Object.entries(Xe(e,[rd,cd])).map(([e,t])=>ge(t)?[e,t]:Array.isArray(t)?[e,t.filter(e=>!ge(e))]:lt(t)?[e,this.prepareToCompare(t)]:[e,t]).filter(([e,t])=>!ge(t)))}};VN=U([g(),h(),B(0,m(V.BaseWrapperService)),B(1,m(V.LoggerService)),B(2,ze())],VN);var HN=VN,UN=class extends HN{constructor(e,t,n){super(e,t,n),this.baseWrapperService=e,this.loggerService=t,this.storageService=n,this.defaultsProviderByWrapperId=new Map}extractDataToStorage(e,t){return this.filterParams(e)}transformStorage(e,t){let n=this.defaultsProviderByWrapperId.get(t)?.();return Object.fromEntries(Object.entries(e).map(([e,t])=>
2{if(!n)return[e,t];let r=n[e];return r===void 0?[e,t]:[e,nt(t,r)?null:t]}))}applyDefaults(e,t,n){this.defaultsProviderByWrapperId.set(e,t);let r=this.getStorageParams(e),i=this.extractDataToStorage(r,n),a=this.transformStorage(i,e);this.setStorageParams(e,a,!0)}destroy(e){this.defaultsProviderByWrapperId.delete(e),super.destroy(e)}};UN=U([g(),h(),B(0,m(V.BaseWrapperService)),B(1,m(V.LoggerService)),B(2,m(V.QueryStorageService))],UN);var WN=UN,GN=class{constructor(e,t,n){this.routerService=e,this.loggerService=t,this.windowService=n}getQueryParams(){return this.routerService.getCurrentRoute().query}getQueryParam(e){return this.getQueryParams()[e]}subscribe(e,t){this.routerService.subscribe(e,t)}unsubscribe(e){this.routerService.unsubscribe(e)}async addQuery(e,t=!1,n=!1){let r=this.getCurrentRoute();this.log(`${JSON.stringify(e)} ${JSON.stringify(r.query)}`,`newAddQuery`);let i={...r,query:{...r.query,...e},force:n};return t?this.routerService.replace(i):this.routerService.push(i)}async removeQuery(e,t=!1,n=!1){let r=this.getParamsWithoutKeys(e);this.log(JSON.stringify(r),`newRemoveQuery`);let i={...this.getCurrentRoute(),query:r,force:n};return typeof this.windowService.self().history?.replaceState==`function`&&this.windowService.self().history.replaceState(null,``,this.routerService.resolve(i).fullPath),t?this.routerService.replace(i):this.routerService.push(i)}async replaceQuery(e,t=!1,n=!1){this.log(JSON.stringify(e),`newReplaceQuery`);let r={...this.getCurrentRoute(),query:e,force:n};return t?this.routerService.replace(r):this.routerService.push(r)}async cleanQuery(e=!1,t=!1){this.log(``,`newCleanQuery`);let n={...this.getCurrentRoute(),query:{},force:t};return e?this.routerService.replace(n):this.routerService.push(n)}async extendQuery(e,t=!1,n=!1){let r=this.getQueryParams(),i={},a={},o={},s={};for(let e in r)WC(e)?i[e]=r[e]:o[e]=r[e];for(let t in e)WC(t)?a[t]=e[t]:s[t]=e[t];return this.replaceQuery({...UC(i,a),...xt(o,s)},t,n)}getCurrentRoute(){return this.routerService.getCurrentRoute()}getParamsWithoutKeys(e){return Xe(re(this.getCurrentRoute().query),e)}log(e,t){this.loggerService.shouldLogByChannel(`queryParams`,[t])&&this.loggerService.log(`queryParams`,e,t)}};GN=U([g(),B(0,m(V.RouterService)),B(1,m(V.LoggerService)),B(2,m(V.WindowService))],GN);var KN=GN,qN=class{constructor(e,t,n,r,i){this.queryParamsService=e,this.modalService=t,this.modalRepository=n,this.routerService=r,this.historyService=i,this.wrapperType=`queryModal`}build(e){let t={id:e,params:{},isOpen:!1};return this.modalRepository.insertOrUpdate([t])}completeBuilds(){this.openModalsByQuery()}async open(e,t){let n=this.getModalsQuery();return await this.queryParamsService.addQuery({modals:[...n||[],{id:e,params:t}]}),this.modalService.open(e,t)}async close(e){let t=this.queryParamsService.getQueryParams(),n=this.isModals(t.modals)?t.modals.filter(({id:t})=>t!==e):void 0;if(this.isPreviousEntryEqualToClosedState(n))return this.routerService.back(),this.modalService.close(e);let r={...t,modals:n};return await this.queryParamsService.replaceQuery(r,!0),this.modalService.close(e)}closeOrOpenByQuery(e){let t=this.queryParamsService.getQueryParams().modals||[];if(this.isModals(t)){let n=t.reduce((e,t)=>(e[t.id]=t.params,e),{}),r=Object.keys(n);e.forEach(e=>{e.wrapperType===`queryModal`&&!r.includes(e.id)&&this.isOpen(e.id)&&this.modalService.close(e.id)}),r.forEach(e=>{this.isExist(e)&&!this.isOpen(e)&&this.modalService.getWrapperData(e)?.wrapperType===`queryModal`&&this.modalService.open(e,n[e])})}}getParams(e){return this.modalService.getParams(e)}getWrapperData(e){return this.modalService.getWrapperData(e)}setParams(e,t){this.updateQueryModals(e,t||{}),this.modalService.setParams(e,t)}patchParams(e,t){let n=this.modalService.patchParams(e,t);return this.updateQueryModals(e,n),n}removeParams(e,t){this.updateQueryModals(e,dt(this.getParams(e),t)),this.modalService.removeParams(e,t)}clearParams(e){this.updateQueryModals(e,{}),this.modalService.clearParams(e)}destroy(e){this.modalService.destroy(e)}isOpen(e){return this.modalService.isOpen(e)}isExist(e){return this.modalService.isExist(e)}async openModalsByQuery(){let e=this.queryParamsService.getQueryParams();this.isModals(e.modals)&&await Promise.all(e.modals.filter(({id:e})=>this.isExist(e)&&this.getWrapperData(e)?.wrapperType===this.wrapperType).map(e=>this.modalService.open(e.id,e.params)))}updateQueryModals(e,t){let n=this.getModalsQuery(),r=this.getModalIndex(e);r>=0&&(n[r].params=t,this.queryParamsService.extendQuery({modals:n},!0,!0))}getModalsQuery(){let e=this.queryParamsService.getQueryParams().modals||[];return Array.isArray(e)?(e=e.filter(Boolean),this.isModals(e)?e:[]):[]}getModalIndex(e){return this.getModalsQuery()?this.getModalsQuery().findIndex(t=>t&&t.id===e):-1}isModals(e){return Vp(e)}isPreviousEntryEqualToClosedState(e){let t=this.historyService.getRouterHistory().state.back;if(typeof t!=`string`||!t)return!1;let n=this.routerService.resolve(t);return!n?.name||n.name!==this.routerService.getCurrentRoute().name?!1:nt(this.normalizeModals(n.query.modals),this.normalizeModals(e))}normalizeModals(e){if(!Array.isArray(e))return[];let t=e.filter(Boolean);return this.isModals(t)?t:[]}};qN=U([g(),B(0,m(V.NewQueryParamsService)),B(1,m(V.ModalService)),B(2,m(V.ModalRepository)
2),B(3,m(V.RouterService)),B(4,m(V.HistoryService))],qN);var JN=class extends yD{constructor(e,t,n,r,i,a){super(e,t,n,r),this.wrapperManagerService=i,this.userService=a}async buildForm(){let e=this.getBuilder(),{email:t}=this.userService.currentUser(),{defaultEmail:n}=this.wrapperManagerService.getParams(Ec);e.control({fieldType:`text`,name:`email`,value:n||t,validators:this.validationRulesBuilderService.createRules().required({messagePath:`exportModal.emailErrorRequired`}).email({messagePath:`exportModal.emailErrorRequired`})})}setExportService(e){this.exportService=e}setTableServiceId(e){this.tableServiceId=e}setExtension(e){this.extension=e}setEntityType(e){this.entityType=e}setEndpointParams(e){this.endpointParams=e}async submit(e){return this.exportService.export(this.extension,this.entityType,this.tableServiceId,this.endpointParams??[],e.email)}};JN=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.WrapperManagerService)),B(5,m(V.UserService))],JN);var YN=JN,XN=class{constructor(e,t,n,r,i,a){this.facetManager=e,this.logger=t,this.modelSubscriptionService=n,this.routerService=r,this.newQueryParamsService=i,this.userService=a,this.subscriptionKeys={}}async resolve(e,t){let n=this.getRouteName(t);try{let t=this.facetManager.getFaceter(e.model);t.setSettings({entityName:e.model.entity,endpointParams:this.getEndpointParams(e)}),e.wait?await t.fetchFacets(e.types):t.fetchFacets(e.types),e.subscriptionModels&&e.subscriptionModels.length>0&&(this.subscriptionKeys[n]=this.modelSubscriptionService.subscribeByModels(e.subscriptionModels,()=>{e.resetSettingsOnSubscription&&t.setSettings({entityName:e.model.entity,endpointParams:this.getEndpointParams(e)}),t.fetchFacets()}))}catch{this.logger.log(`facet`,`Facets for ${e.model} is not loaded`)}}async unresolve(e,t){let n=this.facetManager.getFaceter(e.model);e.clearable&&n.clearFacets();let r=this.getRouteName(t);this.modelSubscriptionService.unsubscribe(this.subscriptionKeys[r]||[])}getEndpointParams(e){if(e.endpointParams?.length)return e.endpointParams;if(!e.source||!e.requestParam)return[];switch(e.source){case`router`:return[this.routerService.getCurrentRoute().params[e.requestParam]];case`query`:return[this.newQueryParamsService.getQueryParams()[e.requestParam]];case`currentUser`:return[this.userService.currentUser().id];default:return[]}}getRouteName(e){return e?.name||this.routerService.getCurrentRoute().name||`root`}};XN=U([g(),B(0,m(V.FacetManager)),B(1,m(V.LoggerService)),B(2,m(V.ModelSubscriptionService)),B(3,m(V.RouterService)),B(4,m(V.NewQueryParamsService)),B(5,m(V.UserService))],XN);var ZN=XN,QN=class{constructor(e){this.sendReceiveSettingsService=e}async resolve(){await this.sendReceiveSettingsService.loadSettings()}};QN=U([g(),B(0,m(V.SendReceiveSettingsService))],QN);var $N=QN,eP=class extends yD{constructor(e,t,n,r,i,a){super(e,t,n,r),this.formBuilderFactoryService=e,this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.messagesAttachmentFileService=i,this.api=a,this._attachType=xa.WhatsAppMedia}setUploadProgressCallback(e){this.onUploadProgressCallback=e}set attachType(e){this._attachType=e}get attachType(){return this._attachType}async buildForm(){let e=this.getBuilder(),t=this.validationRulesBuilderService.createRules().required({messagePath:`messagesAttachmentFileModal.fileErrorRequired`}),n=this.attachType===xa.WhatsAppDocument?ik:sk;switch(this.attachType){case xa.MMS:t=t.fileIsMmsAttachment().fileMaxSize({data:{image:$O,"*":ek}});break;case xa.WhatsAppMedia:t=t.fileIsWhatsAppMediaAttachment().fileMaxSize({data:{image:nk,audio:rk,video:rk}});break;case xa.FacebookMedia:case xa.InstagramMedia:t=t.fileIsInstagramMediaAttachment().fileMaxSize({data:{image:ak,audio:ok,video:ok}});break;case xa.FacebookDocument:case xa.InstagramDocument:case xa.WhatsAppDocument:t=t.fileIsWhatsAppFileAttachment().fileMaxSize({data:{image:n,audio:n,video:n,"*":n}});break;default:t=t.fileIsMessagesAttachment().fileMaxSize({data:{"*":tk}})}e.control({fieldType:`fileUploadArea`,name:`file`,value:null,validationMode:tf.aggressive,validators:t})}cancel(){this.api.getCancelToken().cancel(),this.setFieldValue(`file`,null)}async submit(e){let t=new FormData;switch(t.append(`file`,e.file,e.file.name??`file`),this.attachType){case xa.MMS:return this.messagesAttachmentFileService.attachMmsFile(t,this.onUploadProgressCallback);case xa.WhatsAppMedia:{let n=this.getMediaType(e.file.name);return t.append(`type`,n),this.messagesAttachmentFileService.attachMessengerFile(t,this.onUploadProgressCallback)}case xa.WhatsAppDocument:return t.append(`type`,`document`),this.messagesAttachmentFileService.attachMessengerFile(t,this.onUploadProgressCallback);case xa.FacebookMedia:{let n=this.getMediaType(e.file.name);return t.append(`type`,n),this.messagesAttachmentFileService.attachFacebookFile(t,this.onUploadProgressCallback)}case xa.FacebookDocument:return t.append(`type`,`document`),this.messagesAttachmentFileService.attachFacebookFile(t,this.onUploadProgressCallback);case xa.InstagramMedia:{let n=this.getMediaType(e.file.name);return t.append(`type`,n),this.messagesAttachmentFileService.attachInstagramFile(t,this.onUploadProgressCallback)}case xa.InstagramDocument:return t.append(`type`,`document`),this.messagesAttachmentFileService.attachInstagramFile(t,this.onUploadProgressCallback);default:return this.messagesAttachmentFileService.attachSmsFile(t,this.onUploadProgressCallback)}}getMediaType(e){let t=``,n=Kd(Xd(e));return(n===`video`||n===`audio`||n===`image`)&&(t=n),t}};eP=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.MessagesAttachmentFileService)),B(5,m(V.Api))],eP);var tP=eP,nP=class extends pl{};U([st(),v()],nP.prototype,`resource`,void 0),U([ft()],nP.prototype,`chars`,void 0),U([v()],nP.prototype,`href`,void 0),U([v()],nP.prototype,`name`,void 0),U([ft()],nP.prototype,`size`,void 0),U([ft()],nP.prototype,`width`,void 0),U([ft()],nP.prototype,`height`,void 0),nP=U([Be(md.MESSAGES_ATTACHMENT_FILE)],nP);var rP=nP,iP=class extends qE{attachSmsFile(e,t){return this.getDomainRepository().attachSmsFile(e,t)}attachMmsFile(e,t){return this.getDomainRepository().attachMmsFile(e,t)}attachMessengerFile(e,t){return this.getDomainRepository().attachMessengerFile(e,t)}attachFacebookFile(e,t){return this.getDomainRepository().attachFacebookFile(e,t)}attachInstagramFile(e,t){return this.getDomainRepository().attachInstagramFile(e,t)}};iP=U([oD({model:rP}),g(),h()],iP);var aP=iP,oP=class extends Q{attachSmsFile(e,t){let n=this.endpointsService.getPath(`messagesAttachmentFileSms`);return this.attachFile(n,e,t)}attachMmsFile(e,t){let n=this.endpointsService.getPath(`messagesAttachmentFileMms`);return this.attachFile(n,e,t)}attachMessengerFile(e,t){let n=this.endpointsService.getPath(`messagesAttachmentFileMessenger`);return this.attachFile(n,e,t)}attachFacebookFile(e,t){let n=this.endpointsService.getPath(`messagesAttachmentFileFacebook`);return this.attachFile(n,e,t)}attachInstagramFile(e,t){let n=this.endpointsService.getPath(`messagesAttachmentFileInstagram`);return this.attachFile(n,e,t)}attachFile(e,t,n){let r=this.getConfig(n);return this.getApiSource().post(e,t,r)}getConfig(e){let t={};return e&&(t.onUploadProgress=t=>{e(t)}),t}};oP=U([Y({model:rP}),g(),h()],oP);var sP=oP,cP=class extends qE{getEntityByTimezone(e){return this.getDomainRepository().query().where(`timezone`,e).first()}getEntityByTimezoneOrFail(e){let t=this.getEntityByTimezone(e);if(!t)throw new G(`Not found Timezone with name "${e}"`);return t}};cP=U([oD({model:hn}),g(),h()],cP);var lP=cP,uP=class extends pl{};U([y(null)],uP.prototype,`numbers`,void 0),U([y(null)],uP.prototype,`numberPrice`,void 0),uP=U([Be(md.AVAILABLE_TO_BUY_NUMBERS)],uP);var dP=uP,fP=class extends Q{getId(e,t={}){return`${e}${JSON.stringify(t??{})}`}async getAvailableToBuyNumbersForCountry(e,t={}){let n={...t,country:e},r=await this.getApiSource().get(this.endpointsService.getPath(`availableToBuyNumbers`),{params:n});return r.data.id=this.getId(e,t),await this.create(r.data),r.data}async getTwilioAvailableToBuyNumbersForCountry(e,t){let n={areaCode:t,countryId:e},r=await this.getApiSource().get(this.endpointsService.getPath(`twilioAvailableToBuyNumbers`),{params:n});return r.data.id=this.getId(e,{tollfree:!1,prefix:t}),await this.create(r.data),r.data}findNumberFeatures(e){let t=this.query().all();for(let n=0;n<t.length;n++){let r=t[n].numbers.find(t=>t.number===e);if(r)return r.features}}};fP=U([Y({model:dP}),g(),h()],fP);var pP=fP,mP=class extends pl{};U([y(null)],mP.prototype,`areaCodes`,void 0),mP=U([Be(md.AREA_CODES)],mP);var hP=mP,gP=class extends Q{async getAreaCodesForCountry(e){let t=await this.getApiSource().get(this.endpointsService.getPath(`areaCodes`),{params:{country:e}});if(t.data.id=e,e===`US`){let e=t.data.areaCodes.find(e=>e.code===571);e&&(t.data.areaCodes=t.data.areaCodes.filter(e=>e.code!==571),t.data.areaCodes[0]=e)}return await this.create(t.data),this.findEntityByIdOrFail(e)}};gP=U([Y({model:hP}),g(),h()],gP);var _P=gP,vP=function(e){return e.CHAT=`C`,e}({}),yP=5e3,bP=1e3,xP=e=>e.entityType===`list`,SP=e=>e.entityType===`contact`,CP=e=>
2e.entityType===`contact_email`,wP=e=>e.entityType===`filtered_view`,TP=`recipients`,EP=`from`,DP=`messagesAttachmentFileModal`,OP=`messagesAttachmentFilePreviewModal`,kP=`messagesAttachmentSelectModal`,AP=[`none`,`hourly`,`daily`,`weekly`,`monthly`,`yearly`],jP=[`never`,`after`,`date`],MP=[`First`,`Second`,`Third`,`Fourth`,`Last`],NP=`text`,PP=function(e){return e.WAITING=`w`,e.COMPLETED=`c`,e.FAILED=`f`,e.NOT_ENOUGH_MONEY=`l`,e}({}),FP=function(e){return e.SessionRejected=`SessionRejected`,e.LowBalance=`LowBalance`,e.NoRecipients=`NoRecipients`,e.InvalidRecipients=`InvalidRecipients`,e.EmptyText=`EmptyText`,e.UnexpectedError=`UnexpectedError`,e.ForbiddenCountry=`ForbiddenCountry`,e.Blocked=`Blocked`,e.Unsubscribed=`Unsubscribed`,e.InvalidNumber=`InvalidNumber`,e.InvalidFrom=`InvalidFrom`,e.NotUsFromNumber=`NotUsFromNumber`,e.BadFrFromNumber=`BadFrFromNumber`,e.BadAeFromNumber=`BadAeFromNumber`,e.RegulationTm=`RegulationTm`,e.RegulationAu=`RegulationAu`,e.RegulationGb=`RegulationGb`,e.ShortLinkInText=`ShortLinkInText`,e.SurveyNondedicated=`SurveyNondedicated`,e.TtsNotLvnFromNumber=`TtsNotLvnFromNumber`,e.RejectedMms=`RejectedMms`,e.UserVonageCarrierMmsFileExtensionRejected=`UserVonageCarrierMmsFileExtensionRejected`,e.UserCarrierMmsNotSupported=`UserCarrierMmsNotSupported`,e.TollFreeUnverified=`TollFreeUnverified`,e.TenDlcUnverified=`TenDlcUnverified`,e.TenDlcRejected=`TenDlcRejected`,e.SendingDisabledOnAccount=`SendingDisabledOnAccount`,e.ByocTwilio=`ByocTwilio`,e.ByocVonage=`ByocVonage`,e.ByocSinch=`ByocSinch`,e.NotActiveUserCarrierProvider=`NotActiveUserCarrierProvider`,e.NotActiveUserCarrierPhone=`NotActiveUserCarrierPhone`,e.NotActiveUserCarrierSenderId=`NotActiveUserCarrierSenderId`,e.UserHasNotByocAccess=`UserHasNotByocAccess`,e.UserCarrierPhoneHasNotCapability=`UserCarrierPhoneHasNotCapability`,e.NotExistUserCarrierSender=`NotExistUserCarrierSender`,e.Unsupported=`Unsupported`,e}({}),IP=class{constructor(e,t){this.translateService=e,this.composeScheduledInitFormData=t}configure(e){let t=this.composeScheduledInitFormData.getMessageSendRepeatInitFormData();e.property(e=>e.type).control({fieldType:`select`,value:t.end.type,options:()=>jP.map(e=>({text:this.translateService.t(`composeEndTypes.${e}`),value:e}))}),e.property(e=>e.smsSessions).control({fieldType:`number`,value:t.end.smsSessions}),e.property(e=>e.date).control({fieldType:`datepicker`,value:t.end.date,min:new Date})}};IP=U([g(),B(0,m(V.TranslateService)),B(1,m(V.ComposeScheduledInitFormData))],IP);var LP=class{constructor(e,t){this.translateService=e,this.dateTimeService=t}getSelectMonthDayOptions(){let e=[];for(let t=1;t<=this.dateTimeService.MAX_DAYS_IN_MONTH;t++){let n=t.toString();e.push({text:n,value:n})}return e}getSelectOrdinalDaysOptions(){return MP.map(e=>({text:this.translateService.t(`composeOrdinalDays.${e.toLowerCase()}`),value:e}))}getSelectWeekDaysOptions(){let e=[`Day`,`Weekday`,`WeekendDay`],t=this.dateTimeService.getWeekDaysNames(),n=co.map((e,n)=>({text:t[n],value:e}));return e.forEach(e=>n.push({text:this.translateService.t(`weekDaysFull.${e.toLowerCase()}`),value:e})),n}};LP=U([g(),B(0,m(V.TranslateService)),B(1,m(V.DateTimeService))],LP);var RP=class extends LP{constructor(e,t,n){super(e,t),this.translateService=e,this.dateTimeService=t,this.composeScheduledInitFormData=n}configure(e){let t=this.composeScheduledInitFormData.getMessageSendRepeatInitFormData();e.property(e=>e.count).control({fieldType:`number`,value:t.monthly.count}),e.property(e=>e.repeat).control({fieldType:`radio`,value:t.monthly.repeat}),e.property(e=>e.monthDay).control({fieldType:`select`,value:t.monthly.monthDay,options:()=>this.getSelectMonthDayOptions()}),e.property(e=>e.firstLastDay).control({fieldType:`select`,value:t.monthly.firstLastDay,options:()=>this.getSelectOrdinalDaysOptions()}),e.property(e=>e.weekDay).control({fieldType:`select`,value:t.monthly.weekDay,options:()=>this.getSelectWeekDaysOptions()})}};RP=U([g(),B(0,m(V.TranslateService)),B(1,m(V.DateTimeService)),B(2,m(V.ComposeScheduledInitFormData))],RP);var zP=class{constructor(e,t,n){this.translateService=e,this.dateTimeService=t,this.usersService=n}getSelectHoursIntervalTypeOptions(){return[{text:this.translateService.t(`units.datetime.hoursIntervalType.am`),value:`AM`},{text:this.translateService.t(`units.datetime.hoursIntervalType.pm`),value:`PM`}]}getFirstScheduledDate(e){let t=this.usersService.currentUser(),n=this.dateTimeService.utcToZonedTime(this.dateTimeService.n
2ow(),e?.timezone);n.setMinutes(n.getMinutes()<30?0:30);let r=this.dateTimeService.addMinutes(n,30),i=r.getMinutes();return{date:r,hours:t.displayTimeFormat===`12h`?this.dateTimeService.hoursTo12hFormat(r.getHours()).hours:r.getHours(),minutes:i}}configure(e){let t=this.usersService.currentUser([`timezone`]),{date:n,hours:r,minutes:i}=this.getFirstScheduledDate(t.timezone),a=t.displayTimeFormat===`12h`?this.dateTimeService.hoursTo12hFormat(n.getHours()).type:`AM`;e.property(e=>e.date).control({fieldType:`datepicker`,value:this.dateTimeService.toISO(this.dateTimeService.zonedTimeToUtc(n,t.timezone.timezone))}),e.property(e=>e.hours).control({fieldType:`timeHours`,value:r}),e.property(e=>e.minutes).control({fieldType:`timeMinutes`,value:i}),e.property(e=>e.timeIntervalType).control({fieldType:`select`,value:a,options:()=>this.getSelectHoursIntervalTypeOptions()})}};zP=U([g(),B(0,m(V.TranslateService)),B(1,m(V.DateTimeService)),B(2,m(V.UserService))],zP);var BP=class{constructor(e,t){this.dateTimeService=e,this.composeScheduledInitFormData=t}getCheckButtonWeekDaysOptions(){let e=this.dateTimeService.getWeekDaysNames(`abbreviated`);return co.map((t,n)=>({text:e[n],value:t}))}configure(e){let t=this.composeScheduledInitFormData.getMessageSendRepeatInitFormData();e.property(e=>e.count).control({fieldType:`number`,value:t.weekly.count}),e.property(e=>e.days).control({fieldType:`checkButton`,value:t.weekly.days,options:()=>this.getCheckButtonWeekDaysOptions()})}};BP=U([g(),B(0,m(V.DateTimeService)),B(1,m(V.ComposeScheduledInitFormData))],BP);var VP=class extends LP{constructor(e,t,n){super(e,t),this.translateService=e,this.dateTimeService=t,this.composeScheduledInitFormData=n}getSelectMonthsOptions(){let e=this.dateTimeService.getMonthsNames(`abbreviated`);return zs.map((t,n)=>({text:e[n],value:t}))}configure(e){let t=this.composeScheduledInitFormData.getMessageSendRepeatInitFormData();e.property(e=>e.count).control({fieldType:`number`,value:t.yearly.count}),e.property(e=>e.type).control({fieldType:`radio`,value:t.yearly.type}),e.property(e=>e.month).control({fieldType:`select`,value:t.yearly.month,options:()=>this.getSelectMonthsOptions()}),e.property(e=>e.monthDay).control({fieldType:`select`,value:t.yearly.monthDay,options:()=>this.getSelectMonthDayOptions()}),e.property(e=>e.firstLastDay).control({fieldType:`select`,value:t.yearly.firstLastDay,options:()=>this.getSelectOrdinalDaysOptions()}),e.property(e=>e.weekDay).control({fieldType:`select`,value:t.yearly.weekDay,options:()=>this.getSelectWeekDaysOptions()}),e.property(e=>e.dayOfMonth).control({fieldType:`select`,value:t.yearly.dayOfMonth,options:()=>this.getSelectMonthsOptions()})}};VP=U([g(),B(0,m(V.TranslateService)),B(1,m(V.DateTimeService)),B(2,m(V.ComposeScheduledInitFormData))],VP);var HP=Symbol(`getPathKey`);function UP(e){return new Proxy({},{get(t,n,r){if(n===HP)return e;let i=[...e];return e!==null&&i.push(n),Reflect.has(t,n)||Reflect.set(t,n,UP(i)),Reflect.get(t,n,r)}})}function WP(e){return e(UP([]))[HP]}function GP(e){return e(UP([])).map(e=>e[HP])}function KP(e){let t=e[HP];if(!t)throw new G(`eachItem() can only be used inside typed field getters`);return UP([...t,`*`])}function qP(e,t){return e.flatMap(e=>JP(e,t))}function JP(e,t){let r=e.indexOf(`*`);if(r===-1)return[e];let i=e.slice(0,r),a=e.slice(r+1),o=Math.max(0,...t.map(e=>{let t=i.length?n(e,i):e;return Array.isArray(t)?t.length:0}));return Array.from({length:o},(e,n)=>JP([...i,String(n),...a],t)).flat()}var YP=class{constructor(e,t){this.groupPropertyBuilderFactory=e,this.propertyBuilderFactory=t}setDependencys(e){this.formBuilder=e}property(e){let t=WP(e);if(t.length>1){let e=SA(t.filter((e,n)=>n!==t.length-1)),n=this.groupPropertyBuilderFactory();return n.setDependencys(this.formBuilder,e,t[t.length-1]),n}let n=SA(t),r=this.propertyBuilderFactory();return r.setDependencys(this.formBuilder,n),r}};YP=U([g(),B(0,m(V.GroupPropertyBuilderFactory)),B(1,m(V.PropertyBuilderFactory))],YP);var XP=class{constructor(e,t){this.typedGroupFormBuilderFactoryService=e,this.typedArrayFormBuilderFactoryService=t}
2setDependencys(e,t,n){this.formBuilder=e,this.groupName=t,this.fieldName=n,this.groupModifier=this.formBuilder.getGroupModifier(this.groupName)}control(e){this.groupModifier.addControl({...e,name:this.fieldName})}getField(){return this.groupModifier.instance.childrens.find(e=>e.field.name===this.fieldName).field}getFieldName(){return SA([this.groupName,this.fieldName])}hasFieldTypeGroup(e){this.groupModifier.addGroup({name:this.fieldName,validators:e?.validators});let t=this.typedGroupFormBuilderFactoryService();return t.setDependencys(this.formBuilder,SA([this.groupName,this.fieldName])),t}hasFieldTypeArray(e){this.groupModifier.addArray({name:this.fieldName,validators:e?.validators});let t=this.typedArrayFormBuilderFactoryService();return t.setDependencys(this.formBuilder,SA([this.groupName,this.fieldName])),t}asFieldTypeArray(e){let t=this.typedArrayFormBuilderFactoryService();return t.setDependencys(this.formBuilder,SA([this.groupName,this.fieldName])),t}};XP=U([g(),B(0,m(V.TypedGroupFormBuilderFactoryService)),B(1,m(V.TypedArrayFormBuilderService))],XP);var ZP=class{constructor(e,t){this.typedGroupFormBuilderFactoryService=e,this.typedArrayFormBuilderFactoryService=t,this.defaultParentName=``}setDependencys(e,t){this.formBuilder=e,this.fieldName=t}control(e){this.formBuilder.control({...e,name:this.fieldName},this.defaultParentName)}getField(){return this.formBuilder.getField(this.fieldName).field}hasFieldTypeGroup(e){this.formBuilder.group({name:this.fieldName,validators:e?.validators},this.defaultParentName);let t=this.typedGroupFormBuilderFactoryService();return t.setDependencys(this.formBuilder,this.fieldName),t}hasFieldTypeArray(e){this.formBuilder.array({name:this.fieldName,validators:e?.validators},this.defaultParentName);let t=this.typedArrayFormBuilderFactoryService();return t.setDependencys(this.formBuilder,this.fieldName),t}asFieldTypeArray(e){let t=this.typedArrayFormBuilderFactoryService();return t.setDependencys(this.formBuilder,this.fieldName),t}getFieldName(){return this.fieldName}};ZP=U([g(),B(0,m(V.TypedGroupFormBuilderFactoryService)),B(1,m(V.TypedArrayFormBuilderService))],ZP);var QP=class{constructor(e){this.groupPropertyBuilderFactory=e}setDependencys(e,t){this.formBuilder=e,this.groupName=t}property(e){let t=WP(e),n=this.groupPropertyBuilderFactory();return n.setDependencys(this.formBuilder,this.groupName,SA(t)),n}};QP=U([g(),B(0,m(V.GroupPropertyBuilderFactory))],QP);var $P=class extends qE{};$P=U([oD({model:hP}),g(),h()],$P);var eF=$P,tF=class extends qE{async getAvailableToBuyNumbersForCountry(e,t={}){return!t.tollfree&&dd(e)?this.getDomainRepository().getTwilioAvailableToBuyNumbersForCountry(e,t.prefix):this.getDomainRepository().getAvailableToBuyNumbersForCountry(e,t)}findNumberFeatures(e){return this.getDomainRepository().findNumberFeatures(e)}};tF=U([oD({model:dP}),g(),h()],tF);var nF=tF,rF=class{constructor(e,t,n,r){this.wrapperManagerService=e,this.routerService=t,this.newQueryParamsService=n,this.domainManagerService=r}getId(e){if(e.id)return e.id;if(!e.source||!e.requestParam)throw new G(`There is no source or requestParam`);switch(e.source){case`router`:return this.routerService.getCurrentRoute().params[e.requestParam];case`query`:return this.newQueryParamsService.getQueryParams()[e.requestParam];
2default:return this.wrapperManagerService.getParams(e.source)[e.requestParam]}}getDomainService(e){try{return this.domainManagerService.getService(e)}catch(t){throw t instanceof Wa&&t.message.toLowerCase().indexOf(`not found service`)!==-1?new G(`Domain service for ${e.entity} not specified`):t}}};rF=U([g(),B(0,m(V.WrapperManagerService)),B(1,m(V.RouterService)),B(2,m(V.NewQueryParamsService)),B(3,m(V.DomainManagerService))],rF);var iF=rF,aF=class extends oA{constructor(e,t,n,r){super(e,t,n),this.preloaderManager=e,this.loggerService=t,this.baseResolverService=n,this.routerService=r}async resolve(e){try{await super.resolve(e)}catch(t){if((t instanceof xs||t instanceof ad)&&e.redirectToIfNotFound)await this.routerService.replace(e.redirectToIfNotFound);else if(t instanceof qu&&e.redirectToIfAccessError)await this.routerService.replace(e.redirectToIfAccessError);else throw t}}};aF=U([g(),h(),B(0,m(V.PreloaderManager)),B(1,m(V.LoggerService)),B(2,m(V.BaseResolverService)),B(3,m(V.RouterService))],aF);var oF=class{get(e){return this.storage.getItem(e)}set(e,t){try{this.storage.setItem(e,t)}catch{this.clear(),this.storage.setItem(e,t)}}delete(e){this.storage.removeItem(e)}clear(){this.storage.clear()}getJSON(e){let t=this.get(e);if(ge(t))return{};try{return JSON.parse(t)}catch{return{}}}setJSON(e,t){ge(t)?this.delete(e):this.set(e,JSON.stringify(t))}patchJSON(e,t){let n=this.getJSON(e);this.setJSON(e,{...n,...t})}unpatchJSON(e,t){let n=this.getJSON(e),r=Object.fromEntries(Object.entries(n).filter(([e])=>!t.includes(e)));this.setJSON(e,r)}getParams(e){return this.getJSON(e)}setParams(e,t,n){n?this.setJSON(e,t):this.patchJSON(e,t)}removeParams(e,t){this.unpatchJSON(e,t)}getDate(e){let t=this.get(e);if(!t)return null;let n=new Date(t);return Number.isNaN(n)?null:n}};oF=U([g()],oF);var sF=class extends oF{constructor(...e){super(...e),this.storage=localStorage}};sF=U([g(),h()],sF);var cF=class extends oF{constructor(...e){super(...e),this.storage=sessionStorage}};cF=U([g(),h()],cF);var lF=class{constructor(e){this.routerService=e}getParams(e){let t=this.getStore();return Object.entries(t).reduce((t,[n,r])=>{let{storageKey:i,paramKey:a}=this.splitQueryKey(n);return i===e?{...t,[a]:NC(JSON.parse(String(r)))}:t},{})}setParams(e,t,n=!1){let r={},i=[];for(let[n,a]of Object.entries(t)){let t=this.makeQueryKey(e,n);Ae(a)||ge(a)?i.push(t):Object.assign(r,VC(t,``,a))}let a=this.getCurrentRoute(),o={...Xe(a.query,i),...r};return nt(o,a.query)?Promise.resolve():this.updateRouteLocation({...a,query:o},n)}removeParams(e,t,n=!1){let r=this.getStore(),i=Object.fromEntries(Object.entries(r).filter(([n])=>{let{storageKey:r,paramKey:i}=this.splitQueryKey(n);return r!==e||!t.includes(i)})),a=this.makeReplaceLocation(i);return this.updateRouteLocation(a,n)}makeUpdateLocation(e){let t=this.getCurrentRoute();return{...t,query:{...t.query,...e}}}makeReplaceLocation(e){return{...this.getCurrentRoute(),query:e}}updateRouteLocation(e,t){return t?this.routerService.replace(e):this.routerService.push(e)}getCurrentRoute(){return this.routerService.getCurrentRoute()}getStore(){return this.getCurrentRoute().query}makeQueryKey(e,t){return`${t}.${e}`}splitQueryKey(e){let[t,n]=e.split(`.`);return{storageKey:n,paramKey:t}}};lF=U([g(),B(0,m(V.RouterService))],lF);var uF=lF,dF=e=>{if(!qa(e))return!1;let t=[Is,fo,to,rd,Vs,cd];return Object.keys(e).some(e=>t.includes(e))},fF=e=>{if(typeof e==`number`)return Number.isFinite(e);if(typeof e!=`string`)return!1;let t=Number(e);return!Number.isNaN(t)&&Number.isFinite(t)},pF=class extends HN{constructor(e,t,n,r){super(e,t,n),this.baseWrapperService=e,this.loggerService=t,this.storageService=n,this.userService=r}getStorageParams(e){let t=super.getStorageParams(e),n=this.userService.currentUserId();return n?qa(t)&&Object.entries(t).some(([e,t])=>fF(e)&&dF(t))&&t[String(n)]||{}:t}setStorageParams(e,t,n=!0){let r=this.userService.currentUserId();if(!r)return super.setStorageParams(e,t,n);let i=super.getStorageParams(e)||{},a=(0,qk.default)(i,{[String(r)]:t},{customMerge:(e,t)=>{if(fF(e))return(e,t)=>{if(dF(t))return n?t:{...e??{},...t}}},arrayMerge:(e,t)=>
2t});return super.setStorageParams(e,a,n)}};pF=U([g(),h(),B(0,m(V.BaseWrapperService)),B(1,m(V.LoggerService)),B(2,m(V.LocalStorageService)),B(3,m(V.UserService))],pF);var mF=pF,hF=class extends WN{constructor(e,t,n,r){super(e,t,n),this.lsWrapperService=r}getStorageParams(e){let t=super.getStorageParams(e);return{...this.lsWrapperService.getStorageParams(e),...t}}async setParamsByTableData(e,t,n,r=!0){let i=await super.setParamsByTableData(e,t,n,r);return this.lsWrapperService.setStorageParams(e,this.extractDataForLs(t,n),r),i}extractDataForLs(e,t){let n=Object.fromEntries(Object.entries(e).map(([e,n])=>[e,this.pickByParamsToSave(n,t[e])]));return this.filterParams(n)}};hF=U([g(),h(),B(0,m(V.BaseWrapperService)),B(1,m(V.LoggerService)),B(2,m(V.QueryStorageService)),B(3,m(V.TableLocalStorageWrapperService))],hF);var gF=class{constructor(e,t,n,r){this.validationRulesBuilderService=e,this.translateService=t,this.phoneService=n,this.countryService=r}buildForm(e,t,n){e.property(e=>e.forwardCallsTo).control({fieldType:`select`,value:t.forwardCallsTo,options:()=>n.map(e=>({text:this.translateService.t(`callForwardingFormBuilderService.forwardCallsToValues.${e}`),value:e}))});let r=this.countryService.getCountryPhoneDataOptions();e.property(e=>e.forwardCallsToYourNumber).control({fieldType:`phone`,value:t.forwardCallsToYourNumber,options:()=>r,validators:this.validationRulesBuilderService.createRules().custom(``,(e,t)=>{let n=t;return this.checkValidForwardCallsToYourNumber(n)})}),e.property(e=>e.greeting).control({fieldType:`text`,value:t.greeting})}checkValidForwardCallsToYourNumber(e){return e.forwardCallsTo===`phone`&&!this.phoneService.isValidPhoneNumber(e.forwardCallsToYourNumber.phone)?{message:{path:`callForwardingFormBuilderService.pleaseEnterValidNumber`}}:!0}};gF=U([g(),B(0,m(V.ValidationRulesBuilderService)),B(1,m(V.TranslateService)),B(2,m(V.PhoneService)),B(3,m(V.CountryService))],gF);var _F=gF,vF=[`off`,`chat`,`phone`],yF=class extends yD{constructor(e,t,n,r,i,a,o,s){super(e,t,n,r),this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.usersService=i,this.phoneService=a,this.phoneNumbersService=o,this.callForwardingFormBuilderService=s,this.phoneNumberId=null}setPhoneNumberId(e){this.phoneNumberId=e}async buildForm(){let e=this.getTypedBuilder(),t=this.usersService.currentUser();if(!this.phoneNumberId)return;let n=this.phoneNumbersService.findEntityByIdOrNull(this.phoneNumberId);if(!n)return;let r=this.getForwardCallsTo(n),i=this.phoneService.getPhoneWithCountryCodeByCountryCode(t.countryId);r===`phone`&&(i={phone:this.phoneService.getPhoneWithLeadingPlus(n.forwardCallsTo),countryCode:this.phoneService.getCountryCodeByPhone(n.forwardCallsTo)});let a={forwardCallsTo:r,forwardCallsToYourNumber:i,greeting:n.forwardAudioId??``};this.callForwardingFormBuilderService.buildForm(e,a,[...vF])}getForwardCallsTo(e){return e.forwardCallsTo&&this.phoneService.isValidPhoneNumber(e.forwardCallsTo)?`phone`:e.forwardCallsTo===wN.smsChat?`chat`:`off`}async submit(e){let t={numberId:this.phoneNumberId,forwardingDirection:e.forwardCallsTo};return e.forwardCallsTo===`phone`&&(t.forwardingNumber=e.forwardCallsToYourNumber.phone),e.greeting&&(t.audioId=e.greeting),this.phoneNumbersService.changeForwardingNumber(t)}};yF=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.UserService)),B(5,m(V.PhoneService)),B(6,m(V.PhoneNumbersService)),B(7,m(V.CallForwardingFormBuilderService))],yF);var bF=yF,xF=class extends pl{};U([v(null)],xF.prototype,`countryName`,void 0),U([v(null)],xF.prototype,`phone`,void 0),U([v(null)],xF.prototype,`currency`,void 0),U([y(null)],xF.prototype,`prices`,void 0),xF=U([Be(md.NUMBER_PRICE)],xF);var SF=xF,CF=class extends Q{async getNumbersPrice(e){let t=await this.getApiSource().get(this.endpointsService.getPath(`numberPrice`),{params:{number:e}});return t.data.id=e,await this.create(t.data),this.findEntityByIdOrFail(e)}};CF=U([Y({model:SF}),g(),h()],CF);var wF=CF,TF=class extends qE{async getNumbersPrice(e){return this.getDomainRepository().getNumbersPrice(e)}};TF=U([oD({model:SF}),g(),h()],TF);var EF=TF,DF=class extends Tk{constructor(...e){super(...e),this.id=`1`}init(){return this.updateState({showAuthLoader:!1,oldVersion:!1})}
2getLoadedState(){return this.findEntityByIdOrNull(this.id)}async getState(){return this.getRequest(this.id)}getStateSync(){return this.getRequestSync(this.id)}async updateState(e){let t=await this.getState();await this.postRequest({...t,...e,id:this.id}),await this.fill(this.id)}setFieldValue(e,t){return this.updateState({[e]:t})}async getFieldValue(e){let t=await this.getState();return t?t[e]:null}getFieldValueSync(e){let t=this.getStateSync();return t?t[e]:null}};DF=U([Y({model:Sf,fetch:Sf.entity,create:Sf.entity,single:Sf.entity}),g(),h()],DF);var OF=DF,kF=class{constructor(e){this.em=e}init(){return this.getGlobalStateRepo().init()}getLoadedState(){return this.getGlobalStateRepo().getLoadedState()}getState(){return this.getGlobalStateRepo().getState()}setFieldValue(e,t){return this.getGlobalStateRepo().setFieldValue(e,t)}getFieldValue(e){return this.getGlobalStateRepo().getFieldValue(e)}getFieldValueSync(e){return this.getGlobalStateRepo().getFieldValueSync(e)}setFieldValueIfChanged(e,t){return this.getFieldValue(e)===t?null:this.setFieldValue(e,t)}getGlobalStateRepo(){return this.em.getRepository(Sf)}};kF=U([g(),B(0,m(V.EntityManager))],kF);var AF=kF,jF=class extends mi{};jF=U([Be(md.NUMBER_AVAILABLE_COUNTRY)],jF);var MF=jF,NF=class extends Q{async getNumberAvailableCountries(){let e=this.endpointsService.getPath(`numberAvailableCountries`),t=await this.getApiSource().get(e);return await this.create(t.data.countryList),this.all()}};NF=U([Y({model:MF}),g(),h()],NF);var PF=NF,FF=class extends qE{getNumberAvailableCountries(){return this.getDomainRepository().getNumberAvailableCountries()}};FF=U([oD({model:MF}),g(),h()],FF);var IF=FF,LF=class{constructor(e){this.phoneService=e}async autocomplete(e,t,n,r,i,a){let o=[];if(this.phoneService.isValidPhoneNumber(e)){let t=this.phoneService.getCountryCodeByPhone(e),n=this.phoneService.getPhoneWithCountryCode(e,t),r=this.phoneService.clearPhoneAndAddPlus(n);o.push({value:r,country:t})}return{items:o,pageCount:1}}};LF=U([g(),B(0,m(V.PhoneService))],LF);var RF=LF,zF=class{constructor(e,t){this.phoneValidateAutocompleteService=e,this.contactService=t,this.cancelLastRequestFn=null}isExistSavedNumbers(e){return e.length===0?!1:e.length!==1||e[0].entityId!==0}async autocomplete(e,t,n,r,i,a){if(this.cancelLastRequestFn?.(),e.length<2)return{items:[],pageCount:1};let o=this.contactService.onContactsAutocomplete(e,!1,!1,!1);this.cancelLastRequestFn=o.cancel;let s=(await o).filter(e=>e.entityType===`contact`);if(this.isExistSavedNumbers(s))return{items:s.map(e=>({id:e.entityId.toString(),fullName:e.title,phone:e.value??``,avatar:e.avatarHref??void 0,value:e.value??``,autocompleteType:`contact`})),pageCount:1};let c=await this.phoneValidateAutocompleteService.autocomplete(e,t,n,r,i,a);return{items:c.items.map(e=>({...e,autocompleteType:`phone`})),pageCount:c.pageCount}}};zF=U([g(),B(0,m(V.PhoneValidateAutocompleteService)),B(1,m(V.ContactService))],zF);var BF=zF,VF=class{constructor(e,t,n,r){this.authService=e,this.routerService=t,this.restrictionPagesRouterService=n,this.windowService=r}async resolve(e){if(this.needToRedirect()){let e=this.routerService.getCurrentRoute().query,t=`${e.state}?${new URLSearchParams(e).toString()}`;this.windowService.redirect(t);return}let t=this.routerService.getCurrentRoute();try{await this.authService.authByOAuthProvider(e.provider,t.query)}catch(e){if(e instanceof Zc){await this.routerService.replace({name:`auth.loginSSO`,query:{errorMessage:e.message}});return}if(e instanceof qu){await this.restrictionPagesRouterService.goToUnavailableLocationRoute(`replace`);return}if(e instanceof od){await this.restrictionPagesRouterService.goToAccountSuspendedRoute();return}if(e instanceof jo){let t=e.message;await this.routerService.push({name:`auth.login`,query:{errorMessage:t}})}}}needToRedirect(){return this.windowService.getLocation().href.startsWith(`https://app.textmagictesting.com`)&&!!this.routerService.getCurrentRoute().query.state}};VF=U([g(),B(0,m(V.AuthService)),B(1,m(V.RouterService)),B(2,m(V.RestrictionPagesRouterService)),B(3,m(V.WindowService))],VF);var HF=VF,UF=class extends yD{constructor(e,t,n,r,i,a){super(e,t,n,r),this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.countryService=i,this.userService=a}async buildForm(){let e=this.getBuilder(),t=this.countryService.getSelectOptionCountries();e.control({name:`format`,fieldType:`radio`,value:`country`}),e.control({name:`country`,fieldType:`selectSearchCountry`,value:this.userService.currentUser().countryId,options:()=>t})}async submit(){}};UF=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.CountryService)),B(5,m(V.UserService))],UF);var WF=UF;function GF(e,t,n=`gray`){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return n}var KF=class{constructor(e,t){this.translateService=e,this.teamWorkflowService=t}getUserRoleOptions(){return[Fr.ADMIN,Fr.USER].map(e=>{let{value:t,color:n}=this.getUserRoleLabelData(e);return{color:n,text:t,value:e,outline:!0}})}getColorForUserRoleLabelData(e){return{[Fr.USER]:`gray`,[Fr.ADMIN]:`blue`,[Fr.SUPER_ADMIN]:`blue`}[e]}getUserRoleLabelData(e){return{value:this.getSubaccountTypeLabel(e),color:this.getUserRoleColor(e)}}getUserRoleColor(e){return this.teamWorkflowService.isUsersWorkflow()?this.getColorForUserRoleLabelData(e):GF({gray:[Fr.USER],blue:[Fr.ADMIN],green:[Fr.SUPER_ADMIN]},e,`blue`)}getSubaccountTypeLabel(e){if(this.teamWorkflowService.isUsersWorkflow())return this.getUserTypeLabel(e);let t={[Fr.USER]:`status.account.user`,[Fr.ADMIN]:`status.account.admin`,[Fr.SUPER_ADMIN]:`status.account.superAdmin`};return this.translateService.t(t[e])??this.translateService.t(`status.undefined`)}getUserTypeLabel(e){let t={[Fr.USER]:`status.account.user`,[Fr.ADMIN]:`status.account.admin`,[Fr.SUPER_ADMIN]:`status.account.accountOwner`};return this.translateService.t(t[e])??this.translateService.t(`status.undefined`)}};KF=U([g(),B(0,m(V.TranslateService)),B(1,m(V.TeamWorkflowService))],KF);var qF=KF,JF=class{constructor(e){this.loggerService=e}isHasNotificationFeature(){return`Notification`in window}isNotificationDenied(){return this.isHasNotificationFeature()&&Notification.permission===`denied`}isNotificationGranted(){return this.isHasNotificationFeature()&&Notification.permission===`granted`}isAllowNotificationRequest(){return this.isHasNotificationFeature()&&Notification.permission==="default"}notificationRequest(e){this.isAllowNotificationRequest()&&Notification.requestPermission(e)}notify(e,t,n,r,i){if(!this.isNotificationGranted())return;r=r||Jf;let a=new Notification(t,{icon:r,tag:e,body:n});i&&(a.onclick=()=>{try{i()}catch(e){this.loggerService.error(`error`,e.message)}window.focus(),a.close()})}};JF=U([g(),B(0,m(V.LoggerService))],JF);var YF=JF,XF=`/assets/C2LkV6Ff.mp3`,ZF=`NotAllowedError`,QF=class{constructor(e,t,n){this.loggerService=e,this.monitoringService=t,this.windowService=n,this.failedAudioBuffer=null,this.failedAudioVolume=null,this.audioContext=null,this.audioBufferCache=new Map,this.contextIdCounter=0,this.gainNode=null,this.isAudioInitialized=!1,this.currentRetryHandler=null,this.currentSetupHandler=null,this.userInteractionEvents=[`click`,`touchstart`,`keydown`],this.visibilityHandler=async()=>
2{if(!document.hidden&&this.audioContext){if(this.audioContext.state===`suspended`)setTimeout(async()=>{try{this.audioContext?.state===`suspended`&&await this.tryResumeAudioContext()}catch(e){this.loggerService.error(`error`,`Failed to resume AudioContext: ${e.message}`)}},200);else if(this.audioContext.state===`closed`)try{await this.resetAudioContext()}catch(e){this.loggerService.error(`error`,`Failed to reset AudioContext: ${e.message}`)}}}}async initAudio(){this.isAudioInitialized||(this.setupAudioActivationHandlers(),this.setupVisibilityHandlers(),this.isAudioInitialized=!0)}setupAudioActivationHandlers(){let e=async()=>{try{await this.initAudioContext(),this.failedAudioBuffer||await this.playSilentSound(),await this.preDecodeAudioFiles()}catch(e){this.loggerService.error(`error`,`Failed to prepare audio context: ${e.message}`)}},t=()=>{e(),this.clearSetupHandler()};this.currentSetupHandler=t,this.userInteractionEvents.forEach(e=>this.windowService.self().addEventListener(e,t,!0))}setupVisibilityHandlers(){document.addEventListener(`visibilitychange`,this.visibilityHandler)}isAudioContextValid(){return!!(this.audioContext&&this.audioContext.state!==`closed`)}isAutoplayPolicyDeny(e){if(!e||typeof e!=`object`)return!1;let{name:t,message:n}=e;return t===ZF||typeof n==`string`&&/play\(\)\s+failed/i.test(n)}async resetAudioContext(){try{this.audioContext&&this.audioContext.state!==`closed`&&await this.audioContext.close(),this.audioContext=null,this.gainNode=null,this.clearAudioCache(),await this.initAudioContext()}catch(e){throw this.loggerService.error(`error`,`Failed to reset AudioContext: ${e.message}`),e}}async initAudioContext(){try{if(this.audioContext||(this.audioContext=new AudioContext,this.contextIdCounter+=1,this.clearAudioCache()),this.audioContext?.state===`closed`&&(this.audioContext=null,this.gainNode=null,this.contextIdCounter+=1,this.clearAudioCache()),!this.gainNode&&this.audioContext&&(this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)),!this.audioContext||!this.gainNode)throw Error(`Failed to initialize audio context or gain node`);this.audioContext?.state===`suspended`&&await this.tryResumeAudioContext()}catch(e){throw this.isAutoplayPolicyDeny(e)||this.monitoringService.logInfo(`Failed to initialize AudioContext: ${e.message}`,Ba.ERROR),this.audioContext?.state===`closed`&&await this.cleanUp(),e}}async tryResumeAudioContext(){await Promise.race([this.audioContext?.resume(),new Promise((e,t)=>{setTimeout(()=>{let e=Error(`User interaction required for audio playback`);e.name=ZF,t(e)},1e3)})])}async playWebAudio(e,t=.5){if(this.isAudioContextValid()||await this.initAudioContext(),this.audioContext?.state===`suspended`){let e=Error(`User interaction required for audio playback`);throw e.name=ZF,e}if(this.audioContext?.state===`closed`&&await this.resetAudioContext(),!e||!this.gainNode||!this.audioContext)throw Error(`Audio not properly initialized`);let n=this.audioContext.createBufferSource();n.buffer=e,this.gainNode.gain.value=Math.max(0,Math.min(1,t)),n.connect(this.gainNode),n.start(0),n.onended=()=>{n.disconnect()}}async retryAudioPlaybackByClick(e,t=.5){if(this.isAudioContextValid()||await this.initAudioContext(),this.audioContext?.state===`suspended`&&await this.tryResumeAudioContext(),this.audioContext?.state===`closed`&&await this.resetAudioContext(),!e||!this.gainNode||!this.audioContext)throw Error(`Audio not properly initialized`);let n=this.audioContext.createBufferSource();n.buffer=e,this.gainNode.gain.value=Math.max(0,Math.min(1,t)),n.connect(this.gainNode),n.start(0),n.onended=()=>{n.disconnect()}}getAudioUrl(e){return e?sp+e:XF}clearAudioCache(){for(let[e,t]of this.audioBufferCache.entries())t.binaryArrayBuffer?(t.decodedAudioBuffer=void 0,t.contextId=void 0):this.audioBufferCache.delete(e)}async preloadAudioFile(e){try{let t=this.getAudioUrl(e);if(this.audioBufferCache.has(t))return;let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch audio file: ${n.status} ${n.statusText}`);let r=await n.arrayBuffer();if(this.isAudioContextValid()&&this.audioContext?.state!==`suspended`){let e=await this.audioContext.decodeAudioData(r);this.audioBufferCache.set(t,{decodedAudioBuffer:e,contextId:this.contextIdCounter})}else this.audioBufferCache.set(t,{binaryArrayBuffer:r})}catch(e){throw this.loggerService.error(`error`,`Failed to load audio file: ${e.message}`),e}}async getCachedAudioBuffer(e){let t=this.getAudioUrl(e);this.isAudioContextValid()||await this.initAudioContext();let n=this.audioBufferCache.get(t);if(!n||!n.decodedAudioBuffer&&!n.binaryArrayBuffer)throw Error(`Audio file not loaded: ${t}. Call preloadAudioFile first.`);if(n.decodedAudioBuffer&&n.contextId===this.contextIdCounter)return n.decodedAudioBuffer;if(!this.audioContext)throw Error(`AudioContext not initialized`);if(!n.binaryArrayBuffer)throw Error(`Audio file not loaded: ${t}. ArrayBuffer is empty`);let r=n.binaryArrayBuffer.slice(0),i=await this.audioContext.decodeAudioData(r);return n.decodedAudioBuffer=i,n.contextId=this.contextIdCounter,n.binaryArrayBuffer=void 0,i}async preDecodeAudioFiles(){if(!this.isAudioContextValid())return;let e=[];for(let[t,n]of this.audioBufferCache.entries()){if(n.decodedAudioBuffer&&n.contextId===this.contextIdCounter)continue;let r=t.startsWith(`https://my.textmagic.com/s3/`)?t.substring(sp.length):void 0,i=this.getCachedAudioBuffer(r).then(()=>{}).catch(e=>{this.loggerService.error(`error`,`Failed to pre-decode ${t}: ${e.message}`)});e.push(i)}await Promise.allSettled(e)}async playSound(e,t){let n;try{await this.preloadAudioFile(e),n=await this.getCachedAudioBuffer(e),await this.playWebAudio(n,t)}catch(r){this.handlePlayError(r,n,t,e)}}playSilentSound(){if(!this.isAudioContextValid()){this.loggerService.error(`error`,`AudioContext not initialized. Need user interaction first.`);return}let e=this.audioContext,t=e.createOscillator(),n=e.createGain();t.type=`sine`,t.frequency.value=110,n.gain.value=.001,t.connect(n).connect(e.destination),t.start(),t.stop(e.currentTime+.05),t.one
2nded=()=>{t.disconnect(),n.disconnect()}}async cleanUp(){try{this.isAudioInitialized=!1,this.failedAudioBuffer=null,this.failedAudioVolume=null,this.clearRetryHandler(),this.clearSetupHandler(),this.audioContext&&this.audioContext.state!==`closed`&&await this.audioContext.close(),this.audioContext=null,this.gainNode=null,this.audioBufferCache.clear(),this.contextIdCounter+=1,document.removeEventListener(`visibilitychange`,this.visibilityHandler)}catch(e){this.monitoringService.logInfo(`Failed to cleanup audio resources: ${e.message}`,Ba.ERROR)}}handlePlayError(e,t,n=.5,r){if(e.name===ZF){this.clearRetryHandler(),this.clearSetupHandler(),t&&(this.failedAudioBuffer=t),this.failedAudioVolume=n;let e=r,i=async()=>{try{if(this.failedAudioBuffer){let e=this.failedAudioBuffer,t=this.failedAudioVolume??.5;this.failedAudioBuffer=null,this.failedAudioVolume=null,await this.retryAudioPlaybackByClick(e,t)}else if(e){await this.preloadAudioFile(e);let t=await this.getCachedAudioBuffer(e);await this.retryAudioPlaybackByClick(t,n)}else{await this.preloadAudioFile();let e=await this.getCachedAudioBuffer();await this.retryAudioPlaybackByClick(e,n)}this.performDelayedInitialization()}catch(t){let n=`Failed to retry audio playback: ${t.message}, path=${e}`;this.isAutoplayPolicyDeny(t)?this.loggerService.log(`error`,n):this.monitoringService.logInfo(n,Ba.ERROR)}this.clearRetryHandler()};this.currentRetryHandler=i,this.userInteractionEvents.forEach(e=>this.windowService.self().addEventListener(e,i,!0))}else{let t=`Audio playback error: ${e.message}, path=${r}`;this.monitoringService.logInfo(t,Ba.ERROR)}}clearRetryHandler(){this.currentRetryHandler&&(this.userInteractionEvents.forEach(e=>this.windowService.self().removeEventListener(e,this.currentRetryHandler,!0)),this.currentRetryHandler=null)}clearSetupHandler(){this.currentSetupHandler&&(this.userInteractionEvents.forEach(e=>this.windowService.self().removeEventListener(e,this.currentSetupHandler,!0)),this.currentSetupHandler=null)}performDelayedInitialization(){this.preDecodeAudioFiles().catch(e=>{this.loggerService.error(`error`,`Failed to pre-decode files during delayed init: ${e.message}`)})}};QF=U([g(),B(0,m(V.LoggerService)),B(1,m(V.MonitoringService)),B(2,m(V.WindowService))],QF);var $F=QF,eI=class extends pl{};U([v()],eI.prototype,`id`,void 0),U([v()],eI.prototype,`wsServers`,void 0),U([at()],eI.prototype,`hackIpInContact`,void 0),U([v()],eI.prototype,`rtcpMuxPolicy`,void 0),U([ft()],eI.prototype,`registerExpires`,void 0),U([v()],eI.prototype,`aorsDomain`,void 0),U([v(null)],eI.prototype,`authorizationUser`,void 0),U([v(null)],eI.prototype,`password`,void 0),U([v(null)],eI.prototype,`endpoint`,void 0),U([v(null)],eI.prototype,`uri`,void 0),U([at(!1)],eI.prototype,`log`,void 0),eI=U([Be(md.VOICE_CALL_CONFIG)],eI);var tI=eI,nI=class extends Q{constructor(...e){super(...e),this.id=`1`}async getSettings(){let e=this.endpointsService.getPath(`userVoiceCallSettings`),t=await this.getApiSource().get(e);return await this.insertOrUpdate([{...t.data,id:this.id}]),this.findEntityByIdOrFail(this.id)}};nI=U([Y({model:tI}),g(),h()],nI);var rI=nI,iI=class extends pl{get allowedPhoneNumberCountryForNativeDedicatedOnly(){return this.countryId===`CA`?[this.countryId,`US`]:[this.countryId]}};U([v()],iI.prototype,`id`,void 0),U([v()],iI.prototype,`countryId`,void 0),U([v()],iI.prototype,`name`,void 0),U([v()],iI.prototype,`replyOptionsType`,void 0),U([v()],iI.prototype,`sender`,void 0),U([ft()],iI.prototype,`buyable`,void 0),U([v()],iI.prototype,`category`,void 0),U([at()],iI.prototype,`ssiAllowMobilePhone`,void 0),U([at()],iI.prototype,`ssiAllowSenderId`,void 0),U([at()],iI.prototype,`ssiAllowShared`,void 0),U([at()],iI.prototype,`isNativeDedicatedOnly`,void 0),U([v()],iI.prototype,`status`,void 0),iI=U([Be(md.SENDER_SETTINGS_COUNTRY)],iI);var aI=iI,oI=class extends Q{async loadCountries(){let e=this.endpointsService.getPath(`senderSettingsCountries`),t=await this.getApiSource().get(e),n=[];for(let e in t.data){let r=e;t.data[r].forEach(e=>{let t={...e,id:e.countryId,category:r};n.push(t)})}
2return await this.insertOrUpdate(n),this.all()}getCountriesByCategories(e){return this.all().filter(({category:t})=>e.includes(t))}getCountriesByCategory(e){return this.getCountriesByCategories([e])}getCountriesByCountryIds(e){return this.all().filter(({countryId:t})=>e.includes(t))}async updateSenderSettingsForCountry(e,t,n){let r=this.endpointsService.getPath(`senderSettingsCountries`);await this.getApiSource().put(r,{country:e,value:t,sourceType:n}),await this.loadCountries()}async restoreDefaultSettingForCountry(e){let t=this.endpointsService.getPath(`senderSettingsRestoreForCountry`);return await this.getApiSource().put(t,{country:e}),rT(this.loadCountries())}async restoreDefaultSetting(){let e=this.endpointsService.getPath(`senderSettingsRestore`);return await this.getApiSource().get(e),rT(this.loadCountries())}};oI=U([Y({model:aI}),g(),h()],oI);var sI=oI,cI=class{constructor(e){this.phoneService=e}register(e){e(`phoneNumber`,(e,[t])=>e?this.phoneService.isValidPhoneNumber(e,t)?!0:{message:{path:`commonValidationRegistrator.phoneNumber`}}:!0),e(`phoneNumberForRegion`,(e,[t])=>he(e,t)?!0:{message:{path:`commonValidationRegistrator.phoneNumberForRegion`}}),e(`phoneRequired`,({phone:e,countryCode:t})=>{let n=e.trim();if(!n)return!1;let r=t;return!r&&(r=this.phoneService.getCountryCodeByPhone(e),!r)?!1:n!==this.phoneService.getPhoneLeadCodeByCountryCode(r)}),e(`contactPhoneValid`,({phone:e,countryCode:t})=>this.phoneService.validateContactPhone({phone:e,countryCode:t})),e(`phoneValid`,({phone:e,countryCode:t})=>this.phoneService.validatePhone({phone:e,countryCode:t}))}};cI=U([g(),B(0,m(V.PhoneService))],cI);var lI=cI,uI=class{constructor(e){this.validationRulesBuilderService=e}getPasswordConfig(){let e={messagePath:`specialValidationRegistrator.fromToCharacters`,messageParams:{min:8,max:48}};return{fieldType:`password`,value:``,validators:this.validationRulesBuilderService.createRules().required(e).minLength(8,e).maxLength(48,e).hasNumbers({messagePath:`specialValidationRegistrator.oneNumber`}).hasSpecialChars({messagePath:`specialValidationRegistrator.oneSpecialChar`}).hasLowercaseAndUppercase({messagePath:`specialValidationRegistrator.lowerAndUppercase`})}}};uI=U([g(),B(0,m(V.ValidationRulesBuilderService))],uI);var dI=uI,fI=class{constructor(e){this.domainManagerService=e}async resolve(e){let t=this.domainManagerService.getSettingsService(e.model);e.cache===!1?await t.getDomainRepository().getSettings():await t.getSettings()}};fI=U([g(),B(0,m(V.DomainManagerService))],fI);var pI=fI,mI=class{constructor(e,t){this.subAccountsPermissionsService=e,this.userService=t}async getPermissions(){await this.subAccountsPermissionsService.getPermissions(this.userService.currentUser().id)}hasPermissions(){return!!this.subAccountsPermissionsService.findEntityByIdOrNull(this.userService.currentUser().id)}async getPermissionsIfNotLoaded(){this.hasPermissions()||await this.getPermissions()}isActivePermission(e){let t=this.userService.currentUserId();if(t===null)return!1;let n=e,r=this.subAccountsPermissionsService.findEntityByIdOrFail(t),i={autorechargeSettings:`billing`,invoices:`billing`,reportingStatements:`billing`};if(r.accountPermissions.billing)n=i[e]??n;else if(n===`billing`)return!0;return this.subAccountsPermissionsService.findUserPermissionsInAnyGroupByName(t,n).value}};mI=U([g(),B(0,m(V.SubAccountsPermissionsService)),B(1,m(V.UserService))],mI);var hI=mI,gI=class{constructor(e,t,n){this.permissionsService=e,this.routerService=t,this.accessControlService=n,this.routesPermissions={},this.routesAccessControlGroups={},this.fillPermissionsFromRoutes(t.getRoutes()),this.fillAccessControlFromRoutes(t.getRoutes())}isAllowAccessToRouteByAccessGroups(e){return e.every(e=>this.accessControlService.isAccessAllowed(e))}getRouteName(e){return typeof e==`string`?e:this.routerService.getRawRouteName(e)}async resolveStrategiesForRoute(e){let t=this.getRouteName(e);if(!t)return;let n=async e=>{let t=e.next();t.done||(await this.accessControlService.resolveStrategies(t.value),await n(e))};await n(this.isAllowAccessToRouteByName(t))}*isAllowAccessToRouteByName(e){if(!this.checkPermissionsByRouteByName(e))return!1;let t=this.routesAccessControlGroups[e]??[];if(yield t,!this.isAllowAccessToRouteByAccessGroups(t))return!1;let n=this.routerService.getRouteByName(e);
2if(!(n.children&&n.children.length!==0)||n.meta?.redirectToFirstChildren===!1)return!0;let r=n.children.map(e=>this.routerService.getOriginRoute(e).name),i=this.getRedirectForRoute(n);i&&i.name&&(r=r.filter(e=>e!==i.name),r.unshift(i.name));for(let e=0;e<r.length;e++){let t=r[e];if(typeof t!=`string`)throw new G(`route name should be type "string". Route name type "${typeof t}"`);let n=!1,i=!1,a=this.isAllowAccessToRouteByName(t);for(;!n;){let e=a.next();e.done?(n=!0,i=e.value):yield e.value}if(i)return!0}return!1}isAllowAccessToRoute(e){let t=this.getRouteName(e);if(!t)return!0;let n=this.isAllowAccessToRouteByName(t);for(;;){let e=n.next();if(e.done)return e.value}}checkPermissionsByRouteByName(e){let t=this.routesPermissions[e]??[];return t.length===0||t.every(e=>this.permissionsService.isActivePermission(e))}fillPermissionsFromRoutes(e,t=[]){e.forEach(e=>{let n=[...t];e.meta?.permission&&n.push(e.meta.permission),typeof e.name==`string`&&n.length!==0&&(this.routesPermissions[e.name]=n),e.children&&e.children.length&&this.fillPermissionsFromRoutes(e.children,n)})}fillAccessControlFromRoutes(e,t=[]){e.forEach(e=>{let n=[...t];e.meta?.accessControlGroups&&n.push(...e.meta.accessControlGroups),typeof e.name==`string`&&n.length!==0&&(this.routesAccessControlGroups[e.name]=n),e.children&&e.children.length&&this.fillAccessControlFromRoutes(e.children,n)})}getRedirectForRoute(e){let{redirect:t}=e;if(!t)return null;let n=e=>{let t=this.getRouteName(e);if(!t)throw new G(`route without name`);return this.routerService.getRouteByName(t)};if(typeof t==`function`){let r=n(t(this.routerService.resolve(e)));return this.getRedirectForRoute(r)}return typeof t==`string`?this.routerService.getRouteByName(t):n(t)}_getFirstAllowedChildrenRoute(e,t=!0){let n=this.getRouteName(e);if(!n)return null;let r=this.routerService.getRouteByName(n);if(t&&!r.children)throw new G(`route ${n} without children`);if(!t&&!r.children&&this.isAllowAccessToRoute(r))return r;let i=this.getRedirectForRoute(r);if(i){let e=this._getFirstAllowedChildrenRoute(i,!1);if(e)return e}if(!r.children||r.children.length===0)return null;for(let e=0;e<r.children.length;e++){let t=this._getFirstAllowedChildrenRoute(r.children[e],!1);if(t)return t}return null}getFirstAllowedChildrenRoute(e){return this._getFirstAllowedChildrenRoute(e,!0)}getFirstAllowedRoute(e=[]){return e.find(e=>this.isAllowAccessToRoute(e))??null}};gI=U([g(),B(0,m(V.PermissionsService)),B(1,m(V.RouterService)),B(2,m(V.AccessControlService))],gI);var _I=gI,vI=class extends pl{};U([v()],vI.prototype,`id`,void 0),U([ft()],vI.prototype,`price`,void 0),U([y()],vI.prototype,`currency`,void 0),U([v()],vI.prototype,`giftType`,void 0),vI=U([Be(md.SENDER_ID_PRICE)],vI);var yI=vI,bI=class extends qE{fillPriceDetails(){return this.getDomainRepository().fillPriceDetails()}getPriceDetails(){return this.getDomainRepository().getPriceDetails()}};bI=U([oD({model:yI}),g(),h()],bI);var xI=bI,SI=class extends Q{constructor(...e){super(...e),this.id=`1`}getPriceDetails(){return this.findEntityByIdOrNull(this.id)}async fillPriceDetails(){let e=await this.getApiSource().get(this.endpointsService.getPath(`senderIdPrice`));return await this.insertOrUpdate([{...e.data,id:this.id}]),e.data}};SI=U([Y({model:yI}),g(),h()],SI);var CI=SI,wI=class extends yD{constructor(e,t,n,r,i){super(e,t,n,r),this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.forwardAudioService=i,this.ATTACH_VIDEO_AUDIO_FILE_LIMIT=15728640}async buildForm(){this.getBuilder().control({fieldType:`file`,name:`file`,value:null,validators:this.validationRulesBuilderService.createRules().fileMaxSize({data:{audio:this.ATTACH_VIDEO_AUDIO_FILE_LIMIT},messagePath:`common.fileSizeError`})})}async submit(e){return this.forwardAudioService.uploadFile(e.file)}};wI=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.ForwardAudioService))],wI);var TI=wI,EI=class extends pl{};U([ft()],EI.prototype,`brandRegistration`,void 0),U([ft()],EI.prototype,`campaignRegistration`,void 0),U([v()],EI.prototype,`currency`,void 0),U([ft()],EI.prototype,`minimumRequiredCredit`,void 0),U([y()],EI.prototype,`numberPrice`,void 0),U([at()],EI.prototype,`hasFreeCampaignRegistration`,void 0),EI=U([Be(md.TEN_DLC_PRICING)],EI);var DI=EI,OI=class extends qE{constructor(...e){super(...e),this.id=`1`,this.minimumRequiredCreditForCa=20}async fetchPrices(){let e=(await this.getDomainRepository().fetchPrices()).data;
2return await this.getDomainRepository().insertOrUpdate([{...e,id:this.id}]),e}getPrices(){return this.getDomainRepository().findEntityByIdOrNull(this.id)}getAppliedPrices(){return this.getPrices()}};OI=U([oD({model:DI}),g(),h()],OI);var kI=OI,AI=class extends Q{async fetchPrices(){let e=this.endpointsService.getPath(`tenDlcGetPricing`);return this.getApiSource().get(e)}};AI=U([Y({model:DI}),g(),h()],AI);var jI=AI,MI=class{constructor(e){this.tenDlcPricingPreloader=e}async resolve(){await this.tenDlcPricingPreloader.preload()}};MI=U([g(),B(0,m(V.TenDlcPricesPreloader))],MI);var NI=MI,PI=class{constructor(e){this.typedGroupFormBuilderFactoryService=e}setDependencys(e,t){this.formBuilder=e,this.arrayName=t,this.arrayModifier=this.formBuilder.getArrayModifier(this.arrayName)}control(e,t){this.formBuilder.getField(this.arrayName).childrens.length===0&&this.arrayModifier.initControl({...e}),(t?.extendArray??!0)&&this.formBuilder.extendArray(this.arrayName)}groupControl(e){let t=this.arrayModifier.initGroup(e).instance,n=this.typedGroupFormBuilderFactoryService(),r=SA([this.arrayName,t.field.name]);return n.setDependencys(this.formBuilder,r),n}push(e){this.formBuilder.extendArray(this.arrayName)}remove(e){let t=this.formBuilder.getField(this.arrayName).childrens[e].field.name;this.formBuilder.removeField(`${this.arrayName}.${t}`)}};PI=U([g(),B(0,m(V.TypedGroupFormBuilderFactoryService))],PI);var FI=class extends Q{async linkToCampaign(e){let t=this.endpointsService.getPath(`tenDlcNumberLinkToCampaign`);await this.getApiSource().post(t,e)}async unlink(){let e=this.endpointsService.getPath(`numberUnlink`);return(await this.getApiSource().get(e)).data}getNumbersByStatus(e){let t={filter:[],other:{status:e}};return this.doGrid(this.getSettingsFetch(),[],t)}async getNumbersByCampaignId(e){let t={perPage:250,filter:[],other:{campaignId:e}},n=await this.doGrid(this.getSettingsFetch(),[],t);return await this.insertOrUpdate(n.items),n.items}findNumbersByCampaignId(e){return this.query().where(`campaignId`,e).all()}};FI=U([Y({model:bN,fetch:`tenDlcPhoneNumbers`}),g(),h()],FI);var II=FI,LI=function(e){return e.APPROVED=`APPROVED`,e.PENDING=`PENDING`,e.DECLINED=`DECLINED`,e}({}),RI=`tenDlcPhoneNumbersTable`,zI=`tenDlcPhoneNumbersDetailsTable`,BI=function(e){return e.draft=`draft`,e.supportReview=`support_review`,e.providerReview=`provider_review`,e.verified=`verified`,e.actionRequired=`action_required`,e}({}),VI=function(e){return e.verified=`verified`,e.failed=`failed`,e.inProgress=`in_progress`,e}({}),HI=function(e){return e.automotive=`AUTOMOTIVE`,e.agriculture=`AGRICULTURE`,e.banking=`BANKING`,e.construction=`CONSTRUCTION`,e.consumer=`CONSUMER`,e.education=`EDUCATION`,e.engineering=`ENGINEERING`,e.energy=`ENERGY`,e.oilAndGas=`OIL_AND_GAS`,e.fastMoving=`FAST_MOVING_CONSUMER_GOODS`,e.financial=`FINANCIAL`,e.fintech=`FINTECH`,e.food=`FOOD_AND_BEVERAGE`,e.government=`GOVERNMENT`,e.healthcare=`HEALTHCARE`,e.hospitality=`HOSPITALITY`,e.insurance=`INSURANCE`,e.legal=`LEGAL`,e.manufacturing=`MANUFACTURING`,e.media=`MEDIA`,e.online=`ONLINE`,e.professional=`PROFESSIONAL_SERVICES`,e.rawMaterials=`RAW_MATERIALS`,e.realEstate=`REAL_ESTATE`,e.religion=`RELIGION`,e.retail=`RETAIL`,e.jewelry=`JEWELRY`,e.technology=`TECHNOLOGY`,e.telecommunications=`TELECOMMUNICATIONS`,e.transportation=`TRANSPORTATION`,e.travel=`TRAVEL`,e.electronics=`ELECTRONICS`,e.nonProfit=`NOT_FOR_PROFIT`,e.empty=``,e}({}),UI=class extends qE{constructor(e,t,n,r,i){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.translateService=r,this.phoneNumbersService=i}getStatus(e){let t={[LI.APPROVED]:this.translateService.t(`status.tenDlcPhoneNumber.approved`),[LI.PENDING]:this.translateService.t(`status.tenDlcPhoneNumber.pending`),[LI.DECLINED]:this.translateService.t(`status.tenDlcPhoneNumber.declined`)},n={green:[LI.APPROVED],blue:[LI.PENDING],error:[LI.DECLINED]};return{value:t[e]||``,color:GF(n,e)}}async linkToCampaign(e,t,n){await this.getDomainRepository().linkToCampaign({campaignId:t,userInboundId:n}),this.notify([e],cl.UPDATE)}getFirstRequestId(){return this.getDomainRepository().query().where(e=>e.requestId!==null).first()?.requestId||null}async restoreNumber(e){await this.phoneNumbersService.restoreNumber(e),this.notify([e],cl.UPDATE)}async cancelNumber(e){await this.phoneNumbersService.cancelNumber(e),this.notify([e],cl.UPDATE)}async hasApprovedNumber(){let{items:e}=await this.getDomainRepository().getNumbersByStatus(BI.verified);return!!e.length}async unlink(){return this.getDomainRepository().unlink()}async getNumbersByCampaignId(e){return this.getDomainRepository().getNumbersByCampaignId(e)}findNumbersByCampaignId(e){return this.getDomainRepository().findNumbersByCampaignId(e)}async fetchNumber(e){return(await this.getDomainRepository().gridRequest({filter:[],other:{exactPhoneSearch:e}})).items[0]||null}};UI=U([oD({model:bN}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TranslateService)),B(4,m(V.PhoneNumbersService))],UI);var WI=UI,GI=class extends Q{async getCampaignByRequestId(e){let t=this.endpointsService.getPath(`tenDlcCampaignByRequest`,[e]);try{let e=await this.getApiSource().get(t);
2return await this.insertOrUpdate([e.data]),e.data}catch(e){if(e instanceof xs)return null;throw e}}async fetchCampaignById(e){let t=this.endpointsService.getPath(`tenDlcCampaignSingle`,[e]);try{let e=await this.getApiSource().get(t);return await this.insertOrUpdate([e.data]),e.data}catch(e){if(e instanceof xs)return null;throw e}}async cancelCampaign(e){let t=this.endpointsService.getPath(`tenDlcCampaignSingle`,[e]);await this.getApiSource().delete(t)}async deleteCampaign(e){let t=this.endpointsService.getPath(`tenDlcCampaignSingle`,[e]);await this.getApiSource().delete(t)}async restoreCampaign(e){let t=this.endpointsService.getPath(`tenDlcCampaignRestore`,[e]);await this.getApiSource().post(t)}};GI=U([Y({model:Tn,fetch:`tenDlcCampaign`,single:`tenDlcCampaignSingle`}),g(),h()],GI);var KI=GI,qI=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.translateService=r}async getCampaignByRequestId(e){return this.getDomainRepository().getCampaignByRequestId(e)}async fetchCampaignById(e){return this.getDomainRepository().fetchCampaignById(e)}findCampaign(e){return e?this.getDomainRepository().query().withAll().find(e):null}isCampaignActionRequired(){return this.getDomainRepository().all().some(e=>e.status===Ni.actionRequired)}getFirstDraftCampaign(){return this.getDomainRepository().query().where(`status`,or.DRAFT).first()}getUseCases(e){let t={"2FA":this.translateService.t(`tenDlcCampaignsUseCases.twoFa`),CUSTOMER_CARE:this.translateService.t(`tenDlcCampaignsUseCases.customerCare`),FRAUD_ALERT:this.translateService.t(`tenDlcCampaignsUseCases.fraudAlert`),MARKETING:this.translateService.t(`tenDlcCampaignsUseCases.marketing`),POLLING_VOTING:this.translateService.t(`tenDlcCampaignsUseCases.pollingVoting`),ACCOUNT_NOTIFICATION:this.translateService.t(`tenDlcCampaignsUseCases.accountNotification`),DELIVERY_NOTIFICATION:this.translateService.t(`tenDlcCampaignsUseCases.deliveryNotification`),HIGHER_EDUCATION:this.translateService.t(`tenDlcCampaignsUseCases.higherEducation`),PUBLIC_SERVICE_ANNOUNCEMENT:this.translateService.t(`tenDlcCampaignsUseCases.publicServiceAnnouncement`),SECURITY_ALERT:this.translateService.t(`tenDlcCampaignsUseCases.securityAlert`)};return e.map(e=>t[e])}getStatus(e){let t={[Ni.draft]:this.translateService.t(`status.tenDlcCampaigns.draft`),[Ni.supportReview]:this.translateService.t(`status.tenDlcCampaigns.pending`),[Ni.providerReview]:this.translateService.t(`status.tenDlcCampaigns.inReview`),[Ni.actionRequired]:this.translateService.t(`status.tenDlcCampaigns.actionRequired`),[Ni.verified]:this.translateService.t(`status.tenDlcCampaigns.active`)},n={green:[Ni.verified],gray:[Ni.draft],blue:[Ni.supportReview,Ni.providerReview],orange:[Ni.actionRequired]};return{value:t[e]||``,color:GF(n,e)}}fill(e){return this.getDomainRepository().fill(e)}async cancelCampaign(e){await this.getDomainRepository().cancelCampaign(e),this.notify([e],cl.DELETE)}async deleteCampaign(e){await this.getDomainRepository().deleteCampaign(e),this.notify([e],cl.DELETE)}async restoreCampaign(e){await this.getDomainRepository().restoreCampaign(e),this.notify([e],cl.UPDATE)}async deleteCampaignErrorFields(e){let t=this.findCampaign(e);t&&(t.errorFields=[],await this.getDomainRepository().insertOrUpdate([t]))}async hasAnyCampaign(){return(await this.getDomainRepository().gridRequest({filter:[]},{pageKey:`1-10`,requestParams:{page:1,perPage:10}})).items.length>0}};qI=U([oD({model:Tn}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TranslateService))],qI);var JI=qI,YI=class extends pl{};U([v()],YI.prototype,`id`,void 0),U([y()],YI.prototype,`vonageBrandId`,void 0),U([ft()],YI.prototype,`userId`,void 0),U([Ge(Kn,`userId`)],YI.prototype,`user`,void 0),U([y()],YI.prototype,`entityType`,void 0),U([v()],YI.prototype,`brandStatus`,void 0),U([y()],YI.prototype,`vettingStatus`,void 0),U([y()],YI.prototype,`vettingId`,void 0),U([y()],YI.prototype,`companyNameLegal`,void 0),U([y()],YI.prototype,`companyNameDisplay`,void 0),U([y()],YI.prototype,`taxNumber`,void 0),U([y(null)],YI.prototype,`taxNumberIdentifier`,void 0),U([y()],YI.prototype,`taxNumberCountryCode`,void 0),U([y()],YI.prototype,`state`,void 0),U([y()],YI.prototype,`city`,void 0),U([y()],YI.prototype,`street`,void 0),U([y()],YI.prototype,`postalCode`,void 0),U([y()],YI.prototype,`countryId`,void 0),U([y()],YI.prototype,`verticalTypeOfCompany`,void 0),U([y()],YI.prototype,`website`,void 0),U([y()],YI.prototype,`contactFirstName`,void 0),U([y()],YI.prototype,`contactLastName`,void 0),U([y(null)],YI.prototype,`contactJobPosition`,void 0),U([y(null)],YI.prototype,`contactExactJobTitle`,void 0),U([y()],YI.prototype,`contactPhone`,void 0),U([y()],YI.prototype,`contactEmail`,void 0),U([y()],YI.prototype,`companyStockSymbol`,void 0),U([y()],YI.prototype,`companyStockExchange`,void 0),U([y()],YI.prototype,`campaignIds`,void 0),U([qe(Tn,`c
2ampaignIds`)],YI.prototype,`campaigns`,void 0),U([v()],YI.prototype,`createdAt`,void 0),U([v()],YI.prototype,`updatedAt`,void 0),U([y()],YI.prototype,`registeredAt`,void 0),U([y()],YI.prototype,`errorFields`,void 0),U([y()],YI.prototype,`draftRequestId`,void 0),U([y()],YI.prototype,`actionRequiredRequestId`,void 0),U([y(null)],YI.prototype,`businessRegionsOfOperations`,void 0),U([y(null)],YI.prototype,`socialProfileLinks`,void 0),U([at()],YI.prototype,`isDetailsFilled`,void 0),U([at()],YI.prototype,`isAddressFilled`,void 0),U([at()],YI.prototype,`isContactFilled`,void 0),YI=U([Be(md.TOLL_FREE_BRAND)],YI);var XI=YI,ZI=class extends Q{};ZI=U([Y({model:XI}),g(),h()],ZI);var QI=ZI,$I=function(e){return e.UNKNOWN=`UNKNOWN`,e.REAL_ESTATE=`REAL_ESTATE`,e.HEALTHCARE=`HEALTHCARE`,e.ENERGY=`ENERGY`,e.ENTERTAINMENT=`ENTERTAINMENT`,e.RETAIL=`RETAIL`,e.AGRICULTURE=`AGRICULTURE`,e.INSURANCE=`INSURANCE`,e.EDUCATION=`EDUCATION`,e.HOSPITALITY=`HOSPITALITY`,e.FINANCIAL=`FINANCIAL`,e.GAMBLING=`GAMBLING`,e.CONSTRUCTION=`CONSTRUCTION`,e.NGO=`NGO`,e.MANUFACTURING=`MANUFACTURING`,e.GOVERNMENT=`GOVERNMENT`,e.TECHNOLOGY=`TECHNOLOGY`,e.COMMUNICATION=`COMMUNICATION`,e.POSTAL=`POSTAL`,e.TRANSPORTATION=`TRANSPORTATION`,e}({}),eL=`tenDlcBrandDetailsModal`,tL=function(e){return e.draft=`draft`,e.supportReview=`support_review`,e.providerReview=`provider_review`,e.verified=`verified`,e.actionRequired=`action_required`,e}({}),nL=function(e){return e.public=`public`,e.private=`private`,e.government=`government`,e.nonProfit=`non-profit`,e}({}),rL=function(e){return e.DRAFT=`DRAFT`,e.PENDING=`PENDING`,e.IN_REVIEW=`IN_REVIEW`,e.VERIFIED=`VERIFIED`,e.ACTION_REQUIRED=`ACTION_REQUIRED`,e}({}),iL=`tollFreeFormModal`,aL=function(e){return e.Franchise=`Franchise`,e.GovernmentOrStateOrganisation=`Government or State Organisation`,e.LicensedProfessional=`Licensed Professional`,e.PublicUtility=`Public Utility`,e.RegisteredCorporation=`Registered Corporation`,e.SoleProprietor=`Sole Proprietor`,e.NonProfitOrganization=`Non-Profit Organization`,e}({}),oL=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.translateService=r}getStatus(e){let t={[rL.DRAFT]:this.translateService.t(`status.tenDlcBrandStatus.draft`),[rL.PENDING]:this.translateService.t(`status.tenDlcBrandStatus.pending`),[rL.IN_REVIEW]:this.translateService.t(`status.tenDlcBrandStatus.inReview`),[rL.VERIFIED]:this.translateService.t(`status.tenDlcBrandStatus.verified`),[rL.ACTION_REQUIRED]:this.translateService.t(`status.tenDlcBrandStatus.actionRequired`)},n={gray:[rL.DRAFT],green:[rL.VERIFIED],blue:[rL.PENDING,rL.IN_REVIEW],orange:[rL.ACTION_REQUIRED]};return{value:t[e]||``,color:GF(n,e),outline:e!==rL.ACTION_REQUIRED}}getVerticalTypeLabel(e){return{[$I.UNKNOWN]:this.translateService.t(`common.unknown`),[$I.REAL_ESTATE]:this.translateService.t(`tenDlcVerticalType.realEstate`),[$I.HEALTHCARE]:this.translateService.t(`tenDlcVerticalType.healthcare`),[$I.ENERGY]:this.translateService.t(`tenDlcVerticalType.energy`),[$I.ENTERTAINMENT]:this.translateService.t(`tenDlcVerticalType.entertainment`),[$I.RETAIL]:this.translateService.t(`tenDlcVerticalType.retail`),[$I.AGRICULTURE]:this.translateService.t(`tenDlcVerticalType.agriculture`),[$I.INSURANCE]:this.translateService.t(`tenDlcVerticalType.insurance`),[$I.EDUCATION]:this.translateService.t(`tenDlcVerticalType.education`),[$I.HOSPITALITY]:this.translateService.t(`tenDlcVerticalType.hospitality`),[$I.FINANCIAL]:this.translateService.t(`tenDlcVerticalType.financial`),[$I.GAMBLING]:this.translateService.t(`tenDlcVerticalType.gambling`),[$I.CONSTRUCTION]:this.translateService.t(`tenDlcVerticalType.construction`),[$I.NGO]:this.translateService.t(`tenDlcVerticalType.ngo`),[$I.MANUFACTURING]:this.translateService.t(`tenDlcVerticalType.manufacturing`),[$I.GOVERNMENT]:this.translateService.t(`tenDlcVerticalType.government`),[$I.TECHNOLOGY]:this.translateService.t(`tenDlcVerticalType.technology`),[$I.COMMUNICATION]:this.translateService.t(`tenDlcVerticalType.communication`),[$I.POSTAL]:this.translateService.t(`tenDlcVerticalType.postal`),[$I.TRANSPORTATION]:this.translateService.t(`tenDlcVerticalType.transportation`)}[e]}};oL=U([oD({model:XI}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TranslateService))],oL);var sL=oL,cL=class extends pl{};U([y()],cL.prototype,`tenDlcState`,void 0),U([y()],cL.prototype,`tollfreeState`,void 0),cL=U([Be(md.REGULATIONS_STATUS)],cL);var lL=cL,uL=class extends Q{constructor(...e){super(...e),this.id=`1`}async fetchStatus(){let e=this.endpointsService.getPath(`regulationsStatus`),t=(await this.getApiSource().get(e)).data;
2return await this.insertOrUpdate([{...t,id:this.id}]),t}findStatus(){return this.findEntityByIdOrNull(this.id)}async loadStatus(){return this.findStatus()||this.fetchStatus()}};uL=U([Y({model:lL}),g(),h()],uL);var dL=uL,fL=function(e){return e.HAS_10DLC_REQUEST_IN_PROGRESS=`hasInProgress`,e.ACTION_REQUIRED=`hasActionRequired`,e.HAS_UNSENDED_10DLC_REQUEST=`hasUnsent`,e}({}),pL=function(e){return e.HAS_TOLLFREE_REQUEST_IN_PROGRESS=`hasInProgress`,e.ACTION_REQUIRED=`hasActionRequired`,e.HAS_UNSENDED_TOLLFREE_REQUEST=`hasUnsent`,e.HAS_TOLLFREE_NUMBER_WITHOUT_REQUEST=`hasNumberWithoutRequest`,e.ENOUGH_MONEY=`hasEnoughMoney`,e.NO_ENOUGH_MONEY=`notEnoughMoney`,e}({}),mL=`https://support.textmagic.com/article/10dlc-messaging/`,hL=[`jpg`,`jpeg`,`png`,`gif`,`pdf`],gL=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.translateService=r}fetchStatus(){return this.getDomainRepository().fetchStatus()}async loadStatus(){return this.getDomainRepository().loadStatus()}getStatus(){return this.getDomainRepository().findStatus()}getTenDlcStatus(){return this.getStatus()?.tenDlcState||null}getTenDlcRequestId(){return this.getStatus()?.tenDlcState?.requestId||null}getTollFreeRequestId(){return this.getStatus()?.tollfreeState?.requestId||null}getTollFreeStatus(){return this.getStatus()?.tollfreeState||null}getTenDlcState(){return this.getTenDlcStatus()?.state}getTollFreeState(){return this.getTollFreeStatus()?.state||pL.ENOUGH_MONEY}isNotEnoughMoneyForTollFree(){return this.getTollFreeState()===pL.NO_ENOUGH_MONEY}isEnoughMoneyForTollFree(){return this.getTollFreeState()===pL.ENOUGH_MONEY}hasNumberAndNoTollFree(){return this.getTollFreeState()===pL.HAS_TOLLFREE_NUMBER_WITHOUT_REQUEST}hasUnfinishedTenDlc(){return this.getTenDlcState()===fL.HAS_UNSENDED_10DLC_REQUEST}hasUnfinishedTollFree(){return this.getTollFreeState()===pL.HAS_UNSENDED_TOLLFREE_REQUEST}hasTenDlcInProgress(){return this.getTenDlcState()===fL.HAS_10DLC_REQUEST_IN_PROGRESS}hasTollFreeInProgress(){return this.getTollFreeState()===pL.HAS_TOLLFREE_REQUEST_IN_PROGRESS}hasTenDlcActionRequired(){return this.getTenDlcState()===fL.ACTION_REQUIRED}hasTollFreeActionRequired(){return this.getTollFreeState()===pL.ACTION_REQUIRED}getTollFreeEmptyButtonText(e){return{[pL.NO_ENOUGH_MONEY]:this.translateService.t(`tollFreeEmptyArea.buyCredit`),[pL.ENOUGH_MONEY]:this.translateService.t(`tollFreeEmptyArea.getNumber`),[pL.HAS_TOLLFREE_NUMBER_WITHOUT_REQUEST]:this.translateService.t(`tollFreeEmptyArea.registerBrand`),[pL.HAS_UNSENDED_TOLLFREE_REQUEST]:this.translateService.t(`tollFreeEmptyArea.completeRegistration`)}[e]||this.translateService.t(`tollFreeEmptyArea.getNumber`)}};gL=U([oD({model:lL}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TranslateService))],gL);var _L=gL,vL=class extends fN{constructor(e,t,n,r){super(e,t,n),this.em=e,this.loggerService=n,this.columnsSizeService=r}getInitColumns(){return{phone:{columnOrder:1,label:`tableColumns.textmagicNumber`,visible:!0,minWidth:this.columnsSizeService.getPhoneMinWidth()},account:{columnOrder:2,label:`tableColumns.account`,visible:!0,minWidth:this.columnsSizeService.getPersonMinWidth()},status:{columnOrder:3,label:`tableColumns.status`,visible:!0,growRatio:.5},nextRenewal:{columnOrder:4,label:`tableColumns.nextRenewal`,visible:!0,growRatio:.5,minWidth:220}}}};vL=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ColumnsFromStoreFactory)),B(2,m(V.LoggerService)),B(3,m(V.ColumnsSizeService))],vL);var yL=vL,bL=class extends yD{constructor(e,t,n,r,i,a){super(e,t,n,r),this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.distributionDetailsService=i,this.recipientService=a}async buildForm(){let e=this.getTypedBuilder();e.property(e=>e.name).control({fieldType:`text`,value:``,validators:this.validationRulesBuilderService.createRules().required()}),e.property(e=>e.recipients).control({fieldType:`tagsRecipient`,value:[],validators:this.validationRulesBuilderService.createRules().required()})}
2async populateFromEntityId(e){let t=this.distributionDetailsService.findEntityByIdOrFail(e),n=await this.recipientService.makeRecipientOptions(t.recipients,{removeBlockedContacts:!0});this.populate({name:t.name,recipients:n})}async submit(){}};bL=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.DistributionDetailsService)),B(5,m(V.RecipientService))],bL);var xL=bL,SL=e=>[`1`,`2`,`3`,`4`,`5`,`6`].map(t=>({value:t,text:e(`sendReceiveSettings.maximumLengthOptions.${t}`)})),CL=e=>e.startsWith(`+`)?e.slice(1):e,wL=class extends yD{constructor(e,t,n,r,i,a){super(e,t,n,r),this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.distributionDetailsService=i,this.translateService=a}async buildForm(){let e=this.getTypedBuilder();e.property(e=>e.includeOptions).control({fieldType:`radio`,value:`both`});let t=SL(e=>this.translateService.t(e));e.property(e=>e.maxLength).control({fieldType:`select`,value:t[0].value,options:()=>t}),e.property(e=>e.sender).control({fieldType:`selectSearchSenderSettings`,value:``,options:()=>[]}),e.property(e=>e.sourceType).control({fieldType:`text`,value:``})}populateFromEntityId(e){this.populate(this.getPopulateDataFromEntity(e))}async submit(){}getPopulateDataFromEntity(e){let{includeOptions:t,maxLength:n,senderSourcePhone:r}=this.distributionDetailsService.findEntityByIdOrFail(e),i=CL(r||``);return{includeOptions:t,maxLength:n.toString(),sender:i}}};wL=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.DistributionDetailsService)),B(5,m(V.TranslateService))],wL);var TL=wL,EL=class{constructor(e,t,n,r,i,a,o){this.contactService=e,this.contactListService=t,this.numericService=n,this.phoneService=r,this.segmentsService=i,this.messagesPriceService=a,this.recipientDataMapperService=o}getUid(e){return e.entityId.toString()}getAvatarPropsForContact(e){return this.contactService.getAvatarPropsForContact({id:String(e.entityId),phone:e.entityType===`reply_email`?``:e.value??``,email:e.entityType===`reply_email`?e.value??``:``,avatarHref:e.avatarHref??void 0,fullName:e.entityType===`reply`||e.entityType===`reply_email`?``:e.title,firstName:e.value,isList:e.entityType===`list`,isFilteredView:e.entityType===`filtered_view`})}normalizeRecipientForContact(e){return{...e,uid:this.getUid(e),entityId:e.entityId||ks(e.value??``),avatar:this.getAvatarPropsForContact(e),nameAsPhone:e.title.trim()===e.value,label:e.title,hint:this.phoneService.preparePhoneForDisplay(e.value??``)}}normalizeRecipientForContactEmail(e){return{...e,uid:this.getUid(e),entityId:e.entityId||ks(e.value??``),avatar:this.getAvatarPropsForContact(e),nameAsPhone:e.title.trim()===e.value,label:e.title,hint:e.value??void 0}}normalizeRecipientForList(e){let t=this.formatRecipientsCount(e.value??``);return{...e,uid:this.getUid(e),entityId:e.entityId||ks(e.value??``),avatar:this.getAvatarPropsForContact(e),label:e.title,hint:`${t} recipients`,shortHint:t,isTemporary:!1}}normalizeRecipientForFilteredView(e){let t=this.formatRecipientsCount(e.value??``);return{...e,sharedBy:void 0,uid:this.getUid(e),entityId:e.entityId||ks(e.value??``),avatar:this.getAvatarPropsForContact(e),label:e.title,hint:`${t} recipients`,shortHint:t}}normalizeRecipientForReply(e){return{...e,uid:this.getUid(e),entityId:e.entityId||ks(e.value??``),avatar:this.getAvatarPropsForContact(e),nameAsPhone:!0,label:this.phoneService.preparePhoneForDisplay(e.value??``),hint:e.countryName}}normalizeRecipientForReplyEmail(e){let t;if(e.value)t=e.value;else throw new G(`"label" is null`);return{...e,uid:this.getUid(e),entityId:e.entityId||ks(e.value??``),avatar:this.getAvatarPropsForContact(e),label:t}}normalizeRecipient(e){if(e.entityType===`list`)return this.normalizeRecipientForList({...e,entityType:e.entityType});if(e.entityType===`filtered_view`)return this.normalizeRecipientForFilteredView({...e,entityType:e.entityType});if(e.entityType===`contact`)return this.normalizeRecipientForContact({...e,entityType:e.entityType});if(e.entityType===`contact_email`)return this.normalizeRecipientForContactEmail({...e,entityType:e.entityType});if(e.entityType===`reply`)return this.normalizeRecipientForReply({...e,entityType:e.entityType});if(e.entityType===`reply_email`)return this.normalizeRecipientForReplyEmail({...e,entityType:e.entityType});throw new Qa(e.entityType)}normalizeRecipients(e){return e.map(e=>this.normalizeRecipient(e))}normalizeRecipientOptions(e){let t=[],n=[],r=[],i=[],a=[];
2return e.forEach(e=>{if(e.entityType===`list`)t.push(e.entityId);else if(e.entityType===`contact`||e.entityType===`contact_email`)n.push(e.entityId);else if(e.entityType===`filtered_view`)r.push(e.entityId);else if(e.entityType===`email`||e.entityType===`reply_email`){if(!e.value)throw new G(`el.value is null`);a.push(e.value)}else{if(!e.value)throw new G(`el.value is null`);i.push(WO(e.value))}}),{groupIds:t,contactIds:n,segmentIds:r,numbers:i,emails:a}}prepareRecipientsForClipboard(e){return e.reduce((e,t)=>(t.entityType===`contact`?t.value&&(e+=`${this.phoneService.clearPhoneAndAddPlus(t.value)} 3`):e+=`${t.label} 4`,e),``).slice(0,-1)}async makeRecipientOptions(e,t={}){let n=e.contactIds.map(e=>e.toString()),r=e.groupIds.map(e=>e.toString()),i=e.segmentIds.map(e=>e.toString()),[a,o,s]=await Promise.all([this.contactService.fillEntitiesByIds(n),this.contactListService.fillEntitiesByIds(r,[]),this.segmentsService.fillEntitiesByIds(i)]),c=a;t.removeBlockedContacts&&(c=c.filter(e=>!e.blocked));let l=c.map(e=>this.makeRecipientOptionFromContact(e)),u=o.map(e=>this.makeRecipientOptionFromContactList(e)),d=s.map(e=>this.makeRecipientOptionFromFilteredView(e)).filter(e=>e!==null),f=e.numbers.map(e=>this.makeRecipientOptionFromPhoneNumber(e)),p=e.emails?.map(e=>this.makeRecipientOptionFromEmail(e))??[];return[...l,...u,...f,...p,...d]}
4getRequestParamsFromRecipients(e){let{groupIds:t,contactIds:n,segmentIds:r,numbers:i}=this.normalizeRecipientOptions(e);return{lists:t.join(`,`),contacts:n.join(`,`),filteredViews:r.join(`,`),phones:i.join(`,`)}}async getRecipientsCount(e){return this.messagesPriceService.fetchRecipientsCount({...this.getRequestParamsFromRecipients(e),text:``,from:null})}makeRecipientOptionFromContactList(e){return{entityType:`list`,label:e.name,value:`${e.id}`,entityId:parseInt(e.id,10),isTemporary:e.isTemporary,hint:this.recipientDataMapperService.formatMembersCount(e.membersCount)}}makeRecipientOptionFromFilteredView(e){return{entityType:`filtered_view`,label:e.name,value:`${e.id}`,hint:this.recipientDataMapperService.formatMembersCount(e.count),entityId:parseInt(e.id,10)}}makeRecipientOptionFromPhoneNumber(e){return{entityId:ks(e),entityType:`raw`,label:this.recipientDataMapperService.getPhoneLabel(e),value:`${e}`.replace(/^\+/,``)}}makeRecipientOptionFromEmail(e){return{entityId:Rd(e),entityType:`email`,label:this.recipientDataMapperService.getEmailLabel(e),value:e}}makeRecipientOptionFromContact(e){return{entityType:`contact`,label:e.fullName?.trim()??``,value:e.phone??``,entityId:parseInt(e.id,10),hint:this.recipientDataMapperService.computeContactHint(e)}}makeRecipientOptionFromContactEmail(e){return{entityType:`contact_email`,label:e.fullName?.trim()??``,value:e.email??``,entityId:parseInt(e.id,10),hint:e.email??``}}makeRecipientOptionFromReplyEmail(e){return this.makeRecipientOptionFromEmail(e)}formatRecipientsCount(e){let t=Number(e);return Number.isNaN(t)?e:this.numericService.formatInteger(t)}};EL=U([g(),B(0,m(V.ContactService)),B(1,m(V.ContactListService)),B(2,m(V.NumericService)),B(3,m(V.PhoneService)),B(4,m(V.SegmentsService)),B(5,m(V.MessagesPriceService)),B(6,m(V.RecipientDataMapperService))],EL);var DL=EL,OL=class{constructor(e,t,n,r,i){this.numericService=e,this.phoneService=t,this.contactService=n,this.contactListService=r,this.segmentsService=i}computeContactHint(e){if(e?.phone&&(e.fullName?.trim()??``)!==e.phone)return this.phoneService.preparePhoneForDisplay(e.phone)}getContactLabel(e){return this.contactService.findEntityByIdOrNull(String(e))?.fullName?.trim()}getContactHint(e){let t=this.contactService.findEntityByIdOrNull(String(e));if(t)return this.computeContactHint(t)}getContactEmailLabel(e){return this.contactService.findEntityByIdOrNull(String(e))?.fullName?.trim()}getContactEmailHint(e){return this.contactService.findEntityByIdOrNull(String(e))?.email??void 0}formatMembersCount(e){if(e!==void 0)return this.numericService.formatInteger(e)}getListLabel(e){return this.contactListService.findEntityByIdOrNull(String(e))?.name}getListHint(e){let t=this.contactListService.findEntityByIdOrNull(String(e));return this.formatMembersCount(t?.membersCount)}getFilteredViewLabel(e){return this.segmentsService.findEntityByIdOrNull(String(e))?.name}getFilteredViewHint(e){let t=this.segmentsService.findEntityByIdOrNull(String(e));return this.formatMembersCount(t?.count)}getPhoneLabel(e){return this.phoneService.preparePhoneForDisplay(e)}getEmailLabel(e){return e}};OL=U([g(),B(0,m(V.NumericService)),B(1,m(V.PhoneService)),B(2,m(V.ContactService)),B(3,m(V.ContactListService)),B(4,m(V.SegmentsService))],OL);var kL=class extends Q{async createDistribution(e){let t=await this.postRequest(e);return await this.updateRepositoryDistribution(t.data.id,t.data.email,e),t.data}async updateDistribution(e,t){let n=await this.putForFormRequest({id:e,...t});return await this.updateRepositoryDistribution(e,n.data.email,t),n.data}updateRepositoryDistribution(e,t,{sender:n,...r}){let i={id:e,email:t,...r,recipients:{emails:[],...r.recipients},maxLength:Number(r.maxLength),senderSourcePhone:n};return this.insertOrUpdate([i])}};kL=U([Y({model:ba,create:`distributions`,single:`distribution`}),g(),h()],kL);var AL=kL,jL=class extends qE{createDistribution(e){return this.getDomainRepository().createDistribution({...e,sourceType:e.sourceType||null})}updateDistribution(e,t){return this.getDomainRepository().updateDistribution(e,{...t,sourceType:t.sourceType||null})}};jL=U([oD({model:ba}),g(),h()],jL);var ML=jL,NL=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.httpService=e,this.endpointsService=t,this.windowService=n,this.zendeskService=r,this.shareASaleService=i,this.firstPromoterService=a,this.postHogService=o,this.googleAnalyticsService=s,this.microsoftUetService=c,this.gartnerConversionService=l,this.metaPixelTrackingService=u,this.openAiPixelService=d,this.cookieConsentService=f,this.trackers=[],this.isLoaded=!1}registerApp(e){this.initialize(),this.windowService.self().onload=()=>{this.isLoaded||(this.isLoaded=!0,this.getTrackers().filter(e=>e!==this.microsoftUetService||this.cookieConsentService.hasMarketingConsent()).forEac
4h(t=>{e.use(t.getPlugin(),t.getConfig())}))}}initialize(){this.addTracker(this.zendeskService).addTracker(this.shareASaleService).addTracker(this.firstPromoterService).addTracker(this.postHogService).addTracker(this.googleAnalyticsService).addTracker(this.microsoftUetService).addTracker(this.gartnerConversionService).addTracker(this.metaPixelTrackingService).addTracker(this.openAiPixelService)}addTracker(e){let t=Wo.config();if(!this.isSupportedEnvironment()&&!t.tracking.forceTracking)return this;if(this.getTrackers().includes(e))throw new G(`Already existed tracker cannot be added`);return this.getTrackers().push(e),this}getTrackers(){return this.trackers}track(e){let t=this.endpointsService.getPath(`auditLogs`),n={};e.properties&&(n=e.properties),n.category=e.category;try{this.httpService.post(t,{eventName:e.name,properties:n})}catch{}}cleanUp(){this.getTrackers().forEach(e=>{e.cleanUp()})}isSupportedEnvironment(){return!0}};NL=U([g(),B(0,m(V.Api)),B(1,m(V.EndpointsService)),B(2,m(V.WindowService)),B(3,m(V.ZendeskService)),B(4,m(V.ShareASaleService)),B(5,m(V.FirstPromoterService)),B(6,m(V.PostHogService)),B(7,m(V.GoogleAnalyticsService)),B(8,m(V.MicrosoftUetService)),B(9,m(V.GartnerConversionService)),B(10,m(V.MetaPixelTrackingService)),B(11,m(V.OpenAiPixelService)),B(12,m(V.CookieConsentService))],NL);var PL=NL,FL=class{constructor(e){this.userService=e}getDateMinWidth(e=cc.GENERAL_FORMAT){switch(e){case cc.GENERAL_FORMAT:return this.userService.currentUser().displayTimeFormat===`12h`?180:160;default:return 120}}getMoneyMinWidth(){return 190}getStageMinWidth(){return 190}getTitleMinWidth(){return 190}getCountryMinWidth(){return 140}getPhoneMinWidth(){return 190}getCompanyMinWidth(){return 190}getPhoneWithIconMinWidth(){return this.getPhoneMinWidth()+30}getPersonMinWidth(){return 190}getEmailMinWidth(){return 190}};FL=U([g(),B(0,m(V.UserService))],FL);var IL=FL,LL=class{constructor(e,t,n){this.byocService=e,this.serverSubscriptionService=t,this.permissionsService=n,this.systemAccountPermissionsChangedEventHandler=e=>{let{manageCpaasProviders:t}=e.payload.channelsPermissions,{byoc:n}=e.payload.messagingPermissions,r=t.value&&this.permissionsService.isActivePermission(`manageCpaasProviders`)!==t.value,i=this.permissionsService.isActivePermission(`byoc`)!==n.value;(r||i)&&this.byocService.refreshSettings()}}async resolve(){this.serverSubscriptionService.subscribe(`systemAccountPermissionsChanged`,this.systemAccountPermissionsChangedEventHandler)}async unresolve(){this.serverSubscriptionService.unsubscribe(`systemAccountPermissionsChanged`,this.systemAccountPermissionsChangedEventHandler)}};LL=U([g(),B(0,m(V.ByocService)),B(1,m(V.ServerSubscriptionService)),B(2,m(V.PermissionsService))],LL);var RL=LL,zL=class{constructor(e,t,n,r,i,a,o,s,c,l,u){this.authService=e,this.translateService=t,this.serverSubscriptionService=n,this.notificationService=r,this.userService=i,this.routerService=a,this.windowService=o,this.modalService=s,this.userSettingsService=c,this.subscriptionService=l,this.browserIdentifierService=u,this.systemExitHandler=async e=>{if(e?.payload?.deviceIdentifier?.toString()!==this.browserIdentifierService.getUid()){if(this.modalService.closeAllModals(),this.userSettingsService.currentUserSettingsOrNull()?.isImpersonated){await this.userService.stopImpersonateMode();let e=this.routerService.resolve({name:L.WorkspaceSubaccounts});this.windowService.replace(e.fullPath);return}await this.authService.logoutRedirect(),this.notificationService.notifyWarning(this.translateService.t(`systemExitResolver.successNotification`))}},this.logoutHandler=()=>{this.systemExitHandler()}}async resolve(){this.serverSubscriptionService.subscribe(`systemExit`,this.systemExitHandler),this.subscriptionService.subscribeBroadcast(Xc.UserLoggedOut,this.logoutHandler)}async unresolve(){this.serverSubscriptionService.unsubscribeAll(`systemExit`),this.subscriptionService.unsubscribeBroadcast(Xc.UserLoggedOut,this.logoutHandler)}};zL=U([g(),B(0,m(V.AuthService)),B(1,m(V.TranslateService)),B(2,m(V.ServerSubscriptionService)),B(3,m(V.NotificationService)),B(4,m(V.UserService)),B(5,m(V.RouterService)),B(6,m(V.WindowService)),B(7,m(V.ModalService)),B(8,m(V.UserSettingsService)),B(9,m(V.SubscriptionService)),B(10,m(V.BrowserIdentifierService))],zL);var BL=zL,VL=class{constructor(e){this.serverSubscriptionService=e,this.eventName=`forceRefreshWebApp`}handler(){hs().getLocation().reload()}async resolve(){this.serverSubscriptionService.subscribe(this.eventName,()=>{this.handler()})}async unresolve(){this.serverSubscriptionService.unsubscribeAll(this.eventName)}};VL=U([g(),B(0,m(V.ServerSubscriptionService))],VL);var HL=VL,UL=function(e){return e.messenger=`Messenger`,e.payment=`Payment`,e}({}),WL=function(e){return e.visitedPaymentPage=`Visited Payment Page`,e.selectedCreditAmount=`Selected Credit Amount`,e}({}),GL=[`US`,`CA`,`PR`,`NZ`,`AU`,`GB`,`EE`],KL=[Oa,...Wi,...ti,`user.contacts.imports`,`user.contacts.import`,`user.contacts.imports.details.imported`,`user.contacts.imports.details.duplicates`,`user.contacts.imports.details.failed`,`user.contacts.imports.details.excluded`,`auth.forgotPassword`,`auth.smsCode`,`auth.emailCode`,L.BillingOverview,L.BillingPlans],qL=function(e){return e.purchase=`Purchase`,e}({}),JL=function(e){return e.signUp=`OOLMCOvGwokBENfhgcgD`,e.firstPayment=`u1DxCLi8i4oBENfhgcgD`,e.byocNumbersLink=`zU0uCNve7LQZENfhgcgD`,e}({}),YL=function(e){return e.pageView=`$pageview`,e.signUp=`sign_up`,e.byocVisited=`byoc_clicked`,e.signUpFormCompleted=`Completed Sign up form`,e.signUpForFree=`Clicked "Sign up for free"`,e.signUpWithApple=`Clicked "Sign up with Apple"`,e.signUpWithMicrosoft=`Clicked "Sign up with Microsoft"`,e.signUpWithGoogle=`Clicked "Sign up with Google"`,e.tenDlcBrandVisited=`10DLC: Visited "Brand" registration`,e.tenDlcBrandSubmitted=`10DLC: Submitted "Brand" registration`,e.tenDlcCampaignVisited=`10DLC: Visited "Campaign" registration`,e.tenDlcCampaignSubmitted=`10DLC: Submitted "Campaign" registration`,e.tenDlcSummaryVisited=`10DLC: Visited "Summary" page`,e.tenDlcFormSubmitted=`10DLC: Submitted 10DLC registration form`,e.tenDlcClickedSkipAi=`10DLC: Clicked âSkip AI and fill manuallyâ`,e.tenDlcClickedAutoFillWithAi=`10DLC: Clicked âAuto-fill with AIâ`,e.tollFreeBrandVisited=`Toll-free: Visited "Brand" registration`,e.tollFreeBrandSubmitted=`Toll-free: Submitted "Brand" registration`,e.tollFreeCampaignVisited=`Toll-free: Visited "Campaign" registration`,e.tollFreeCampaignSubmitted=`Toll-free: Submitted "Campaign" registration`,e.tollFreeSummaryVisited=`Toll-free: Visited "Summary" page`,e.tollFreeFormSubmitted=`Toll-free: Submitted toll-free registration form`,e.tollFreeVisitedInfoPage=`Toll-free: Visited âInfoâ page`,e.tollFreeClickedSkipAi=`Toll-free: Clicked âSkip AI and fill manuallyâ`,e.tollFreeClickedAutoFillWithAi=`Toll-free: Clicked âAuto-fill with AIâ`,e.stripeBillingBuyCreditModalOpened=`Viewed "Buy credit" modal`,e.viewedAddBillingDetailsModal=`Viewed "Add billing details" modal`,e.clickedContinueWorking=`Clicked "Continue working"`,e.clickedCreateButton=`Clicked "Create" button`,e.pointAiEnabled=`Point AI enabled`,e}({}),XL=[L.SmsVoiceByocFlow,...Wi],ZL=[{routeName:L.SmsVoiceByocFlow,event:`byoc_clicked`}
4,{routeName:_i.tenDlcRegisterBrand,event:`10DLC: Visited "Brand" registration`},{routeName:_i.tenDlcRegisterCampaign,event:`10DLC: Visited "Campaign" registration`},{routeName:_i.tenDlcSummary,event:`10DLC: Visited "Summary" page`},{routeName:_i.tollFreeRegisterBrand,event:`Toll-free: Visited "Brand" registration`},{routeName:_i.tollFreeRegisterCampaign,event:`Toll-free: Visited "Campaign" registration`},{routeName:_i.tollFreeSummary,event:`Toll-free: Visited "Summary" page`}],QL={google:`Clicked "Sign up with Google"`,apple:`Clicked "Sign up with Apple"`,microsoft:`Clicked "Sign up with Microsoft"`},$L={brand_upsertion:`10DLC: Submitted "Brand" registration`,brand_submit:`10DLC: Submitted "Brand" registration`,campaign_submission:`10DLC: Submitted "Campaign" registration`,submission_for_review:`10DLC: Submitted 10DLC registration form`,toll_free_brand_upsertion:`Toll-free: Submitted "Brand" registration`,toll_free_brand_submission:`Toll-free: Submitted "Brand" registration`,toll_free_campaign_submission:`Toll-free: Submitted "Campaign" registration`,toll_free_submission_for_review:`Toll-free: Submitted toll-free registration form`},eR=class{async initializeTrackerAsPlugin(e){return new Promise((t,n)=>{let r=document.createElement(`script`);r.type=`text/javascript`,e.isDeferred?r.defer=!0:r.async=!0,e.id&&(r.id=e.id),e.src&&(r.src=e.src);let i=document.getElementsByTagName(`head`);if(!i.length)throw new G(`No head html element found`);i[0].appendChild(r),e.src?(r.onload=()=>{e.trackingHandler(),t()},r.onerror=()=>{n(new Ju(`Script ${e.src} failed to load`))}):e.loadOnCustomEvent?(r.addEventListener(`onExternalTrackerLoad`,e.trackingHandler),r.dispatchEvent(new CustomEvent(`onExternalTrackerLoad`)),t()):t()})}cleanUp(){}};eR=U([g()],eR);var tR=eR,nR=5e3,rR=class extends tR{constructor(e,t,n,r,i,a,o,s,c,l,u){super(),this.routerService=e,this.windowService=t,this.userService=n,this.subscriptionService=r,this.loggerService=i,this.unauthenticatedCountryService=a,this.loggedInStatusService=o,this.featureFlagsService=s,this.api=c,this.endpointsService=l,this.monitoringLoggerService=u,this.isUserLoggedIntoWidget=!1,this.isLoginConfirmed=!1,this.loginAttempt=Promise.resolve(),this.loginGeneration=0}async callWidget(...e){(await this.getWidget())?.(...e)}async getWidget(){return await this.widgetPromise,this.windowService.get(`zE`)||(this.loggerService.error(`error`,`Zendesk widget is not loaded`),null)}getConfig(){return{id:Wo.config().tracking.zendeskKey}}getPlugin(){return{install:()=>this.initialize()}}async initialize(){let e=this.getConfig().id,t=this.routerService.getRouter(),n=!1,r=async()=>{await this.shouldLoadWidget(t.currentRoute.value)?(n||(this.widgetPromise=this.initializeTrackerAsPlugin(a),n=!0,await this.setUpOptions()),this.loggedInStatusService.isUserLoggedIn()?await this.trackAuthenticated():await this.trackUnauthenticated()):n&&await this.hideWidget()},i=async()=>{await t.isReady(),await r(),this.subscriptionService.subscribe(Ur,r,!0)},a={src:`https://static.zdassets.com/ekr/snippet.js?key=${e}`,id:`ze-snippet`,trackingHandler:i};await i()}async trackAuthenticated(){return await this.loginZendeskUser(),this.showWidget()}trackUnauthenticated(){return this.showWidget()}async shouldLoadWidget(e){let t=this.featureFlagsService.isFeatureEnabled(Hu.ZendeskWidget)&&!!e.name&&KL.includes(String(e.name));if(this.windowService.self().screen.width<1024)return!1;if(this.loggedInStatusService.isUserLoggedIn())try{let e=this.userService.currentUser(),n=!GL.includes(e.countryId),r=e.status===Wr.ST_WIZARD;return n||r?!1:t}catch(e){if(e instanceof G)return!1;throw e}let n=await this.unauthenticatedCountryService.loadCountry();return!!n?.id&&GL.includes(n.id)&&t}async setUpOptions(){await this.callWidget(`messenger:set`,`cookies`,`functional`)}async loginZendeskUser(){if(this.isUserLoggedIntoWidget)return this.loginAttempt;let e=await this.getWidget();if(!e)return;this.isUserLoggedIntoWidget=!0;let t=this.loginGeneration,n=()=>t!==this.loginGeneration,r=()=>{};return this.loginAttempt=Promise.race([new Promise(e=>{r=e}),mn(nR).then(()=>void 0)]),e(`messenger`,`loginUser`,async e=>{try{let t=await this.fetchMessagingToken();if(n()){r();return}e(t)}catch(e){if(n()){r();return}let t=this.isLoginConfirmed?`zendeskTokenRefresh`:`zendeskMessagingToken`;this.allowLoginRetry(),this.captureLoginError(e,t),r()}},e=>{if(n()){r();return}if(!e){this.isLoginConfirmed=!0,r();return}let t=this.isLoginConfirmed?`zendeskLoginRefresh`:`zendeskLoginUser`;this.allowLoginRetry(),this.captureLoginError(e,t),r()}),this.loginAttempt}allowLoginRetry(){this.isLoginConfirmed||(this.isUserLoggedIntoWidget=!1)}captureLoginError(e,t){let n=e instanceof Error?e:Error(`${t} failed: ${JSON.stringify(e)}`);this.monitoringLoggerService.logAndCapture(n,Ba.ERROR,t)}async fetchMessagingToken(){let{data:e}=await this.api.get(this.endpointsService.getPath(`zendeskMessagingToken`));return e.token}async showWidget(){await this.callWidget(`messenger`,`show`)}async hideWidget(){await this.callWidget(`messenger`,`hide`)}async logout(){this.loginGeneration+=1,this.isUserLoggedIntoWidget=!1,this.isLoginConfirmed=!1,await this.callWidget(`messenger`,`logoutUser`)}cleanUp(){this.logout()}};rR=U([g(),h(),B(0,m(V.RouterService)),B(1,m(V.WindowService)),B(2,m(V.UserService)),B(3,m(V.SubscriptionService)),B(4,m(V.LoggerService)),B(5,m(V.UnauthenticatedCountryService)),B(6,m(V.LoggedInStatusService)),B(7,m(V.FeatureFlagsService)),B(8,m(V.Api)),B(9,m(V.EndpointsService)),B(10,m(V.MonitoringLoggerService))],rR);var iR=rR,aR=class extends pl{};U([y()],aR.prototype,`ajsAnonymousId`,void 0),U([y()],aR.prototype,`gaClientId`,void 0),U([y()],aR.prototype,`gaSessionId`,void 0),U([y()],aR.prototype,`gaSessionNumber`,void 0),aR=U([Be(md.USER_ANALYTICS_FIELD)],aR);var oR=aR,sR=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.monitoringService=r}async updateFields(e,t){let n=this.getAnalyticsFields();try{await this.getDomainRepository().updateFields(e)}catch(n){if(n instanceof Ha){this.handleRetryError(e,t);return}this.monitoringService.logError(n)}let r={...n,...e};await this.getDomainRepository().storeAnalyticsFields(r)}getAnalyticsFields(){return this.getDomainRepository().findAnalyticsFields()}handleRetryError(e,t){t||(t=0),t+=1,t<=3&&setTimeout(()=>this.updateFields(e,t),gr)}};sR=U([oD({model:oR}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.MonitoringService))],sR);var cR=sR,lR=class extends Q{constructor(...e){super(...e),this.id=`1`}updateFields(e){let t=this.endpointsService.getPath(`userAnalyticsFieldsUpdate`);return this.getApiSource().put(t,e)}
4storeAnalyticsFields(e){return this.insertOrUpdate([{...e,id:this.id}])}findAnalyticsFields(){return this.findEntityByIdOrFail(this.id)}};lR=U([Y({model:oR}),g(),h()],lR);var uR=lR,dR=class{constructor(e,t,n,r){this.routerService=e,this.loggerService=t,this.userService=n,this.get=r,this.resolvedStrategies={},this.isInstalled=!1,this.successInstalledCallback=null}async waitInstall(){this.isInstalled||await new Promise((e,t)=>{this.successInstalledCallback=e})}async install(){this.routerService.getRouter().beforeEach((e,t,n)=>this.handleRouteTransition(e,n)),await this.checkCurrentRoute(),this.isInstalled=!0,this.successInstalledCallback&&this.successInstalledCallback(null)}async checkCurrentRoute(){let e=this.routerService.getCurrentRoute();if((e.meta?.pageAvailableFor||yr.authenticated)===yr.authenticated&&this.userService.getCurrentUserOrNull()===null)return;let t=await this.getAccessRedirect(e);t&&await this.routerService.push(t)}async handleRouteTransition(e,t){try{let n=await this.getAccessRedirect(e);n?t(n):t()}catch(e){this.loggerService.error(`router`,e.message,`AccessControlService`),t(ra)}}getStrategy(e){return this.get(e)}isAccessAllowed(e){let t=this.getStrategy(e);if(t.resolve&&!this.resolvedStrategies[e])throw new Wl(e);return t.isAccessAllowed()}async resolveStrategies(e){return Promise.all(e.map(async e=>{let t=this.getStrategy(e);t.resolve&&(await t.resolve(),this.resolvedStrategies[e]=!0)}))}async getAccessRedirect(e){let{accessControlGroups:t}=e.meta;return!Array.isArray(t)||!t.length?null:(await this.resolveStrategies(t),t.map(t=>{if(this.isAccessAllowed(t))return null;let n=this.getStrategy(t);return n.getRedirectRoute?n.getRedirectRoute(e)??ra:ra}).find(e=>e)??null)}};dR=U([g(),B(0,m(V.RouterService)),B(1,m(V.LoggerService)),B(2,m(V.UserService)),B(3,m(`GetLocator`))],dR);var fR=dR,pR=class{constructor(e){this.teamWorkflowService=e}isAccessAllowed(){return this.teamWorkflowService.isUsersWorkflowNotUserRole()}};pR=U([g(),B(0,m(V.TeamWorkflowService))],pR);var mR=class{constructor(e){this.teamWorkflowService=e}isAccessAllowed(){return this.teamWorkflowService.isUsersWorkflowNotUserRole()}};mR=U([g(),B(0,m(V.TeamWorkflowService))],mR);var hR=class{constructor(e){this.gettingStartedInfoService=e}async resolve(){await this.gettingStartedInfoService.findOrFillInfo()}isAccessAllowed(){return this.gettingStartedInfoService.findInfoOrFail().showGettingStartedPage}};hR=U([g(),B(0,m(V.GettingStartedInfoService))],hR);var gR=class{constructor(e){this.userSettingsService=e}isAccessAllowed(){return this.userSettingsService.currentUserSettingsOrNull()?.showTenDlcTab??!1}};gR=U([g(),B(0,m(V.UserSettingsService))],gR);var _R=class{constructor(e){this.userSettingsService=e}isAccessAllowed(){return this.userSettingsService.currentUserSettingsOrNull()?.showTollFreeTab??!1}};_R=U([g(),B(0,m(V.UserSettingsService))],_R);var vR=class{constructor(e){this.userSettingsService=e}isAccessAllowed(){return this.userSettingsService.currentUserSettingsOrNull()?.showSenderIds??!1}};vR=U([g(),B(0,m(V.UserSettingsService))],vR);var yR=class{constructor(e){this.userService=e}isAccessAllowed(){return this.userService.isAllowInviteSubAccount()}};yR=U([g(),B(0,m(V.UserService))],yR);var bR=class{constructor(e){this.teamWorkflowService=e}isAccessAllowed(){return this.teamWorkflowService.isUsersWorkflow()}};bR=U([g(),B(0,m(V.TeamWorkflowService))],bR);var xR=class{constructor(e){this.teamWorkflowService=e}isAccessAllowed(){return this.teamWorkflowService.isSubaccountsWorkflow()}};xR=U([g(),B(0,m(V.TeamWorkflowService))],xR);var SR=class{constructor(e){this.teamWorkflowService=e}isAccessAllowed(){return!this.teamWorkflowService.isUsersWorkflow()}};SR=U([g(),B(0,m(V.TeamWorkflowService))],SR);var CR=class{constructor(e,t){this.teamWorkflowService=e,this.userService=t}isAccessAllowed(){return this.teamWorkflowService.isUsersWorkflowNotUserRole()}};CR=U([g(),B(0,m(V.TeamWorkflowService)),B(1,m(V.UserService))],CR);var wR=class{constructor(e){this.userService=e}isAccessAllowed(){return this.userService.currentUser().subaccountType!==Fr.USER}};wR=U([g(),B(0,m(V.UserService))],wR);var TR=class{constructor(e,t){this.teamWorkflowService=e,this.userService=t}isAccessAllowed(){return!this.teamWorkflowService.isUsersWorkflow()||this.userService.currentUser().subaccountType===Fr.SUPER_ADMIN}};TR=U([g(),B(0,m(V.TeamWorkflowService)),B(1,m(V.UserService))],TR);var ER=class{constructor(e){this.tasksAccessControlService=e}isAccessAllowed(){return this.tasksAccessControlService.isAccessAllowed()}};ER=U([g(),B(0,m(V.TasksAccessControlService))],ER);var DR=class{constructor(e){this.dealsAccessControlService=e}isAccessAllowed(){return this.dealsAccessControlService.isAccessAllowed()}};DR=U([g(),B(0,m(V.DealsAccessControlService))],DR);var OR=class{constructor(e){this.userService=e}isAccessAllowed(){return this.userService.currentUser().subaccountType===Fr.SUPER_ADMIN}};OR=U([g(),B(0,m(V.UserService))],OR);var kR=class{constructor(e,t){this.teamWorkflowService=e,this.userService=t}isAccessAllowed(){let e=this.userService.currentUser().subaccountType;return this.teamWorkflowService.isUsersWorkflow()&&e===Fr.ADMIN||e===Fr.SUPER_ADMIN}};kR=U([g(),B(0,m(V.TeamWorkflowService)),B(1,m(V.UserService))],kR);var AR=class{constructor(e){this.webWidgetsAccessControlService=e}isAccessAllowed(){return this.webWidgetsAccessControlService.isAllowWebWidgetForCurrentUser()}};AR=U([g(),B(0,m(V.WebWidgetsAccessControlService))],AR);var jR=class{constructor(e){this.permissionsService=e}async resolve(){await this.permissionsService.getPermissionsIfNotLoaded()}isAccessAllowed(){return this.permissionsService.isActivePermission(`autorechargeSettings`)}getRedirectRoute(){return{name:`payment`}}};jR=U([g(),B(0,m(V.PermissionsService))],jR);var MR=class{constructor(e,t){this.byocService=e,this.permissionsService=t}async resolve(){let e=[this.permissionsService.getPermissionsIfNotLoaded()];this.byocService.hasSettings()||e.push(this.byocService.fetchSettings()),await Promise.all(e)}isAccessAllowed(){return this.byocService.isAvailable()}};MR=U([g(),B(0,m(V.ByocService)),B(1,m(V.PermissionsService))],MR);var NR=class{constructor(e){this.routerService=e}isAccessAllowed(){let e=[`payment.congratsRedirect`],t=this.routerService.getPreviousRoute();return!!e.find(e=>t?.name===e)}};NR=U([g(),B(0,m(V.RouterService))],NR);var PR=class{constructor(e){this.accountSettingsSecurityService=e}async resolve(){this.accountSettingsSecurityService.getLoadedSettings()||await this.accountSettingsSecurityService.getSettings()}isAccessAllowed(){return!this.accountSettingsSecurityService.getLoadedSettingsOrFail().hasPhoneOrTotpTwoFa}getRedirectRoute(){return{name:`user.accounts.security`}}};PR=U([g(),B(0,m(V.AccountSettingsSecurityService))],PR);var FR=class{constructor(e,t){this.permissionsService=e,this.userService=t}async resolve(){await this.permissionsService.getPermissionsIfNotLoaded()}isAccessAllowed(){return!this.permissionsService.isActivePermission(`autorechargeSettings`)}getRedirectRoute(){return{name:Ei,query:{openCreditModal:`true`}}}};FR=U([g(),B(0,m(V.PermissionsService)),B(1,m(V.UserService))],FR);var IR=class{constructor(e,t){this.usersWorkflowNotUserRoleStrategy=e,this.userService=t}isAccessAllowed(){return this.usersWorkflowNotUserRoleStrategy.isAccessAllowed()}};IR=U([g(),B(0,m(V.UsersWorkflowNotUserRoleStrategy)),B(1,m(V.UserService))],IR);var LR=class{constructor(e){this.teamWorkflowService=e}isAccessAllowed(){return this.teamWorkflowService.mustAcceptTermsUpdate()}getRedirectRoute(){return{name:Ei}}};LR=U([g(),B(0,m(V.TeamWorkflowService))],LR);var RR=class{constructor(e){this.billingService=e}isAccessAllowed(){return this.billingService.isAllowAccessForBilling()}};RR=U([g(),B(0,m(V.BillingService))],RR);var zR=class{constructor(e){this.userService=e}getAccessRejectionReason(){return this.userService.currentUser().subaccountType===Fr.USER?`role`:this.isCorrectWorkflowType()?null:`flow`}isAccessAllowed(){return this.getAccessRejectionReason()===null}getRedirectRoute(){let e=this.getAccessRejectionReason();if(e===null)throw new G(`"accessRejectionReason" is null`);if(e===`role`)return null;if(e===`flow`)return this.redirectRoute;throw new Qa(e)}};zR=U([g(),B(0,m(V.UserService))],zR);var BR=class extends zR{constructor(e,t){super(e),this.userService=e,this.teamWorkflowService=t,this.redirectRoute={name:L.WorkspaceUsers}}isCorrectWorkflowType(){return this.teamWorkflowService.isSubaccountsWorkflow()}};BR=U([g(),B(0,m(V.UserService)),B(1,m(V.TeamWorkflowService))],BR);var VR=class extends zR{constructor(e,t){super(e),this.userService=e,this.teamWorkflowService=t,this.redirectRoute={name:L.WorkspaceSubaccounts}}isCorrectWorkflowType(){return this.teamWorkflowService.isUsersWorkflow()}};VR=U([g(),B(0,m(V.UserService)),B(1,m(V.TeamWorkflowService))],VR);var HR=class{constructor(e,t){this.featureFlagsService=e,this.userService=t}isAccessAllowed(){return this.featureFlagsService.isFeatureEnabled(Hu.IntegrationsSettings)}};HR=U([g(),B(0,m(V.FeatureFlagsService)),B(1,m(V.UserService))],HR);var UR=class{constructor(e,t){this.featureFlagsService=e,this.userService=t}isAccessAllowed(){return!this.featureFlagsService.isFeatureEnabled(Hu.IntegrationsSettings)}};UR=U([g(),B(0,m(V.FeatureFlagsService)),B(1,m(V.UserService))],UR);var WR=class{constructor(e){this.userSettingsService=e}getRedirectRoute(){return{name:Ln.flows}}isAccessAllowed(){let e=this.userSettingsService.currentUserSettingsOrNull();return!e||e?.showAutoResponders}};WR=U([g(),B(0,m(V.UserSettingsService))],WR);var GR=class{constructor(e,t,n,r){this.featureFlagsService=e,this.permissionsService=t,this.emailCampaignDomainsPreloaderService=n,this.emailCampaignDomainService=r}canConnectDomains(){return this.permissionsService.isActivePermission(`connectEmailDomains`)}async resolve(){await this.permissionsService.getPermissionsIfNotLoaded(),!this.canConnectDomains()&&await this.emailCampaignDomainsPreloaderService.preload()}isAccessAllowed(){return this.featureFlagsService.isFeatureEnabled(Hu.ReportsEmail)?this.canConnectDomains()?!0:this.emailCampaignDomainService.findAll(
4).length>0:!1}};GR=U([g(),B(0,m(V.FeatureFlagsService)),B(1,m(V.PermissionsService)),B(2,m(V.EmailCampaignDomainsPreloaderService)),B(3,m(V.EmailCampaignDomainService))],GR);var KR=class{constructor(e,t){this.userService=e,this.teamWorkflowService=t}isAllowWebWidgetForCurrentUser(){return!(this.userService.currentUser().subaccountType===Fr.USER&&this.teamWorkflowService.isUsersWorkflow())}};KR=U([g(),B(0,m(V.UserService)),B(1,m(V.TeamWorkflowService))],KR);var qR=class extends pl{};U([y()],qR.prototype,`state`,void 0),U([y()],qR.prototype,`postalCode`,void 0),U([y()],qR.prototype,`street`,void 0),U([y()],qR.prototype,`lifeTimeValue`,void 0),U([y()],qR.prototype,`mostUsedProduct`,void 0),U([y()],qR.prototype,`autoRechargeEnabled`,void 0),qR=U([Be(md.USER_ANALYTICS_TRAIT)],qR);var JR=qR,YR=class extends qE{};YR=U([oD({model:JR}),g(),h()],YR);var XR=YR,ZR=class extends Q{constructor(...e){super(...e),this.id=`1`}async storeAnalyticsTraits(e){await this.insertOrUpdate([{...e,id:this.id}])}};ZR=U([Y({model:JR}),g(),h()],ZR);var QR=ZR,$R=class extends tR{getConfig(){return{id:`null`}}getPlugin(){return{install:()=>this.initialize()}}async initialize(){let e={src:`https://www.dwin1.com/62237.js`,isDeferred:!0,trackingHandler:()=>{}};try{await this.initializeTrackerAsPlugin(e)}catch(e){if(e instanceof Ju)return;throw e}}};$R=U([g(),h()],$R);var ez=$R,tz=class extends tR{constructor(e,t){super(),this.routerService=e,this.subscriptionService=t}getConfig(){let e=Wo.config();return{id:e.tracking.firstPromoterId,host:e.tracking.firstPromoterHost}}getPlugin(){return{install:()=>this.initialize()}}initialize(){let e=()=>{this.track()};this.initializeTrackerAsPlugin({src:`https://cdn.firstpromoter.com/fprom.js`,trackingHandler:async()=>{await this.routerService.getRouter().isReady(),e(),this.subscriptionService.subscribe(Ur,e,!0)}})}track(){let e=this.getConfig().id,t=this.getConfig().host;(function(){try{$FPROM.init(e,t)}catch{}})()}};tz=U([g(),h(),B(0,m(V.RouterService)),B(1,m(V.SubscriptionService))],tz);var nz=tz,rz=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,iz=/CrOS/;function az(){let e=!1;if(`userAgentData`in navigator&&`mobile`in navigator.userAgentData)return navigator.userAgentData.mobile;if(`maxTouchPoints`in navigator)e=navigator.maxTouchPoints>0;else if(`msMaxTouchPoints`in navigator)e=navigator.msMaxTouchPoints>0;else if(typeof window.matchMedia==`function`){let t=matchMedia(`(pointer:coarse)`);if(t&&t.media===`(pointer:coarse)`)e=!!t.matches;else if(`orientation`in window)e=!0;else{let t;if(`userAgent`in navigator&&(t=navigator.userAgent),t?.headers&&typeof t.headers[`user-agent`]==`string`&&(t=t.headers[`user-agent`]),typeof t!=`string`)return!1;e=rz.test(t)&&!iz.test(t)}}return e}function oz(){let e=navigator.userAgent,t=e.indexOf(`Version/`);if(t===-1)return``;let n=e.substring(t+8),r=n.indexOf(` `);return r===-1?n:n.substring(0,r)}var sz=[`ResizeObserver loop limit exceeded`,`ResizeObserver loop completed with undelivered notifications.`,`Non-Error promise rejection captured`,`Object captured as exception with keys: code, message`,/Object captured as promise rejection with keys/,`Object captured as exception with keys: error, headers, message, name, ok`],cz=[{pattern:/Unable to preload CSS/i,key:`preload-css`},{pattern:/Failed to fetch dynamically imported module/i,key:`dynamic-import`},{pattern:/Importing a module script failed/i,key:`dynamic-import`},{pattern:/error loading dynamically imported module/i,key:`dynamic-import`}],lz=e=>{let t=cz.find(({pattern:t})=>t.test(e));return t?[`asset-loading`,t.key]:null},uz=`__tmBrokenVueComponents`,dz=2e4,fz=10,pz=1e4,mz=class{constructor(e,t,n,r,i){this.config=e,this.microSe
4ntryService=t,this.translateService=n,this.subscriptionService=r,this.featureFlagsService=i,this.user=null,this.isInited=!1,this.isVueRenderDiagnosticsAttached=!1,this.feedbackEnabledRouteNames=[Ln.flows,Ln.flowDetails,Ln.templates,Ln.logs]}init(e,t){this.isInited||(this.app=e,this.router=t,this.microSentryService.init(e),requestIdleCallback(async()=>{try{this.Sentry=await R(()=>globalThis.__rdl__(() => import(`./C07hXsDV.js`)),__vite__mapDeps([815,2]),import.meta.url)}catch{this.microSentryService.logError(Error(`Sentry SDK failed to load`));return}this.microSentryService.destroy(),this.initSentry(),this.featureFlagsService.isFeatureEnabled(Hu.SentryVerboseLogging)&&this.attachVueRenderDiagnostics(e),this.isInited=!0,this.isFeedbackButtonEnabled&&(this.customizeWidgetButton(),this.subscriptionService.subscribe(mr,e=>{typeof e.name==`string`&&this.feedbackEnabledRouteNames.find(t=>t===e.name)?this.toggleWidgetButton(!0):this.toggleWidgetButton(!1)},!0)),this.Sentry.setUser(this.user)},{timeout:pz}))}async setUser(e){let t=this.isProfilingEnabled;
4if(this.user=e,!this.Sentry){this.microSentryService.setUser(e);return}if(this.isProfilingEnabled!==t){let e;try{await this.Sentry.close(this.config.sentry.timeout)}catch(t){e=t}this.initSentry(),e&&this.Sentry.captureException(e)}this.Sentry.setUser(this.user)}logInfo(e,t=Ba.INFO,n){t!==Ba.NULL&&(this.Sentry?this.Sentry.logger[this.mapLogLevelToLogSeverityLevel(t)](e,n):this.microSentryService.logInfo(e,t))}logError(e,t=Ba.ERROR,n){t!==Ba.NULL&&(e instanceof Za&&!e.shouldBeMonitored()||(this.Sentry?this.Sentry.captureException(e,{level:this.mapLogLevelToSentryLogLevel(t),extra:n}):this.microSentryService.logError(e,t)))}destroy(){this.Sentry?this.Sentry.close():this.microSentryService.destroy()}toggleWidgetButton(e){let t=this.getWidgetButtonElement();t&&(t.style.display=e?`flex`:`none`)}getSentryInstance(){return this.Sentry??null}get isProfilingEnabled(){return this.user?this.user.uiProfiling===!0:!1}getIntegrations(e,t){let n=[];return n.push(this.Sentry.vueIntegration({app:e,tracingOptions:{trackComponents:!1,hooks:[`mount`,`update`,`unmount`],timeout:this.config.sentry.timeout}})),n.push(this.Sentry.breadcrumbsIntegration({console:!1})),t&&(this.browserTracing||(this.browserTracing=this.Sentry.browserTracingIntegration({router:t,routeLabel:`name`,enableInp:!0,enableLongTask:!0,consistentTraceSampling:!0})),n.push(this.browserTracing)),this.isProfilingEnabled&&n.push(this.Sentry.browserProfilingIntegration()),n.push(this.Sentry.httpClientIntegration({failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/]})),this.isFeedbackButtonEnabled&&!az()&&n.push(this.Sentry.feedbackIntegration({colorScheme:`light`,showBranding:!1,showEmail:!0,triggerLabel:this.translateService.t(`sentry.feedback`),emailLabel:this.translateService.t(`sentry.emailLabel`),showName:!1,submitButtonLabel:this.translateService.t(`sentry.sendFeedback`),formTitle:this.translateService.t(`sentry.feedbackAndIdeas`),messagePlaceholder:this.translateService.t(`sentry.messagePlaceholder`)})),n.push(this.Sentry.thirdPartyErrorFilterIntegration({filterKeys:[`textmagic-web-app`],behaviour:`drop-error-if-contains-third-party-frames`})),n.push(this.Sentry.consoleLoggingIntegration({levels:[`error`,`trace`,`warn`]})),n}initSentry(){this.Sentry.init({integrations:this.getIntegrations(this.app,this.router),debug:!1,app:[this.app],dsn:this.config.sentry.dsn,environment:``,release:[`textmagic_carrera_app`,`20261001-39361-126a85bd`].join(`@`),enableLogs:!0,tracePropagationTargets:[`localhost`,this.config.appUrl],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,sendDefaultPii:!1,tracesSampler:({_name:e,_attributes:t,inheritOrSampleWith:n})=>this.isProfilingEnabled?1:n(.3),profilesSampleRate:+!!this.isProfilingEnabled,sampleRate:.3,ignoreErrors:sz,ignoreSpans:[{op:`http.client`,name:/GET https:\/\/[\d.]+\/is$/}],beforeSend:(e,t)=>{if(e.request?.data&&(e.request.data=this.sanitize(e.request.data)),t?.originalException instanceof CustomEvent&&t.originalException.type===`unhandledrejection`)return null;if(t?.originalException instanceof PromiseRejectionEvent){let e=t.originalException.reason;if(!e||!(e instanceof Error)||e instanceof Za&&!e.shouldBeMonitored())return null}if(t?.originalException&&t.originalException instanceof Za&&!t.originalException.shouldBeMonitored())return null;if(t?.originalException instanceof Za){let n=t.originalException.getSentryFingerprint();n&&(e.fingerprint=n)}if(!e.fingerprint){let t=lz(e.exception?.values?.[0]?.value??``);t&&(e.fingerprint=t)}if(this.featureFlagsService.isFeatureEnabled(Hu.SentryVerboseLogging)){if(!e.fingerprint){let t=this.getVueErrorFingerprint(e);t&&(e.fingerprint=t)}let n=this.readBrokenComponents(t?.originalException);n&&(e.extra={...e.extra,brokenVueComponents:n})}return e},denyUrls:[/extensions\//i,/^chrome:\/\//i,/^chrome-extension:\/\//i]})}getVueErrorFingerprint(e){let t=e.exception?.values?.[0];if(t?.mechanism?.type!==`vue`)return null;let n=e.contexts?.vue?.componentName;return n?[`vue`,n,t.type??`Error`,t.value??``]:null}attachVueRenderDiagnostics(e){if(this.isVueRenderDiagnosticsAttached)return;
4this.isVueRenderDiagnosticsAttached=!0;let t=e.config.errorHandler;e.config.errorHandler=(n,r,i)=>{this.markBrokenComponents(n,e),t?.call(e,n,r,i)}}markBrokenComponents(e,t){if(e&&typeof e==`object`)try{let n=this.findMountedComponentsWithoutDom(t);if(!n.length)return;Object.defineProperty(e,uz,{value:n,enumerable:!1,configurable:!0,writable:!0})}catch{}}readBrokenComponents(e){if(!e||typeof e!=`object`)return null;let t=e[uz];return Array.isArray(t)&&t.length?t:null}findMountedComponentsWithoutDom(e){let t=e._instance;if(!t)return[];let n=[],r=new Set,i=[t],a=dz;for(;i.length&&a>0;){let e=i.pop();if(r.has(e))continue;r.add(e);let t=e.subTree;if(!t)continue;e.isMounted&&t.el===null&&n.push(this.formatComponentChain(e));let o=[t];for(;o.length&&a>0;){--a;let e=o.pop();if(e.component)i.push(e.component);else if(Array.isArray(e.children))for(let t of e.children)t&&typeof t==`object`&&!Array.isArray(t)&&o.push(t)}}return n}formatComponentChain(e){let t=[],n=e;for(;n&&t.length<fz;)t.push(n.type?.name??n.type?.__name??`Anonymous`),n=n.parent;return t.join(` < `)}sanitize(e){if(!e||typeof e!=`object`)return e;let t=/(token$|secret$|.*_token$|.*password.*|.*pass.*|key$|.*_key$|auth.*|credential.*|.*pin.*)/i,n={...e};for(let r of Object.keys(e))t.test(r)?n[r]=`[FILTERED]`:typeof e[r]==`object`&&e[r]!==null&&(n[r]=this.sanitize(e[r]));return n}mapLogLevelToSentryLogLevel(e){switch(e){case Ba.DEBUG:return`debug`;case Ba.LOG:return`log`;case Ba.WARNING:return`warning`;case Ba.ERROR:return`error`;case Ba.INFO:return`info`;case Ba.TRACE:return`info`;case Ba.FATAL:return`fatal`;default:throw new Qa(e)}}mapLogLevelToLogSeverityLevel(e){switch(e){case Ba.TRACE:return`trace`;case Ba.DEBUG:return`debug`;case Ba.INFO:return`info`;case Ba.WARNING:return`warn`;case Ba.ERROR:return`error`;case Ba.FATAL:return`fatal`;case Ba.LOG:return`info`;default:throw new Qa(e)}}customizeWidgetButton(){let e=this.getWidgetButtonElement();if(!e)return;e.classList.add(`no-print`);let t=1e3,n=oz(),r=navigator.userAgent.toLowerCase();(r.indexOf(`safari/`)>-1&&n&&n<`15.6`||r.indexOf(`firefox/`)>-1)&&window.addEventListener(`resize`,()=>{let e=document.body.offsetWidth>t;this.toggleWidgetButton(e)});try{let n=this.getStyleSheetForWidgetButton(e);if(!n)return;this.setRulesForWidgetButton(n,t)}catch{}this.toggleWidgetButton(!1)}setRulesForWidgetButton(e,t){[`.widget__actor svg { 5 display: none !important; 6 }`,`.widget__actor { 7 @media screen and (max-width: ${t}px) { 8 display: none !important; 9 } 10 display: flex; 11 justify-content: center !important; 12 position: fixed !important; 13 top: 50% !important; 14 bottom: auto !important; 15 left: auto !important; 16 right: 0 !important; 17 padding: 6px 12px !important; 18 transform: translateY(-50%) translateX(70%) rotate(-90deg) !important; 19 transform-origin: bottom center !important; 20 color: #fff !important; 21 background-color: #D23201 !important; 22 border-radius: 4px 4px 0 0 !important; 23 transition: all 0.3s ease !important; 24 }`,`.widget__actor:hover { 25 color: #2b2233 !important; 26 background-color: #f6f6f7 !important; 27 }`,`.widget__actor span { 28 font-size: 13px; 29 line-height: normal; 30 word-break: normal !important; 31 word-wrap: normal !important; 32 white-space: nowrap !important; 33 font-weight: 400; 34 font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; 35 -webkit-font-smoothing: auto; 36 }`,`.form__top { 37 display: flex !important; 38 flex-direction: column-reverse !important; 39 }`,`.form__label[for="email"] { 40 order: 0 !important; 41 }`,`.form__label[for="message"] { 42 order: 1 !important; 43 }`,`.form__label[for="screnshot"] { 44 order: 2 !important; 45 }`,`.btn--primary { 46 background: #008CFF !important; 47 }`,`.btn--primary:hover { 48 background: #008CFF !important; 49 }`,`.editor__tool--active { 50 background: #008CFF !important; 51 }`].forEach(t=>e?.insertRule(t))}getStyleSheetForWidgetButton(e){let t=e.shadowRoot?.styleSheets;return t?t.item(t.length-1):null}getWidgetButtonElement(){return document.querySelector(`#sentry-feedback`)}sanitizeNetworkRequest(e){if(e.op!==`resource.fetch`&&e.op!==`resource.xhr`)return;let t=e.data;if(t&&typeof t==`object`){if(t.request?.body)try{let e,n=!1;typeof t.request.body==`string`?(e=JSON.parse(t.request.body),n=!0):e=t.request.body;let r=this.sanitize(e);t.request.body=n?JSON.stringify(r):r}catch(e){this.logInfo(`beforeAddRecordingEvent: failed to parse request body for sanitization`,Ba.DEBUG,{error:e.message,body:t.request.body})}if(t.response?.body)try{let e,n=!1;typeof t.response.body==`string`?(e=JSON.parse(t.response.body),n=!0):e=t.response.body;let r=this.sanitize(e);t.response.body=n?JSON.stringify(r):r}catch(e){this.logInfo(`beforeAddRecordingEvent: failed to parse response body for sanitization`,Ba.DEBUG,{error:e.message,body:t.response.body})}}}sanitizeConsoleLog({payload:e}){e.category===`console`&&e.data&&Array.isArray(e.data.arguments)&&(e.data.arguments=e.data.arguments.map(e=>{if(typeof e==`object`&&e)try{return this.sanitize(e)}catch{return`[SANITIZATION_ERROR]`}return e}))}shouldIgnoreScriptLoadingError(e){if(!/failed to load/i.test(e))return!1;let t=/https?:\/\/[^)\s]+/.exec(e);if(!t)return!1;try{let e=new URL(t[0]),n=new URL(this.config.appUrl);return e.hostname!==n.hostname}catch{return!1}}get isFeedbackButtonEnabled(){return!0}};mz=U([g(),B(0,m(V.Config)),B(1,m(V.MicroSentryMonitoringService)),B(2,m(V.TranslateService)),B(3,m(V.SubscriptionService)),B(4,m(V.FeatureFlagsService))],mz);var hz=mz,gz=class{init(e){}setUser(e){}logInfo(){}logError(){}destroy(){}};gz=U([g()],gz);var _z=class extends pl{};U([v()],_z.prototype,`id`,void 0),U([v()],_z.prototype,`name`,void 0),_z=U([Be(md.UNAUTHENTICATED_COUNTRY)],_z);var vz=_z,yz=class extends Q{async detectCountry(){let e=this.endpointsService.getPath(`unauthenticatedCountry`),t=(await this.getApiSource().get(e)).data;
51return await this.deleteAll(),t&&await this.insertOrUpdate([t]),this.getCountry()}getCountry(){return this.query().first()}};yz=U([Y({model:vz}),g(),h()],yz);var bz=yz,xz=class extends qE{async detectCountry(){return this.getDomainRepository().detectCountry()}getCountry(){return this.getDomainRepository().getCountry()}async loadCountry(){return this.getCountry()||this.detectCountry()}};xz=U([oD({model:vz}),g(),h()],xz);var Sz=xz,Cz=function(e){return e.task=`task`,e.ticketMessage=`ticket-message`,e.openAIAssistant=`open-ai-assistant`,e.deal=`deal`,e.liveChatMessage=`live-chat-message`,e.webWidget=`web-widget`,e.messengerNote=`messenger-note`,e.contactNote=`contact-note`,e.emailCampaign=`email-campaign`,e.automationStep=`automation-step`,e}({}),wz=function(e){return e.attachment=`attachment`,e.chatAttachment=`chat-attachment`,e.logo=`logo`,e}({}),Tz=e=>e?.type===`image`,Ez=e=>e?.type===`video`,Dz=class extends Q{constructor(e,t,n,r,i,a){super(t,n,r,i,a),this._config=e,this.serializerService=t,this.api=n,this.endpointsService=r,this.loggerService=i,this.filterQueryService=a}async uploadFile({file:e,fileType:t,onUploadProgress:n,entityId:r,entityType:i,cancelToken:a}){let o=new FormData;o.append(`file`,e),o.append(`fileType`,t??wz.attachment),i&&o.append(`entityType`,i),r&&o.append(`entityId`,r);let s=this.endpointsService.getPath(`uploadFile`),{data:c}=await this.getApiSource().post(s,o,{onUploadProgress:n,cancelToken:a});return await this.insertOrUpdate([c]),c.id}async attachFiles(e,t,n){let r=this.endpointsService.getPath(`attachFiles`);return this.getApiSource().post(r,{fileIds:e,entity:{entityId:t,entityType:n}})}uploadFileCancellable(e){return this.makeCancelableRequest(t=>this.uploadFile({...e,cancelToken:t}))}getDownloadLink(e,t){let n=this._config.apiUrl,r=`${this.endpointsService.getPath(`downloadFile`,[e,t])}`;if(!n)return r;let i=new URL(n);return i.pathname=r,i.toString()}async detachFile(e,t,n){let r=this.endpointsService.getPath(`detachFile`);await this.getApiSource().post(r,{fileId:n,entityType:t,entityId:e}),this.delete([n])}async fetchListGridRequest(e,t,n,r){let i=await this.doGrid(this.settings().fetch,t,e,n,r);return i.items=i.items.map(t=>({...t,type:e.other.entityType})),await this.insertOrUpdate(i.items),i}};Dz=U([g(),h(),Y({model:Mr,fetch:`files`}),B(0,m(V.Config)),B(1,m(V.SerializerService)),B(2,m(V.Api)),B(3,m(V.EndpointsService)),B(4,m(V.LoggerService)),B(5,m(V.FilterQueryService))],Dz);var Oz=Dz,kz=class extends qE{async uploadFile(e){let t=await this.getDomainRepository().uploadFile(e);return e.entityType&&this.notify([],cl.CREATE),t}attachFiles(e,t,n){return this.getDomainRepository().attachFiles(e,t,n)}uploadFileCancellable(e){return this.getDomainRepository().uploadFileCancellable(e)}getDownloadLink(e,t){return this.getDomainRepository().getDownloadLink(e,t)}async detachFile(e,t,n){await this.getDomainRepository().detachFile(e,t,n),this.notify([e],cl.DELETE)}getFetchEndpointParams(){return[]}gridRequestWithEntityType(e,t,n,r,i){return this.getDomainRepository().fetchListGridRequest({...n,other:{entityType:t,entityId:e}},this.getFetchEndpointParams(),r,i)}};kz=U([oD({model:Mr}),g(),h()],kz);var Az=kz,jz=class extends pl{};U([st(),v()],jz.prototype,`countryId`,void 0),U([v()],jz.prototype,`currency`,void 0),U([ft(0)],jz.prototype,`price`,void 0),jz=U([Be(md.MESSAGES_PRICE_FOR_COUNTRY)],jz);var Mz=jz,Nz=class extends qE{getMessagesPriceForCountries(){return this.getDomainRepository().getMessagesPriceForCountries()}};Nz=U([oD({model:Mz}),g(),h()],Nz);var Pz=Nz,Fz=class extends Q{async fetchMessagesPriceForCountries(){let e=await this.getApiSource().get(this.endpointsService.getPath(`messagesPriceForCountries`));return e.data&&await this.insertOrUpdate(e.data),this.all()}async getMessagesPriceForCountries(){let e=this.all();return e.length?e:this.fetchMessagesPriceForCountries()}};Fz=U([Y({model:Mz,fetch:`messagesPriceForCountries`}),g(),h()],Fz);var Iz=Fz,Lz=class extends UE{setId(e){this.id=e}async exportByEntity(e,t,n){if(!this.id)throw new G(`Entity id is not set for export`);return super.exportByEntity(e,t,n,[this.id])}};Lz=U([g(),h()],Lz);var Rz=Lz,zz=class{slice(e,t=1,n=10){let r=this.sliceItems(e,t,n
51);return this.formatPaginationOffsetResponse(r,e.length,t,n)}all(e){return this.formatPaginationOffsetResponse(e,e.length,1,e.length)}formatPaginationOffsetResponse(e,t,n,r){return{items:e,pagination:{type:`offset`,perPage:r,page:n,totalCount:t,pageCount:Math.ceil(t/r),nextId:``,prevId:``}}}sliceItems(e,t,n){let r=t*n,i=r-n;return e.slice(i,r)}};zz=U([g()],zz);var Bz=zz,Vz=class extends Tk{constructor(...e){super(...e),this.id=`1`}async fetchOAuthSignUpData(){let e=await this.getRequest(this.id);return e?(await this.storeOAuthSignUpData(e),this.getOAuthSignUpData()):null}getOAuthSignUpData(){return this.findEntityByIdOrNull(this.id)}async storeOAuthSignUpData(e){await this.postRequest({...e,id:this.id}),await this.fill(this.id)}clearOAuthSignUpData(){return this.deleteRequest(this.id)}};Vz=U([Y({model:If,fetch:If.entity,create:If.entity,single:If.entity}),g(),h()],Vz);var Hz=Vz,Uz=class{constructor(e,t){this.translateService=e,this.oAuthSignUpRepository=t}fetchOAuthSignUpData(){return this.oAuthSignUpRepository.fetchOAuthSignUpData()}getOAuthSignUpData(){return this.oAuthSignUpRepository.getOAuthSignUpData()}storeOAuthSignUpData(e){return this.oAuthSignUpRepository.storeOAuthSignUpData(e)}async clearOAuthSignUpData(){return this.oAuthSignUpRepository.clearOAuthSignUpData()}getExpectationFailedErrorMessage(e){let t=this.translateService.t(`auth.oauth.providers.${e}`);return this.translateService.t(`auth.oauth.errors.expectationFailed`,{provider:t})}};Uz=U([g(),B(0,m(V.TranslateService)),B(1,m(V.OAuthSignUpRepository))],Uz);var Wz=Uz,Gz=class{isFeatureEnabled(e){let t=Wo.config().featureFlags[e];if(typeof t==`boolean`)return t;let n=localStorage.getItem(`tm::features::${e}`);return!!n&&![`disabled`,`false`,`0`].includes($e(n?.toLowerCase()))}isEnabledForE2e(e){let t=localStorage.getItem(`tm::features-e2e::${e}`);return!!t&&![`disabled`,`false`,`0`].includes($e(t?.toLowerCase()))}};Gz=U([g()],Gz);var Kz=[`use_case`,`private_user`,`configure_analytics`,`success_payment`,`finish`,`getting_started`],qz=class extends pl{};U([v()],qz.prototype,`flow`,void 0),U([y()],qz.prototype,`currentStep`,void 0),qz=U([Be(md.WIZARD)],qz);var Jz=qz,Yz=class extends Q{constructor(e,t,n,r,i){super(e,t,n,r,i),this.serializerService=e,this.api=t,this.endpointsService=n,this.loggerService=r,this.filterQueryService=i,this.id=`1`}async getWizardState(){let e=await this.getApiSource().get(this.endpointsService.getPath(`wizardState`));return this.insert([{...e.data,id:this.id}]),this.findEntityByIdOrFail(this.id)}findWizardState(){return this.findEntityByIdOrFail(this.id)}async apply(e){let t=this.endpointsService.getPath(`wizardApply`),n=(await this.getApiSource().post(t,e)).data;return await this.updateWizardState(n),this.findWizardState()}async getWizardPrices(){return(await this.getApiSource().get(this.endpointsService.getPath(`wizardPrices`))).data}updateWizardState(e){return this.insertOrUpdate([{...e,id:this.id}])}};Yz=U([Y({model:Jz}),g(),h(),B(0,m(V.SerializerService)),B(1,m(V.Api)),B(2,m(V.EndpointsService)),B(3,m(V.LoggerService)),B(4,m(V.FilterQueryService))],Yz);var Xz=Yz,Zz=`getWizardPricesEvent`,Qz=`wizardChangeStepEvent`,$z=`wizardChangeStepErrorEvent`,eB=class extends qE{constructor(e,t,n){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.countriesWithNewWizard=[`US`,`CA`,`PR`,`GB`,`AU`]}getWizardState(){return this.getDomainRepository().getWizardState()}findWizardState(){return this.getDomainRepository().findWizardState()}async apply(e){try{let t=await this.getDomainRepository().apply(e);return this.subscription.emit(Qz,e),t}catch(e){throw this.subscription.emit($z,e),e}}async getWizardPrices(){let e=await this.getDomainRepository().getWizardPrices();return this.subscription.emit(Zz,e),e}hasWizardStep(e){return Kz.includes(e)}isWizardMode(e){return e.flow!==`none`}isAllowUsageMainApplication(e){return!this.isWizardMode(e)||e.currentStep===null||[`success_payment`,`finish`,`getting_started`].includes(e.currentStep)}getStepAfterConfigureAnalytics(e){return{type:this.countriesWithNewWizard.includes(e)?`from_configure_analytics_to_getting_started`:`from_configure_analytics_to_finish`}}};eB=U([oD({model:Jz}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager))],eB);var tB=eB,nB=class{constructor(e,t,n,r,i,a,o,s){this.wizardService=e,this.userService=t,this.routerService=n,this.routerBuilderService=r,this.subscription=i,this.windowService=a,this.restrictionPagesRouterService=o,this.gettingStartedInfoService=s,this.subscriptionKey=null,this.reloadTimeoutId=null,this.changeStepErrorHandler=e=>{e instanceof xo&&(this.reloadTimeoutId=window.setTimeout(()=>this.windowService.getLocation().reload(),2e3))},this.beforeEachHandler=(e,t,n)=>{let r=this.wizardService.findWizardState();this.wizardService.isAllowUsageMainApplication(r)||e.meta.isWizardPage||e.name==={name:`payment`}.name||e.name==={name:`auth.logout`}.name||e.name===this.restrictionPagesRouterService.getPersonalUseRoute().name||n()}}stepToGettingStartedPage(){let e={name:Oa};return this.routerService.replace(e)}stepToWizardPage(){return this.routerService.replace({name:`wizard`})}stepToLoginPersonalPage(){return this.restrictionPagesRouterService.goToLoginPersonalRoute()}async resolve(){let e=this.routerService.getCurrentRoute(),t=this.userService.currentUser();if(!this.userService.isAllowWizardForCurrentUser()){e.meta.isWizardPage&&await this.stepToGettingStartedPage();return}this.subscriptionKey=this.subscription.subscribe($z,this.changeStepErrorHandler);let n=await this.wizardService.getWizardState();if(n.currentStep===`configure_analytics`&&(n=await this.wizardService.apply(this.wizardService.getStepAfterConfigureAnalytics(t.countryId)),await this.gettingStartedInfoService.getInfo()),n.currentStep===`private_user`){await this.stepToLoginPersonalPage();return}let r=this.wizardService.isAllowUsageMainApplication(n);if(!r&&!e.meta.isWizardPage&&await this.stepToWizardPage(),r&&e.meta.isWizardPage&&await this.stepToGettingStartedPage(),r||this.routerBuilderService.addBeforeEachHandler(this.beforeEachHandler),n.currentStep&&!this.wizardService.hasWizardStep(n.currentStep))throw new G(`Not handled wizard step "${n.currentStep}, flow ${n.flow}"`)}async unresolve(){this.routerBuilderService.removeBeforeEachHandler(this.beforeEachHandler),this.reloadTimeoutId&&clearTimeout(this.reloadTimeoutId),this.subscriptionKey&&this.subscription.unsubscribe([this.subscriptionKey])}};nB=U([g(),B(0,m(V.WizardService)),B(1,m(V.UserService)),B(2,m(V.RouterService)),B(3,m(V.RouterBuilderService)),B(4,m(V.ModelSubscriptionService)),B(5,m(V.WindowService)),B(6,m(V.RestrictionPagesRouterService)),B(7,m(V.GettingStartedInfoService))],nB);var rB=nB,iB=class{constructor(){this.eventsQueue=[],this.isProcessing=!1}enqueue(...e){this.eventsQueue.push(e)}processEvents(e){if(!this.isProcessing){for(this.isProcessing=!0;this.eventsQueue.length>0;){let t=this.eventsQueue.shift();t&&e(t)}this.isProcessing=!1}}};iB=U([g()],iB);var aB=iB,oB=class{constructor(e,t,n){this.subscriptionService=e,this.windowService=t,this.routerService=n,this.userLoggedIn=!1,this._isLogOutByUnauthorizedApiError=!1,this.subscriptionService.subscribeBroadcast(Xc.UserLoggedIn,e=>{e.isLogged&&!this.userLoggedIn&&this.isAllowRefreshConfirmRegistrationRoute(e)&&(this.windowService.getLocation().href=`/`)})}isAllowRefreshConfirmRegistrationRoute(e){let t=this.routerService.getCurrentRoute();if(t.name!==`auth.signup.verifyEmail`)return!0;let n=t.query.userId;return e.userId===n}setUserLoggedIn(e){this.userLoggedIn=!0,this._isLogOutByUnauthorizedApiError=!1,this.subscriptionService.broadcastEmit(Xc.UserLoggedIn,{isLogged:!0,userId:e})}setUserLoggedOut(e=!1){this.userLoggedIn=!1,this._isLogOutByUnauthorizedApiError=e,this.subscriptionService.broadcastEmit(Xc.UserLoggedIn,{isLogged:!1,userId:null})}isUserLoggedIn(){return this.userLoggedIn}isLogOutByUnauthorizedApiError(){return this._isLogOutByUnauthorizedApiError}};oB=U([g(),B(0,m(V.SubscriptionService)),B(1,m(V.WindowService)),B(2,m(V.RouterService))],oB);var sB=oB,cB=class{constructor(e,t){this.subscription=e,this.signUpTrackingService=t,this.subscriptionKey=null,this.changeStepHandler=e=>{(e.type===`from_configure_analytics_to_finish`||e.type===`from_configure_analytics_to_getting_started`)&&this.signUpTrackingService.trackSignUp(String(e.type))}}async resolve(){this.subscriptionKey=this.subscription.subscribe(Qz,this.changeStepHandler)}async unresolve(){this.subscriptionKey&&this.subscription.unsubscribe([this.subscriptionKey])}};cB=U([g(),B(0,m(V.ModelSubscriptionService)),B(1,m(V.SignUpTrackingService))],cB);var lB=cB,uB=class extends pl{};U([v()],uB.prototype,`includeOptions`,void 0),U([v()],uB.prototype,`maxLength`,void 0),U([at()],uB.prototype,`removeExtraBlank`,void 0),U([at()],uB.prototype,`autoTransliterate`,void 0),U([at()],uB.prototype,`sendUndelivered`,void 0),U([at()],uB.prototype,`e2sEnabled`,void 0),U([y(null,e=>e??``)],uB.prototype,`customCutLines`,void 0),uB=U([Be(md.SEND_RECEIVE_SETTINGS)],uB);var dB=uB,fB=class extends qE{constructor(e,t,n){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n}getSettings(){return this.getDomainRepository().getSettings()}async update(e){await this.getDomainRepository().updateSettings(e)}async loadSettings(){await this.getDomainRepository().fetchSettings()}};fB=U([oD({model:dB}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager))],fB);var pB=fB,mB=class extends Q{async fetchSettings(){let e=await this.api.get(this.endpointsService.getPath(`sendReceiveSetting`));
51return(await this.insertOrUpdate([e.data]))[0]}getSettings(){return this.query().first()}async updateSettings(e){await this.api.put(this.endpointsService.getPath(`sendReceiveSetting`),e),await this.query().first().$update(e)}};mB=U([Y({model:dB}),g(),h()],mB);var hB=mB,gB=class{constructor(e){this.validationRulesBuilderService=e}createFileUploadFieldConfig(e){return{...e,validators:this.getComposedValidationRules(e)}}getComposedValidationRules(e){let t=this.getDefaultValidators();return e.validators?this.validationRulesBuilderService.compose(t,e.validators):t}getDefaultValidators(){return this.validationRulesBuilderService.createRules().fileAllowed().fileMaxSize()}};gB=U([g(),B(0,m(V.ValidationRulesBuilderService))],gB);var _B=gB,vB=class extends pl{};U([at()],vB.prototype,`isAvailableForCountry`,void 0),U([at()],vB.prototype,`hasFailedNumbers`,void 0),U([at()],vB.prototype,`hasFailedProvider`,void 0),U([at()],vB.prototype,`hasConnectedProviders`,void 0),U([at()],vB.prototype,`hasSenderIds`,void 0),U([at()],vB.prototype,`hasPhones`,void 0),U([y()],vB.prototype,`access`,void 0),vB=U([Be(md.BYOC)],vB);var yB=vB,bB=class extends Q{constructor(...e){super(...e),this.id=`1`}getId(){return this.id}async getSettings(e=[]){let{single:t}=this.settings(),n=this.getPathIfExists(t),r=await this.getApiSource().get(n);if(!r)throw new Ml(`Response data expected`);return r.data?(await this.insertOrUpdate([{...r.data,id:this.id}]),this.findSettings(e)):null}findSettings(e=[]){return this.query().with(e).find(this.id)}hasSettings(e=[]){return!!this.findSettings(e)}getSettingsIfNeed(){return this.findSettings()??this.getSettings()}async fetchUpdateSettings(e){let{single:t,update:n}=this.settings(),r=this.getPathIfExists(n||t);await this.getApiSource().put(r,e),this.updateSettings(e)}updateSettings(e){let t=this.getUpdateData(e);this.update([t])}patchRepoSettings(e){let t=this.findSettings();if(!t)throw new Us(`Settings not found`);this.updateSettings({...t,...e})}deleteSettings(){this.delete([this.id])}getUpdateData(e){return{...e,id:this.id}}getPathIfExists(e){if(!e)throw new Us(`You must define valid property in settings()`);return this.endpointsService.getPath(e)}};bB=U([g(),h()],bB);var xB=bB,SB=class extends xB{};SB=U([Y({model:yB,single:`byoc`}),g(),h()],SB);var CB=SB,wB=class extends qE{getDomainSettings(){throw new Wa(`Please use decorator @DomainSettings`)}getModel(){if(!this.getDomainSettings().model)throw new Wa(`Composite domain service must be without model`);return this.getDomainSettings().model}getDomainRepository(){if(!this.getDomainSettings().model)throw new Wa(`Composite domain service must be without repository`);return this.entityManager.getRepository(this.getDomainSettings().model)}
51findSettings(e=[]){return this.getDomainRepository().findSettings(e)}findSettingsOrFail(){let e=this.findSettings();if(!e)throw new G(`setting is null`);return e}async updateSettings(e){let t=await this.getDomainRepository().fetchUpdateSettings(e);return this.notifySingle(cl.UPDATE),t}async patchRepoSettings(e){this.getDomainRepository().patchRepoSettings(e)}async getSettings(){return this.findSettings()||this.getDomainRepository().getSettings()}hasSettings(){return!!this.findSettings()}async refreshSettings(){return this.getDomainRepository().getSettings()}notifySingle(e){let t=this.getDomainRepository().getId();this.notify([t],e,this.getModel())}};wB=U([g(),h()],wB);var TB=wB,EB=class extends TB{constructor(e,t,n,r,i,a){super(e,t,a),this.entityManager=e,this.modelSubscriptionService=t,this.byocCarrierSenderIdService=n,this.byocCarrierPhoneService=r,this.permissionsService=i,this.preloaderManager=a}fetchSettings(){return this.getDomainRepository().getSettings()}isAvailable(){return this.isAvailableForCountry()&&this.permissionsService.isActivePermission(`manageCpaasProviders`)}isAvailableForCountry(){return!!this.findSettings()?.isAvailableForCountry}isActive(){let e=this.findSettings();if(!e)return!1;let t=e.access;return t.accessType===null||t.accessType===`country`||t.accessType===`plan`||t.expiredAt===null||t.isActive}refreshIsActive(){return this.refreshSettings()}hasErrors(){let e=this.findSettings();return e?e.hasFailedNumbers||e.hasFailedProvider:!1}refreshHasErrors(){return this.refreshSettings()}hasConnectedProviders(){return!!this.findSettings()?.hasConnectedProviders}setHasConnectedProviders(e){return this.patchRepoSettings({hasConnectedProviders:e})}refreshHasConnectedProviders(){return this.refreshSettings()}hasSenderIds(){return!!this.findSettings()?.hasSenderIds}async refreshHasSenderIds(){let e=await this.byocCarrierSenderIdService.fetchHasSenderIds();return await this.setHasSenderIds(e),e}setHasSenderIds(e){return this.patchRepoSettings({hasSenderIds:e})}hasPhones(){return!!this.findSettings()?.hasPhones}async refreshHasPhones(){let e=await this.byocCarrierPhoneService.fetchHasPhones();return await this.setHasPhones(e),e}setHasPhones(e){return this.patchRepoSettings({hasPhones:e})}isSendingAllowed(){return this.findSettings()?.access.isSendingAllowed??!1}getAccessOrFail(){return this.findSettingsOrFail().access}getByocOutboundMessageCost(){return .01}};EB=U([oD({model:yB}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.ByocCarrierSenderIdService)),B(3,m(V.ByocCarrierPhoneService)),B(4,m(V.PermissionsService)),B(5,m(V.PreloaderManager))],EB);var DB=EB,OB=class{withForbiddenDuplicatesConfig(e){return xt({componentProps:{removeDuplicates:()=>!0}},e)}};OB=U([g()],OB);var kB=OB,AB=class{constructor(e){this.userRepository=e,this.paging={pageKey:``,requestParams:{page:1,perPage:25}}}getFetchEndpointParams(){return[]}async gridRequest(e,t,n,r){let i=this.composeQuery(e);return this.userRepository.adminsGridRequest(i,this.paging,n,r)}composeQuery(e){let t={withPermission:{eq:`BILLING`}};return{...e,filter:[...e.filter,t]}}};AB=U([g(),B(0,m(V.UserRepository))],AB);var jB=AB,MB=class extends fN{constructor(e,t,n,r){super(e,t,n),this.em=e,this.loggerService=n,this.columnsSizeService=r}getInitColumns(){return{name:{columnOrder:1,visible:!0,growRatio:2,minWidth:this.columnsSizeService.getPersonMinWidth(),required:!0},email:{columnOrder:2,visible:!0,growRatio:2,minWidth:200,required:!0}}}};MB=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ColumnsFromStoreFactory)),B(2,m(V.LoggerService)),B(3,m(V.ColumnsSizeService))],MB);var NB=MB,PB=class{constructor(e){this.globalStateService=e,this.fieldId=`showAuthLoader`}async fetchLoaderState(){return!!await this.globalStateService.getFieldValue(this.fieldId)}getLoaderState(){return!!this.globalStateService.getLoadedState()?.showAuthLoader}async showLoader(){await this.toggleLoader(!0)}async hideLoader(){await this.toggleLoader(!1),await this.globalStateService.setFieldValue(this.fieldId,!1)}async toggleLoader(e){await this.globalStateService.setFieldValue(this.fieldId,e)}};PB=U([g(),B(0,m(V.GlobalStateService))],PB);function FB(e){return function(t){return Reflect.defineMetadata(Jl.FaceterSettings,e,t),t.prototype.getFaceterSettings=function(){return e},t}}var IB=class extends pl{get cancellationDate(){return this.isCanceled?this.nextRenewalAt:null}get isCancellable(){return this.status===dr.accepted}};U([v()],IB.prototype,`id`,void 0),U([v()],IB.prototype,`senderId`,void 0),U([v()],IB.prototype,`userId`,void 0),U([Ge(Kn,`userId`)],IB.prototype,`user`,void 0),U([v()],IB.prototype,`explanation`,void 0),U([v()],IB.prototype,`status`,void 0),U([ft()],IB.prototype,`price`,void 0),U([y()],IB.prototype,`currency`,void 0),U([y(null)],IB.prototype,`nextRenewalAt`,void 0),U([at()],IB.prototype,`isCanceled`,void 0),U([v()],IB.prototype,`giftType`,void 0),IB=U([Be(md.SENDER_ID)],IB);var LB=IB,RB=class extends eA{async fetchFacets(){let e=this.settings.entityName,t=await this.getRepository().gridRequest({filter:[]}
51,{requestParams:{page:1,perPage:1},pageKey:`1-0`});this.mergeFacets({[e]:t.pagination.totalCount})}getFacets(){return this.getFacetRepository().findEntityByIdOrNull(`paginationFacets`)}storeFacets(e){if(bd(e))this.getFacetRepository().insertOrUpdateRaw([{id:`paginationFacets`,payload:e}]);else throw new Us(`Broken contract with backend`)}getRepository(){let e=this.getEntityRepository();if(!Pr(e))throw new Gc(`Repository for ${this.settings.entityName} is not griddable`);return e}};RB=U([FB({models:[Oi,LB,Tn]}),g(),h()],RB);var zB=RB,BB=class{constructor(e,t){this.em=e,this.baseWrapperService=t}async open(e,t){this.trigger(e,!0,t)}async close(e){this.trigger(e,!1)}build(e,t){this.baseWrapperService.build(e,t)}getWrapperData(e){return this.baseWrapperService.getWrapperData(e)}setParams(e,t){this.baseWrapperService.setParams(e,t)}patchParams(e,t){return this.baseWrapperService.patchParams(e,t)}getParams(e){return this.baseWrapperService.getParams(e)}removeParams(e,t){this.baseWrapperService.removeParams(e,t)}clearParams(e){this.baseWrapperService.clearParams(e)}destroy(e){this.getRepository().delete([e])}isOpen(e){let t=this.getWrapperData(e);return t&&t.isOpen}isExist(e,t=af){return!!this.getRepository().findEntityByIdOrNull(e)}getRepository(){return this.em.getRepository(af)}trigger(e,t,n){if(!this.isExist(e))throw new Za(`Section wrapper doesn't exist: ${e}`);this.getRepository().update([{id:e,params:n??{},isOpen:t}])}};BB=U([g(),B(0,m(V.EntityManager)),B(1,m(V.BaseWrapperService))],BB);var VB=BB,HB=class extends TB{constructor(e,t,n){super(e,t,n),this.entityManager=e,this.modelSubscriptionService=t,this.preloaderManager=n,this.getDomainRepository().init()}getIsNotificationRequestWasClosed(){return this.getDomainRepository().getUiStateParam(`isNotificationRequestWasClosed`)}setIsNotificationRequestWasClosed(e){return this.getDomainRepository().setUiStateParam(`isNotificationRequestWasClosed`,e)}getChatShowMobileChat(){return this.getDomainRepository().getUiStateParam(`chatShowMobileChat`)}setChatShowMobileChat(e){return this.getDomainRepository().setUiStateParam(`chatShowMobileChat`,e)}getChatIsChatsLoading(){return this.getDomainRepository().getUiStateParam(`chatIsChatsLoading`)}setChatIsChatsLoading(e){return this.getDomainRepository().setUiStateParam(`chatIsChatsLoading`,e)}getNotificationTopOffset(){return this.getDomainRepository().getUiStateParam(`notificationTopOffset`)}setNotificationTopOffset(e){return this.getDomainRepository().setUiStateParam(`notificationTopOffset`,e)}};HB=U([oD({model:kf}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager))],HB);var UB=class extends xB{init(){this.insertOrUpdateRaw([{id:this.getId()}])}getUiStateParam(e){return this.getUiState()[e]}setUiStateParam(e,t){this.getUiStateParam(e)!==t&&this.updateSettings({[e]:t})}getUiState(){let e=this.findEntityByIdOrNull(this.getId());if(!e)throw new Us(`Trying to access UiState before initialization`);return e}};UB=U([Fp(),Y({model:kf}),g(),h()],UB);var WB=`W_PDF_EXPORT_CHART_GEN`,GB=e=>qa(e)&&e.type===`W_PDF_EXPORT_CHART_SUCCESS`,KB=`/assets/pdf.worker-DrdH4Z5e.js`,qB=(e,t)=>{let n=`import ${JSON.stringify(new URL(e,import.meta.url))}`,r=new Blob([n],{type:`application/javascript`}),i=URL.createObjectURL(r),a=new Worker(i,{type:`module`,name:t?.name});return a.addEventListener(`error`,e=>{URL.revokeObjectURL(i)}),a},JB=class{async generatePdfFromCanvas(e,t,n){return new Promise((r,i)=>{e.toBlob(e=>{if(!e){i(new Fu(`Canvas blob is empty`));return}let a=new FileReader;a.readAsArrayBuffer(e),a.onloadend=()=>{let e=a.result,i=new Uint8Array(e);r(this.generatePdf(i,t,n))}})})}async generatePdf(e,t,n){let r=Math.random();return new Promise((i,a)=>{let o=this.getWorker(),s=e=>{GB(e.data)&&e.data.nonce===r&&i(e.data.blob),o.removeEventListener(`message`,s)};o.addEventListener(`message`,s),o.postMessage({type:WB,nonce:r,imageData:e,width:t,height:n})})}getWorker(){return this.worker||(this.worker=qB(KB),this.worker.addEventListener(`messageerror`,()=>{throw new Fu(`Worker received a message that could not be deserialized`)}),this.worker.addEventListener(`error`,e=>{throw new Fu(e.message)})),this.worker}};JB=U([g()],JB);var YB=class{constructor(e){this.qrCodeWorkerService=e}async getBase64(e,t){return this.qrCodeWorkerService.toDataUrl(e,{errorCorrectionLevel:`H`,type:`image/png`,color:{dar
51k:`#000000`},...t})}formatForSms(e,t){return`SMSTO:${e}:${t}`}};YB=U([g(),B(0,m(V.QrCodeWorkerService))],YB);var XB=`/assets/qrcode.worker-CYlqRhRk.js`,ZB=`W_QRCODE_TO_DATA_URL`,QB=e=>qa(e)&&e.type===`W_QRCODE_TO_DATA_URL_SUCCESS`,$B=e=>qa(e)&&e.type===`W_QRCODE_TO_DATA_URL_ERROR`,eV=class{async toDataUrl(e,t){let n=Math.random();return new Promise((r,i)=>{let a=this.getWorker(),o=e=>{QB(e.data)&&e.data.nonce===n?r(e.data.dataUrl):$B(e.data)&&e.data.nonce===n&&i(new fu(e.data.error)),a.removeEventListener(`message`,o)};a.addEventListener(`message`,o),a.postMessage({type:ZB,nonce:n,text:e,options:t})})}getWorker(){return this.worker||(this.worker=qB(XB),this.worker.addEventListener(`messageerror`,()=>{throw new fu(`Worker received a message that could not be deserialized`)}),this.worker.addEventListener(`error`,e=>{throw new fu(e.message)})),this.worker}};eV=U([g()],eV);var tV=class extends pl{};U([at()],tV.prototype,`showGettingStartedPage`,void 0),U([y()],tV.prototype,`virtualNumbers`,void 0),U([y()],tV.prototype,`senderIds`,void 0),U([y()],tV.prototype,`tenDlcNumbers`,void 0),U([y()],tV.prototype,`tollFreeNumbers`,void 0),U([y()],tV.prototype,`additionalInfo`,void 0),U([v()],tV.prototype,`giftType`,void 0),tV=U([Be(md.GETTING_STARTED_INFO)],tV);var nV=tV,rV=class extends qE{constructor(e,t,n,r,i){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.userService=r,this.dateTimeService=i}getInfo(){return this.getDomainRepository().getInfo()}findInfo(){return this.getDomainRepository().findInfo()}findInfoOrFail(){return this.getDomainRepository().findInfoOrFail()}canGetFreeNumber(){let e=this.userService.currentUser().createdAt,t=new Date(e),n=this.dateTimeService.addMonths(t,6);return!this.dateTimeService.isAfter(Date.now(),n)}async findOrFillInfo(){let e=this.findInfo();return e||(e=await this.getInfo()),e}};rV=U([oD({model:nV}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.UserService)),B(4,m(V.DateTimeService))],rV);var iV=rV,aV=class extends Q{constructor(...e){super(...e),this.id=`1`}async getInfo(){let e=this.endpointsService.getPath(`gettingStartedInfo`),t=await this.getApiSource().get(e),n=t.data;return await this.insertOrUpdate([{...t.data,id:this.id}]),n}findInfo(){return this.findEntityByIdOrNull(this.id)}findInfoOrFail(){return this.findEntityByIdOrFail(this.id)}};aV=U([Y({model:nV}),g(),h()],aV);var oV=aV,sV=class{constructor(e){this.gettingStartedInfoService=e}async resolve(){await this.gettingStartedInfoService.findOrFillInfo()}};sV=U([g(),B(0,m(V.GettingStartedInfoService))],sV);var cV=sV,lV=class{constructor(){this.pool=[]}hasPromiseInPool(e){return!!this.getItem(e)}getPromiseFromPool(e){return this.getItem(e)?.promise}getPromiseCountInPool(e){return this.getItem(e)?.count??0}addPromiseToPool(e,t){let n=this.getItemIndex(e);n===-1?this.pool.push({keys:e,promise:t,count:1}):this.pool[n].count+=1}removePromiseFromPool(e){let t=this.getItemIndex(e);t!==-1&&(this.pool[t].count===1?this.pool.splice(t,1):--this.pool[t].count)}cleanup(){this.pool=[]}isMatchedByKeys(e,t){return e.every(e=>t.keys.includes(e))}getItem(e){return this.pool.find(t=>this.isMatchedByKeys(e,t))}getItemIndex(e){return this.pool.findIndex(t=>this.isMatchedByKeys(e,t))}};lV=U([g()],lV);var uV=class{constructor(e,t,n){this.poolManager=e,this.resolverManager=t,this.loggerService=n,this.resolvePromiseKey=Symbol(`resolver:resolve`),this.unresolvePromiseKey=Symbol(`resolver:unresolve`)}async resolve(e,t,n){this.log(`Resolver execution requestedâ¦`,e);let r=this.getResolver(e),i=r.getResolverKeys?.(e.params,t,n)??[];if(i.length>0){let a=this.getPromiseKeys(0,i);if(r.isPersistent?.()){this.log(`It is a persistent resolver`);let i=this.poolManager.getPromiseFromPool(a);return i?this.log(`Resolver is already resolving, returning existing promise and incrementing the count in the pool`):(this.log(`Resolver is not resolving yet, creating new promise`),i=r.resolve(e.params,t,n)),this.poolManager.addPromiseToPool(a,i),i}if(this.poolManager.hasPromiseInPool(a))return this.log(`Resolver already resolving, returning existing promise`),this.poolManager.getPromiseFromPool(a);{this.log(`Resolver is not resolving yet, creating new promise`);let i=r.resolve(e.params,t,n);return this.poolManager.addPromiseToPool(a,i),i.finally(()=>{this.log(`Promise resolve is fulfilled, removing from pool`,e),this.poolManager.removePromiseFromPool(a)}),i}}return this.log(`Resolver keys is empty, resolving the default way`),r.resolve(e.params,t,n)}async unresolve(e,t,n){this.log(`Resolver unresolve requestedâ¦`,e);let r=this.getResolver(e),i=r.getResolverKeys?.(e.params,t,n)??[];if(i.length>0){let a=this.getPromiseKeys(1,i);if(r.isPersistent?.()){this.log(`It is a persistent resolver`);let o=this.getPromiseKeys(0,i);if(this.poolManager.hasPromiseInPool(a))return this.log(`Resolver already unresolving, returning existing promise`),this.poolManager.getPromiseFromPool(a);if(await Promise.resolve(),this.poolManager.getPromiseCountInPool(o)>1)return this.log(`Resolver is not a root of persistent resolvers, decrementing the count in the pool`),this.poolManager.removePromiseFromPool(o),Promise.resolve();let s=r.unresolve?r.unresolve(e.params,t,n):Promise.resolve();return this.poolManager.addPromiseToPool(a,s),s.finally(()=>{this.log(`Promise unresolve is fulfilled, removing from pool`,e),this.poolManager.removePromiseFromPool(a),this.poolManager.removePromiseFromPool(o)}),s}if(this.poolManager.hasPromiseInPool(a))return this.log(`Resolver already unresolving, returning existing promise`),this.poolManager.getPromiseFromPool(a);{this.log(`Resolver is not unresolving yet, creating new promise`);let i=r.unresolve?r.unresolve(e.params,t,n):Promise.resolve();return this.poolManager.addPromiseToPool(a,i),i.finally(()=>{this.log(`Promise unresolve is fulfilled, removing from pool`,e),this.poolManager.removePromiseFromPool(a)}),i}}return this.log(`Resolver keys is empty, unresolving the default way`),r.unresolve?r.unresolve(e.params,t,n):Promise.resolve()}cleanup(){this.poolManager.cleanup()}getResolver(e){return this.resolverManager.getResolver(e.service)}getPromiseKeys(e,t){return[e===0?this.resolvePromiseKey:this.unresolvePromiseKey,...t]}log(e,t){let n=`resolver`;this.loggerService.log(n,e,`ResolverExecutorService`),t&&this.loggerService.raw(n,t)}};uV=U([g(),B(0,m(V.PromiseExecutorPoolManager)),B(1,m(V.ResolverManager)),B(2,m(V.LoggerService))],uV);var dV=class extends uV{constructor(e,t,n,r){super(e,t,n),this.poolManager=e,this.resolverManager=t,this.loggerService=n,this.performanceMarkService=r}async resolve(e,t,n){let r=this.performanceMarkService.startMeasure(`Resolve: ${e.service}`);return super.resolve(e,t,n).finally(r)}async unresolve(e,t,n){let r=this.performanceMarkService.startMeasure(`Unresolve: ${e.service}`);return super.unresolve(e,t,n).finally(r)}};dV=U([g(),h(),B(0,m(V.PromiseExecutorPoolManager)),B(1,m(V.ResolverManager)),B(2,m(V.LoggerService)),B(3,m(V.PerformanceMarkService))],dV);var fV=class{constructor(){this.supportsPerformanceMark=!1,this.supportsPerformanceMark=typeof performance<`u`}mark(e){if(!this.isDisabled())return performance.mark(e)}now(){return this.isDisabled()?0:performance.now()}measure(e,t,n){if(!this.isDisabled())return performance.measure(e,{start:t,end:n})}clearMarks(e){if(!this.isDisabled())return performance.clearMarks(e)}clearMeasures(e){if(!this.isDisabled())return performance.clearMeasures(e)}getEntries(){return this.isDisabled()?[]:performance.getEntries()}startMeasure(e){let t=this.now();return()=>this.measure(e,t)}isDisabled(){return!0}};fV=U([g()],fV);var pV=class{constructor(e,t){this.loggerService=e,this.monitoringService=t}logAndCapture(e,t,n){let r=this.getChannel(t);if(typeof e==`string`)this.loggerService.log(r,e,n),this.monitoringService.logInfo(e,t,{subchannel:n});else{if(e instanceof Za&&!e.shouldBeMonitored())return;this.loggerService.log(r,n?`Got exception for ${n}`:`Got exception`),this.loggerService.raw(r,e),this.monitoringService.logError(e,t,{subchannel:n})}}getChannel(e){return{[Ba.INFO]:`info`,[Ba.WARNING]:`warn`,[Ba.ERROR]:`error`,[Ba.DEBUG]:`debug`,[Ba.LOG]:`debug`,[Ba.TRACE]:`debug`,[Ba.FATAL]:`error`}[e]}};pV=U([g(),B(0,m(V.LoggerService)),B(1,m(V.MonitoringService))],pV);var mV=class{pipe(e){return this.addRoutesToList(e,[]),e}addRoutesToList(e,t,n=``){let r=new Set;
51e.forEach(e=>{if(n&&r.add(n),e.children?.length)this.addRoutesToList(e.children,t,e.path?e.path:Array.from(r).join(`/`));else{let n=e.path;r.size&&(n=Array.from(r).join(`/`),e.path&&(n+=`/`+e.path)),t.push(n)}})}};mV=U([g()],mV);var hV=mV,gV=class{constructor(e,t){this.senderSettingsCountriesService=e,this.staticPaginationService=t}getFetchEndpointParams(){return[]}async gridRequest(e,t,n){await this.senderSettingsCountriesService.fillCountries();let r=this.senderSettingsCountriesService.searchCountriesByCategories(this.categories,n);return this.staticPaginationService.all(r)}setCategories(e){this.categories=e}};gV=U([g(),B(0,m(V.SenderSettingsCountriesService)),B(1,m(V.StaticPaginationService))],gV);var _V=gV,vV=class extends Tk{constructor(e,t,n,r,i){super(e,t,n),this.transport=e,this.localStorageAdapter=t,this.loggerService=n,this.api=r,this.endpointsService=i,this.id=`1`}reopenAccount(e,t){return this.api.post(this.endpointsService.getPath(`reopenAccount`),{username:e,password:t})}async fetchReopenAccountData(){let e=await this.getRequest(this.id);return e?(await this.storeReopenAccountData(e),this.getReopenAccountData()):null}getReopenAccountData(){return this.findEntityByIdOrNull(this.id)}async storeReopenAccountData(e){await this.postRequest({...e,id:this.id}),await this.fill(this.id)}clearReopenAccountData(){return this.deleteRequest(this.id)}};vV=U([Y({model:xf,fetch:xf.entity,create:xf.entity,single:xf.entity}),g(),h(),B(0,m(V.LocalStorageTransport)),B(1,m(V.LocalStorageAdapter)),B(2,m(V.LoggerService)),B(3,m(V.Api)),B(4,m(V.EndpointsService))],vV);var yV=vV,bV=class{constructor(e){this.em=e}async reopenAccount(e,t){await this.getRepository().reopenAccount(e,t),await this.getRepository().clearReopenAccountData()}fetchReopenAccountData(){return this.getRepository().fetchReopenAccountData()}async storeReopenAccountData(e){await this.getRepository().storeReopenAccountData(e)}getLoginOrEmail(){return this.getRepository().getReopenAccountData()?.loginOrEmail}getFullName(){return this.getRepository().getReopenAccountData()?.fullName}getRepository(){return this.em.getRepository(xf)}};bV=U([g(),B(0,m(V.EntityManager))],bV);var xV=bV,SV=class{constructor(e,t){this.authService=e,this.reopenAccountService=t}async resolve(){let e=await this.reopenAccountService.fetchReopenAccountData();if(!e||!e.loginOrEmail)return this.authService.toInitialRoute()}};SV=U([g(),B(0,m(V.AuthService)),B(1,m(V.ReopenAccountService))],SV);var CV=SV,wV=class{isSms(e){return!this.isMms(e)&&!this.isVoiceBroadcast(e)}isMms(e){return/>(.+)<\/media>/.test(e)}isVoiceBroadcast(e){return/>(.+)<\/audio>/.test(e)}};wV=U([g()],wV);function TV(e){return t=>{t?.preventDefault(),!(t instanceof CustomEvent&&t.type===`unhandledrejection`)&&t?.reason&&t?.reason instanceof Error&&e(t.reason)}}var EV=class{constructor(e){this.config=e}
51init(e){this.microSentryClient=new ke({dsn:this.config.sentry.dsn,environment:``,release:[`textmagic_carrera_app`,`20261001-39361-126a85bd`].join(`@`),ignoreErrors:sz}),this.errorEventListener=this.errorEventHandler.bind(this),this.unhandledRejectionEventListener=TV(this.logError.bind(this)),window.addEventListener(`error`,this.errorEventListener),window.addEventListener(`unhandledrejection`,this.unhandledRejectionEventListener)}setUser(e){this.microSentryClient?.setUser(e||{})}logInfo(e,t=Ba.INFO){t!==Ba.NULL&&this.microSentryClient?.captureMessage(e)}logError(e,t=Ba.ERROR){e&&t!==Ba.NULL&&(e instanceof Za&&!e.shouldBeMonitored()||(e.message||(e.message=`An unknown error occurred, error: ${JSON.stringify(e)}`),this.microSentryClient?.report(e)))}destroy(){window.removeEventListener(`error`,this.errorEventListener),window.removeEventListener(`unhandledrejection`,this.unhandledRejectionEventListener),this.microSentryClient?.destroy()}errorEventHandler(e){if(e.error instanceof Za&&!e.error.shouldBeMonitored())return!1;let t=e;return e?.message||(t={...e,message:`The error was caused due to an 'error' event`,stack:e.error}),this.logError(t),!1}};EV=U([g(),B(0,m(V.Config))],EV);var DV=class{constructor(e,t){this.subscription=e,this.loggedInStatusService=t,this.subscriptionKey=null,this.changeStepHandler=e=>{e.type===`from_use_case_to_private_user`&&this.loggedInStatusService.setUserLoggedOut()}}async resolve(){this.subscriptionKey=this.subscription.subscribe(Qz,this.changeStepHandler)}async unresolve(){this.subscriptionKey&&this.subscription.unsubscribe([this.subscriptionKey])}};DV=U([g(),B(0,m(V.ModelSubscriptionService)),B(1,m(V.LoggedInStatusService))],DV);var OV=DV,kV=class extends yD{constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this.em=t,this.validationRulesBuilderService=n,this.logger=r,this.reopenAccountService=i,this.notificationService=a,this.translationService=o,this.windowService=s,this.authService=c}async buildForm(){this.getBuilder().control({fieldType:`password`,name:`password`,value:``,validators:this.validationRulesBuilderService.createRules().required({messagePath:`auth.closedAccount.form.password.errors.required`})})}async submit(e){try{await this.reopenAccountService.reopenAccount(this.reopenAccountService.getLoginOrEmail(),e.password)}catch(e){if(e instanceof hl){await this.authService.openSmsTfaPage(this.reopenAccountService.getLoginOrEmail(),e.credentials);return}if(e instanceof Xl){let t=dt(e.credentials,[`email`,`tfaToken`]);await this.authService.openEmailTfaPage(this.reopenAccountService.getLoginOrEmail(),t);return}throw e}this.notificationService.success(this.translationService.t(`auth.closedAccount.notifications.success`)),this.windowService.redirect(`/`)}};kV=U([g(),h(),B(0,m(V.FormBuilderFactoryService)),B(1,m(V.EntityManager)),B(2,m(V.ValidationRulesBuilderService)),B(3,m(V.LoggerService)),B(4,m(V.ReopenAccountService)),B(5,m(V.NotificationService)),B(6,m(V.TranslateService)),B(7,m(V.WindowService)),B(8,m(V.AuthService))],kV);var AV=kV,jV=class{constructor(e){this.routerService=e,this.loginPersonalRoute={name:`auth.login.personal`},this.accountSuspendedRoute={name:`auth.login.suspended`},this.unavailableLocationRoute={name:`auth.signup.unavailable`},this.reopenAccountRoute={name:`auth.login.reopenAccount`}}goToAccountSuspendedRoute(){return this.routerService.replace(this.accountSuspendedRoute)}goToLoginPersonalRoute(){return this.routerService.replace(this.loginPersonalRoute)}goToUnavailableLocationRoute(e=`push`){return e===`replace`?this.routerService.replace(this.unavailableLocationRoute):this.routerService.push(this.unavailableLocationRoute)}goToReopenAccountRoute(){return this.routerService.replace(this.reopenAccountRoute)}getPersonalUseRoute(){return this.loginPersonalRoute}};jV=U([g(),B(0,m(V.RouterService))],jV);var MV=jV,NV=class extends mN{constructor(e,t,n,r){super(e,t,n),this.em=e,this.loggerService=n,this.columnsSizeService=r}getStructuredColumns(){return{name:{growRatio:2,minWidth:this.columnsSizeService.getPersonMinWidth()},email:{growRatio:2,minWidth:200},subaccountType:{dynamicLoaderWidth:!0},logInButton:{minWidth:150}}}};NV=U([g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ColumnsFromStoreFactory)
51),B(2,m(V.LoggerService)),B(3,m(V.ColumnsSizeService))],NV);var PV=NV,FV=class{constructor(e){this.billingService=e}async resolve(){await this.billingService.fetchSettings()}};FV=U([g(),B(0,m(V.BillingService))],FV);var IV=FV,LV=class{constructor(e){this.cacheService=e}save(e){this.cacheService.set(e.id,e)}get(e){return this.cacheService.get(e)}};LV=U([g(),B(0,m(V.LRUCacheService))],LV);var RV=class extends pl{};U([v()],RV.prototype,`id`,void 0),RV=U([Be(md.TEAM_WORKFLOW)],RV);var zV=RV,BV=class extends qE{constructor(e,t,n,r,i){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.userService=r,this.userSettingsService=i}isActiveUserWorkflowFeature(){return!0}isUsersWorkflow(){return this.isActiveUserWorkflowFeature()?this.userSettingsService.currentUserSettingsOrFail().teamWorkflow.type===`users`:!1}isUsersWorkflowNotUserRole(){return!this.isUsersWorkflow()||this.userService.currentUser().subaccountType!==Fr.USER}isSubaccountsWorkflow(){return!this.isActiveUserWorkflowFeature()||this.userSettingsService.currentUserSettingsOrFail().teamWorkflow.type===`subaccounts`}mustAcceptTermsUpdate(){return this.userSettingsService.currentUserSettingsOrNull()?.showTermsUpdate??!1}getUserIdForWorkflow(){return this.isUsersWorkflow()?this.userSettingsService.currentUserSettingsOrFail().parentId:this.userService.currentUser().id}getAccountDetailsTo(e){if(e.isAllowDetailsPage)return this.getSubAccountDetailsTo(e.id)}getSubAccountDetailsTo(e){return this.userService.isCurrentUser(e)?{name:L.AccountDetails}:this.isUsersWorkflow()?{name:L.WorkspaceUsersDetails,params:{subAccountId:e}}:{name:L.WorkspaceSubaccountsDetails,params:{subAccountId:e}}}};BV=U([oD({model:zV}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.UserService)),B(4,m(V.UserSettingsService))],BV);var VV=BV,HV=class extends Q{};HV=U([Y({model:zV}),g(),h()],HV);var UV=HV,WV=class{constructor(e,t){this.routerService=e,this.billingService=t}async resolve(){await this.billingService.getSettings(),!this.billingService.needByocSubscribe()&&await this.routerService.replace({name:L.SmsVoiceByocIndex})}};WV=U([g(),B(0,m(V.RouterService)),B(1,m(V.BillingService))],WV);var GV=WV,KV=class extends tR{get isInit(){return this._isInit}constructor(e,t,n,r,i,a){super(),this.routerService=e,this.subscriptionService=t,this.userService=n,this.titlerService=r,this.monitoringService=i,this.accessControlService=a,this._isInit=!1}getConfig(){let e=Wo.config();return{id:e.tracking.postHogKey,host:e.tracking.postHogUrl}}getPlugin(){return{install:()=>this.initialize()}}cleanUp(){this.getPosthog().reset(),this._isInit=!1}trackSignUp(e){try{Wo.config().tracking.trackSignUp&&this.getPosthog().capture(YL.signUp,{$set:{signUpMethod:e}})}catch(e){let t=this.userService.getCurrentUserOrNull();this.monitoringService.logError(e,Ba.ERROR,{event:YL.signUp,userId:t?t.id:null,email:t?t.email:null})}}trackEvent(e,t){try{let n=this.routerService.getRouter().currentRoute.value,r=t;r||(r=this.titlerService.getTitle(n,n.params)),this.getPosthog().capture(e,{title:r})}catch(e){this.monitoringService.logError(e)}}trackByOAuthProvider(e){let t=this.getPostHogEventByOAuthProvider(e);this.trackEvent(YL.signUpFormCompleted),t&&this.trackEvent(t)}trackRegulationsSubmissionEvent(e){let t=this.getPostHogEventByRegulationAction(e);t&&this.trackEvent(t)}getPosthog(){return Ct}async initialize(){let e=this.routerService.getRouter(),t=this.getConfig().id,n=String(this.getConfig().host);try{this.getPosthog().init(t,{api_host:n,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,disable_web_experiments:!1,custom_campaign_params:[`gclid`,`fbclid`,`msclkid`,`li_fat_id`,`twclid`],loaded:()=>{}}),this._isInit=!0;let r=e=>{this.trackPage(e)};await(async()=>{await e.isReady(),await this.accessControlService.waitInstall(),this.subscriptionService.subscribe(Ur,r,!0)})()}catch(e){this.monitoringService.logError(e)}}trackPage(e){try{let t=this.userService.getCurrentUserOrNull([`timezone`]);t&&this.getPosthog().get_distinct_id()!==t.id&&this.getPosthog().identify(t.id,{email:t.email,country:t.countryId,timezone:t.timezone?t.timezone.timezone:`UTC`}),this.trackEvent(YL.pageView),this.trackRouteEvent(e)}catch(e){this.monitoringService.logError(e)}}trackRouteEvent(e){let t=e.name||null;if(t&&XL.includes(t)){let e=ZL.find(e=>e.routeName===t)?.event;if(!e)return;this.trackEvent(e)}}getPostHogEventByOAuthProvider(e){return QL[e]||null}getPostHogEventByRegulationAction(e){return $L[e]||null}};KV=U([g(),h(),B(0,m(V.RouterService)),B(1,m(V.SubscriptionService)),B(2,m(V.UserService)),B(3,m(V.DefaultTitlerService)),B(4,m(V.MonitoringService)),B(5,m(V.AccessControlService))],KV);var qV=5e3,JV=class{constructor(e,t){this.postHogService=e,this.monitoringService=t}isFeatureEnabled(e){try{return!!this.postHogService.getPosthog().isFeatureEnabled(e)}catch(e){return this.monitoringService.logAndCapture(e instanceof Error?e:`Unknown error`,Ba.ERROR),!1}}getFeatureFlagVariant(e){try{return this.postHogService.getPosthog().getFeatureFlag(e)}catch(e){this.monitoringService.logAndCapture(e instanceof Error?e:`Unknown error`,Ba.ERROR);return}}getFeatureFlagPayload(e){try{return this.postHogService.getPosthog().getFeatureFlagPayload(e)}catch(e){this.monitoringService.logAndCapture(e instanceof Error?e:`Unknown error`,Ba.ERROR);return}}reloadFeatureFlags(){try{this.postHogService.getPosthog().reloadFeatureFlags()}catch(e){this.monitoringService.logAndCapture(e instanceof Error?e:`Unknown error`,Ba.ERROR)}}get hasLoadedFlags(){return this.postHogService.isInit&&this.postHogService.getPosthog().featureFlags.hasLoadedFlags}waitForFeatureFlags(){let{promise:e,resolve:t}=Promise.withResolvers();if(!this.isSupportedEnvironment()||this.postHogService.getPosthog().featureFlags.hasLoadedFlags)t();else try{let e=this.postHogService.getPosthog().onFeatureFlags(()=>{clearTimeout(n),e(),t()}),n=setTimeout(()=>{e(),t(),this.monitoringService.logAndCapture(`waitForFeatureFlags timed out`,Ba.ERROR)},qV)}catch(e){this.monitoringService.logAndCapture(e instanceof Error?e:`Unknown error`,Ba.ERROR),t()}return e}overrideFeatureFlags(e){try{this.postHogService.getPosthog().featureFlags.overrideFeatureFlags(e)}catch(e){this.monitoringService.logAndCapture(e instanceof Error?e:`Unknown error`,Ba.ERROR)}}resetFeatureFlagOverrides(){this.overrideFeatureFlags(!1)}isSupportedEnvironment(){return!0}};JV=U([g(),B(0,m(V.PostHogService)),B(1,m(V.MonitoringLoggerService))],JV);var YV=class{sortRaw(e,t){let n=this.parseSortParams(t);return n?this.sort(e,n.fieldName,n.reverse):e}sort(e,t,n){return e.sort((e,r)=>{let i=e[t],a=r[t];return i===a?0:i===null?n?1:-1:a===null?n?-1:1:i>a===n?1:-1})}sortByString(e,t,n){return e.sort((e,r)=>{let i=e[t],a=r[t];return i===a?0:i===null?n?1:-1:a===null?n?-1:1:n?i.localeCompare(a):a.localeCompare(i)})}parseSortParams(e){let t=Object.values(e)[0];if(!t)return null;let[n,r]=Object.entries(typeof t==`string`?e:t)[0];return{fieldName:n,reverse:r===`asc`}}};YV=U([g()],YV);var XV=YV,ZV=class{constructor(e){this.resolverService=e}async resolve(e,t){await this.resolverService.resolveDeps(String(t?.name),e.modules)}};ZV=U([g(),B(0,m(V.ResolverService))],ZV);var QV=ZV,$V=class{constructor(e,t,n,r){this.serverSubscriptionService=e,this.routerService=t,this.windowService=n,this.userSettingsService=r,this.handler=async e=>{let t=this.userSettingsService.currentUserSettingsOrFail(),n=e.payload.impersonatorId;if(e.payload.isImpersonatedByTMAdmin||!t.isImpersonated||`${t.impersonatedBy}`!=`${n}`)return;let r=this.routerService.resolve({name:L.WorkspaceSubaccounts});this.windowService.replace(r.fullPath)}}async resolve(){this.serverSubscriptionService.subscribe(`userImpersonationEnd`,this.handler)}async unresolve(){this.serverSubscriptionService.unsubscribeAll(`userImpersonationEnd`)}};$V=U([g(),B(0,m(V.ServerSubscriptionService)),B(1,m(V.RouterService)),B(2,m(V.WindowService)),B(3,m(V.UserSettingsService))],$V);var eH=$V,tH=class extends pl{};U([v()],tH.prototype,`id`,void 0),tH=U([Be(md.CENTRIFUGE)],tH);var nH=tH,rH=class extends qE{getTokens(e){return this.getDomainRepository().getTokens(e)}};rH=U([oD({model:nH}),g(),h()],rH);var iH=rH,aH=class extends Q{async getTokens(e){let t=this.endpointsService.getPath(`centrifugeToken`);return(await this.getApiSource().get(t,{params:{channels:e}})).data}};aH=U([Y({model:nH}),g(),h()],aH);var oH=aH,sH=class{constructor(e,t){this.userService=e,this.serverSubscriptionService=t,this.userProfileChangedHandler=e=>
51{Object.keys(e.payload).forEach(t=>{this.userService.updateUserInStore(t,e.payload[t])})}}async resolve(){this.serverSubscriptionService.subscribe(`userProfileChanged`,this.userProfileChangedHandler)}async unresolve(){this.serverSubscriptionService.unsubscribe(`userProfileChanged`,this.userProfileChangedHandler)}};sH=U([g(),B(0,m(V.UserService)),B(1,m(V.ServerSubscriptionService))],sH);var cH=sH,lH=class extends Zi{};U([v(``)],lH.prototype,`dateBlocked`,void 0),lH=U([Be(md.BLOCKED_CONTACT)],lH);var uH=lH,dH=class{constructor(e,t,n,r){this.serverSubscriptionService=e,this.subscription=t,this.contactService=n,this.noteService=r,this.contactStateChangedHandler=async e=>{await this.contactService.insertOrUpdate([e.payload]),this.subscription.emitByModel(Zi,{ids:[e.payload.id],eventType:cl.UPDATE}),this.subscription.emitByModel(uH,{ids:[e.payload.id],eventType:cl.UPDATE}),this.subscription.emitByModel(Xr,{ids:[e.payload.id],eventType:cl.UPDATE})},this.contactDeletedHandler=e=>{this.contactService.deleteFromStore(e.payload.ids.map(e=>e.toString()))},this.contactAddedHandler=e=>{this.subscription.emitByModel(Zi,{ids:[e.payload.id],eventType:cl.CREATE})},this.contactUnsubscribedResubscribedHandler=()=>{this.subscription.emitByModel(Xr,{ids:[],eventType:cl.UPDATE})},this.contactNoteAddedHandler=e=>{this.contactService.addNote(e.payload.contactId.toString(),{...e.payload,id:e.payload.id.toString(),userId:e.payload.userId.toString()})},this.contactNoteDeletedHandler=e=>{this.contactService.deleteNote(e.payload.contactId.toString(),e.payload.ids.map(String),e.payload.all)},this.contactNoteStateChangedHandler=e=>{this.noteService.insertOrUpdate([{...e.payload,id:e.payload.id.toString(),userId:e.payload.userId.toString()}])},this.listCacheClearHandler=()=>{this.subscription.emitByModel(Fn,{ids:[],eventType:cl.UPDATE})}}async resolve(){this.serverSubscriptionService.subscribe(`contactStateChanged`,this.contactStateChangedHandler),this.serverSubscriptionService.subscribe(`contactDeleted`,this.contactDeletedHandler),this.serverSubscriptionService.subscribe(`contactAdded`,this.contactAddedHandler),this.serverSubscriptionService.subscribe(`contactUnsubscribed`,this.contactUnsubscribedResubscribedHandler),this.serverSubscriptionService.subscribe(`contactResubscribed`,this.contactUnsubscribedResubscribedHandler),this.serverSubscriptionService.subscribe(`contactNoteAdded`,this.contactNoteAddedHandler),this.serverSubscriptionService.subscribe(`contactNoteDeleted`,this.contactNoteDeletedHandler),this.serverSubscriptionService.subscribe(`contactNoteStateChanged`,this.contactNoteStateChangedHandler),this.serverSubscriptionService.subscribe(`listCacheClear`,this.listCacheClearHandler)}async unresolve(){this.serverSubscriptionService.unsubscribe(`contactStateChanged`,this.contactStateChangedHandler),this.serverSubscriptionService.unsubscribe(`contactDeleted`,this.contactDeletedHandler),this.serverSubscriptionService.unsubscribe(`contactAdded`,this.contactAddedHandler),this.serverSubscriptionService.unsubscribe(`contactUnsubscribed`,this.contactUnsubscribedResubscribedHandler),this.serverSubscriptionService.unsubscribe(`contactResubscribed`,this.contactUnsubscribedResubscribedHandler),this.serverSubscriptionService.unsubscribe(`contactNoteAdded`,this.contactNoteAddedHandler),this.serverSubscriptionService.unsubscribe(`contactNoteDeleted`,this.contactNoteDeletedHandler),this.serverSubscriptionService.unsubscribe(`contactNoteStateChanged`,this.contactNoteStateChangedHandler),this.serverSubscriptionService.unsubscribe(`listCacheClear`,this.listCacheClearHandler)}};dH=U([g(),B(0,m(V.ServerSubscriptionService)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.ContactService)),B(3,m(V.NoteService))],dH);var fH=dH,pH=class{constructor(e,t){this.pricingService=e,this.modelPreloaderService=t}async preload(){if(this.isPreloaded())return this.pricingService.fetchPrices(),this.pricingService.getPrices();try{let e=await this.pricingService.fetchPrices();return this.markAsPreloaded(),e}catch(e){throw this.markAsFailed(),e}}isPreloaded(){return this.modelPreloaderService.isPreloaded(this.getKey())}markAsFailed(){this.modelPreloaderService.markAsFailed(this.getKey())}markAsNotPreloaded(){this.modelPreloaderService.markAsNotPreloaded(this.getKey())}markAsPreloaded(){this.modelPreloaderService.markAsPreloaded(this.getKey())}
51getKey(){return`TenDlcPricing`}};pH=U([g(),B(0,m(V.TenDlcPricingService)),B(1,m(V.ModelPreloaderService))],pH);var mH=class extends tR{constructor(e,t,n,r,i,a,o){super(),this.routerService=e,this.subscriptionService=t,this.userAnalyticsFieldsService=n,this.getSyncQueueService=r,this.loggedInStatusService=i,this.loggerService=a,this.userService=o,this.isTrackerInitialized=!1,this.syncQueueService=r()}getConfig(){return{id:Wo.config().tracking.googleAnalyticsMeasurementKey}}getPlugin(){return{install:()=>this.initialize()}}trackEvent(...e){this.isTrackerInitialized?this.pushToDataLayer(...e):this.syncQueueService.enqueue(e)}trackConversion(e,t){let n=this.trackEvent.bind(this);function r(){n(arguments)}let i={send_to:this.getSendTo(e)};t?.transactionId!==void 0&&(i.transaction_id=t.transactionId),t?.newCustomer!==void 0&&(i.new_customer=t.newCustomer),r(`event`,`conversion`,i)}trackSignUp(e){let t=this.trackEvent.bind(this);function n(){t(arguments)}n(`event`,`sign_up`,{method:e})}getSendTo(e){return`${this.getConfig().id}/${e}`}initialize(){let e=this.getConfig().id,t=e=>{this.track(e)},n={src:`https://www.googletagmanager.com/gtag/js?id=${e}`,trackingHandler:async()=>{await this.routerService.getRouter().isReady(),t(),this.subscriptionService.subscribe(Ur,e=>{let n=typeof e.name==`string`&&[`auth.login`,`auth.logout`].includes(e.name);t(n)},!0)}};this.initializeTrackerAsPlugin(n)}track(e){let t=this.getConfig().id,n=this.userAnalyticsFieldsService,r=()=>this.loggedInStatusService.isUserLoggedIn(),i=this.pushToDataLayer.bind(this);function a(){i(arguments)}let o=this.getSyncQueueService.bind(this),s=()=>{this.isTrackerInitialized=!0},c=this.userService.getCurrentUserOrNull();(function(i,l){if(i[l]=i[l]||[],a(`js`,new Date),o().processEvents(a),s(),r()&&!e){let e=n.getAnalyticsFields(),r=e?.gaClientId,i=e?.gaSessionId,o=e?.gaSessionNumber;r&&a(`config`,t,{client_id:r});let s=new Promise(e=>{a(`get`,t,`client_id`,e)}),l=new Promise(e=>{a(`get`,t,`session_id`,e)}),u=new Promise(e=>{a(`get`,t,`session_number`,e)});c&&a(`set`,`user_data`,{email:c.email}),Promise.all([s,l,u]).then(async e=>{let t=e[0]??null;(t&&r!=t||e[1]&&i!=e[1]||e[2]&&o!=e[2])&&await n.updateFields({gaClientId:t,gaSessionId:e[1],gaSessionNumber:e[2]})})}else a(`config`,t)})(window,`dataLayer`)}pushToDataLayer(...e){try{window.dataLayer.push(...e)}catch(e){this.loggerService.error(`error`,e.message)}}};mH=U([g(),h(),B(0,m(V.RouterService)),B(1,m(V.SubscriptionService)),B(2,m(V.UserAnalyticsFieldsService)),B(3,m(V.SyncQueueService)),B(4,m(V.LoggedInStatusService)),B(5,m(V.LoggerService)),B(6,m(V.UserService))],mH);var hH=mH,gH=class{constructor(e){this.userRepository=e}getTokenData(e){return this.userRepository.getSSOInvitationDataByToken(e)}completeSsoInvitation(e,t,n){return this.userRepository.completeSsoInvitation(e,t,n)}};gH=U([g(),B(0,m(V.UserRepository))],gH);var _H=gH,vH=class{constructor(e){this.routerService=e}isFailed(){return!1}async resolve({grantAccessFrom:e,redirectTo:t}){let n=this.routerService.getPreviousRoute();n?.name&&e.includes(n.name.toString())||await this.routerService.replace({name:t})}unresolve(){return Promise.resolve(void 0)}};vH=U([g(),B(0,m(V.RouterService))],vH);var yH=vH,bH=class{constructor(e,t,n){this.performanceMarkService=e,this.config=t,this.loggerService=n,this.isSent=!1,this.metrics={CLS:null,FCP:null,LCP:null,TTFB:null,INP:null},this.endpoint=this.config.telemetryUrl}init(){this.subscribeToWebVitals()}collectMetric(e){this.metrics[e.name]=this.round(e.value,e.name===`CLS`?4:0),this.sendTelemetryIfAllMetricsAreCollected()}sendTelemetryIfAllMetricsAreCollected(){Object.values(this.metrics).every(e=>e!==null)&&this.sendTelemetry({id:hu(),duration:this.getTimeFromSessionStart(),...this.getDeviceInfo(),...this.metrics})}sendTelemetry(e){this.isSent||(this.loggerService.log(`telemetry`,`Sending telemetry data`,`TelemetryService.sendTelemetry`),this.loggerService.raw(`telemetry`,e),typeof navigator<`u`&&(typeof navigator.sendBeacon==`function`?navigator.sendBeacon(this.endpoint,JSON.stringify(e)):fetch(this.endpoint,{method:`POST`,headers:{"Content-Type":`application/json;charset=UTF-8`},body:JSON.stringify(e)}).catch(e=>{if(e instanceof Error)this.loggerService.log(`telemetry`,`Error sending telemetry data: ${e.message}`,`TelemetryService.sendTelemetry`),this.loggerService.raw(`telemetry`,e);else throw new Yu(e)}),this.isSent=!0))}getDeviceInfo(){return{url:window.location?.href??null,userAgent:navigator?.userAgent??null,memory:navigator?.deviceMemory??void 0,cpus:navigator?.hardwareConcurrency??void 0,connection:navigator?.connection?{effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt,downlink:navigator.connection.downlink}:void 0}}subscribeToWebVitals(){wt(e=>{this.logMetric(e),this.collectMetric(e)}),Tt(e=>{this.logMetric(e),this.collectMetric(e)}),He(e=>{this.logMetric(e),this.collectMetric(e)}),o(e=>{this.logMetric(e),this.collectMetric(e)}),Ee(e=>{this.logMetric(e),this.collectMetric(e)})}getTimeFromSessionStart(){return this.round(this.performanceMarkService.n
51ow())}round(e,t=0){return+(Math.round(`${e}e+${t}`)+`e-${t}`)}logMetric(e){this.loggerService.log(`telemetry`,`${e.name}: rating: ${e.rating}; value: ${e.value}; delta: ${e.delta}`,`TelemetryService.logMetric`)}};bH=U([g(),B(0,m(V.PerformanceMarkService)),B(1,m(V.Config)),B(2,m(V.LoggerService))],bH);var xH=class{init(){}};xH=U([g()],xH);var SH=class{async optimisticRequest(e,t,n,r,i,a=hu()){try{await t(a),n(a).then(e=>{r(a,e)}).catch(e=>{i(a,e)})}catch(e){i(a,e)}}async notFoundErrorHandler(e,t){try{return await e()}catch(e){if(e instanceof xs)return t&&await t(e),null;throw e}}};SH=U([g()],SH);var CH=SH,wH=class{hasWrapperConfig(e){return e in g_}getWrapperConfig(e){if(!this.hasWrapperConfig(e))throw new vo(`Wrapper config with id "${e}" does not exist`);return{...this.modulesToModuleResolver(g_[e]),id:e}}getWrapperType(e){if(this.hasWrapperConfig(e))return this.getWrapperConfig(e).type}modulesToModuleResolver(e){if(!e.modules?.length)return e;let t=e.resolvers?[...e.resolvers]:[];return t.unshift({service:`AppModuleResolverService`,params:{modules:e.modules}}),{...e,resolvers:[t]}}};wH=U([g()],wH);var TH=wH,EH=class{constructor(e,t){this.teamWorkflowService=e,this.userService=t}async resolve(){this.teamWorkflowService.isUsersWorkflow()&&this.userService.fetchAllSubAccounts().catch(()=>{})}};EH=U([g(),B(0,m(V.TeamWorkflowService)),B(1,m(V.UserService))],EH);var DH=EH,OH=class extends pl{};U([at()],OH.prototype,`ticketsPropsIsGettingStartedPageHidden`,void 0),U([y(null)],OH.prototype,`openAIConsent`,void 0),U([at()],OH.prototype,`composeSwitchChannelsTooltipHidden`,void 0),U([at()],OH.prototype,`emailCampaignIsPromotionalModalChecked`,void 0),U([at()],OH.prototype,`emailCampaignWarmupGuidelinesChecked`,void 0),U([at()],OH.prototype,`contactsImportDataCleanupStepHidden`,void 0),U([at()],OH.prototype,`automationAiBuilderFeatureTooltipHidden`,void 0),OH=U([Be(md.UI_SETTINGS)],OH);var kH=OH,AH=class extends xB{async fetchSettings(){let e=this.endpointsService.getPath(`uiSettingsNew`),t=await this.getApiSource().get(e);if(!t.data)throw new Ml(`Response data expected`);return this.insertOrUpdate([{...t.data,id:this.id}])}
51insertOrUpdateSettings(e){return this.insertOrUpdate([{...e,id:this.id}])}async updateSettings(e){let t=this.endpointsService.getPath(`uiSettings`);await this.getApiSource().patch(t,e),await this.insertOrUpdate([{...e,id:this.id}])}};AH=U([Y({model:kH}),g(),h()],AH);var jH=AH,MH=class extends qE{constructor(...e){super(...e),this.fallbackSettings={ticketsPropsIsGettingStartedPageHidden:!0,openAIConsent:null,composeSwitchChannelsTooltipHidden:!0,emailCampaignIsPromotionalModalChecked:!0,emailCampaignWarmupGuidelinesChecked:!1,contactsImportDataCleanupStepHidden:!1,automationAiBuilderFeatureTooltipHidden:!1}}fetchSettings(){return this.getDomainRepository().fetchSettings()}insertFallbackSettings(){return this.getDomainRepository().insertOrUpdateSettings(this.fallbackSettings)}updateSettings(e){return this.getDomainRepository().updateSettings(e)}};MH=U([oD({model:kH}),g(),h()],MH);var NH=MH,PH=class{constructor(e,t){this.uiSettingsService=e,this.monitoringService=t}async resolve(){try{await this.uiSettingsService.fetchSettings()}catch(e){this.monitoringService.logError(e),await this.uiSettingsService.insertFallbackSettings()}}async unresolve(){}isFailed(){return!1}};PH=U([g(),B(0,m(V.UiSettingsService)),B(1,m(V.MonitoringService))],PH);var FH=PH,IH=class{constructor(e,t){this.customFieldsPreloaderService=e,this.serverSubscriptionService=t,this.clearCacheEvent=`customFieldsCacheClear`,this.reloadCustomFields=async()=>{this.customFieldsPreloaderService.markAsNotPreloaded(),await this.customFieldsPreloaderService.preload()}}async resolve(){this.serverSubscriptionService.subscribe(this.clearCacheEvent,this.reloadCustomFields)}async unresolve(){this.serverSubscriptionService.unsubscribeAll(this.clearCacheEvent)}};IH=U([g(),B(0,m(V.CustomFieldsPreloaderService)),B(1,m(V.ServerSubscriptionService))],IH);var LH=IH,RH=class extends pl{};U([v()],RH.prototype,`id`,void 0),U([at()],RH.prototype,`showSenderIds`,void 0),U([at()],RH.prototype,`showTenDlcTab`,void 0),U([at()],RH.prototype,`showTollFreeTab`,void 0),U([y()],RH.prototype,`showTenDlcAlert`,void 0),U([y()],RH.prototype,`showTollFreeAlert`,void 0),U([at()],RH.prototype,`showBackendPanel`,void 0),U([y()],RH.prototype,`verifyIdentity`,void 0),U([at()],RH.prototype,`showAutoResponders`,void 0),U([at()],RH.prototype,`showCompleteNumberRegistrationNotice`,void 0),U([at()],RH.prototype,`showMarketingDataModal`,void 0),U([at()],RH.prototype,`showTermsUpdate`,void 0),U([y()],RH.prototype,`teamWorkflow`,void 0),U([v()],RH.prototype,`parentId`,void 0),U([at()],RH.prototype,`billingDetailsExist`,void 0),U([at(!1)],RH.prototype,`isImpersonated`,void 0),U([y()],RH.prototype,`impersonatedBy`,void 0),U([at()],RH.prototype,`uiProfiling`,void 0),U([y()],RH.prototype,`emailPrice`,void 0),RH=U([Be(md.USER_SETTINGS)],RH);var zH=RH,BH=class extends Q{async fetchEmailPrice(){let e=this.endpointsService.getPath(`emailCampaignPricing`);return(await this.getApiSource().get(e)).data.price}};BH=U([Y({model:zH}),g(),h()],BH);var VH=BH,HH=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscriptionService=t,this.preloaderManager=n,this.userService=r}currentUserSettingsOrFail(){return this.findEntityByIdOrFail(this.userService.currentUser().id,[`subscriptions`])}currentUserSettingsOrNull(){let e=this.userService.getCurrentUserOrNull();return e?this.findEntityByIdOrNull(e.id,[`subscriptions`]):null}updateCurrentUserSettingsInStore(e){let t=this.currentUserSettingsOrFail().id;return this.getDomainRepository().insertOrUpdate([{...e,id:t}])}async fetchEmailPrice(){let e=await this.getDomainRepository().fetchEmailPrice();return this.updateCurrentUserSettingsInStore({emailPrice:e})}};HH=U([oD({model:zH}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.UserService))],HH);var UH=HH,WH=class extends rj{constructor(...e){super(...e),this.tokensCache={}}init(e){let t=this.getDefaultModelData(),n=this.buildModelData({...t,...e,perPage:e?.perPage||t.perPage});return this.repo.insertOrUpdateRaw([n]),!0}isFirstPage(){let{page:e}=this.getData();return e===1}moveToPrevPage(){let e=this.getData(),t=e.page-1,n=this.getTokensList()[t],r=this.pageKey({page:t,perPage:e.perPage}),i={lastId:e.lastId,nextId:n,perPage:e.perPage,page:t,currentPage:t,pageKey:r},a={id:this.tableModelId,...i,totalCount:e.totalCount,pageCount:e.page
51Count,page:t,currentPage:t,pageKey:r};return this.setData(a),{requestParams:i,pageKey:r}}moveToFirstPage(){return this.moveToPage(this.getFirstPage())}moveToNextPage(e){let t=this.getData(),n=t.page+1,r=this.addToken(e.lastId),i=r[t.page],a=this.pageKey({page:n,perPage:t.perPage}),o={lastId:r.join(`-`),nextId:i,perPage:t.perPage,page:n,currentPage:n,pageKey:a};return this.moveToPage({requestParams:o,pageKey:a})}pageRequestParams(){let{page:e,nextId:t,perPage:n}=this.getData();return this.buildPageParams(e,t,n)}getFirstPage(){let{requestParams:{perPage:e}}=this.pageRequestParams();return this.buildPageParams(1,``,e)}toQuery(){let{nextId:e,perPage:t}=this.getData()||this.getDefaultModelData();return{nextId:e,perPage:t}}pageKey(e){let{page:t,perPage:n}=e;return`${t}-${n}`}changePerPage(e){let t={currentPage:1,lastId:``,perPage:e},n=this.buildModelData(t);this.setData(n)}setData(e){let t=this.getData();t&&this.setCachedLastId(t.perPage,t.lastId);let n=this.getData(),r=this.getNewLastId(e),i=e.perPage&&n.perPage!==e.perPage,a={...n,perPage:e.perPage,pageKey:e.pageKey,nextId:i?``:e.nextId,lastId:r,totalCount:e.totalCount,page:e.page??n.page,currentPage:e.currentPage??n.currentPage};super.setData(a),a.perPage&&this.setCachedLastId(a.perPage,a.lastId)}getCachedLastId(e){return this.tokensCache[e]??``}setCachedLastId(e,t){this.tokensCache[e]=t}getNewLastId(e){let t=this.getData();return e.perPage&&t.perPage!==e.perPage?this.getCachedLastId(e.perPage):this.addToken(e.nextId||``).join(`-`)}buildPageParams(e,t,n){return{requestParams:{nextId:t,perPage:n},pageKey:this.pageKey({page:e,perPage:n}),currentPage:e,page:e}}applyUrlParams(e){let t=this.getData(),n=e.perPage&&t.perPage!==e.perPage?1:t.page,r=this.pageKey({page:n,perPage:e.perPage}),i={id:this.tableModelId,...e,pageKey:r,totalCount:t.totalCount,pageCount:t.pageCount,page:n,currentPage:n};this.setData(i)}isDefaultState(){return!1}onDataLoad(){}getTotal(){return 0}buildModelData(e){let t=this.getDataOrNull();return{id:this.tableModelId,lastId:t?.lastId??``,...e}}getDefaultModelData(){let e={lastId:``,nextId:``,page:1,currentPage:1,perPage:this.settings.perPage,totalCount:0};return this.buildModelData(e)}getTokensList(){return this.getData().lastId.split(`-`)}addToken(e){let t=this.getTokensList();return!t.includes(e)&&e!==`0`&&t.push(e),t}setTotalCount(e){}};WH=U([g(),h()],WH);var GH=WH,KH=class extends aF{async resolve(e){super.resolve(e)}};KH=U([g(),h()],KH);var qH=class{constructor(e){this.noteService=e,this.contactId=null}setContactId(e){this.contactId=e}getFetchEndpointParams(){if(this.contactId===null)throw new G(`"contactId" is null`);return[this.contactId]}async gridRequest(e,t,n,r){return this.noteService.getDomainRepository().getNotes(this.getFetchEndpointParams(),e,t,n,r)}};qH=U([g(),B(0,m(V.NoteService))],qH);var JH=qH,YH=class{constructor(e,t,n,r){this.userService=e,this.postHogService=t,this.loggerService=n,this.monitoringLoggerService=r}init(){if(this.log(`Init Posthog recording trackerâ¦`),!this.postHogService.isInit){this.log(`Posthog is not initialized, skipping initialization.`);return}try{this.userService.currentUser().status===Wr.ST_TRIAL?(this.log(`Current user is in TRIAL status, start session recording.`),this.postHogService.getPosthog().startSessionRecording()):this.log(`Current user is NOT in TRIAL status, skipping initialization.`)}catch(e){e instanceof Error?this.monitoringLoggerService.logAndCapture(e,Ba.ERROR,`posthogRecording`):this.monitoringLoggerService.logAndCapture(`An unknown error occurred while initializing Posthog recording tracker.`,Ba.ERROR,`posthogRecording`)}}stop(){this.log(`Stop session recording`),this.postHogService.getPosthog().stopSessionRecording()}log(e){this.loggerService.log(`tracking`,e,`posthogRecording`)}};YH=U([g(),B(0,m(V.UserService)),B(1,m(V.PostHogService)),B(2,m(V.LoggerService)),B(3,m(V.MonitoringLoggerService))],YH);var XH=class{getPriorityName(e){return{[Ai.Urgent]:`commonPriority.urgent`,[Ai.High]:`commonPriority.high`,[Ai.Normal]:`commonPriority.normal`,[Ai.Low]:`commonPriority.low`}[e]}getPriorityIconImage(e){return{[Ai.Low]:Zf,[Ai.Normal]:Yf,[Ai.High]:Qf,[Ai.Urgent]:Xf}[e]}getPrioritiesOptions(){return this.getOrderedPriorities().map(e=>
51({value:e,text:this.getPriorityName(e)}))}getDefaultPriority(){return Ai.Normal}getOrderedPriorities(){return[Ai.Urgent,Ai.High,Ai.Normal,Ai.Low]}};XH=U([g()],XH);var ZH=XH,QH=class{constructor(){this.cache=new Map}initializeCacheForFieldIfNotExists({field:e,maxElements:t}){this.cache.has(e)||this.cache.set(e,{values:new Map,field:e,maxElements:t})}clearAll(){this.cache.clear()}set(e,t,n){let{values:r,maxElements:i}=this.getFieldCacheEntry(e);if(!r.has(t)){if(r.size===i){let e=r.keys().next().value;typeof e==`string`&&r.delete(e)}r.set(t,n)}}get(e,t){return this.getCacheForField(e).get(t)}delete(e,t){this.getCacheForField(e).delete(t)}clearForField(e){this.cache.has(e)&&this.getCacheForField(e).clear()}getCacheForField(e){return this.getFieldCacheEntry(e).values}getFieldCacheEntry(e){if(!this.cache.has(e))throw new G(`Cache for field ${e} is not initialized`);return this.cache.get(e)}};QH=U([g()],QH);var $H=QH,eU=class{constructor(e,t){this.modelSubscriptionService=e,this.fieldDataCacheService=t,this.subscriptionKeys=[]}async resolve(e){for(let{model:t,fields:n}of e){let e=this.modelSubscriptionService.subscribeByModel(t,()=>{n.forEach(e=>{this.fieldDataCacheService.clearForField(e)})});this.subscriptionKeys.push(e)}}async unresolve(){this.modelSubscriptionService.unsubscribe(this.subscriptionKeys)}};eU=U([g(),B(0,m(V.ModelSubscriptionService)),B(1,m(V.FieldDataCacheService))],eU);var tU=eU,nU=class{getSubfieldValidationRuleName(e){return`${Rr}-${e}`}getFieldConfig({phoneCountryOptions:e,withCustomNumber:t}){return{fieldType:`selectSenderPhone`,value:{valueType:mf.DEFAULT},componentProps:{phoneCountryOptions:()=>e,withCustomNumber:()=>t}}}};nU=U([g()],nU);var rU=nU,iU=class{constructor(e,t){this.validationRulesBuilderService=e,this.subValidationService=t}getFieldConfig({validationItemRules:e,phoneCountryOptions:t,withCustomNumber:n}){return{fieldType:`countrySenderPhoneList`,value:[],componentProps:{phoneCountryOptions:()=>t,withCustomNumber:()=>n},validators:this.validationRulesBuilderService.createRules().custom(...this.subValidationService.forEachItem(e))}}};iU=U([g(),B(0,m(V.ValidationRulesBuilderService)),B(1,m(V.SubValidationService))],iU);var aU=class{constructor(e){this.posthogRecordingService=e}async resolve(){this.posthogRecordingService.init()}async unresolve(){this.posthogRecordingService.stop()}};aU=U([g(),B(0,m(V.PosthogRecordingService))],aU);var oU=class extends pl{};U([v()],oU.prototype,`id`,void 0),U([ft()],oU.prototype,`userId`,void 0),U([y()],oU.prototype,`legalName`,void 0),U([y()],oU.prototype,`brandName`,void 0),U([y()],oU.prototype,`organizationType`,void 0),U([y()],oU.prototype,`legalStructure`,void 0),U([y()],oU.prototype,`taxNumber`,void 0),U([y()],oU.prototype,`taxNumberIdentifier`,void 0),U([v()],oU.prototype,`status`,void 0),U([y()],oU.prototype,`industry`,void 0),U([y()],oU.prototype,`website`,void 0),U([y([])],oU.prototype,`businessRegionsOfOperations`,void 0),U([y([])],oU.prototype,`socialProfileLinks`,void 0),U([y()],oU.prototype,`street`,void 0),U([y()],oU.prototype,`city`,void 0),U([y()],oU.prototype,`zipCode`,void 0),U([y()],oU.prototype,`state`,void 0),U([y()],oU.prototype,`countryId`,void 0),U([y()],oU.prototype,`contactFirstName`,void 0),U([y()],oU.prototype,`contactLastName`,void 0),U([y()],oU.prototype,`contactJobPosition`,void 0),U([y()],oU.prototype,`contactExactJobTitle`,void 0),U([y()],oU.prototype,`contactPhone`,void 0),U([y()],oU.prototype,`contactEmail`,void 0),U([y()],oU.prototype,`companyStockSymbol`,void 0),U([y()],oU.prototype,`companyStockExchange`,void 0),U([v()],oU.prototype,`createdAt`,void 0),U([v()],oU.prototype,`updatedAt`,void 0),U([y([])],oU.prototype,`errorFields`,void 0),U([y()],oU.prototype,`draftRequestId`,void 0),U([y()],oU.prototype,`actionRequiredRequestId`,void 0),U([at()],oU.prototype,`isBrandOrgDetailsFilled`,void 0),U([at()],oU.prototype,`isBrandOrgAddressFilled`,void 0),U([at()],oU.prototype,`isBrandContactFilled`,void 0),oU=U([Be(md.TEN_DLC_TWILIO_BRAND)],oU);var sU=oU,cU=class extends Q{async getBrand(){try{let e=this.endpointsService.getPath(`tenDlcTwilioBrand`),t=await this.getApiSource().get(e);
51return await this.deleteAll(),await this.insertOrUpdate([t.data]),t.data}catch(e){if(e instanceof xs)return null;throw e}}findBrand(){return this.query().first()}};cU=U([Y({model:sU}),g(),h()],cU);var lU=cU,uU=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.translateService=r}async getBrand(){return this.getDomainRepository().getBrand()}findBrand(){return this.getDomainRepository().findBrand()}getStatus(e){let t={[tL.draft]:this.translateService.t(`status.tenDlcBrandStatus.draft`),[tL.supportReview]:this.translateService.t(`status.tenDlcBrandStatus.pending`),[tL.providerReview]:this.translateService.t(`status.tenDlcBrandStatus.inReview`),[tL.verified]:this.translateService.t(`status.tenDlcBrandStatus.verified`),[tL.actionRequired]:this.translateService.t(`status.tenDlcBrandStatus.actionRequired`)},n={gray:[tL.draft],green:[tL.verified],blue:[tL.supportReview,tL.providerReview],orange:[tL.actionRequired]};return{value:t[e]||``,color:GF(n,e)}}getLegalFormName(e){let t={[nL.public]:this.translateService.t(`tenDlcBrandEntityType.public`),[nL.private]:this.translateService.t(`tenDlcBrandEntityType.private`),[nL.nonProfit]:this.translateService.t(`tenDlcBrandEntityType.nonProfit`),[nL.government]:this.translateService.t(`tenDlcBrandEntityType.government`)};return e&&t[e]||``}async updateErrorFields(e,t){await this.insertOrUpdate([{id:e,errorFields:t}])}};uU=U([oD({model:sU}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TranslateService))],uU);var dU=uU,fU=e=>{let t=new Set;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++){let[i,a]=e[n],[o,s]=e[r];i<s&&o<a&&(t.add(n),t.add(r))}return Array.from(t).sort((e,t)=>e-t)},pU=`weekDaysTimeRangeStartEndRange`,mU=`weekDaysTimeRangeDayRangeOverlap`,hU=`weekDaysTimeRangeRequired`,gU=class{constructor(e,t){this.validationRulesBuilderService=e,this.dateTimeService=t}getWeekDaysTimeRangeFieldConfig(e){return{fieldType:`weekDaysTimeRangeLists`,value:[],componentProps:{canSelectAnyRange:()=>!0,defaultTimeRange:()=>this.getDefaultRange(),...e?.maxRanges?{maxRanges:()=>e.maxRanges}:{}},validators:this.getWeekDaysTimeRangeFieldValidators(e?.validatorParams)}}getWeekDaysTimeRangeFieldValidators(e){return this.validationRulesBuilderService.createRules().custom(pU,t=>{if(e?.isDisabled?.())return!0;let n={ranges:[]};return t.forEach((e,t)=>{e?.enabled&&e?.ranges.forEach((e,r)=>{e[1]<=e[0]&&n.ranges.push({dayIndex:t,rangeIndex:r})})}),!n.ranges.length||{message:{path:`fieldWeekDaysTimeRangeLists.errors.endTimeBeforeStartTime`},payload:n}}).custom(mU,t=>{if(e?.isDisabled?.())return!0;let n={ranges:[]};return t.forEach((e,t)=>{e?.enabled&&fU(e.ranges).forEach(e=>{n.ranges.push({dayIndex:t,rangeIndex:e})})}),!n.ranges.length||{message:{path:`fieldWeekDaysTimeRangeLists.errors.intervalsOverlap`},payload:n}})}getDefaultRange(){return[`09:00`,`17:00`].map(e=>this.dateTimeService.getDateFromStringFormat(e,cc.DATEPICKER_TIME_FORMAT))}mapScheduledIndexToWeekDaysNumber(e){if(e<0)throw new G(`Index should be >= 0. Value = "${e}"`);if(e>6)throw new G(`Index should be <= 6. Value = "${e}"`);return e+1}mapWeekDaysNumberToScheduledIndex(e){return e-1}};gU=U([g(),B(0,m(V.ValidationRulesBuilderService)),B(1,m(V.DateTimeService))],gU);var _U=gU,vU=class{constructor(e){this.get=e,this.formServices=new Map}createFormFromFactoryAndGetId(e,t){let n=this.get(e)(t??{}),r=n.getFormId();return this.formServices.set(r,n),r}removeForm(e){this.formServices.delete(e)}getForm(e){if(!this.hasForm(e))throw new Sd(`Not exist form ${e}`);return this.formServices.get(e)}hasForm(e){return this.formServices.has(e)}};vU=U([g(),B(0,m(`GetLocator`))],vU);var yU=vU,bU=class{constructor(e,t){this.baseResolverService=e,this.tenDlcPhoneNumbersService=t}async resolve(e){let t=this.baseResolverService.getId(e);await this.tenDlcPhoneNumbersService.getNumbersByCampaignId(t)}};bU=U([g(),B(0,m(V.BaseResolverService)),B(1,m(V.TenDlcPhoneNumbersService))],bU);var xU=bU,SU=class{constructor(e,t){this.serverSubscriptionService=e,this.fieldDataCacheService=t,this.clearCacheEvent=`subAccountsClosed`,this.clearCache=()=>{this.fieldDataCacheService.clearForField(Jr.FIELD_ASSIGNEE)}}async resolve(){this.serverSubscriptionService.subscribe(this.clearCacheEvent,this.clearCache)}
51async unresolve(){this.serverSubscriptionService.unsubscribe(this.clearCacheEvent,this.clearCache)}};SU=U([g(),B(0,m(V.ServerSubscriptionService)),B(1,m(V.FieldDataCacheService))],SU);var CU=SU,wU=class extends pl{};U([v()],wU.prototype,`id`,void 0),U([ft()],wU.prototype,`count`,void 0),wU=U([Be(md.TICKET_COUNT)],wU);var TU=wU,EU=class extends Q{constructor(...e){super(...e),this.id=`1`}async fetchCount(e){let t=this.endpointsService.getPath(`ticketsCount`),{data:n}=await this.getApiSource().get(t,{params:e,paramsSerializer:e=>_p(e)});return n.count}fetchUnreadCountValue(){return this.fetchCount({filters:[{isRead:{eq:0}}]})}persistUnreadTicketsCount(e){return this.insertOrUpdate([{id:this.id,count:e}])}findUnreadTicketsCount(){return this.findEntityByIdOrNull(this.id)?.count??null}updateUnreadTicketsCount(e){this.update([{id:this.id,count:e}])}};EU=U([Y({model:TU}),g(),h()],EU);var DU=EU,OU=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.ticketStatusService=r,this.fetchSeq=0,this.lastWsSeq=0}async fetchUnreadTicketsCount(){this.fetchSeq+=1;let e=this.fetchSeq,t=await this.getDomainRepository().fetchUnreadCountValue();this.lastWsSeq<e&&await this.getDomainRepository().persistUnreadTicketsCount(t)}findUnreadTicketsCount(){return this.getDomainRepository().findUnreadTicketsCount()}updateUnreadTicketsCount(e){return this.lastWsSeq=this.fetchSeq,this.getDomainRepository().updateUnreadTicketsCount(e)}async getCountClosedTicketAfterDeleteContact(e){let t=this.ticketStatusService.getAllStatuses();return t.length===0&&(await this.ticketStatusService.fillAll(),t=this.ticketStatusService.getAllStatuses()),t=t.filter(e=>!e.isClosed),this.getDomainRepository().fetchCount({filters:[{requester:{in:[e]},status:{in:t.map(e=>e.id)}}]})}};OU=U([oD({model:TU}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TicketStatusService))],OU);var kU=OU,AU=class{async preloadUnreadTicketsCount(){let e=this.getKey();if(!this.modelPreloaderService.isPreloaded(e,Mo.PRELOADERS)){this.modelPreloaderService.startPreloading(e,TU);try{await this.ticketCountService.fetchUnreadTicketsCount(),this.modelPreloaderService.markAsPreloaded(e)}catch(t){throw t instanceof Zs&&this.modelPreloaderService.markAsFailed(e),t}}}markUnreadTicketsCountAsNotPreloaded(){this.modelPreloaderService.markAsNotPreloaded(this.getKey())}markUnreadTicketsCountAsPreloaded(){let e=this.getKey();this.modelPreloaderService.isPreloaded(e,Mo.PRELOADERS)||this.createAndMarkAsPreloaded(e,TU)}isPreloaded(e,t){return this.modelPreloaderService.isPreloaded(e,t)}startPreloading(e,t,n){return this.modelPreloaderService.startPreloading(e,t,n)}markAsPreloaded(e){return this.modelPreloaderService.markAsPreloaded(e)}markAsNotPreloaded(e){this.modelPreloaderService.markAsNotPreloaded(e)}markAsFailed(e){this.modelPreloaderService.markAsFailed(e)}preload(e){return this.modelPreloaderService.preload(e)}preloadById(e,t){return this.modelPreloaderService.preloadById(e,t)}reloadById(e,t){return this.modelPreloaderService.reloadById(e,t)}isFailed(e,t,n){return this.modelPreloaderService.isFailed(e,t,n)}isFailedById(e,t,n){return this.modelPreloaderService.isFailedById(e,t,n)}createAndMarkAsPreloaded(e,t){this.modelPreloaderService.createAndMarkAsPreloaded(e,t)}getKey(){return`ticketUnreadCount`}};U([m(V.ModelPreloaderService)],AU.prototype,`modelPreloaderService`,void 0),U([m(V.TicketCountService)],AU.prototype,`ticketCountService`,void 0),AU=U([Bk({models:[TU]}),g()],AU);var jU=class{async resolve(){await this.ticketCountPreloaderService.preloadUnreadTicketsCount()}};U([m(V.TicketCountPreloaderService)],jU.prototype,`ticketCountPreloaderService`,void 0),jU=U([g()],jU);var MU=class{constructor(e,t,n){this.serverSubscriptionService=e,this.ticketCountService=t,this.ticketCountPreloaderService=n,this.unreadTicketsCountUpdatedEvent=`unreadTicketsCountUpdated`,this.unreadTicketsCountUpdatedHandler=e=>{this.ticketCountService.updateUnreadTicketsCount(e.payload.count),this.ticketCountPreloaderService.markUnreadTicketsCountAsPreloaded()}}async resolve(){this.serverSubscriptionService.subscribe(this.unreadTicketsCountUpdatedEvent,this.unreadTicketsCountUpdatedHandler)}async unresolve(){this.serverSubscriptionService.unsubscribe(this.unreadTicketsCountUpdatedEvent,this.unreadTicketsCountUpdatedHandler),this.ticketCountPreloaderService.markUnreadTicketsCountAsNotPreloaded()}};MU=U([g(),B(0,m(V.ServerSubscriptionService)),B(1,m(V.TicketCountService)),B(2,m(V.TicketCountPreloaderService))],MU);var NU=`dateValue`,PU=`textValue`,FU=`numericValue`,IU=`monetaryValue`,LU=`singleValue`,RU=`multiValue`,zU=[NU,PU,FU,IU,LU,RU],BU={date:NU,dateTime:NU,text:PU,numeric:FU,monetary:IU,singleOption:LU,multiOption:RU},VU=e=>Object.entries(BU).find(([,t])=>t===e)?.[0]??`text`,HU=`customFields`,UU=`:`,WU=(e,t)=>[HU,t,e].join(UU),GU=e=>{let t=e.split(UU);if(t.length<3)return null;let[n,r,i]=t;return n===`customFields`?{prefix:n,customFieldId:i,customFieldType:r}:null},KU=e=>e.startsWith(`customFields:`),qU=e=>e?e.map(e=>Object.entries(e).reduce((e,[t,n])=>{let r=GU(t);return r?(e[r.prefix]||(e[r.prefix]=[]),e[r.prefix].push(XU(r.customFieldId,r.customFieldType,n)),e):(e[t]=n,e)},{}),[]):[],JU=(e,t)=>Go().getCustomField(e)?.fieldType??t,YU=(e,t=JU)=>e.map(e=>{let n={...e};return`customFields`in e&&(delete n[HU],Object.values(e[HU]).forEac
51h(e=>{let r=Object.keys(e).find(t=>zU.includes(t)&&!Ae(e[t])),i=VU(r),a=t?t(e.id,i):i;n[WU(e.id,a)]=e[r]})),n}),XU=(e,t,n)=>({id:e,[BU[t]]:n}),ZU=class{isEqual(e,t){let[n,r]=this.getMostExhaustiveArray(e,t),i=[...qU(r)];return qU(n).every(e=>{for(let t in i){let n=i[t];if(this.isObjectsEqual(e,n))return delete i[t],!0}return i.length===0&&this.isObjectsEqual(e,{})})}isCustomFieldsValuesEqual(e,t){let[n,r]=this.getMostExhaustiveArray(e??[],t??[]),i=[...r];return n.every(e=>{let t=e.id,n=i.findIndex(e=>String(e.id)===String(t)),r=i[n],a=Object.keys(e).find(t=>zU.includes(t)&&!Ae(e[t]));return a?n!==-1&&a in e&&a in r?this.isValuesEqual(e[a],r[a]):i.length===0&&this.isValuesEqual(e[a],null):!1})}isValuesEqual(e,t){return Ae(e)&&Ae(t)?!0:qa(e)&&Object.values(e).every(e=>Ae(e)||OT(e))?Object.entries(e).every(([e,n])=>this.isEqualPaginationUrlFilterScalarValueType(n,t?.[e])):OT(e)?this.isEqualPaginationUrlFilterScalarValueType(e,t):!1}isObjectsEqual(e,t){let n=Xe(e,PT),r=Xe(t,PT),[i,a]=this.getMostExhaustiveObject(n,r);return Object.entries(i).every(([e,t])=>e===`customFields`?this.isCustomFieldsValuesEqual(t,a[e]):this.isValuesEqual(t,a[e]))}isEqualPaginationUrlFilterScalarValueType(e,t){if(Ae(e)&&Ae(t))return!0;let[n,r]=Ae(e)?[t,e]:[e,t];return Object.entries(n).every(([e,t])=>{let n=r?.[e];return Ae(t)&&Ae(n)||Ae(n)&&hi(t)||Ae(t)&&hi(n)?!0:Array.isArray(t)&&Array.isArray(n)?nt(this.normalizeValue(t),this.normalizeValue(n)):this.normalizeValue(t)===this.normalizeValue(n)})}getMostExhaustiveObject(e,t){return(qa(e)?Object.keys(e).length:0)>(qa(t)?Object.keys(t).length:0)?[e,t]:[t,e]}getMostExhaustiveArray(e,t){return e.length>t.length?[e,t]:[t,e]}normalizeValue(e){return IT(e)}};ZU=U([g()],ZU);var QU=class{cleanup(e){return e.map(e=>this.cleanupSingleFilter(e))}cleanupSingleFilter(e){let t={};return Object.entries(e).forEach(([e,n])=>{if(!PT.includes(e)){if(e===`customFields`){let e=n,r=this.cleanup(e);t[HU]=r}else jT({[e]:n})?Object.entries(n).forEach(([n,r])=>{this.isEmptyValue(r)||Object.entries(r).forEach(([r,i])=>{this.isEmptyValue(i)||(qa(t[e])||(t[e]={},t[e][n]={}),qa(t[e][n])||(t[e][n]={}),t[e][n][r]=i)})}):OT(n)?Object.entries(n).forEach(([n,r])=>{this.isEmptyValue(r)||(qa(t[e])||(t[e]={}),t[e][n]=r)}):n!==null&&(t[e]=n)}}),t}isEmptyValue(e){return Ae(e)||Array.isArray(e)&&e.length===0}};QU=U([g()],QU);var $U=class{getQueryForSorter(e,t){if(t.relation){let e=t.relation.split(`.`),n={[t.name]:{}},r=n[t.name];return e.forEach((n,i)=>{if(i===e.length-1){r[n]=t.direction;return}r[n]={},r=r[n]}),n}return{[e]:{[t.name]:t.direction}}}parseSorter(e,t){let n=Object.keys(t)[0];if(n===e){let n=Object.keys(t[e])[0];return{name:n,direction:t[e][n]}}let r=Object.keys(t[n])[0];return{name:n,relation:r,direction:t[n][r]}}};$U=U([g()],$U);var eW=class{constructor(e){this.baseResolverService=e}
51async resolve(e){await this.getService(e).getSettings()}isFailed(e){return!this.getService(e).findSettings()}getService(e){let t=this.baseResolverService.getDomainService(e.model);if(!(t instanceof TB))throw new Lc(`Service is not DomainSettingsService`);return t}};eW=U([g(),B(0,m(V.BaseResolverService))],eW);var tW=eW,nW=class{constructor(e,t,n,r,i){this.routerPermissionsService=e,this.routerService=t,this.translateService=n,this.userService=r,this.routerBuilderService=i,this.beforeEachHandler=async(e,t,n)=>{let r=this.routerService.isCurrentRouteChildOf({name:`user.accounts`});e.name===`user.accounts`&&r&&await this.setFirstAvailableRoute()},this.setFirstAvailableRoute=async()=>{let e=this.getFilteredRoutesGroups().map(e=>e.links).flat().map(e=>e.route)[0]??{name:`user.compose.message`};await this.routerService.replace(e)}}getRoutesGroups(){let e=this.userService.currentUser().subaccountType!==Fr.USER,t=this.routerService.getCurrentRoute(),n=[L.WorkspaceSubaccountsImport,L.WorkspaceSubaccountsDetails,`user.accounts.subAccounts.import.details`],r=[{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.users`),route:{name:L.WorkspaceUsers},icon:`tmi-account-box`,overrideActive:typeof t.name==`string`&&t.name.startsWith(L.WorkspaceUsersDetails)?!0:void 0},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.subAccounts.title`),route:{name:L.WorkspaceSubaccounts},icon:`tmi-account-box`,overrideActive:n.some(e=>typeof t.name==`string`&&t.name.startsWith(e))?!0:void 0},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.sso`),route:{name:L.WorkspaceSso},icon:`verified_user`},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.dataRetention`),route:{name:L.WorkspaceDataRetention},icon:`tmi-database`}],i=[{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.newBilling.title`),route:{name:L.BillingOverview},icon:`account_balance`},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.monthlyPlans`),route:{name:L.BillingPlans},icon:`credit_card`},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.invoices`),route:{name:L.BillingInvoices},icon:`tmi-file-text-outline`},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.statements`),route:{name:L.BillingStatements},icon:`tmi-money`}],a=[{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.details`),route:{name:L.AccountDetails},icon:`tmi-account-circle-filled`},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.security`),route:{name:`user.accounts.security`},icon:`lock`},{itemType:`link`,title:this.translateService.t(`pageTitle.user.accounts.notifications`),route:{name:L.AccountNotifications},icon:`notifications`}];return e?[{itemType:`group`,title:this.translateService.t(`pageTitle.user.accounts.workspace`),links:r},{itemType:`group`,title:this.translateService.t(`pageTitle.user.accounts.billing`),links:i},{itemType:`group`,title:this.translateService.t(`pageTitle.user.accounts.personal`),links:a}]:[{itemType:`group`,title:this.translateService.t(`pageTitle.user.accounts.personal`),links:[...a,...r]}]}getFilteredRoutesGroups(){let e=this.getRoutesGroups(),t=[];return e.forEach(e=>{let n=e.links.filter(e=>this.routerPermissionsService.isAllowAccessToRoute(e.route));n.length!==0&&t.push({...e,links:n})}),t}async resolveStrategies(){await Promise.all(this.getRoutesGroups().map(e=>e.links).flat().map(e=>this.routerPermissionsService.resolveStrategiesForRoute(e.route)))}async resolve(){this.routerBuilderService.addBeforeEachHandler(this.beforeEachHandler),await this.resolveStrategies(),this.routerService.getCurrentRoute().name==={name:`user.accounts`}.name&&await this.setFirstAvailableRoute()}async unresolve(){this.routerBuilderService.removeBeforeEachHandler(this.beforeEachHandler)}};nW=U([g(),B(0,m(V.RouterPermissionsService)),B(1,m(V.RouterService)),B(2,m(V.TranslateService)),B(3,m(V.UserService)),B(4,m(V.RouterBuilderService))],nW);var rW=nW,iW=new Date().valueOf(),aW=6e5,oW=100,sW=class{constructor(e,t){this.entityManager=e,this.subscriptionService=t,this.currentTabId=iW.toString(),this.getLockRepository().removeLock()}broadcastEmitNewTab(){this.subscriptionService.broadcastEmit(Xc.NewPrimaryTab)}emitPrimaryTabChanged(e){this.subscriptionService.emit(`change:TmAppPrimaryInstance`,e),e&&this.broadcastEmitNewTab()}async getIsTmAppPrimaryInstance(){let{tabId:e,timestamp:t}
51=await this.getStorageData();return!e||!t||this.checkIsExpiredTab(t)||e===this.currentTabId}checkIsExpiredTab(e){return Date.now()-e>aW}async checkTabId(){let e=await this.getIsTmAppPrimaryInstance();return e&&(await this.setPrimaryTab(),this.subscriptionService.broadcastEmit(Xc.ChangePrimaryTab)),e}async removeTabId(){let e=this.getRepository();(await e.getTabData())?.tabId===this.currentTabId&&await e.removeTabData()}setPrimaryTab(){let e={tabId:this.currentTabId,timestamp:Date.now()};return this.getRepository().saveTabData(e)}async raceForPrimaryTab(){let{promise:e,resolve:t}=Promise.withResolvers(),n=this.getLockRepository(),r=await n.getLock();return(!r.tabId||r.tabId===this.currentTabId)&&(await n.setLock(this.currentTabId),setTimeout(async()=>{if((await n.getLock()).tabId===this.currentTabId){let e=await this.checkTabId();await n.removeLock(),t(e)}},oW)),e}subscribeToChangePrimaryTab(e){this.subscriptionService.subscribeBroadcast(Xc.ChangePrimaryTab,async()=>{await this.removeTabId(),e()})}subscribeToCloseTab(e){this.subscriptionService.subscribeBroadcast(Xc.CloseBrowserTab,async()=>{e(await this.raceForPrimaryTab())})}async closeTabHandler(){await this.getIsTmAppPrimaryInstance()&&this.subscriptionService.broadcastEmit(Xc.CloseBrowserTab),this.removeTabId()}getStorageData(){return this.getRepository().getTabData()}getRepository(){return this.entityManager.getRepository(Ff)}getLockRepository(){return this.entityManager.getRepository(jf)}};sW=U([g(),B(0,m(V.EntityManager)),B(1,m(V.SubscriptionService))],sW);var cW=sW,lW=class extends Tk{constructor(...e){super(...e),this.id=`1`}saveTabData(e){return this.postRequest({id:this.id,...e})}getTabData(){return this.getRequest(this.id)}removeTabData(){return this.deleteRequest(this.id)}};lW=U([Y({model:Ff,fetch:Ff.entity,single:Ff.entity,create:Ff.entity}),g(),h()],lW);var uW=lW,dW=class extends Tk{constructor(...e){super(...e),this.id=`1`}setLock(e){return this.postRequest({id:this.id,tabId:e})}getLock(){return this.getRequest(this.id)}removeLock(){return this.deleteRequest(this.id)}};dW=U([Y({model:jf,fetch:jf.entity,single:jf.entity,create:jf.entity}),g(),h()],dW);var fW=dW,pW=class{constructor(e,t,n){this.fieldSelectSearchWithCustomBuilderService=e,this.translateService=t,this.ticketInboxService=n}getSubfieldValidationRuleName(e){return this.fieldSelectSearchWithCustomBuilderService.getSubfieldValidationRuleName(e)}getFieldConfig(){return this.fieldSelectSearchWithCustomBuilderService.getFieldConfig(`selectSearchInbox`)}extendOptions(e){return this.fieldSelectSearchWithCustomBuilderService.extendOptions({options:e,header:this.translateService.t(`fieldSelectSearchInbox.connected`),addNewText:this.translateService.t(`fieldSelectSearchInbox.connectNew`),addNewRoute:{name:this.ticketInboxService.hasInboxes()?L.TicketsInboxesConnect:oi.gettingStarted}})}};pW=U([g(),B(0,m(V.FieldSelectSearchWithCustomBuilderService)),B(1,m(V.TranslateService)),B(2,m(V.TicketInboxService))],pW);var mW=pW,hW=class{constructor(e,t,n){this.routerPermissionsService=e,this.settingsSectionRedirectResolver=t,this.reportingRedirectResolver=n}getContactsSectionRoutes(){return[{name:`contact`,route:{name:Pn.name}},{name:`list`,route:{name:Mn.name}},{name:`filteredView`,route:{name:Ma.name}},{name:`tag`,route:{name:`user.contacts.tags`}},{name:`import`,route:{name:ur.name}},{name:`unsubscriber`,route:{name:Or.name}},{name:`blockedContact`,route:{name:rr.name}}]}getScheduledSectionRoutes(){return[{name:`upcoming`,route:{name:Hn.upcoming}},{name:`paused`,route:{name:Hn.paused}},{name:`notSent`,route:{name:Hn.notSent}},{name:`completed`,route:{name:Hn.completed}},{name:`calendar`,route:{name:Hn.calendar}}]}getServicesSectionRoutes(){return[{name:`byoc`,route:{name:L.SmsVoiceByocIndex}}]}getReportSectionRoutes(){return this.reportingRedirectResolver.getReportSectionRoutes()}getRoutesMapStructure(){return{GettingStartedMenuItem:Oa,ComposeMainSidebarItem:`user.compose`,MessengerMainSidebarItem:Ar.root,ContactsMainSidebarItem:{routeName:`user.contacts`,childrenRoutesList:this.getContactsSectionRoutes(),navigateToParentRoute:!0},ScheduledMainSidebarItem:{routeName:Hn.scheduled,childrenRoutesList:this.getScheduledSectionRoutes()},TemplatesMainSidebarItem:wr.root,ReportingMainSidebarItem:{routeName:`user.reporting`,childrenRoutesList:this.getReportSectionRoutes()},SettingsMainSidebarItem:{routeName:`user.settings`,childrenRoutesList:this.settingsSectionRedirectResolver.getRoutesGroups().map(e=>e.links).flat().map(e=>({name:e.route.name,route:e.route}))}}}getMainRoutesMap(){let e=this.getRoutesMapStructure(),t={};for(let n in e){let r=n,i=e[r];t[r]=typeof i==`string`||Array.isArray(i)?i:i.routeName}return t}getRoutesMap(){let e=this.getRoutesMapStructure(),t={};for(let n in e){let r=n,i=e[r];if(typeof i==`string`)t[r]=i;else if(Array.isArray(i))t[r]=i.find(e=>this.routerPermissionsService.isAllowAccessToRoute({name:e}));else if(!i.childrenRoutesList||i.childrenRoutesList.length===0)t[r]=i.routeName;else{let e=i.childrenRoutesList.find(e=>this.routerPermissionsService.isAllowAccessToRoute(e.route));if(!e)continue;let n=e.route.name;if(typeof n!=`string`)throw new G(`firstAllowedChildrenRoute is typeof "${typeof n}", expected string`);t[r]=i.navigateToParentRoute?i.routeName:n}}return t}async resolve(){let e=Object.values(this.getRoutesMapStructure());await Promise.all(e.map(e=>{if(typeof e==`string`)return this.routerPermissionsService.resolveStrategiesForRoute(e);
51if(Array.isArray(e))return Promise.all(e.map(e=>this.routerPermissionsService.resolveStrategiesForRoute(e)));let t=[this.routerPermissionsService.resolveStrategiesForRoute(e.routeName)];return e.childrenRoutesList.forEach(e=>{t.push(this.routerPermissionsService.resolveStrategiesForRoute(e.route)),e.childrenRoutesList&&e.childrenRoutesList.forEach(e=>{t.push(this.routerPermissionsService.resolveStrategiesForRoute(e.route))})}),Promise.all(t)}))}};hW=U([g(),B(0,m(V.RouterPermissionsService)),B(1,m(V.SettingsSectionRedirectResolver)),B(2,m(V.ReportingRedirectResolver))],hW);var gW=hW;function _W(e){return function(t){let n=new WeakMap,r=t.prototype.getResolverKeys;t.prototype.getResolverKeys=function(e,t,i){let a=n.get(this);if(!a)throw new G(`resolverUid not found for instance`);return[a,...r.call(this,e,t,i)]};let i=new Proxy(t,{construct(t,i){let a=new t(...i);if(typeof r!=`function`)throw new G(`"withUniqueKeys" requires "getResolverKeys" method to be implemented`);return n.set(a,Symbol(e)),a},get(e,n){return n===`name`?t.name:n===`prototype`?t.prototype:e[n]}});return(Reflect.getMetadataKeys?.(t)||[]).forEach(e=>{let n=Reflect.getMetadata(e,t);Reflect.defineMetadata(e,n,i)}),(Reflect.getMetadataKeys?.(t.prototype)||[]).forEach(e=>{let n=Reflect.getMetadata(e,t.prototype);Reflect.defineMetadata(e,n,i.prototype)}),i}}var vW=class{constructor(e,t,n){this.userPresenceService=e,this.serverSubscriptionService=t,this.userService=n,this.eventHandler=this.userPresenceStatusChangedHandler.bind(this)}async resolve(){this.userPresenceService.fetchUserPresence(),this.serverSubscriptionService.subscribe(`userPresenceStatusChanged`,this.eventHandler)}async unresolve(){this.serverSubscriptionService.unsubscribe(`userPresenceStatusChanged`,this.eventHandler)}getResolverKeys(){return[]}userPresenceStatusChangedHandler(e){let t=String(e.payload.id),n=e.payload.presenceStatus;this.userService.updateItemIfExists({id:t,presenceStatus:n}),this.userService.isCurrentUser(t)&&this.userPresenceService.storeUserPresence(n)}};vW=U([_W(`UserPresenceResolver`),g(),B(0,m(V.UserPresenceService)),B(1,m(V.ServerSubscriptionService)),B(2,m(V.UserService))],vW);var yW=vW,bW=class extends pl{};U([ft()],bW.prototype,`failed`,void 0),U([ft()],bW.prototype,`accepted`,void 0),U([ft()],bW.prototype,`rejected`,void 0),U([ft()],bW.prototype,`delivered`,void 0),U([ft()],bW.prototype,`scheduled`,void 0),U([ft()],bW.prototype,`all`,void 0),U([ft()],bW.prototype,`sent`,void 0),bW=U([Be(md.SESSION_STAT)],bW);var xW=bW,SW=class extends Q{async getRequest(e){let t=await super.getRequest(e);return t.id=e,t}};SW=U([Y({model:xW,single:`sessionsIndexStat`}),g(),h()],SW);var CW=SW,wW=class extends qE{};wW=U([oD({model:xW}),g(),h()],wW);var TW=wW,EW=class extends qE{};EW=U([oD({model:ga}),g(),h()],EW);var DW=EW,OW=class{constructor(e){this.serverSubscriptionService=e}async resolve(){this.serverSubscriptionService.subscribe(`systemAccountAcceptTermsUpdate`,this.userPolicyPrivacyChangedHandler)}async userPolicyPrivacyChangedHandler(e){`showTermsUpdate`in e.payload&&(await xl().updateCurrentUserSettingsInStore({showTermsUpdate:e.payload.showTermsUpdate}),$l().isCurrentRoute({name:`privacyPolicy.base`})&&await Oc().redirectAfterSuccessLogin())}async unresolve(){this.serverSubscriptionService.unsubscribe(`systemAccountAcceptTermsUpdate`,this.userPolicyPrivacyChangedHandler)}};OW=U([g(),B(0,m(V.ServerSubscriptionService))],OW);var kW=OW,AW=class{constructor(e,t){this.routerService=e,this.teamWorkflowService=t}async resolve(){let e=this.routerService.getCurrentRoute();this.teamWorkflowService.mustAcceptTermsUpdate()&&!this.isAcceptPage(e)&&await this.routerService.replace({name:Ti})}isAcceptPage(e){return e.matched.some(e=>e.name===na)}};AW=U([g(),B(0,m(V.RouterService)),B(1,m(V.TeamWorkflowService))],AW);var jW=AW,MW=class extends pl{};U([y(null)],MW.prototype,`presenceStatus`,void 0),U([y(null)],MW.prototype,`showPresence`,void 0),MW=U([Be(md.USER_PRESENCE)],MW);var NW=MW,PW=function(e){return e.ONLINE=`online`,e.OFFLINE=`offline`,e}({}),FW=class extends Q{constructor(...e){super(...e),this.id=`1`}async fetchPresence(){let e=this.endpointsService.getPath(`currentUserPresence`),{data:t}=await this.getApiSource().get(e);return t?this.storePresence(t):null}async updatePresence(e){let t=this.endpointsService.getPath(`currentUserPresence`);return await this.getApiSource().post(t,e),this.storePresence(e)}
51storePresence(e){return this.insertOrUpdate([{...e,id:this.id}])}findPresence(){return this.findEntityByIdOrNull(this.id)}async setUserPresenceStatus(e,t){await this.getApiSource().post(this.endpointsService.getPath(`userPresence`,[e]),{presenceStatus:t})}};FW=U([Y({model:NW}),g(),h()],FW);var IW=FW,LW=class extends qE{constructor(e,t,n,r){super(e,t,n),this.entityManager=e,this.subscription=t,this.preloaderManager=n,this.translateService=r}getUserPresence(){return this.getDomainRepository().findPresence()}fetchUserPresence(){return this.getDomainRepository().fetchPresence()}async updateUserPresence(e){return this.getDomainRepository().updatePresence(e)}storeUserPresence(e){return this.getDomainRepository().storePresence({presenceStatus:e})}getPresenceStatusOptions(){return[{text:this.translateService.t(`userPresence.online`),value:PW.ONLINE},{text:this.translateService.t(`userPresence.offline`),value:PW.OFFLINE}]}async setUserPresenceStatus(e,t){await this.getDomainRepository().setUserPresenceStatus(e,t),this.notify([e],cl.UPDATE,Kn)}};LW=U([oD({model:NW}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager)),B(3,m(V.TranslateService))],LW);var RW=LW,zW=class{constructor(e,t){this.loggerService=e,this.modelSearcherServiceFactory=t,this.managerId=`ModelSearcherManager`,this.loggerChannel=`search`,this.services={}}addSearchFactory(e,t){return this.hasFactory(e)||(this.services[e]=this.modelSearcherServiceFactory(),this.services[e].setSettings(t),this.services[e].init({search:``}),this.loggerService.log(this.loggerChannel,`Added model search service ${e}`)),this.services[e]}getSearchFactory(e){if(!this.hasFactory(e))throw new G(`No model search service found with name "${e}"`);return this.services[e]}removeSearchFactory(e){this.hasFactory(e)&&(this.loggerService.log(this.loggerChannel,`Remove model search service ${e}`),delete this.services[e])}hasFactory(e){return!!this.services[e]}};zW=U([g(),B(0,m(V.LoggerService)),B(1,m(V.ModelSearcherServiceFactory))],zW);var BW=zW,VW=class{constructor(e,t){this.em=e,this.domainManagerService=t}setSettings(e){this.settings=e,this.defaultValue=e.defaultValue||``}init(e){this.key=`${this.settings.entity.entity}`;let t=this.getDomainServiceSearchable().getSearchSettings();this.getRepo().init(this.key,t.supportedSearchFields),this.getDomainServiceSearchable().setIsEmptyState(!1),e&&this.applyByParams(e)}apply(e,t){typeof e==`string`&&(this.getDomainServiceSearchable().search(e.trim(),t),this.getRepo().setValue(this.key,e.trim()))}applyByParams(e){this.apply(e.search)}reset(){this.apply(this.defaultValue)}getSearchFields(){return this.getRepo().getSearchFields(this.key)}getSearchQuery(){return this.getRepo().getValue(this.key,this.defaultValue)}isDefaultState(){return this.getSearchQuery()===this.defaultValue}isEmptyState(){return this.getDomainServiceSearchable().isEmptyState()&&!this.isDefaultState()}getRepo(){return this.em.getRepository(Df)}getDomainServiceSearchable(){return this.domainManagerService.getService(this.settings.entity)}};VW=U([g(),B(0,m(V.EntityManager)),B(1,m(V.DomainManagerService))],VW);var HW=VW,UW=class{constructor(e){this.translateService=e}hasReasonDescription(e){return!!{found_better_alternative:!0,has_issues_with_platform:!0,other:!0}[e.reason]}buildUserRefusalSurveyFields(e){e.property(e=>e.reason).control({fieldType:`select`,value:``,options:()=>{let{t:e}=this.translateService;return[{text:e(`cancelReasons.selectReason`),value:``},{text:e(`cancelReasons.notNeedService`),value:`not_need_service`},{text:e(`cancelReasons.hasIssuesWithPlatform`),value:`has_issues_with_platform`},{text:e(`cancelReasons.pricingTooHigh`),value:`pricing_too_high`},{text:e(`cancelReasons.foundBetterAlternative`),value:`found_better_alternative`},{text:e(`cancelReasons.other`),value:`other`}]}}),e.property(e=>e.description).control({fieldType:`textarea`,value:``})}getPayloadFromFormData(e){if(e.reason===``)throw new G(`is empty "reason"`);let t;return t=e.reason===`not_need_service`||e.reason===`pricing_too_high`?{reason:e.reason,description:null}:{reason:e.reason,description:e.description},t}};UW=U([g(),B(0,m(V.TranslateService))],UW);var WW=UW,GW=class{constructor(e){this.tableRepository=e}init(){}isExpanded(e){return this.tableRepository.findEntityByIdOrFail(e).isExpand}expandAllRows(e,t){this.tableRepository.update([{id:e,isExpand:t}])}};
51GW=U([g(),B(0,m(V.TableRepository))],GW);var KW=GW,qW=class{constructor(e){this.localStorageService=e}getLocalStorageKey(){return`expand-table-state:templatesTable`}serializeValue(e){return`${e}`}deserializeValue(e){return e===`true`||e!==`false`&&null}getValue(){let e=this.localStorageService.get(this.getLocalStorageKey());return e===null?null:this.deserializeValue(e)}setValue(e){this.localStorageService.set(this.getLocalStorageKey(),this.serializeValue(e))}async init(e){this.getValue()===null&&this.setValue(e===Wr.ST_TRIAL)}};qW=U([g(),B(0,m(V.LocalStorageService))],qW);var JW=qW,YW=class{constructor(e){this.validationRulesBuilderService=e}getContactTagsFieldBuilder(e,t){let n={messagePath:`bulkEditForm.tagsRequired`};return{build:r=>{switch(r){case t:e.group({name:r},``);break;case`${t}.detachAll`:e.getGroupModifier(t).addControl({name:`detachAll`,fieldType:`checkbox`,value:!0});break;case`${t}.detach`:e.getGroupModifier(t).addControl({name:`detach`,fieldType:`contactTags`,value:[],validators:this.validationRulesBuilderService.createRules().required(n)});break;case`${t}.attach`:e.getGroupModifier(t).addControl({name:`attach`,fieldType:`contactTags`,value:[],validators:this.validationRulesBuilderService.createRules().required(n)});break;case`${t}.replace`:e.getGroupModifier(t).addControl({name:`replace`,fieldType:`contactTags`,value:[],validators:this.validationRulesBuilderService.createRules().required(n)});break;default:throw new G(`There isn't nested tags field with the name ${r}`)}},transformToRequest:e=>{if(e.replace)return{detachAll:!0,attach:e.replace};if(e.attach)return{attach:e.attach};if(e.detach)return{detach:e.detach};if(e.detachAll)return{detachAll:!0};throw new G(`Contact tags value is empty`)}}}};YW=U([g(),B(0,m(V.ValidationRulesBuilderService))],YW);var XW=YW,ZW=class{constructor(){this.key=`tm::uid`}getUid(){let e=localStorage.getItem(this.key);return e||(e=hu(),localStorage.setItem(this.key,e),e)}};ZW=U([g()],ZW);var QW=ZW,$W=e=>{if(!e||typeof e!=`object`)return;let t;`gte`in e&&e.gte?t=`gte`:`gt`in e&&e.gt&&(t=`gt`);let n;`lte`in e&&e.lte?n=`lte`:`lt`in e&&e.lt&&(n=`lt`);let r=t?e[t]:void 0,i=n?e[n]:void 0;if(t||n){if(t&&r&&n&&i)return{startOperation:t,start:r,endOperation:n,end:i};if(t&&r)return{startOperation:t,start:r,endOperation:void 0,end:void 0};if(n&&i)return{startOperation:void 0,start:void 0,endOperation:n,end:i}}},eG=` - `,tG=class{constructor(e,t,n,r){this.dateTimeService=e,this.userService=t,this.translateService=n,this.relativeDateTimeService=r}mapDateFilter(e,t,n){let r=re(e),i=r[t].eq;if(!hj.includes(i))throw new G(`incorrect date filter type`);let a=()=>{let e=new Date;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))},o=e=>`-${e} days midnight`,s=e=>{let t=this.userService.currentUser([`timezone`]),n=this.dateTimeService.zonedTimeToUtc(e,t.timezone.timezone),r=t.displayTimeFormat===`24h`,i=this.dateTimeService.toDate(n);return this.dateTimeService.formatDateForTimezone(i,cc.ISO_FORMAT_WITH_TIMEZONE,void 0,!1,r,!1)};return{"Last 30 days":()=>{r[n]={gte:o(29)}},"Last 60 days":()=>{r[n]={gte:o(59)}},"Last week":()=>{let e=a(),t=this.dateTimeService.setDate(e,e.getDate()-7),i=this.dateTimeService.startOfWeek(e),o=this.dateTimeService.startOfWeek(t);r[n]={gte:s(o),lte:s(i)}},"Pick date range":()=>{let e=r.from?.eq;if(typeof e!=`string`)throw new G(`"from" should be type string`);let t=r.to?.eq;if(typeof t!=`string`)throw new G(`"to" should be type string`);r[n]={gte:s(this.dateTimeService.startOfDay(new Date(e))),lte:s(this.dateTimeService.endOfDay(new Date(t)))}},"Previous month":()=>{let e=this.dateTimeService.setDate(a(),0),t=this.dateTimeService.setDate(e,1);r[n]={gte:s(t),lte:s(e)}},"This month":()=>{r[n]={gte:s(this.dateTimeService.setDate(a(),1))}},"This week":()=>{r[n]={gte:s(this.dateTimeService.setDay(a(),1))}},Today:()=>{r[n]={gte:`today midnight`,lt:`tomorrow midnight`}},Yesterday:()=>{r[n]={gte:`yesterday midnight`,lt:`today midnight`}}}[i](),delete r[t],delete r.from,delete r.to,r}getLabel(e,t=cc.DATE_FORMAT_YEAR){switch(!0){case this.relativeDateTimeService.isRelativeDateForToday(e):return{main:this.translateService.t(`units.datetime.ranges.${ws.THIS_DAY}`)};case this.relativeDateTimeService.isRelativeDateForYesterday(e):return{main:this.translateService.t(`units.datetime.ranges.${ws.LAST_DAY}`)};case this.relativeDateTimeService.isRelativeDateForLast7Days(e):return{main:this.translateService.t(`units.datetime.ranges.${ws.LAST_7_DAYS}`)};case this.relativeDateTimeService.isRelativeDateForLast30Days(e):return{main:this.translateService.t(`units.datetime.ranges.${ws.LAST_30_DAYS}`)};case this.relativeDateTimeService.isRelativeDateForEver(e):return{main:this.translateService.t(`units.datetime.ranges.${ws.EVER}`)};case this.relativeDateTimeService.isRelativeDateForNoDate(e):return{main:this.translateService.t(`units.datetime.ranges.${ws.NEVER}`)};
51case this.relativeDateTimeService.isRelativeDateForLastPeriod(e):{let t=this.relativeDateTimeService.getPeriodFormRelativeDateForLastPeriod(e);return{main:this.translateService.tc(`units.datetime.period.${t.period}`,t.count),op:this.translateService.t(`filters.datetime.rangeLast`)}}case this.relativeDateTimeService.isRelativeDateForNotLastPeriod(e):{let t=this.relativeDateTimeService.getPeriodFormRelativeDateForNotLastPeriod(e);return{main:this.translateService.tc(`units.datetime.period.${t.period}`,t.count),op:this.translateService.t(`filters.datetime.rangeNotLast`)}}case tE(e):{let n=this.relativeDateTimeService.isValidDate(e?.start)?this.utcToUserTimezone(this.dateTimeService.toDate(e.start)):null,r=n?this.dateTimeService.format(n,t,!1):void 0,i=this.relativeDateTimeService.isValidDate(e?.end)?this.utcToUserTimezone(this.dateTimeService.toDate(e.end)):null,a=i?this.dateTimeService.format(i,t,!1):void 0;return n&&i?this.dateTimeService.isSameDay(n,i)?{main:`${r}`}:{main:`${r}${eG}${a}`}:n?{main:`${r}`,op:this.translateService.t(`filters.datetime.rangeFrom`)}:{main:`${a}`,op:this.translateService.t(`filters.datetime.rangeTo`)}}default:return{main:this.translateService.t(`common.all`)}}}toFormattedText(e){let t=$W(e);if(!t)return[];let{main:n,op:r}=this.getLabel(t);return[{type:`badge`,value:r?`${Ie(r)} ${n}`:n}]}utcToUserTimezone(e){let{timezone:t}=this.userService.currentUser([`timezone`]);return this.dateTimeService.utcToZonedTime(e?new Date(e).toISOString():new Date().toISOString(),t.timezone)}};tG=U([g(),B(0,m(V.DateTimeService)),B(1,m(V.UserService)),B(2,m(V.TranslateService)),B(3,m(V.RelativeDateTimeService))],tG);var nG=tG,rG=class extends qE{};rG=U([oD({model:Er}),g(),h()],rG);var iG=rG,aG=class extends Q{};aG=U([Y({model:Er}),g(),h()],aG);var oG=aG,sG=class{constructor(e){this.dateTimeService=e}getMessageSendRepeatInitFormData(){return{type:`none`,end:{type:`never`,smsSessions:1,date:this.dateTimeService.formatDate(this.dateTimeService.addDays(this.dateTimeService.n
51ow(),1),`yyyy-MM-dd`)},hourly:{count:1},daily:{count:1},weekly:{count:1,days:[]},monthly:{count:1,repeat:`month-day`,monthDay:`1`,firstLastDay:`First`,weekDay:`Sunday`},yearly:{count:1,type:`year-day`,month:`January`,monthDay:`1`,firstLastDay:`First`,weekDay:`Sunday`,dayOfMonth:`January`}}}};sG=U([g(),B(0,m(V.DateTimeService))],sG);var cG=sG,lG=[`MO`,`TU`,`WE`,`TH`,`FR`,`SA`,`SU`],uG=function(){function e(e,t){if(t===0)throw Error(`Can't create weekday with n == 0`);this.weekday=e,this.n=t}return e.fromStr=function(t){return new e(lG.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},e.prototype.toString=function(){var e=lG[this.weekday];return this.n&&(e=(this.n>0?`+`:``)+String(this.n)+e),e},e.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},e}(),dG=function(e){return e!=null},fG=function(e){return typeof e==`number`},pG=function(e){return typeof e==`string`&&lG.includes(e)},mG=Array.isArray,hG=function(e,t){t===void 0&&(t=e),arguments.length===1&&(t=e,e=0);for(var n=[],r=e;r<t;r++)n.push(r);return n},gG=function(e,t){var n=0,r=[];if(mG(e))for(;n<t;n++)r[n]=[].concat(e);else for(;n<t;n++)r[n]=e;return r},_G=function(e){return mG(e)?e:[e]};function vG(e,t,n){n===void 0&&(n=` `);var r=String(e);return t>>=0,r.length>t?String(r):(t-=r.length,t>n.length&&(n+=gG(n,t/n.length)),n.slice(0,t)+String(r))}var yG=function(e,t,n){var r=e.split(t);return n?r.slice(0,n).concat([r.slice(n).join(t)]):r},bG=function(e,t){var n=e%t;return n*t<0?n+t:n},xG=function(e,t){return{div:Math.floor(e/t),mod:bG(e,t)}},SG=function(e){return!dG(e)||e.length===0},CG=function(e){return!SG(e)},wG=function(e,t){return CG(e)&&e.indexOf(t)!==-1},TG=function(e,t,n,r,i,a){return r===void 0&&(r=0),i===void 0&&(i=0),a===void 0&&(a=0),new Date(Date.UTC(e,t-1,n,r,i,a))},EG=[31,28,31,30,31,30,31,31,30,31,30,31],DG=864e5,OG=TG(1970,1,1),kG=[6,0,1,2,3,4,5],AG=function(e){return e%4==0&&e%100!=0||e%400==0},jG=function(e){return e instanceof Date},MG=function(e){return jG(e)&&!isNaN(e.getTime())},NG=function(e){return e.getTimezoneOffset()*60*1e3},PG=function(e,t){var n=e.getTime()-NG(e)-(t.getTime()-NG(t));return Math.round(n/DG)},FG=function(e){return PG(e,OG)},IG=function(e){return new Date(OG.getTime()+e*DG)},LG=function(e){var t=e.getUTCMonth();return t===1&&AG(e.getUTCFullYear())?29:EG[t]},RG=function(e){return kG[e.getUTCDay()]},zG=function(e,t){var n=TG(e,t+1,1);return[RG(n),LG(n)]},BG=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},VG=function(e){return new Date(e.getTime())},HG=function(e){for(var t=[],n=0;n<e.length;n++)t.push(VG(e[n]));return t},UG=function(e){e.sort(function(e,t){return e.getTime()-t.getTime()})},WG=function(e,t){t===void 0&&(t=!0);var n=new Date(e);return[vG(n.getUTCFullYear().toString(),4,`0`),vG(n.getUTCMonth()+1,2,`0`),vG(n.getUTCDate(),2,`0`),`T`,vG(n.getUTCHours(),2,`0`),vG(n.getUTCMinutes(),2,`0`),vG(n.getUTCSeconds(),2,`0`),t?`Z`:``].join(``)},GG=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(e);if(!t)throw Error(`Invalid UNTIL value: ${e}`);return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},KG=function(e,t){return e.toLocaleString(`sv-SE`,{timeZone:t}).replace(` `,`T`)+`Z`},qG=function(e,t){var n=Intl.DateTimeFormat().resolvedOptions().timeZone,r=new Date(KG(e,n)),i=new Date(KG(e,t??`UTC`)).getTime()-r.getTime();return new Date(e.getTime()-i)},JG=function(){function e(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,e===`between`?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):e===`before`?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):e===`after`&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return e.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if(this.method===`between`){if(t)return!0;
51if(n)return!1}else if(this.method===`before`){if(n)return!1}else if(this.method===`after`)return t?!0:(this.add(e),!1);return this.add(e)},e.prototype.add=function(e){return this._result.push(e),!0},e.prototype.getValue=function(){var e=this._result;switch(this.method){case`all`:case`between`:return e;default:return e.length?e[e.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),YG=function(e){Ze(t,e);function t(t,n,r){var i=e.call(this,t,n)||this;return i.iterator=r,i}return t.prototype.add=function(e){return this.iterator(e,this._result.length)?(this._result.push(e),!0):!1},t}(JG),XG={dayNames:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],monthNames:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},ZG=function(e,t){return e.indexOf(t)!==-1},QG=function(e){return e.toString()},$G=function(e,t,n){return`${t} ${n}, ${e}`},eK=function(){function e(e,t,n,r){if(t===void 0&&(t=QG),n===void 0&&(n=XG),r===void 0&&(r=$G),this.text=[],this.language=n||XG,this.gettext=t,this.dateFormatter=r,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var i=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);i.sort(function(e,t){return e-t}),a.sort(function(e,t){return t-e}),this.bymonthday=i.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(dG(this.origOptions.byweekday)){var o=mG(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],s=String(o);this.byweekday={allWeeks:o.filter(function(e){return!e.n}),someWeeks:o.filter(function(e){return!!e.n}),isWeekdays:s.indexOf(`MO`)!==-1&&s.indexOf(`TU`)!==-1&&s.indexOf(`WE`)!==-1&&s.indexOf(`TH`)!==-1&&s.indexOf(`FR`)!==-1&&s.indexOf(`SA`)===-1&&s.indexOf(`SU`)===-1,isEveryDay:s.indexOf(`MO`)!==-1&&s.indexOf(`TU`)!==-1&&s.indexOf(`WE`)!==-1&&s.indexOf(`TH`)!==-1&&s.indexOf(`FR`)!==-1&&s.indexOf(`SA`)!==-1&&s.indexOf(`SU`)!==-1};var c=function(e,t){return e.weekday-t.weekday};this.byweekday.allWeeks.sort(c),this.byweekday.someWeeks.sort(c),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){var n=!0;if(!(t.options.freq in e.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var r in t.origOptions){if(ZG([`dtstart`,`wkst`,`freq`],r))return!0;
51if(!ZG(e.IMPLEMENTED[t.options.freq],r))return!1}return n},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t(`RRule error: Unable to fully convert this rrule to text`);if(this.text=[t(`every`)],this[iq.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t(`until`));var n=this.options.until;this.add(this.dateFormatter(n.getUTCFullYear(),this.language.monthNames[n.getUTCMonth()],n.getUTCDate()))}else this.options.count&&this.add(t(`for`)).add(this.options.count.toString()).add(this.plural(this.options.count)?t(`times`):t(`time`));return this.isFullyConvertible()||this.add(t(`(~ approximate)`)),this.text.join(``)},e.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e(`hours`):e(`hour`))},e.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e(`minutes`):e(`minute`))},e.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e(`weekdays`):e(`weekday`)):this.add(this.plural(this.options.interval)?e(`days`):e(`day`)),this.origOptions.bymonth&&(this.add(e(`in`)),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e(`weeks`):e(`week`)),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e(`weekdays`):e(`weekday`)):this.add(e(`on`)).add(e(`weekdays`)):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e(`days`):e(`day`)):(this.options.interval===1&&this.add(e(`week`)),this.origOptions.bymonth&&(this.add(e(`in`)),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},e.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e(`months`)),this.plural(this.options.interval)&&this.add(e(`in`))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e(`months`):e(`month`))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e(`on`)).add(e(`weekdays`)):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e(`years`))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e(`years`):e(`year`))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e(`on the`)).add(this.list(this.options.byyearday,this.nth,e(`and`))).add(e(`day`)),this.options.byweekno&&this.add(e(`in`)).add(this.plural(this.options.byweekno.length)?e(`weeks`):e(`week`)).add(this.list(this.options.byweekno,void 0,e(`and`)))},e.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e(`on`)).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e(`or`))).add(e(`the`)).add(this.list(this.bymonthday,this.nth,e(`or`))):this.add(e(`on the`)).add(this.list(this.bymonthday,this.nth,e(`and`)))},e.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e(`on`)).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e(`and`)),this.add(e(`on the`)).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e(`and`))))},e.prototype._byhour=function(){var e=this.gettext;this.add(e(`at`)).add(this.list(this.origOptions.byhour,void 0,e(`and`)))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext(`and`)))},e.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n(`last`);var r=Math.abs(e);switch(r){case 1:case 21:case 31:t=r+n(`st`);break;
51case 2:case 22:t=r+n(`nd`);break;case 3:case 23:t=r+n(`rd`);break;default:t=r+n(`th`)}return e<0?t+` `+n(`last`):t},e.prototype.monthtext=function(e){return this.language.monthNames[e-1]},e.prototype.weekdaytext=function(e){var t=fG(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+` `:``)+this.language.dayNames[t]},e.prototype.plural=function(e){return e%100!=1},e.prototype.add=function(e){return this.text.push(` `),this.text.push(e),this},e.prototype.list=function(e,t,n,r){var i=this;r===void 0&&(r=`,`),mG(e)||(e=[e]);var a=function(e,t,n){for(var r=``,i=0;i<e.length;i++)i!==0&&(i===e.length-1?r+=` `+n+` `:r+=t+` `),r+=e[i];return r};t=t||function(e){return e.toString()};var o=function(e){return t&&t.call(i,e)};return n?a(e.map(o),r,n):e.map(o).join(r+` `)},e}(),tK=function(){function e(e){this.done=!0,this.rules=e}return e.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&this.symbol===null},e.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;for(var r in e=null,this.rules){n=this.rules[r];var i=n.exec(this.text);i&&(e===null||i[0].length>e[0].length)&&(e=i,t=r)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===``&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t===`SKIP`);return this.symbol=t,this.value=e,!0},e.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept(`number`)},e.prototype.expect=function(e){if(this.accept(e))return!0;throw Error(`expected `+e+` but found `+this.symbol)},e}();function nK(e,t){t===void 0&&(t=XG);var n={},r=new tK(t.tokens);return r.start(e)?(i(),n):null;function i(){r.expect(`every`);var e=r.acceptNumber();if(e&&(n.interval=parseInt(e[0],10)),r.isDone())throw Error(`Unexpected end`);switch(r.symbol){case`day(s)`:n.freq=iq.DAILY,r.nextSymbol()&&(o(),d());break;case`weekday(s)`:n.freq=iq.WEEKLY,n.byweekday=[iq.MO,iq.TU,iq.WE,iq.TH,iq.FR],r.nextSymbol(),d();break;case`week(s)`:n.freq=iq.WEEKLY,r.nextSymbol()&&(a(),d());break;case`hour(s)`:n.freq=iq.HOURLY,r.nextSymbol()&&(a(),d());break;case`minute(s)`:n.freq=iq.MINUTELY,r.nextSymbol()&&(a(),d());break;case`month(s)`:n.freq=iq.MONTHLY,r.nextSymbol()&&(a(),d());break;case`year(s)`:n.freq=iq.YEARLY,r.nextSymbol()&&(a(),d());break;case`monday`:case`tuesday`:case`wednesday`:case`thursday`:case`friday`:case`saturday`:case`sunday`:if(n.freq=iq.WEEKLY,n.byweekday=[iq[r.symbol.substr(0,2).toUpperCase()]],!r.nextSymbol())return;for(;r.accept(`comma`);){if(r.isDone())throw Error(`Unexpected end`);var t=c();if(!t)throw Error(`Unexpected symbol `+r.symbol+`, expected weekday`);n.byweekday.push(iq[t]),r.nextSymbol()}u(),d();break;case`january`:case`february`:case`march`:case`april`:case`may`:case`june`:case`july`:case`august`:case`september`:case`october`:case`november`:case`december`:if(n.freq=iq.YEARLY,n.bymonth=[s()],!r.nextSymbol())return;for(;r.accept(`comma`);){if(r.isDone())throw Error(`Unexpected end`);var i=s();if(!i)throw Error(`Unexpected symbol `+r.symbol+`, expected month`);n.bymonth.push(i),r.nextSymbol()}a(),d();break;default:throw Error(`Unknown symbol`)}}function a(){var e=r.accept(`on`),t=r.accept(`the`);if(e||t)do{var i=l(),a=c(),o=s();if(i)a?(r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(iq[a].nth(i))):(n.bymonthday||(n.bymonthday=[]),n.bymonthday.push(i),r.accept(`day(s)`));else if(a)r.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(iq[a]);else if(r.symbol===`weekday(s)`)r.nextSymbol(),n.byweekday||(n.byweekday=[iq.MO,iq.TU,iq.WE,iq.TH,iq.FR]);else if(r.symbol===`week(s)`){r.nextSymbol();var u=r.acceptNumber();if(!u)throw Error(`Unexpected symbol `+r.symbol+`, expected week number`);for(n.byweekno=[parseInt(u[0],10)];r.accept(`comma`);){if(u=r.acceptNumber(),!u)throw Error(`Unexpected symbol `+r.symbol+`; expected monthday`);n.byweekno.push(parseInt(u[0],10))}}else if(o)r.nextSymbol(),n.bymonth||(n.bymonth=[]),n.bymonth.push(o);else return}while(r.accept(`comma`)||r.accept(`the`)||r.accept(`on`))}function o(){if(r.accept(`at`))do{var e=r.acceptNumber();if(!e)throw Error(`Unexpected symbol `+r.symbol+`, expected hour`);for(n.byhour=[parseInt(e[0],10)];r.accept(`comma`);){if(e=r.acceptNumber(),!e)throw Error(`Unexpected symbol `+r.symbol+`; expected hour`);n.byhour.push(parseInt(e[0],10))}}while(r.accept(`comma`)||r.accept(`at`))}function s(){switch(r.symbol){case`january`:return 1;case`february`:return 2;case`march`:return 3;case`april`:return 4;case`may`:return 5;case`june`:return 6;case`july`:return 7;case`august`:return 8;case`september`:return 9;
51case`october`:return 10;case`november`:return 11;case`december`:return 12;default:return!1}}function c(){switch(r.symbol){case`monday`:case`tuesday`:case`wednesday`:case`thursday`:case`friday`:case`saturday`:case`sunday`:return r.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(r.symbol){case`last`:return r.nextSymbol(),-1;case`first`:return r.nextSymbol(),1;case`second`:return r.nextSymbol(),r.accept(`last`)?-2:2;case`third`:return r.nextSymbol(),r.accept(`last`)?-3:3;case`nth`:var e=parseInt(r.value[1],10);if(e<-366||e>366)throw Error(`Nth out of range: `+e);return r.nextSymbol(),r.accept(`last`)?-e:e;default:return!1}}function u(){r.accept(`on`),r.accept(`the`);var e=l();if(e)for(n.bymonthday=[e],r.nextSymbol();r.accept(`comma`);){if(e=l(),!e)throw Error(`Unexpected symbol `+r.symbol+`; expected monthday`);n.bymonthday.push(e),r.nextSymbol()}}function d(){if(r.symbol===`until`){var e=Date.parse(r.text);if(!e)throw Error(`Cannot parse until date:`+r.text);n.until=new Date(e)}else r.accept(`for`)&&(n.count=parseInt(r.value[0],10),r.expect(`number`))}}var rK;(function(e){e[e.YEARLY=0]=`YEARLY`,e[e.MONTHLY=1]=`MONTHLY`,e[e.WEEKLY=2]=`WEEKLY`,e[e.DAILY=3]=`DAILY`,e[e.HOURLY=4]=`HOURLY`,e[e.MINUTELY=5]=`MINUTELY`,e[e.SECONDLY=6]=`SECONDLY`})(rK||(rK={}));function iK(e){return e<rK.HOURLY}var aK=function(e,t){return t===void 0&&(t=XG),new iq(nK(e,t)||void 0)},oK=[`count`,`until`,`interval`,`byweekday`,`bymonthday`,`bymonth`];eK.IMPLEMENTED=[],eK.IMPLEMENTED[rK.HOURLY]=oK,eK.IMPLEMENTED[rK.MINUTELY]=oK,eK.IMPLEMENTED[rK.DAILY]=[`byhour`].concat(oK),eK.IMPLEMENTED[rK.WEEKLY]=oK,eK.IMPLEMENTED[rK.MONTHLY]=oK,eK.IMPLEMENTED[rK.YEARLY]=[`byweekno`,`byyearday`].concat(oK);var sK=function(e,t,n,r){return new eK(e,t,n,r).toString()},cK=eK.isFullyConvertible,lK=function(){function e(e,t,n,r){this.hour=e,this.minute=t,this.second=n,this.millisecond=r||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},e}(),uK=function(e){Ze(t,e);function t(t,n,r,i,a,o,s){var c=e.call(this,i,a,o,s)||this;return c.year=t,c.month=n,c.day=r,c}return t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return RG(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var t=Math.floor(this.month/12),n=bG(this.month,12);this.month=n,this.year+=t,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,t){t>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-t))+e*7:this.day+=-(this.getWeekday()-t)+e*7,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,t,n){for(t&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var r=xG(this.hour,24),i=r.div,a=r.mod;if(i&&(this.hour=a,this.addDaily(i)),SG(n)||wG(n,this.hour))break}},t.prototype.addMinutes=function(e,t,n,r){for(t&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/e)*e);;){this.minute+=e;var i=xG(this.minute,60),a=i.div,o=i.mod;if(a&&(this.minute=o,this.addHours(a,!1,n)),(SG(n)||wG(n,this.hour))&&(SG(r)||wG(r,this.minute)))break}},t.prototype.addSeconds=function(e,t,n,r,i){for(t&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/e)*e);;){this.second+=e;var a=xG(this.second,60),o=a.div,s=a.mod;if(o&&(this.second=s,this.addMinutes(o,!1,n,r)),(SG(n)||wG(n,this.hour))&&(SG(r)||wG(r,this.minute))&&(SG(i)||wG(i,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=zG(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,this.month===13&&(this.month=1,++this.year,this.year>9999))return;e=zG(this.year,this.month-1)[1]}}},t.prototype.add=function(e,t){var n=e.freq,r=e.interval,i=e.wkst,a=e.byhour,o=e.byminute,s=e.bysecond;switch(n){case rK.YEARLY:return this.addYears(r);case rK.MONTHLY:return this.addMonths(r);case rK.WEEKLY:return this.addWeekly(r,i);case rK.DAILY:return this.addDaily(r);case rK.HOURLY:return this.addHours(r,t,a);case rK.MINUTELY:return this.addMinutes(r,t,a,o);case rK.SECONDLY:return this.addSeconds(r,t,a,o,s)}},t}(lK);function dK(e){for(var t=[],n=Object.keys(e),r=0,i=n;r<i.length;r++){var a=i[r];
51wG(rq,a)||t.push(a),jG(e[a])&&!MG(e[a])&&t.push(a)}if(t.length)throw Error(`Invalid options: `+t.join(`, `));return ot({},e)}function fK(e){var t=ot(ot({},nq),dK(e));if(dG(t.byeaster)&&(t.freq=iq.YEARLY),!(dG(t.freq)&&iq.FREQUENCIES[t.freq]))throw Error(`Invalid frequency: ${t.freq} ${e.freq}`);if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),dG(t.wkst)?fG(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=iq.MO.weekday,dG(t.bysetpos)){fG(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var n=0;n<t.bysetpos.length;n++){var r=t.bysetpos[n];if(r===0||!(r>=-366&&r<=366))throw Error(`bysetpos must be between 1 and 366, or between -366 and -1`)}}if(!(t.byweekno||CG(t.byweekno)||CG(t.byyearday)||t.bymonthday||CG(t.bymonthday)||dG(t.byweekday)||dG(t.byeaster)))switch(t.freq){case iq.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case iq.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case iq.WEEKLY:t.byweekday=[RG(t.dtstart)]}if(dG(t.bymonth)&&!mG(t.bymonth)&&(t.bymonth=[t.bymonth]),dG(t.byyearday)&&!mG(t.byyearday)&&fG(t.byyearday)&&(t.byyearday=[t.byyearday]),!dG(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(mG(t.bymonthday)){for(var i=[],a=[],n=0;n<t.bymonthday.length;n++){var r=t.bymonthday[n];r>0?i.push(r):r<0&&a.push(r)}t.bymonthday=i,t.bynmonthday=a}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(dG(t.byweekno)&&!mG(t.byweekno)&&(t.byweekno=[t.byweekno]),!dG(t.byweekday))t.bynweekday=null;else if(fG(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(pG(t.byweekday))t.byweekday=[uG.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof uG)!t.byweekday.n||t.freq>iq.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var o=[],s=[],n=0;n<t.byweekday.length;n++){var c=t.byweekday[n];if(fG(c)){o.push(c);continue}if(pG(c)){o.push(uG.fromStr(c).weekday);continue}!c.n||t.freq>iq.MONTHLY?o.push(c.weekday):s.push([c.weekday,c.n])}t.byweekday=CG(o)?o:null,t.bynweekday=CG(s)?s:null}return dG(t.byhour)?fG(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<iq.HOURLY?[t.dtstart.getUTCHours()]:null,dG(t.byminute)?fG(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<iq.MINUTELY?[t.dtstart.getUTCMinutes()]:null,dG(t.bysecond)?fG(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<iq.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function pK(e){var t=e.dtstart.getTime()%1e3;if(!iK(e.freq))return[];var n=[];return e.byhour.forEach(function(r){e.byminute.forEach(function(i){e.bysecond.forEach(function(e){n.push(new lK(r,i,e,t))})})}),n}function mK(e){var t=e.split(` 52`).map(gK).filter(function(e){return e!==null});return ot(ot({},t[0]),t[1])}function hK(e){var t={},n=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!n)return t;var r=n[1],i=n[2];return r&&(t.tzid=r),t.dtstart=GG(i),t}function gK(e){if(e=e.replace(/^\s+|\s+$/,``),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return _K(e);var n=t[1];switch(n.toUpperCase()){case`RRULE`:case`EXRULE`:return _K(e);case`DTSTART`:return hK(e);default:throw Error(`Unsupported RFC prop ${n} in ${e}`)}}function _K(e){var t=hK(e.replace(/^RRULE:/i,``));return e.replace(/^(?:RRULE|EXRULE):/i,``).split(`;`).forEach(function(n){var r=n.split(`=`),i=r[0],a=r[1];switch(i.toUpperCase()){case`FREQ`:t.freq=rK[a.toUpperCase()];break;case`WKST`:t.wkst=tq[a.toUpperCase()];break;case`COUNT`:case`INTERVAL`:case`BYSETPOS`:case`BYMONTH`:case`BYMONTHDAY`:case`BYYEARDAY`:case`BYWEEKNO`:case`BYHOUR`:case`BYMINUTE`:case`BYSECOND`:var o=vK(a),s=i.toLowerCase();t[s]=o;break;case`BYWEEKDAY`:case`BYDAY`:t.byweekday=bK(a);break;case`DTSTART`:case`TZID`:var c=hK(e);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case`UNTIL`:t.until=GG(a);break;case`BYEASTER`:t.byeaster=Number(a);break;default:throw Error(`Unknown RRULE property '`+i+`'`)}}),t}function vK(e){return e.indexOf(`,`)===-1?yK(e):e.split(`,`).map(yK)}function yK(e){return/^[+-]?\d+$/.test(e)?Number(e):e}function bK(e){return e.split(`,`).map(function(e){if(e.length===2)return tq[e];var t=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!t||t.length<3)throw SyntaxError(`Invalid weekday string: ${e}`);var n=Number(t[1]),r=tq[t[2]].weekday;return new uG(r,n)})}var xK=function(){function e(e,t){if(isNaN(e.getTime()))throw RangeError(`Invalid date passed to DateWithZone`);this.date=e,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()===`UTC`}
52,enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=WG(this.date.getTime(),this.isUTC);return this.isUTC?`:${e}`:`;TZID=${this.tzid}:${e}`},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:qG(this.date,this.tzid)},e}();function SK(e){for(var t=[],n=``,r=Object.keys(e),i=Object.keys(nq),a=0;a<r.length;a++)if(r[a]!==`tzid`&&wG(i,r[a])){var o=r[a].toUpperCase(),s=e[r[a]],c=``;if(!(!dG(s)||mG(s)&&!s.length)){switch(o){case`FREQ`:c=iq.FREQUENCIES[e.freq];break;case`WKST`:c=fG(s)?new uG(s).toString():s.toString();break;case`BYWEEKDAY`:o=`BYDAY`,c=_G(s).map(function(e){return e instanceof uG?e:mG(e)?new uG(e[0],e[1]):new uG(e)}).toString();break;case`DTSTART`:n=CK(s,e.tzid);break;case`UNTIL`:c=WG(s,!e.tzid);break;default:if(mG(s)){for(var l=[],u=0;u<s.length;u++)l[u]=String(s[u]);c=l.toString()}else c=String(s)}c&&t.push([o,c])}}var d=t.map(function(e){return`${e[0]}=${e[1].toString()}`}).join(`;`),f=``;return d!==``&&(f=`RRULE:${d}`),[n,f].filter(function(e){return!!e}).join(` 53`)}function CK(e,t){return e?`DTSTART`+new xK(new Date(e),t).toString():``}function wK(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(e,n){return e.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var TK=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?VG(t):HG(t)),e===`all`?this.all=t:(n._value=t,this[e].push(n))},e.prototype._cacheGet=function(e,t){var n=!1,r=t?Object.keys(t):[],i=function(e){for(var n=0;n<r.length;n++){var i=r[n];if(!wK(t[i],e[i]))return!0}return!1},a=this[e];if(e===`all`)n=this.all;else if(mG(a))for(var o=0;o<a.length;o++){var s=a[o];if(!(r.length&&i(s))){n=s._value;break}}if(!n&&this.all){for(var c=new JG(e,t),o=0;o<this.all.length&&c.accept(this.all[o]);o++);n=c.getValue(),this._cacheAdd(e,n,t)}return mG(n)?HG(n):n instanceof Date?VG(n):n},e}(),EK=_(_(_(_(_(_(_(_(_(_(_(_(_([],gG(1,31),!0),gG(2,28),!0),gG(3,31),!0),gG(4,30),!0),gG(5,31),!0),gG(6,30),!0),gG(7,31),!0),gG(8,31),!0),gG(9,30),!0),gG(10,31),!0),gG(11,30),!0),gG(12,31),!0),gG(1,7),!0),DK=_(_(_(_(_(_(_(_(_(_(_(_(_([],gG(1,31),!0),gG(2,29),!0),gG(3,31),!0),gG(4,30),!0),gG(5,31),!0),gG(6,30),!0),gG(7,31),!0),gG(8,31),!0),gG(9,30),!0),gG(10,31),!0),gG(11,30),!0),gG(12,31),!0),gG(1,7),!0),OK=hG(1,29),kK=hG(1,30),AK=hG(1,31),jK=hG(1,32),MK=_(_(_(_(_(_(_(_(_(_(_(_(_([],jK,!0),kK,!0),jK,!0),AK,!0),jK,!0),AK,!0),jK,!0),jK,!0),AK,!0),jK,!0),AK,!0),jK,!0),jK.slice(0,7),!0),NK=_(_(_(_(_(_(_(_(_(_(_(_(_([],jK,!0),OK,!0),jK,!0),AK,!0),jK,!0),AK,!0),jK,!0),jK,!0),AK,!0),jK,!0),AK,!0),jK,!0),jK.slice(0,7),!0),PK=hG(-28,0),FK=hG(-29,0),IK=hG(-30,0),LK=hG(-31,0),RK=_(_(_(_(_(_(_(_(_(_(_(_(_([],LK,!0),FK,!0),LK,!0),IK,!0),LK,!0),IK,!0),LK,!0),LK,!0),IK,!0),LK,!0),IK,!0),LK,!0),LK.slice(0,7),!0),zK=_(_(_(_(_(_(_(_(_(_(_(_(_([],LK,!0),PK,!0),LK,!0),IK,!0),LK,!0),IK,!0),LK,!0),LK,!0),IK,!0),LK,!0),IK,!0),LK,!0),LK.slice(0,7),!0),BK=[0,31,60,91,121,152,182,213,244,274,305,335,366],VK=[0,31,59,90,120,151,181,212,243,273,304,334,365],HK=(function(){for(var e=[],t=0;t<55;t++)e=e.concat(hG(7));return e})();function UK(e,t){var n=TG(e,1,1),r=AG(e)?366:365,i=AG(e+1)?366:365,a=FG(n),o=RG(n),s=ot(ot({yearlen:r,nextyearlen:i,yearordinal:a,yearweekday:o},WK(e)),{wnomask:null});if(SG(t.byweekno))return s;s.wnomask=gG(0,r+7);var c,l,u=c=bG(7-o+t.wkst,7);u>=4?(u=0,l=s.yearlen+bG(o-t.wkst,7)):l=r-u;for(var d=Math.floor(l/7),f=bG(l,7),p=Math.floor(d+f/4),ee=0;ee<t.byweekno.length;ee++){var te=t.byweekno[ee];if(te<0&&(te+=p+1),te>0&&te<=p){var ne=void 0;te>1?(ne=u+(te-1)*7,u!==c&&(ne-=7-c)):ne=u;for(var re=0;re<7&&(s.wnomask[ne]=1,ne++,s.wdaymask[ne]!==t.wkst);re++);}}if(wG(t.byweekno,1)){var ne=u+p*7;if(u!==c&&(ne-=7-c),ne<r)for(var ee=0;ee<7&&(s.wnomask[ne]=1,ne+=1,s.wdaymask[ne]!==t.wkst);ee++);}if(u){var ie=void 0;if(wG(t.byweekno,-1))ie=-1;else{var ae=RG(TG(e-1,1,1)),oe=bG(7-ae.valueOf()+t.wkst,7),se=AG(e-1)?366:365,ce=void 0;oe>=4?(oe=0,ce=se+bG(ae-t.wkst,7)):ce=r-u,ie=Math.floor(52+bG(ce,7)/4)}if(wG(t.byweekno,ie))for(var ne=0;ne<u;ne++)s.wnomask[ne]=1}return s}function WK(e){var t=AG(e)?366:365,n=RG(TG(e,1,1));return t===365?{mmask:EK,mdaymask:NK,nmdaymask:zK,wdaymask:HK.slice(n),mrange:VK}:{mmask:DK,mdaymask:MK,nmdaymask:RK,wdaymask:HK.slice(n),mrange:BK}}function GK(e,t,n,r,i,a){var o={lastyear:e,lastmonth:t,nwdaymask:[]},s=[];if(a.freq===iq.YEARLY){if(SG(a.bymonth))s=[[0,n]];else for(var c=0;c<a.bymonth.length;
53c++)t=a.bymonth[c],s.push(r.slice(t-1,t+1))}else a.freq===iq.MONTHLY&&(s=[r.slice(t-1,t+1)]);if(SG(s))return o;o.nwdaymask=gG(0,n);for(var c=0;c<s.length;c++)for(var l=s[c],u=l[0],d=l[1]-1,f=0;f<a.bynweekday.length;f++){var p=void 0,ee=a.bynweekday[f],te=ee[0],ne=ee[1];ne<0?(p=d+(ne+1)*7,p-=bG(i[p]-te,7)):(p=u+(ne-1)*7,p+=bG(7-i[p]+te,7)),u<=p&&p<=d&&(o.nwdaymask[p]=1)}return o}function KK(e,t){t===void 0&&(t=0);var n=e%19,r=Math.floor(e/100),i=e%100,a=Math.floor(r/4),o=r%4,s=Math.floor((r+8)/25),c=Math.floor((r-s+1)/3),l=Math.floor(19*n+r-a-c+15)%30,u=Math.floor(i/4),d=i%4,f=Math.floor(32+2*o+2*u-l-d)%7,p=Math.floor((n+11*l+22*f)/451),ee=Math.floor((l+f-7*p+114)/31),te=(l+f-7*p+114)%31+1,ne=Date.UTC(e,ee-1,te+t);return[Math.ceil((ne-Date.UTC(e,0,1))/864e5)]}var qK=function(){function e(e){this.options=e}return e.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=UK(e,n)),CG(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var r=this.yearinfo,i=r.yearlen,a=r.mrange,o=r.wdaymask;this.monthinfo=GK(e,t,i,a,o,n)}dG(n.byeaster)&&(this.eastermask=KK(e,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[hG(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],r=this.mrange[t],i=gG(null,this.yearlen),a=n;a<r;a++)i[a]=a;return[i,n,r]},e.prototype.wdayset=function(e,t,n){for(var r=gG(null,this.yearlen+7),i=FG(TG(e,t,n))-this.yearordinal,a=i,o=0;o<7&&(r[i]=i,++i,this.wdaymask[i]!==this.options.wkst);o++);return[r,a,i]},e.prototype.ddayset=function(e,t,n){var r=gG(null,this.yearlen),i=FG(TG(e,t,n))-this.yearordinal;return r[i]=i,[r,i,i+1]},e.prototype.htimeset=function(e,t,n,r){var i=this,a=[];return this.options.byminute.forEach(function(t){a=a.concat(i.mtimeset(e,t,n,r))}),UG(a),a},e.prototype.mtimeset=function(e,t,n,r){var i=this.options.bysecond.map(function(n){return new lK(e,t,n,r)});return UG(i),i},e.prototype.stimeset=function(e,t,n,r){return[new lK(e,t,n,r)]},e.prototype.getdayset=function(e){switch(e){case rK.YEARLY:return this.ydayset.bind(this);case rK.MONTHLY:return this.mdayset.bind(this);case rK.WEEKLY:return this.wdayset.bind(this);case rK.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(e){switch(e){case rK.HOURLY:return this.htimeset.bind(this);case rK.MINUTELY:return this.mtimeset.bind(this);case rK.SECONDLY:return this.stimeset.bind(this)}},e}();function JK(e,t,n,r,i,a){for(var o=[],s=0;s<e.length;s++){var c=void 0,l=void 0,u=e[s];u<0?(c=Math.floor(u/t.length),l=bG(u,t.length)):(c=Math.floor((u-1)/t.length),l=bG(u
53-1,t.length));for(var d=[],f=n;f<r;f++){var p=a[f];dG(p)&&d.push(p)}var ee=void 0;ee=c<0?d.slice(c)[0]:d[c];var te=t[l],ne=BG(IG(i.yearordinal+ee),te);wG(o,ne)||o.push(ne)}return UG(o),o}function YK(e,t){var n=t.dtstart,r=t.freq,i=t.interval,a=t.until,o=t.bysetpos,s=t.count;if(s===0||i===0)return QK(e);var c=uK.fromDate(n),l=new qK(t);l.rebuild(c.year,c.month);for(var u=eq(l,c,t);;){var d=l.getdayset(r)(c.year,c.month,c.day),f=d[0],p=d[1],ee=d[2],te=$K(f,p,ee,l,t);if(CG(o))for(var ne=JK(o,u,p,ee,l,f),re=0;re<ne.length;re++){var ie=ne[re];if(a&&ie>a)return QK(e);if(ie>=n){var ae=ZK(ie,t);if(!e.accept(ae)||s&&(--s,!s))return QK(e)}}else for(var re=p;re<ee;re++){var oe=f[re];if(dG(oe))for(var se=IG(l.yearordinal+oe),ce=0;ce<u.length;ce++){var le=u[ce],ie=BG(se,le);if(a&&ie>a)return QK(e);if(ie>=n){var ae=ZK(ie,t);if(!e.accept(ae)||s&&(--s,!s))return QK(e)}}}if(t.interval===0||(c.add(t,te),c.year>9999))return QK(e);iK(r)||(u=l.gettimeset(r)(c.hour,c.minute,c.second,0)),l.rebuild(c.year,c.month)}}function XK(e,t,n){var r=n.bymonth,i=n.byweekno,a=n.byweekday,o=n.byeaster,s=n.bymonthday,c=n.bynmonthday,l=n.byyearday;return CG(r)&&!wG(r,e.mmask[t])||CG(i)&&!e.wnomask[t]||CG(a)&&!wG(a,e.wdaymask[t])||CG(e.nwdaymask)&&!e.nwdaymask[t]||o!==null&&!wG(e.eastermask,t)||(CG(s)||CG(c))&&!wG(s,e.mdaymask[t])&&!wG(c,e.nmdaymask[t])||CG(l)&&(t<e.yearlen&&!wG(l,t+1)&&!wG(l,-e.yearlen+t)||t>=e.yearlen&&!wG(l,t+1-e.yearlen)&&!wG(l,-e.nextyearlen+t-e.yearlen))}function ZK(e,t){return new xK(e,t.tzid).rezonedDate()}function QK(e){return e.getValue()}function $K(e,t,n,r,i){for(var a=!1,o=t;o<n;o++){var s=e[o];a=XK(r,s,i),a&&(e[s]=null)}return a}function eq(e,t,n){var r=n.freq,i=n.byhour,a=n.byminute,o=n.bysecond;return iK(r)?pK(n):r>=iq.HOURLY&&CG(i)&&!wG(i,t.hour)||r>=iq.MINUTELY&&CG(a)&&!wG(a,t.minute)||r>=iq.SECONDLY&&CG(o)&&!wG(o,t.second)?[]:e.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}var tq={MO:new uG(0),TU:new uG(1),WE:new uG(2),TH:new uG(3),FR:new uG(4),SA:new uG(5),SU:new uG(6)},nq={freq:rK.YEARLY,dtstart:null,interval:1,wkst:tq.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},rq=Object.keys(nq),iq=function(){function e(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new TK,this.origOptions=dK(e);var n=fK(e).parsedOptions;this.options=n}return e.parseText=function(e,t){return nK(e,t)},e.fromText=function(e,t){return aK(e,t)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(e){return YK(e,this.options)},e.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},e.prototype._cacheAdd=function(e,t,n){if(this._cache)return this._cache._cacheAdd(e,t,n)},e.prototype.all=function(e){if(e)return this._iter(new YG(`all`,{},e));var t=this._cacheGet(`all`);return t===!1&&(t=this._iter(new JG(`all`,{})),this._cacheAdd(`all`,t)),t},e.prototype.between=function(e,t,n,r){if(n===void 0&&(n=!1),!MG(e)||!MG(t))throw Error(`Invalid date passed in to RRule.between`);var i={before:t,after:e,inc:n};if(r)return this._iter(new YG(`between`,i,r));var a=this._cacheGet(`between`,i);return a===!1&&(a=this._iter(new JG(`between`,i)),this._cacheAdd(`between`,a,i)),a},e.prototype.before=function(e,t){if(t===void 0&&(t=!1),!MG(e))throw Error(`Invalid date passed in to RRule.before`);var n={dt:e,inc:t},r=this._cacheGet(`before`,n);return r===!1&&(r=this._iter(new JG(`before`,n)),this._cacheAdd(`before`,r,n)),r},e.prototype.after=function(e,t){if(t===void 0&&(t=!1),!MG(e))throw Error(`Invalid date passed in to RRule.after`);var n={dt:e,inc:t},r=this._cacheGet(`after`,n);return r===!1&&(r=this._iter(new JG(`after`,n)),this._cacheAdd(`after`,r,n)),r},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return SK(this.origOptions)},e.prototype.toText=function(e,t,n){return sK(this,e,t,n)},e.prototype.isFullyConvertibleToText=function(){return cK(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=[`YEARLY`,`MONTHLY`,`WEEKLY`,`DAILY`,`HOURLY`,`MINUTELY`,`SECONDLY`],e.YEARLY=rK.YEARLY,e.MONTHLY=rK.MONTHLY,e.WEEKLY=rK.WEEKLY,e.DAILY=rK.DAILY,e.HOURLY=rK.HOURLY,e.MINUTELY=rK.MINUTELY,e.SECONDLY=rK.SECONDLY,e.MO=tq.MO,e.TU=tq.TU,e.WE=tq.WE,e.TH=tq.TH,e.FR=tq.FR,e.SA=tq.SA,e.SU=tq.SU,e.parseString=mK,e.optionsToString=SK,e}();function aq(e,t,n,r,i,a){var o={},s=e.accept;
53function c(e,t){n.forEach(function(n){n.between(e,t,!0).forEach(function(e){o[Number(e)]=!0})})}i.forEach(function(e){var t=new xK(e,a).rezonedDate();o[Number(t)]=!0}),e.accept=function(e){var t=Number(e);return isNaN(t)?s.call(this,e):!o[t]&&(c(new Date(t-1),new Date(t+1)),!o[t])?(o[t]=!0,s.call(this,e)):!0},e.method===`between`&&(c(e.args.after,e.args.before),e.accept=function(e){var t=Number(e);return o[t]?!0:(o[t]=!0,s.call(this,e))});for(var l=0;l<r.length;l++){var u=new xK(r[l],a).rezonedDate();if(!e.accept(new Date(u.getTime())))break}t.forEach(function(t){YK(e,t.options)});var d=e._result;switch(UG(d),e.method){case`all`:case`between`:return d;case`before`:return d.length&&d[d.length-1]||null;default:return d.length&&d[0]||null}}var oq={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function sq(e,t){var n=[],r=[],i=[],a=[],o=hK(e),s=o.dtstart,c=o.tzid;return mq(e,t.unfold).forEach(function(e){if(e){var t=pq(e),o=t.name,s=t.parms,l=t.value;switch(o.toUpperCase()){case`RRULE`:if(s.length)throw Error(`unsupported RRULE parm: ${s.join(`,`)}`);n.push(mK(e));break;case`RDATE`:var u=(/RDATE(?:;TZID=([^:=]+))?/i.exec(e)??[])[1];u&&!c&&(c=u),r=r.concat(gq(l,s));break;case`EXRULE`:if(s.length)throw Error(`unsupported EXRULE parm: ${s.join(`,`)}`);i.push(mK(l));break;case`EXDATE`:a=a.concat(gq(l,s));break;case`DTSTART`:break;default:throw Error(`unsupported property: `+o)}}}),{dtstart:s,tzid:c,rrulevals:n,rdatevals:r,exrulevals:i,exdatevals:a}}function cq(e,t){var n=sq(e,t),r=n.rrulevals,i=n.rdatevals,a=n.exrulevals,o=n.exdatevals,s=n.dtstart,c=n.tzid,l=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||i.length||a.length||o.length){var u=new vq(l);return u.dtstart(s),u.tzid(c||void 0),r.forEach(function(e){u.rrule(new iq(uq(e,s,c),l))}
53),i.forEach(function(e){u.rdate(e)}),a.forEach(function(e){u.exrule(new iq(uq(e,s,c),l))}),o.forEach(function(e){u.exdate(e)}),t.compatible&&t.dtstart&&u.rdate(s),u}var d=r[0]||{};return new iq(uq(d,d.dtstart||t.dtstart||s,d.tzid||t.tzid||c),l)}function lq(e,t){return t===void 0&&(t={}),cq(e,dq(t))}function uq(e,t,n){return ot(ot({},e),{dtstart:t,tzid:n})}function dq(e){var t=[],n=Object.keys(e),r=Object.keys(oq);if(n.forEach(function(e){wG(r,e)||t.push(e)}),t.length)throw Error(`Invalid options: `+t.join(`, `));return ot(ot({},oq),e)}function fq(e){if(e.indexOf(`:`)===-1)return{name:`RRULE`,value:e};var t=yG(e,`:`,1);return{name:t[0],value:t[1]}}function pq(e){var t=fq(e),n=t.name,r=t.value,i=n.split(`;`);if(!i)throw Error(`empty property name`);return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}function mq(e,t){if(t===void 0&&(t=!1),e=e&&e.trim(),!e)throw Error(`Invalid empty string`);if(!t)return e.split(/\s/);for(var n=e.split(` 54`),r=0;r<n.length;){var i=n[r]=n[r].replace(/\s+$/g,``);i?r>0&&i[0]===` `?(n[r-1]+=i.slice(1),n.splice(r,1)):r+=1:n.splice(r,1)}return n}function hq(e){e.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw Error(`unsupported RDATE/EXDATE parm: `+e)})}function gq(e,t){return hq(t),e.split(`,`).map(function(e){return GG(e)})}function _q(e){var t=this;return function(n){if(n!==void 0&&(t[`_${e}`]=n),t[`_${e}`]!==void 0)return t[`_${e}`];for(var r=0;r<t._rrule.length;r++){var i=t._rrule[r].origOptions[e];if(i)return i}}}var vq=function(e){Ze(t,e);function t(t){t===void 0&&(t=!1);var n=e.call(this,{},t)||this;return n.dtstart=_q.apply(n,[`dtstart`]),n.tzid=_q.apply(n,[`tzid`]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(e){return aq(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){yq(e,this._rrule)},t.prototype.exrule=function(e){yq(e,this._exrule)},t.prototype.rdate=function(e){bq(e,this._rdate)},t.prototype.exdate=function(e){bq(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return lq(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return lq(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(SK({dtstart:this._dtstart}))),this._rrule.forEach(function(t){e=e.concat(t.toString().split(` 55`))}),this._exrule.forEach(function(t){e=e.concat(t.toString().split(` 56`).map(function(e){return e.replace(/^RRULE:/,`EXRULE:`)}).filter(function(e){return!/^DTSTART/.test(e)}))}),this._rdate.length&&e.push(xq(`RDATE`,this._rdate,this.tzid())),this._exdate.length&&e.push(xq(`EXDATE`,this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join(` 57`)},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(t){return e.rrule(t.clone())}),this._exrule.forEach(function(t){return e.exrule(t.clone())}),this._rdate.forEach(function(t){return e.rdate(new Date(t.getTime()))}),this._exdate.forEach(function(t){return e.exdate(new Date(t.getTime()))}),e},t}(iq);function yq(e,t){if(!(e instanceof iq))throw TypeError(String(e)+` is not RRule instance`);wG(t.map(String),String(e))||t.push(e)}function bq(e,t){if(!(e instanceof Date))throw TypeError(String(e)+` is not Date instance`);wG(t.map(Number),Number(e))||(t.push(e),UG(t))}function xq(e,t,n){var r=!n||n.toUpperCase()===`UTC`;return`${r?`${e}:`:`${e};TZID=${n}:`}${t.map(function(e){return WG(e.valueOf(),r)}).join(`,`)}`}var Sq={[rK.HOURLY]:`hourly`,[rK.DAILY]:`daily`,[rK.WEEKLY]:`weekly`,[rK.MONTHLY]:`monthly`,[rK.YEARLY]:`yearly`},Cq=class{constructor(e,t,n,r,i){this.rruleService=e,this.timezoneService=t,this.dateTimeService=n,this.userService=r,this.composeScheduledInitFormData=i}getComposeSchedule(e,t,n){let r=this.userService.currentUser([`timezone`]),i=this.timezoneService.getEntityByTimezone(t),a=r.displayTimeFormat===`12h`,o=this.dateTimeService.utcToZonedTime(this.dateTimeService.toDate(e),i?.timezone),s=o.getHours(),c=o.getMinutes(),l=`AM`;if(a){let{hours:e,type:t}=this.dateTimeService.hoursTo12hFormat(s);s=e,l=t}let u={sendingTimezone:i?.id??r.timezone.id,sendingDateTime:{date:this.dateTimeService.toISO(o),hours:s,minutes:c,timeIntervalType:l},repeat:this.composeScheduledInitFormData.getMessageSendRepeatInitFormData()};if(!n)return u;let d=this.getScheduleRepeatFromRule(n);if(u.repeat.type=d.freqType,d.endType&&(u.repeat.end.type=d.endType,d.smsSessions?u.repeat.end.smsSessions=d.smsSessions:d.until&&(u.repeat.end.date=d.until)),d.freqType===`hourly`)u.repeat.hourly={count:d.count??u.repeat.hourly.count};else if(d.freqType===`daily`)u.repeat.daily={count:d.count??u.repeat.daily.count};else if(d.freqType===`weekly`)u.repeat.weekly={count:d.count??u.repeat.weekly.count,days:d.days??u.repeat.weekly.days};else if(d.freqType===`monthly`)u.repeat.monthly={count:d.count??u.repeat.monthly.count,firstLastDay:d.firstLastDay??u.repeat.monthly.firstLastDay,monthDay:d.monthDay??u.repeat.monthly.monthDay,repeat:d.repeat??u.repeat.monthly.repeat,weekDay:d.weekDay??u.repeat.monthly.weekDay};else if(d.freqType===`yearly`)u.repeat.yearly={count:d.count??u.repeat.yearly.c
57ount,dayOfMonth:d.dayOfMonth??u.repeat.yearly.dayOfMonth,firstLastDay:d.firstLastDay??u.repeat.yearly.firstLastDay,month:d.month??u.repeat.yearly.month,monthDay:d.monthDay??u.repeat.yearly.monthDay,type:d.type??u.repeat.yearly.type,weekDay:d.weekDay??u.repeat.yearly.weekDay};else throw new Qa(d.freqType);return u}getScheduleRepeatFromRule(e){let t=this.rruleService.getInstanceFromString(e).origOptions,n={freqType:this.getRepeatType(t.freq)};return[`hourly`,`daily`,`weekly`,`monthly`].includes(n.freqType)&&(n.count=t.interval),n.freqType===`weekly`&&(n.days=this.getDays(t.byweekday)),t.count&&(n.endType=`after`,n.smsSessions=t.count),t.until&&(n.endType=`date`,n.until=t.until.toISOString().slice(0,10)),n.freqType===`monthly`?{...n,...this.getMonthlyData(t)}:n.freqType===`yearly`?{...n,...this.getYearlyData(t)}:n}getDays(e){if(!e)return[];if(!Array.isArray(e))throw new G(`byweekday should be type Array`);return e.map(e=>ho[e.weekday])}getRepeatType(e){return Sq[e]??`hourly`}getMonthlyData(e){if(typeof e.bymonthday==`number`)return{repeat:`month-day`,monthDay:e.bymonthday.toString()};if(this.isMonthFloatDayRule(e)){let t=e.byweekday.map(e=>Ws[e.weekday]);return{repeat:`month-float-day`,firstLastDay:this.rruleService.getOrdinalDayBysetpos(e.bysetpos),weekDay:this.calculateWeekDay(t)}}}getYearlyData(e){if(this.isYearDayRule(e))return{type:`year-day`,month:this.rruleService.getMonthByMonthNumber(e.bymonth),monthDay:e.bymonthday.toString()};if(this.isYearFloatDayRule(e)){let t=e.byweekday.map(e=>Ws[e.weekday]);return{type:`year-float-day`,firstLastDay:this.rruleService.getOrdinalDayBysetpos(e.bysetpos),dayOfMonth:this.rruleService.getMonthByMonthNumber(e.bymonth),weekDay:this.calculateWeekDay(t)}}return!1}isMonthFloatDayRule(e){return e.bysetpos&&typeof e.bysetpos==`number`&&Array.isArray(e.byweekday)&&e.byweekday.length}isYearDayRule(e){return typeof e.bymonth==`number`&&typeof e.bymonthday==`number`}isYearFloatDayRule(e){return e.bysetpos&&typeof e.bysetpos==`number`&&e.bymonth&&typeof e.bymonth==`number`}calculateWeekDay(e){return e.length===7?Ws[7]:e.length===5?Ws[8]:e.length===2?Ws[9]:e[0]}};Cq=U([g(),B(0,m(V.RRuleService)),B(1,m(V.TimezoneService)),B(2,m(V.DateTimeService)),B(3,m(V.UserService)),B(4,m(V.ComposeScheduledInitFormData))],Cq);function wq(){return function(e){e.prototype.isPersistent=function(){return!0};let t=new Proxy(e,{construct(e,t){let n=new e(...t);if(typeof n.getResolverKeys!=`function`)throw new G(`Persistent resolver requires "getResolverKeys" method to be implemented`);return n},get(t,n){return n===`name`?e.name:n===`prototype`?e.prototype:t[n]}});return(Reflect.getMetadataKeys?.(e)||[]).forEach(n=>{let r=Reflect.getMetadata(n,e);Reflect.defineMetadata(n,r,t)}),(Reflect.getMetadataKeys?.(e.prototype)||[]).forEach(n=>{let r=Reflect.getMetadata(n,e.prototype);Reflect.defineMetadata(n,r,t.prototype)}),t}}var Tq=class{constructor(e,t){this.get=e,this.progressService=t,this.subscriptions=new Map}async resolve(e){for(let t of e.serviceIds){let e=this.getDomainProgressableService(t),n=e.getProgressType(),r=e.subscribeProgress(t=>{let r=this.progressService.mapServerEventPayload(t,n);this.progressService.isLastProgress(r)&&e.getPreloader().reloadById(e.getModel(),r.originalId),this.progressService.insertOrUpdateProgress(r)});this.subscriptions.set(t,r)}}async unresolve(e){for(let t of e.serviceIds){let e=this.subscriptions.get(t);e&&(this.getDomainProgressableService(t).unsubscribeProgress(e),this.subscriptions.delete(t))}}getResolverKeys(e){return e.serviceIds}getDomainProgressableService(e){return this.get(e)}saveProgress(e){return this.progressService.insertOrUpdateProgress({...e})}getProgress(e,t){return this.progressService.findProgressOrNull({type:e,originalId:t})}};Tq=U([_W(`ProgressResolver`),wq(),g(),B(0,m(`GetLocator`)),B(1,m(V.ProgressService))],Tq);var Eq=Tq,Dq=class extends qE{insertOrUpdateProgress(e){this.getDomainRepository().insertOrUpdateRaw([{...e,id:this.getProgressId({type:e.type,originalId:e.originalId})}])}findProgressOrNull(e){return this.findEntityByIdOrNull(this.getProgressId(e))}deleteProgress(e){return this.deleteFromStore([this.getProgressId(e)])}isLastProgress(e){let t=this.findProgressOrNull(e),n=e.progress;return t?.progress!==100&&n===100}mapServerEventPayload(e,t){return`entityId`in e?{type:t,originalId:String(e.entityId),progress:e.percentageValue}:{type:t,originalId:String(e.id),progress:e.progress}}getProgressId({type:e,originalId:t}){return`${e}-${t}`}};Dq=U([oD({model:yf}),g(),h()],Dq);var Oq=Dq,kq=class extends Q{};kq=U([g(),h(),Y({model:yf})],kq);var Aq=kq,jq=class{constructor(e){this.domainManagerService=e}async resolve(){}async unresolve(e){if(e.models?.length!==0)for(let t of e.models)this.domainManagerService.getService(t).deleteAllFromStore()}};jq=U([g(),B(0,m(V.DomainManagerService))],jq);var Mq=jq,Nq=class{constructor(e,t,n){this.routerService=e,this.routerPermissionsService=t,this.loggerService=n,this.alreadyPrefetchedIds=new Set,this.alreadyPrefetchedChunks=new Set,this.routeChunkMap=new Map,this.chunkMapLoadPromise=null}async prefetchChunksForRoute(e,t,n=!0){if(typeof e!=`string`)return;let r=this.resolveRoute(e,t);if(r){if(!r.meta?.__tmPrefetchId){this.loggerService.log(`routePrefetch`,`No prefetch data found for route "${e}". Skippingâ¦`,`RoutePrefetchService.prefetchChunksForRoute`);return}this.alreadyPrefetchedIds.has(r.meta.__tmPrefetchId)||(this.loggerService.log(`routePrefetch`,`Prefetching "${e}" with "${r.meta.__tmPrefetchId}" prefetchIdâ¦`,`RoutePrefetchService.prefetchChunksForRoute`),this.prefetchChunksForPrefetchId(r.meta.__tmPrefetchId),n&&await Promise.all(r.matched.map(e=>{let t=e.meta?.__tmPrefetchId;return t?this.prefetchChunksForPrefetchId(t):Promise.resolve()})))}}async prefetchChunksForPrefetchId(e){if(this.chunkMapLoadPromise||(this.chunkMapLoadPromise=this.loadRouteChunkMap()),await this.chunkMapLoadPromise,this.alreadyPrefetchedIds.has(e))return;let t=this.routeChunkMap.get(e)??new Set;this.loggerService.log(`routePrefetch`,`Prefetching ${t.size} chunks for "${e}" prefetchIdâ¦`,`RoutePrefetchService.prefetchChunksForPrefetchId`),this.injectPrefetchLinks(t),this.alreadyPrefetchedIds.add(e)}resolveRoute(e,t){try{let n=this.routerService.resolveFinalPath({name:e,params:t});return this.routerPermissionsService.isAllowAccessToRoute(n)?n:null}catch{return this.loggerService.log(`routePrefetch`,`Failed to resolve route "${String(e)}" with params "${JSON.stringify(t)}"`,`RoutePrefetchService.resolveRoute`),null}}async loadRouteChunkMap(){let e=window.BUILD_MANIFEST?.routeChunkMap;if(e)try{let t=await R(()=>import(e),[],import.meta.url);this.routeChunkMap=t.ROUTE_CHUNK_MAP}catch{console.warn(`Failed to load route chunk map from BUILD_MANIFEST, using an empty map as a fallback`)}else console.warn(`routeChunkMap was not found in BUILD_MANIFEST, using an empty map as a fallback`)}
57injectPrefetchLinks(e){e.forEach(e=>{if(this.alreadyPrefetchedChunks.has(e))return;let t=document.createElement(`link`);t.crossOrigin=``,t.href=`/${e}`,e.endsWith(`.css`)?(t.rel=`preload`,t.as=`style`):(t.rel=`modulepreload`,t.as=`script`),document.head.appendChild(t),this.alreadyPrefetchedChunks.add(e)})}};Nq=U([g(),B(0,m(V.RouterService)),B(1,m(V.RouterPermissionsService)),B(2,m(V.LoggerService))],Nq);var Pq=class{getSubfieldValidationRuleName(e){return`${Bn}-${e}`}getFieldConfig(e){return{fieldType:e??`selectSearchWithCustom`,value:{valueType:lf.EXISTING}}}extendOptions({options:e,header:t,addNewText:n,addNewRoute:r}){let i={text:`existingValue`,value:`existingValue`,subheader:t,disabled:!0},a={text:n,value:`newValue`,overrideOption:!0,type:`button`,to:r},o=[i];return e.length?o.push(...e):o.push(a),o}};Pq=U([g()],Pq);var Fq=Pq,Iq=class extends Q{setIsRowsLoading(e,t,n){return this.insertOrUpdate([{id:this.getId(e,t),isLoading:n}])}getRowsLoading(e,t){return this.findEntityByIdOrNull(this.getId(e,t))?.isLoading??!1}cleanUp(e){this.deleteByCondition(t=>t.id.startsWith(e))}getId(e,t){return`${e}:${t}`}};Iq=U([Y({model:ic}),g(),h()],Iq);var Lq=Iq,Rq=class{constructor(e,t,n,r){this.postHogService=e,this.googleAnalyticsService=t,this.localStorageAdapter=n,this.userService=r,this.signUpEvent=`signUpEvent`}trackSignUp(e){let t=this.userService.getCurrentUserOrNull();t&&!this.isSignUpTriggered(t.id)&&(this.storeSignUpEvent(t.id),this.postHogService.trackSignUp(e),this.googleAnalyticsService.trackConversion(JL.signUp))}storeSignUpEvent(e){this.localStorageAdapter.setJSON(this.signUpEvent,{id:e})}isSignUpTriggered(e){return(this.localStorageAdapter.getJSON(this.signUpEvent)?.id?this.localStorageAdapter.getJSON(this.signUpEvent).id:null)===e}};Rq=U([g(),B(0,m(V.PostHogService)),B(1,m(V.GoogleAnalyticsService)),B(2,m(V.LocalStorageAdapter)),B(3,m(V.UserService))],Rq);var zq=Rq,Bq=class{constructor(e){this.loggerService=e,this.CONSENT_COOKIE_NAME=`cookieyes-consent`}parseCookieYesConsent(e){try{let t=e.split(`,`),n={};return t.forEach(e=>{let[t,r]=e.split(`:`);t&&r&&(n[t.trim()]=r.trim())}),{consentid:n.consentid||null,consent:n.consent===`yes`,action:n.action===`yes`,necessary:n.necessary===`yes`,functional:n.functional===`yes`,analytics:n.analytics===`yes`,performance:n.performance===`yes`,advertisement:n.advertisement===`yes`,other:n.other===`yes`,lastRenewedDate:n.lastRenewedDate?parseInt(n.lastRenewedDate,10):null}}catch(e){return this.loggerService.error(`tracking`,`Failed to parse consent cookie: ${e}`,`CookieConsent`),null}}getConsentData(){let e=ta(this.CONSENT_COOKIE_NAME);return e?this.parseCookieYesConsent(e):null}hasMarketingConsent(){let e=this.getConsentData();return!e||!e.consent?!1:e.analytics&&e.advertisement}hasAdvertisementConsent(){let e=this.getConsentData();return e?e.consent&&e.advertisement:!1}hasAnalyticsConsent(){let e=this.getConsentData();return e?e.consent&&e.analytics:!1}hasFunctionalConsent(){let e=this.getConsentData();return e?e.consent&&e.functional:!1}getRawConsentCookie(){return ta(this.CONSENT_COOKIE_NAME)}hasConsentCookie(){return ta(this.CONSENT_COOKIE_NAME)!==null}logConsentState(){let e=this.getRawConsentCookie(),t=this.getConsentData();this.loggerService.group(`tracking`,`Cookie Consent State`,()=>{this.loggerService.log(`tracking`,`Cookie exists: ${this.hasConsentCookie()}`,`CookieConsent`),this.loggerService.log(`tracking`,`Raw cookie: ${e}`,`CookieConsent`),this.loggerService.log(`tracking`,`Parsed data:`,`CookieConsent`),this.loggerService.raw(`tracking`,t),this.loggerService.log(`tracking`,`Has marketing consent: ${this.hasMarketingConsent()}`,`CookieConsent`),this.loggerService.log(`tracking`,`Has advertisement consent: ${this.hasAdvertisementConsent()}`,`CookieConsent`),this.loggerService.log(`tracking`,`Has analytics consent: ${this.hasAnalyticsConsent()}`,`CookieConsent`),this.loggerService.log(`tracking`,`Has functional consent: ${this.hasFunctionalConsent()}`,`CookieConsent`)},`CookieConsent`)}};Bq=U([g(),B(0,m(V.LoggerService))],Bq);var Vq=Bq,Hq=class{constructor(e,t){this.userNumbersPreloaderService=e,this.serverSubscriptionService=t,this.onSystemAccountNumbersListChange=this.onSystemAccountNumbersListChangeCallback.bind(this),this.isPersistent=()=>!0,this.getResolverKeys=()=>[`userNumbersResolverService`]}async resolve(){await this.userNumbersPreloaderService.preload(),this.serverSubscriptionService.subscribe(`systemAccountNumbersListChange`,this.onSystemAccountNumbersListChange)}async unresolve(){this.serverSubscriptionService.unsubscribe(`systemAccountNumbersListChange`,this.onSystemAccountNumbersListChange)}onSystemAccountNumbersListChangeCallback(){this.userNumbersPreloaderService.markAsNotPreloaded()}};Hq=U([g(),B(0,m(V.UserNumbersPreloaderService)),B(1,m(V.ServerSubscriptionService))],Hq);var Uq=Hq,Wq=class{constructor(e){this.userNumbersPreloaderService=e}async resolve(){await this.userNumbersPreloaderService.markAsNotPreloaded()}};Wq=U([g(),B(0,m(V.UserNumbersPreloaderService))],Wq);var Gq=Wq,Kq=class{constructor(e){this.userNumbersService=e}async resolve(e,t,n){let r=this.userNumbersService.findUserNumbersOrFail();return{showGettingStarted:!this.userNumbersService.canSendSms(r)}}};Kq=U([g(),B(0,m(V.UserNumbersService))],Kq);var qq=Kq,Jq=class{constructor(e,t,n,r){this.routerPermissionsService=e,this.routerService=t,this.translateService=n,this.integrationsSettingsStrategy=r,this.setFirstAvailableRoute=async()=>{let e=this.getFilteredRoutesGroups().map(e=>e.links).flat().map(e=>e.route)[0]??{name:`user.compose.message`};await this.routerService.replace(e)}}getSmsVoiceChildRoutesRecord(){return{numbers:{name:L.SmsVoiceNumbers},senderIds:{name:L.SmsVoiceSenderIds},byoc:{name:L.SmsVoiceByocIndex},senderSettings:{name:L.SmsVoiceSenderSettings},tenDlc:{name:L.SmsVoiceTenDlcIndex},tollFree:{name:L.SmsVoiceTollFree}}}getWorkspaceChildRoutesRecord(){return{workspaceUsers:{name:L.WorkspaceUsers},workspaceSubaccounts:{name:L.WorkspaceSubaccounts},workspaceSso:{name:L.WorkspaceSso},workspaceDataRetention:{name:L.WorkspaceDataRetention}}}getWorkspaceChildRoutes(){let e=[{name:`workspaceUsers`,title:this.translateService.t(`pageTitle.user.accounts.users`)},{name:`workspaceSubaccounts`,title:this.translateService.t(`pageTitle.user.accounts.subAccounts.title`)},{name:`workspaceSso`,title:this.translateService.t(`pageTitle.user.accounts.sso`)},{name:`workspaceDataRetention`,title:this.translateService.t(`pageTitle.user.accounts.dataRetention`)}],t=this.getWorkspaceChildRoutesRecord();return e.map(e=>({...e,to:t[e.name]}))}getBillingChildRoutesRecord(){return{overview:{name:L.BillingOverview},plans:{name:L.BillingPlans},invoices:{name:L.BillingInvoices},statements:{name:L.BillingStatements}}}getBillingChildRoutes(){let e=[{name:`overview`,title:this.translateService.t(`pageTitle.user.settings.billingOverview`)},{name:`plans`,title:this.translateService.t(`pageTitle.user.settings.billingPlans`)},{name:`invoices`,title:this.translateService.t(`pageTitle.user.settings.billingInvoices`)},{name:`statements`,title:this.translateService.t(`pageTitle.user.settings.billingStatements`)}],t=this.getBillingChildRoutesRecord();return e.map(e=>({...e,to:t[e.name]}))}getAccountChildRoutesRecord(){return{details:{name:L.AccountDetails},security:{name:L.AccountSecurity},notifications:{name:L.AccountNotifications}}}getAccountChildRoutes(){let e=[{name:`details`,title:this.translateService.t(`pageTitle.user.settings.accountDetails`)},{name:`security`,title:this.translateService.t(`pageTitle.user.settings.accountSecurity`)},{name:`notifications`,title:this.translateService.t(`pageTitle.user.settings.accountNotifications`)}],t=this.getAccountChildRoutesRecord();return e.map(e=>({...e,to:t[e.name]}))}getRoutesGroups(){let e=[{itemType:`link`,itemKey:`smsVoice`,title:this.translateService.t(`pageTitle.user.settings.smsVoice`),route:{name:L.SmsVoice},icon:`chat`,pageRoutesList:this.getSmsVoiceChildRoutesRecord()},{itemType:`link`,itemKey:`email`,title:this.translateService.t(`pageTitle.user.settings.email`),route:{name:L.EmailIndex},icon:`mail`},{itemType:`link`,itemKey:`chatWidget`,title:this.translateService.t(`pageTitle.user.settings.liveChat`),route:{name:L.LiveChatIndex},icon:`tmi-testimonial-comment`},{itemType:`link`,itemKey:`whatsApp`,title:this.translateService.t(`pageTitle.user.settings.whatsApp`),route:{name:L.WhatsAppIndex},icon:`tmi-whatsapp-phone`},{itemType:`link`,itemKey:`facebook`,title:this.translateService.t(`pageTitle.user.settings.facebook`),route:{name:L.FacebookIndex},icon:`tmi-facebook`},{itemType:`link`,itemKey:`instagram`,title:this.translateService.t(`pageTitle.user.settings.instagram`),route:{name:L.InstagramIndex},icon:`tmi-instagram`}],t;t=this.integrationsSettingsStrategy.isAccessAllowed()?this.translateService.t(`pageTitle.user.settings.api`):this.translateService.t(`pageTitle.user.settings.apiIntegrations`);let n=[{itemType:`link`,itemKey:`mcp`,title:this.translateService.t(`pageTitle.user.settings.integrationsMcp`),route:{name:L.IntegrationsMcp},icon:`tmi-mcp`,badge:`new`},{itemType:`link`,itemKey:`integrations`,title:this.translateService.t(`pageTitle.user.settings.integrations`),route:{name:L.Integrations},icon:`tmi-connection`,badge:`new`},{itemType:`link`,itemKey:`messenger`,title:this.translateService.t(`pageTitle.user.settings.messenger`),route:{name:L.Messenger},icon:`chat`},{itemType:`link`,itemKey:`contacts`,title:this.translateService.t(`pageTitle.user.settings.contacts`),route:{name:L.ContactsIndex},icon:`tmi-people`},{itemType:`link`,itemKey:`api`,title:t,route:{name:L.ApiIndex},icon:`tmi-brackets`},{itemType:`link`,itemKey:`emailToSms`,title:this.translateService.t(`pageTitle.user.settings.emailToSms`),route:{name:L.EmailToSmsIndex}
57,icon:`tmi-chat-email`},{itemType:`link`,itemKey:`automationRules`,title:this.translateService.t(`pageTitle.user.settings.autoResponders`),route:{name:L.AutoRespondersIndex},icon:`tmi-reply-inbox`},{itemType:`link`,itemKey:`tickets`,title:this.translateService.t(`pageTitle.user.settings.tickets`),route:{name:L.TicketsIndex},icon:`inbox`},{itemType:`link`,itemKey:`tasks`,title:this.translateService.t(`pageTitle.user.settings.tasks`),route:{name:L.Tasks},icon:`tmi-tasks`},{itemType:`link`,itemKey:`deals`,title:this.translateService.t(`pageTitle.user.settings.deals`),route:{name:L.Deals},icon:`tmi-deals-monetization-on2`},{itemType:`link`,itemKey:`pointAi`,title:this.translateService.t(`pageTitle.user.settings.pointAi`),route:{name:L.PointAiIndex},icon:`tmi-stars-filled`}],r=this.routerService.getCurrentRoute(),i=this.getWorkspaceChildRoutes().find(e=>this.routerPermissionsService.isAllowAccessToRoute(e.to)),a=[];return i&&a.push({itemType:`link`,itemKey:`workspace`,title:this.translateService.t(`pageTitle.user.settings.workspace`),route:i.to,icon:`tmi-organization-domain`,overrideActive:typeof r.name==`string`&&(r.name.startsWith(L.WorkspaceSubaccounts)||r.name.startsWith(L.WorkspaceUsers)||r.name.startsWith(L.WorkspaceSso)||r.name.startsWith(L.WorkspaceDataRetention))?!0:void 0,childrenRoutesList:this.getWorkspaceChildRoutes()}),a.push({itemType:`link`,itemKey:`billing`,title:this.translateService.t(`pageTitle.user.settings.billing`),route:{name:L.BillingIndex},icon:`account_balance`,childrenRoutesList:this.getBillingChildRoutes()}),a.push({itemType:`link`,itemKey:`account`,title:this.translateService.t(`pageTitle.user.settings.account`),route:{name:L.AccountIndex},icon:`tmi-account-circle-filled`,childrenRoutesList:this.getAccountChildRoutes()}),[{itemType:`group`,itemKey:`channels`,title:this.translateService.t(`common.channels`),links:e},{itemType:`group`,itemKey:`features`,title:this.translateService.t(`common.features`),links:n},{itemType:`group`,itemKey:`administration`,title:this.translateService.t(`common.administration`),links:a}]}getFilteredRoutesGroups(){let e=this.getRoutesGroups(),t=[];return e.forEach(e=>{let n=e.links.filter(e=>this.routerPermissionsService.isAllowAccessToRoute(e.route));n.length!==0&&t.push({...e,links:n})}),t}async resolveStrategies(){let e=[];this.getRoutesGroups().forEach(t=>{t.links.forEach(t=>{t.childrenRoutesList&&t.childrenRoutesList.forEach(t=>e.push(t.to)),t.pageRoutesList&&Object.values(t.pageRoutesList).forEach(t=>e.push(t)),e.push(t.route)})}),await Promise.all(e.map(e=>this.routerPermissionsService.resolveStrategiesForRoute(e)))}async resolve(){await this.resolveStrategies();let e=this.routerService.getCurrentRoute(),t={name:L.AccountIndex};e.name===t.name&&await this.setFirstAvailableRoute()}};Jq=U([g(),B(0,m(V.RouterPermissionsService)),B(1,m(V.RouterService)),B(2,m(V.TranslateService)),B(3,m(V.IntegrationsSettingsStrategy))],Jq);var Yq=Jq,Xq=class{constructor(e,t,n){this.routerService=e,this.emailCampaignDomainService=t,this.emailCampaignDomainsPreloaderService=n}async resolve(){try{await this.emailCampaignDomainsPreloaderService.preload();
57let e=this.emailCampaignDomainService.findAll(),t=this.routerService.getCurrentRoute();!e.length&&t.name!==L.EmailFlow&&t.name!==L.Email&&await this.routerService.replace({name:L.Email,query:t.query})}catch(e){if(e instanceof xs||e instanceof qu){let e=this.routerService.getCurrentRoute();await this.routerService.replace({name:L.Email,query:e.query});return}throw e}}};Xq=U([g(),B(0,m(V.RouterService)),B(1,m(V.EmailCampaignDomainService)),B(2,m(V.EmailCampaignDomainsPreloaderService))],Xq);var Zq=Xq,Qq=function(e){return e.NotVerified=`not_verified`,e.Pending=`pending`,e.ManualReview=`manual_review`,e.Rejected=`rejected`,e.Verified=`verified`,e}({}),$q=function(e){return e.Pending=`pending`,e.Success=`success`,e.Failed=`failed`,e}({}),eJ=class extends pl{get isDnsVerified(){return this.status!==`not_verified`&&this.status!==`rejected`}};U([v()],eJ.prototype,`domain`,void 0),U([v()],eJ.prototype,`dkimPendingHost`,void 0),U([v()],eJ.prototype,`dkimPendingTextValue`,void 0),U([at()],eJ.prototype,`isDkimPendingHostVerified`,void 0),U([v()],eJ.prototype,`returnPathDomain`,void 0),U([v()],eJ.prototype,`returnPathDomainValue`,void 0),U([at()],eJ.prototype,`isReturnPathDomainVerified`,void 0),U([v()],eJ.prototype,`dmarcRecordName`,void 0),U([v()],eJ.prototype,`dmarcRecordValue`,void 0),U([at()],eJ.prototype,`isDmarcRecordVerified`,void 0),U([v()],eJ.prototype,`status`,void 0),U([v(null)],eJ.prototype,`entriVerificationStatus`,void 0),U([v(null)],eJ.prototype,`dnsProvider`,void 0),U([y(null)],eJ.prototype,`isAvailableForEntriVerification`,void 0),eJ=U([Be(md.EMAIL_CAMPAIGN_DOMAIN)],eJ);var tJ=eJ,nJ=class{constructor(e,t,n){this.routerService=e,this.emailCampaignDomainService=t,this.emailCampaignEmailSenderService=n}async resolve(){let e=this.routerService.getCurrentRoute().params.domainId;if(e&&pe(e))try{let t=await this.emailCampaignDomainService.loadDomain(e);if(t?.status===Qq.Rejected){await this.routerService.replace({name:L.EmailDomains});return}let n=this.emailCampaignEmailSenderService.findSenderEmailsByDomain(e);t&&!n.length&&await this.emailCampaignEmailSenderService.fetchEmailSendersByDomain(t.id)}catch(e){if(e instanceof xs||e instanceof qu){await this.routerService.replace({name:L.Email});return}throw e}}};nJ=U([g(),B(0,m(V.RouterService)),B(1,m(V.EmailCampaignDomainService)),B(2,m(V.EmailCampaignEmailSenderService))],nJ);var rJ=nJ,iJ=class{constructor(e,t,n){this.userService=e,this.userRepository=t,this.teamWorkflowService=n}getFetchEndpointParams(){return[]}async gridRequest(e,t,n,r){let i=this.extractStatusesFromFilter(e),a={...e,other:{statuses:i}};return this.teamWorkflowService.isUsersWorkflow()?a.other.includeParent=!1:a.other.includeSelf=!1,this.userRepository.gridRequest(a,t,n,r)}extractStatusesFromFilter(e){let t=e.filter?.find(e=>e[Br.STATUS]!==void 0);if(t){let e=(t[Br.STATUS].in??[]).join(`,`);return e.length>0?e.split(`,`):this.userService.getStatusesForAllSubAccount()}return this.userService.getStatusesForAllSubAccount()}};iJ=U([g(),B(0,m(V.UserService)),B(1,m(V.UserRepository)),B(2,m(V.TeamWorkflowService))],iJ);var aJ=iJ,oJ=class extends zT{constructor(e,t,n,r,i,a){super(e,t,n,r,i),this.filterSchemaService=e,this.loggerService=t,this.filterStrategyManager=n,this.filterBuilderService=r,this.translateService=i,this.userService=a}get statusesPropsOptions(){return[{text:this.translateService.t(`status.user.active`),value:this.userService.getStatusesForEnabledSubAccount().join(`,`),color:`green`,appearance:`pastel`,outline:!0},{text:this.translateService.t(`status.user.closed`),value:this.userService.getStatusesForClosedSubAccount().join(`,`),color:`gray`,appearance:`pastel`,outline:!0},{text:this.translateService.t(`status.user.subInvited`),value:Wr.ST_SUB_INVITED.toString(),color:`orange`,appearance:`intense`,outline:!0}]}getFilters(){return[{name:Br.STATUS,icon:`filter_alt`,label:this.translateService.t(`common.status`),operation:`in`,relatedFieldName:``,isDefault:!0,callback:e=>(e.options=this.statusesPropsOptions.map(e=>({value:e.value,text:e.text,color:e.color,appearance:e.appearance,outline:e.outline})),e)}]}};oJ=U([g(),h(),B(0,m(V.FilterSchemaService)),B(1,m(V.LoggerService)),B(2,m(V.FilterStrategyManager)),B(3,m(V.FilterBuilderService)),B(4,m(V.TranslateService)),B(5,m(V.UserService))],oJ);var sJ=oJ,cJ=class{constructor(e,t,n){this.ticketInboxService=e,this.routerService=t,this.resolverService=n}async resolve(){await this.resolveInboxes(),this.ticketInboxService.hasInboxes()||await this.routerService.replace({name:L.Tickets})}
57resolveInboxes(e,t){return this.resolverService.resolveComponent([{service:`ModelResolver`,params:[pa]}],e,t)}};cJ=U([g(),B(0,m(V.TicketInboxService)),B(1,m(V.RouterService)),B(2,m(V.ResolverService))],cJ);var lJ=cJ,uJ=class extends qE{constructor(e,t,n){super(e,t,n)}getPermissions(e){return this.getDomainRepository().getPermissions(e)}findUserPermissionsInAnyGroupByName(e,t){let n=this.findEntityByIdOrFail(e);for(let e in n){let r=n[e];if(typeof r==`object`&&r[t])return r[t]}throw new G(`Not found permission with name "${t.toString()}"`)}updatePermissions(e,t){return this.getDomainRepository().updatePermissions(e,t)}async updatePermissionsInStore(e,t){let n=await this.getDomainRepository().updatePermissionsInStore(e,t);return this.notify([e],cl.UPDATE),n}};uJ=U([oD({model:FD}),g(),h(),B(0,m(V.EntityManager)),B(1,m(V.ModelSubscriptionService)),B(2,m(V.PreloaderManager))],uJ);var dJ=uJ,fJ=class extends Q{async getPermissions(e){let t=this.endpointsService.getPath(`subAccountPermissions`,[e]),n=await this.getApiSource().get(t);return await this.insertOrUpdate([{...n.data,id:e}]),this.findEntityByIdOrFail(e)}async updatePermissions(e,t){let n=this.endpointsService.getPath(`subAccountPermissions`,[e]),r=re(t);for(let e in r)Object.keys(r[e]).forEach(t=>{r[e][t]=+r[e][t]});return await this.getApiSource().put(n,r),this.getPermissions(e)}updatePermissionsInStore(e,t){return this.insertOrUpdate([{...t,id:e}])}};fJ=U([Y({model:FD}),g(),h()],fJ);var pJ=fJ,mJ=class{constructor(e){this.userSettingsService=e}async resolve(){this.userSettingsService.currentUserSettingsOrNull()?.emailPrice||await this.userSettingsService.fetchEmailPrice()}};mJ=U([g(),B(0,m(V.UserSettingsService))],mJ);var hJ=mJ,gJ=class extends pl{get hasAvailableEmailsBonuses(){return this.emails!==0}get hasAvailableEmailLookupsBonuses(){return this.emailLookups!==0}get hasAvailableEmailsOrEmailLookupsBonuses(){return this.hasAvailableEmailsBonuses||this.hasAvailableEmailLookupsBonuses}};U([ft()],gJ.prototype,`emails`,void 0),U([ft()],gJ.prototype,`emailLookups`,void 0),U([v()],gJ.prototype,`emailStatus`,void 0),gJ=U([Be(md.BONUS_INFO)],gJ);var _J=gJ,vJ=class extends qE{constructor(...e){super(...e),this.quantityBonusEmails=1e4,this.quantityBonusEmailLookups=1e4}fillInfoBonus(){return this.getDomainRepository().fillBonusInfo()}async updateBonusInfo(e){return this.getDomainRepository().updateBonusInfo(e)}findBonusInfoOrNull(){return this.getDomainRepository().findBonusInfoOrNull()}};vJ=U([oD({model:_J}),g(),h()],vJ);var yJ=vJ,bJ=class extends Q{constructor(...e){super(...e),this.id=`1`}async fillBonusInfo(){let e=this.endpointsService.getPath(`bonusInfo`),t=await this.getApiSource().get(e);return await this.insertOrUpdate([{id:this.id,emails:t.data.email.emails,emailLookups:t.data.email.lookups,emailStatus:t.data.email.status}]),this.findBonusInfoOrFail()}async updateBonusInfo(e){await this.insertOrUpdate([{id:this.id,emails:e.emails,emailLookups:e.emailLookups,emailStatus:e.emailStatus}])}findBonusInfoOrNull(){return this.findEntityByIdOrNull(this.id)}findBonusInfoOrFail(){return this.findEntityByIdOrFail(this.id)}};bJ=U([g(),h(),Y({model:_J})],bJ);var xJ=bJ,SJ=class{constructor(e,t,n){this.featureFlagsService=e,this.bonusInfoService=t,this.serverSubscriptionService=n,this.emailBonusUpdatedHandler=e=>{this.bonusInfoService.updateBonusInfo({emails:e.payload.emails,emailLookups:e.payload.lookups,emailStatus:e.payload.status})}}async resolve(){this.featureFlagsService.isFeatureEnabled(Hu.EmailBonus)&&
57(this.serverSubscriptionService.subscribe(`emailBonusUpdated`,this.emailBonusUpdatedHandler),this.bonusInfoService.fillInfoBonus())}async unresolve(){this.serverSubscriptionService.unsubscribe(`emailBonusUpdated`,this.emailBonusUpdatedHandler)}};SJ=U([g(),B(0,m(V.FeatureFlagsService)),B(1,m(V.BonusInfoService)),B(2,m(V.ServerSubscriptionService))],SJ);var CJ=SJ,wJ=class extends tR{constructor(e){super(),this.monitoringLoggerService=e,this.trackingId=`56283065`}getConfig(){return{id:this.trackingId}}getPlugin(){return{install:()=>this.initialize()}}async initialize(){let e=this.trackingId,t=e=>{this.monitoringLoggerService.logAndCapture(e,Ba.ERROR)};this.initializeTrackerAsPlugin({trackingHandler:async()=>{(function(n,r,i,a,o){var s,c,l;n[o]=n[o]||[],s=function(){var t={ti:e,enableAutoSpaTracking:!0};t.q=n[o],n[o]=new UET(t),n[o].push(`pageLoad`)},c=r.createElement(i),c.src=a,c.async=1,c.onload=c.onreadystatechange=function(){var e=this.readyState;if(!(e&&e!==`loaded`&&e!==`complete`)){c.onload=c.onreadystatechange=null;var n=0,r=function(){typeof UET<`u`?s():n<10?(n++,setTimeout(r,200)):t(`Microsoft UET: failed to initialize after 10 attempts`)};r()}},l=r.getElementsByTagName(i)[0],l.parentNode.insertBefore(c,l)})(window,document,`script`,`//bat.bing.com/bat.js`,`uetq`)},loadOnCustomEvent:!0})}};wJ=U([g(),h(),B(0,m(V.MonitoringLoggerService))],wJ);var TJ=class extends tR{constructor(e,t,n){super(),this.routerService=e,this.subscriptionService=t,this.localStorageAdapter=n,this.localStorageGettingStartedKey=`tm::isGettingStartedVisited`}getConfig(){return{id:``}}getPlugin(){return{install:()=>this.initialize()}}async initialize(){let e=this.routerService.getRouter(),t=`gartnerAnalytics`,n=e=>{window._gz&&window._gz(`2dfb2552-3dcf-4721-a5f9-aead9602994d`,`c8dbc4d64e13c51adf4b94f9bc03408e`),this.trackGettingStartedEvent(e)},r=()=>{(function(e,t,n,r,i){window._gz=function(e,t){window._ct={vid:e,vkey:t,uc:!0,hasDoNotTrackIPs:!1},window.ct},r=e.createElement(t),i=e.getElementsByTagName(t)[0],r.async=1,r.src=n,i.parentNode.insertBefore(r,i)})(document,`script`,`https://tr.capterra.com/static/wp.js`),n()};this.initializeTrackerAsPlugin({trackingHandler:async()=>{r(),await e.isReady(),this.subscriptionService.exist(t)||this.subscriptionService.subscribeWithSubscriptionKey(Ur,n,t,!0)},loadOnCustomEvent:!0})}shouldTrackGettingStartedEvent(e){return!e||e.name!==`user.gettingStarted`?!1:!this.localStorageAdapter.get(this.localStorageGettingStartedKey)}trackGettingStartedEvent(e){this.shouldTrackGettingStartedEvent(e)&&window.ct?.sendEvent&&(window.ct.sendEvent({installationId:`f7b72ae5-47ab-40ea-a09f-97964e3087d1`}),this.localStorageAdapter.set(this.localStorageGettingStartedKey,`true`))}};TJ=U([g(),h(),B(0,m(V.RouterService)),B(1,m(V.SubscriptionService)),B(2,m(V.LocalStorageAdapter))],TJ);var EJ=class extends qE{saveState(e,t){let n=this.getDomainRepository().findEntityByIdOrNull(e),r=n?.states??[],i=n?.currentStateSequence??0,a=[...r.slice(0,i),re(t)],o=a.length;this.getDomainRepository().insertOrUpdateItem({id:e,currentStateSequence:o,states:a})}undo(e){let t=this.getDataToUndo(e);if(t)return this.getDomainRepository().insertOrUpdateItem({id:e,currentStateSequence:t.sequence}),t.state}redo(e){let t=this.getDataToRedo(e);if(t)return this.getDomainRepository().insertOrUpdateItem({id:e,currentStateSequence:t.sequence}),t.state}moveToSequence(e,t){let n=this.getDataToMoveToSequence(e,t);if(n)return this.getDomainRepository().insertOrUpdateItem({id:e,currentStateSequence:n.sequence}),n.state}canUndo(e){return!!this.getDataToUndo(e)}canRedo(e){return!!this.getDataToRedo(e)}clear(e){this.getDomainRepository().clear(e)}getCurrentStateSequence(e){let t=this.getDomainRepository().findEntityByIdOrNull(e);return t?t.currentStateSequence:0}getDataToMoveToSequence(e,t){let n=this.getDomainRepository().findEntityByIdOrNull(e);if(!n)return;let r=t-1,i=n.states[r];if(i)return{state:i,sequence:t}}getDataToUndo(e){let t=this.getCurrentStateSequence(e)-1;return this.getDataToMoveToSequence(e,t)}getDataToRedo(e){let t=this.getCurrentStateSequence(e)+1;return this.getDataToMoveToSequence(e,t)}};EJ=U([oD({model:Ef}),g(),h()],EJ);var DJ=EJ,OJ=class extends Q{clear(e){this.delete([e])}};OJ=U([g(),h(),Y({model:Ef})],OJ);var kJ=OJ,AJ=class{constructor(e,t,n,r){this.routerService=e,this.routePrefetchService=t,this.localStorageService=n,this.mainSidebarRoutesResolverService=r}prefetchRoutes(e){let t=new Set;for(let n of e)if(typeof n==`string`)t.add(n);else if(Yi(n))for(let e of n)t.add(e);else t.add(n.routeName);for(let e of t){let t=this.routerService.resolve({name:e});t.name&&this.routePrefetchService.prefetchChunksForRoute(t.name)}}async resolve(){let e=Object.values(this.mainSidebarRoutesResolverService.getRoutesMapStructure());this.localStorageService.get(la.SELECTED_TYPE)===`email`?e.push(Ki):e.push(Ei),this.prefetchRoutes(e)}};AJ=U([g(),B(0,m(V.RouterService)),B(1,m(V.RoutePrefetchService)),B(2,m(V.LocalStorageService)),B(3,m(V.MainSidebarRoutesResolverService))],AJ);
57var jJ=AJ,MJ=[ku.in,ku.allOf,ku.exactly,ku.notIn],NJ=`tag`,PJ=class{constructor(e,t,n){this.tagService=e,this.translateService=t,this.deletedEntityService=n}toFormattedText(e,{relatedFieldName:t=`id`}){let n=this.getParsedValue(e,t);return[{type:`italic`,value:this.getOperationLabel(n.operation)},{type:`badges`,value:n.tagIds.map(e=>this.deletedEntityService.isDeleted(NJ,e)?{name:Ve(this.deletedEntityService.getDeletedEntityLabel(NJ)),color:`red`}:this.tagService.findEntityByIdOrNull(e)?.title??e)}]}getFilterDependencies(e,{relatedFieldName:t=`id`}){return[{model:Si,ids:this.getParsedValue(e,t).tagIds}]}getParsedValue(e,t){let r=ku.in,i=[];for(let a of MJ){let o=n(e,[t,a]);if(o&&o.length>0){r=a,i=o;break}}return{operation:r,tagIds:i}}getOperationLabel(e){return{[ku.in]:this.translateService.t(`tmFilterTags.contain`),[ku.allOf]:this.translateService.t(`tmFilterTags.containAll`),[ku.exactly]:this.translateService.t(`tmFilterTags.areExactly`),[ku.notIn]:this.translateService.t(`tmFilterTags.containNone`)}[e]}};PJ=U([g(),B(0,m(V.TagService)),B(1,m(V.TranslateService)),B(2,m(V.DeletedEntityService))],PJ);var FJ=PJ,IJ=class{constructor(e,t){this.countryService=e,this.translateService=t}toFormattedText(e){let t=n(e,[ku.in],[]),r=t.includes(`0`),i=[];r&&i.push({type:`italic`,value:this.translateService.t(`myContactsFilters.isEmpty`)});let a=t.filter(e=>e!==`0`).map(e=>({name:this.countryService.getCountryName(e)}));return a.length>0&&i.push({type:`badges`,value:a}),i}};IJ=U([g(),B(0,m(V.CountryService)),B(1,m(V.TranslateService))],IJ);var LJ=IJ,RJ=class{constructor(e,t){this.userService=e,this.translateService=t}toFormattedText(e,{relatedFieldName:t=`id`}){let n=this.getUserIds(e,t),r=n.includes(`0`),i=[];r&&i.push({type:`italic`,value:this.translateService.t(`fieldAssignee.unassigned`)});let a=n.filter(e=>e!==`0`).map(e=>({name:this.userService.findEntityByIdOrNull(e)?.fullName||e}));return a.length>0&&i.push({type:`badges`,value:a}),i}getFilterDependencies(e,{relatedFieldName:t=`id`}){return[{model:Kn,ids:this.getUserIds(e,t).filter(e=>e&&e!==`0`)}]}getUserIds(e,t){return n(e,[t,ku.in],[]).filter(e=>!Ae(e)).map(e=>String(e))}};RJ=U([g(),B(0,m(V.UserService)),B(1,m(V.TranslateService))],RJ);var zJ=RJ,BJ=e=>Object.keys(e).filter(t=>!(e[t]===void 0||e[t]===null||Array.isArray(e[t])&&e[t].length===0)),VJ=`, `,HJ=class{constructor(e){this.translateService=e}mapOperation(e,t){switch(e){case`startsWith`:return du.StartsWith;case`endsWith`:return du.EndsWith;case`anyOf`:return du.AnyOf;case`noneOf`:return du.NoneOf;case`isEmpty`:return Su(t,du.IsEmpty,du.IsNotEmpty);default:throw new G(`Unknown operation`)}}parseValue(e,t){return t===du.IsEmpty||t===du.IsNotEmpty?{value:[],hasValue:!0}:typeof e==`string`?{value:[e],hasValue:!0}:Array.isArray(e)?{value:e,hasValue:e.length>0}:{value:[],hasValue:!1}}getLabel(e,t,n){if(e===du.IsEmpty)return{op:this.translateService.t(`tmFilterPhone.options.isEmpty`),main:``};if(e===du.IsNotEmpty)return{op:this.translateService.t(`tmFilterPhone.options.isNotEmpty`),main:``};if(!t.hasValue)return{op:``,main:this.translateService.t(`common.any`)};let r=``;return e===du.StartsWith?r=this.translateService.t(`tmFilterPhone.options.startsWith`):e===du.EndsWith?r=this.translateService.t(`tmFilterPhone.options.endsWith`):e===du.NoneOf?r=this.translateService.t(`tmFilterPhone.options.notLike`):e===du.AnyOf&&(r=this.translateService.t(`tmFilterPhone.options.like`)),{op:r,main:n?t.value.slice(0,n).join(VJ):t.value.join(VJ)}}toFormattedText(e){let t=BJ(e)[0],n=e[t],r=this.mapOperation(t,n),i=this.parseValue(n,r),a=this.getLabel(r,i),o=[];return a.op&&o.push({type:`italic`,value:a.op}),a.main&&o.push({type:`badges`,value:a.main.split(VJ).map(e=>e)}),o}};HJ=U([g(),B(0,m(V.TranslateService))],HJ);var UJ=HJ,WJ=`, `,GJ=class{constructor(e){this.translateService=e}mapOperation(e,t){switch(e){case rl.AnyOf:return rl.AnyOf;case rl.NoneOf:return rl.NoneOf;case rl.IsEmpty:return Su(t,rl.IsEmpty,rl.IsNotEmpty);case rl.IsUnsubscribed:return Su(t,rl.IsUnsubscribed,rl.IsNotUnsubscribed);default:throw new G(`Unknown operation`)}}parseValue(e,t){return t===rl.IsEmpty||t===rl.IsNotEmpty||t===rl.IsUnsubscribed||t===rl.IsNotUnsubscribed?{value:[],hasValue:!0}:Array.isArray(e)?{value:e,hasValue:e.length>0}:{value:[],hasValue:!1}}getLabel(e,t){let n={[rl.IsEmpty]:this.translateService.t(`tmFilterEmail.options.isEmpty`),[rl.IsNotEmpty]:this.translateService.t(`tmFilterEmail.options.isNotEmpty`),[rl.IsUnsubscribed]:this.translateService.t(`tmFilterEmail.options.isUnsubscribed`),[rl.IsNotUnsubscribed]:this.translateService.t(`tmFilterEmail.options.isNotUnsubscribed`),[rl.NoneOf]:this.translateService.t(`tmFilterEmail.doesNotContain`),[rl.AnyOf]:this.translateService.t(`tmFilterEmail.contains`)};return[rl.AnyOf,rl.NoneOf].includes(e)?{op:n[e],main:t.value.length>0?t.value.join(WJ):this.translateService.t(`common.any`)}:{op:n[e],main:``}}toFormattedText(e){let t=BJ(e)[0],n=e[t],r=this.mapOperation(t,n),i=this.parseValue(n,r),a=this.getLabel(r,i),o=[];return a.op&&o.push({type:`italic`,value:a.op}),a.main&&o.push({type:`badges`,value:this.getBadgesValueItemsFromLabel(a.main)}),o}getBadgesValueItemsFromLabel(e){return e.split(WJ).map(e=>e)}};GJ=U([g(),B(0,m(V.TranslateService))],GJ);var KJ=GJ,qJ=`, `,JJ=class{constructor(e){this.translateService=e}mapOperation(e,t){switch(e){case`anyOf`:return ll.AnyOf;case`noneOf`:return ll.NoneOf;case`isEmpty`:return Su(t,ll.IsNull,ll.IsNotNull);default:throw new G(`Unknown operation`)}}parseValue(e,t){return t===ll.IsNull||t===ll.IsNotNull?{value:[],hasValue:!0}:Array.isArray(e)?{value:e,hasValue:e.length>0}:{value:[],hasValue:!1}}getLabel(e,t){let n={[ll.IsNull]:this.translateService.t(`tmFilterWords.options.isEmpty`),[ll.IsNotNull]:this.translateService.t(`tmFilterWords.options.isNotEmpty`),[ll.NoneOf]:this.translateService.t(`tmFilterWords.doesNotContain`),[ll.AnyOf]:this.translateService.t(`tmFilterWords.
57contains`)};return[ll.AnyOf,ll.NoneOf].includes(e)?{op:n[e],main:t.value.length>0?t.value.join(qJ):this.translateService.t(`common.any`)}:{op:n[e],main:``}}toFormattedText(e){let t=BJ(e)[0],n=e[t],r=this.mapOperation(t,n),i=this.parseValue(n,r),a=this.getLabel(r,i),o=[];return a.op&&o.push({type:`italic`,value:a.op}),a.main&&o.push({type:`badges`,value:this.getBadgesValueItemsFromLabel(a.main)}),o}getBadgesValueItemsFromLabel(e){return e.split(qJ).map(e=>e)}};JJ=U([g(),B(0,m(V.TranslateService))],JJ);var YJ=JJ,XJ=[ku.in,ku.allOf,ku.exactly],ZJ=`contactList`,QJ=class{constructor(e,t,n){this.contactListService=e,this.translateService=t,this.deletedEntityService=n}toFormattedText(e,{relatedFieldName:t=`id`}){return e.isEmpty?[{type:`italic`,value:this.translateService.t(`tmFilterContactList.unlisted`)}]:[{type:`badges`,value:this.getListIds(e,t).map(e=>this.deletedEntityService.isDeleted(ZJ,e)?{name:Ve(this.deletedEntityService.getDeletedEntityLabel(ZJ)),color:`red`}:{name:this.contactListService.findEntityByIdOrNull(e)?.name??e,icon:`tmi-people`,color:`blue`,extraData:{entity:{type:`contactList`,id:e}}})}]}getFilterDependencies(e,{relatedFieldName:t=`id`}){return[{model:Fn,ids:this.getListIds(e,t)}]}getListIds(e,t){let r=[];for(let i of XJ){let a=n(e,[t,i]);if(a&&a.length>0){r=a;break}}return r}};QJ=U([g(),B(0,m(V.ContactListService)),B(1,m(V.TranslateService)),B(2,m(V.DeletedEntityService))],QJ);var $J=QJ,eY=class{constructor(e,t){this.contactService=e,this.translateService=t}toFormattedText(e){let t=n(e,[ku.in],[]),r=t.includes(`empty`),i=[];r&&i.push({type:`italic`,value:this.translateService.t(`myContactsFilters.isEmpty`)});let a=t.filter(e=>e!==`empty`).map(e=>({name:this.contactService.getSourceText(e)}
57));return a.length>0&&i.push({type:`badges`,value:a}),i}};eY=U([g(),B(0,m(V.ContactService)),B(1,m(V.TranslateService))],eY);var tY=eY,nY=class{constructor(e){this.translateService=e}toFormattedText(e){let t=e[ku.isEmpty];if(t!=null)return[{type:`italic`,value:Su(t,!0,!1)?this.translateService.t(`tmFilterNumeric.empty`):this.translateService.t(`tmFilterNumeric.notEmpty`)}];let n=$W(e);return n?WT(n)?[{type:`italic`,value:this.translateService.t(`tmFilterNumeric.between`)},{type:`badge`,value:`${n.start} - ${n.end}`}]:HT(n)?[`â¥`,{type:`badge`,value:n.start}]:UT(n)?[`â¤`,{type:`badge`,value:n.end}]:[]:[]}};nY=U([g(),B(0,m(V.TranslateService))],nY);var rY=nY,iY=class{constructor(e){this.translateService=e}toFormattedText(e,{callback:t}){let r=this.getOptionValueToTextMap(t),i=n(e,[ku.in],[]),a=i.includes(`0`),o=[];a&&o.push({type:`italic`,value:this.translateService.t(`myContactsFilters.isEmpty`)});let s=i.filter(e=>e!==`0`).map(e=>({name:r[e]??e}));return s.length>0&&o.push({type:`badges`,value:s}),o}getOptionValueToTextMap(e){let t=e?.({id:``,options:[]});return(t?.options&&Array.isArray(t.options)?t.options:[]).reduce((e,t)=>(e[t.value]=t.text,e),{})}};iY=U([g(),B(0,m(V.TranslateService))],iY);var aY=iY,oY=class{constructor(e,t,n){this.domainManagerService=e,this.preloaderManager=t,this.deletedEntityService=n}async preload(e,t=20){let n=new Map;e.forEach(e=>{let t=n.get(e.model)||[];n.set(e.model,[...t,...e.ids.map(e=>e.toString())])});let r=[];n.forEach((e,n)=>{let i;try{i=this.domainManagerService.getService(n)}catch{}mt(ct(e),t).forEach(e=>{i&&pr(i)?r.push(i.preloadByIds(e)):r.push(this.preloaderManager.getByIdsPreloader(n).preloadByIds(n,e))})}),await Promise.all(r),n.forEach((e,t)=>{let n;try{n=this.domainManagerService.getService(t)}catch{}if(!n)return;let r=e.filter(e=>n.findEntityByIdOrNull(e)===null);this.deletedEntityService.markManyAsDeleted(t.entity,r)})}};oY=U([g(),B(0,m(V.DomainManagerService)),B(1,m(V.PreloaderManager)),B(2,m(V.DeletedEntityService))],oY);var sY=oY,cY=class extends tR{constructor(e,t,n){super(),this.routerService=e,this.subscriptionService=t,this.userService=n,this.BLOCKED_PII_PARAMS=new Set([`user`,`name`,`firstName`,`lastName`,`text`,`s`]),this.isTransportPatched=!1,this.trackingId=`652787705180119`,this.userId=void 0}getConfig(){return{id:this.trackingId}}getPlugin(){return{install:()=>this.initialize()}}patchTransportsForPiiFiltering(){if(this.isTransportPatched)return;this.isTransportPatched=!0;let e=e=>this.stripBlockedParamsFromDl(e),t=window.Image,n=Object.getOwnPropertyDescriptor(HTMLImageElement.prototype,`src`);if(window.Image=function(...r){let i=new t(...r);return Object.defineProperty(i,"src",{set(t){n.set.call(this,e(t))},get(){return n.get.call(this)},configurable:!0}),i},window.Image.prototype=t.prototype,navigator.sendBeacon){let t=navigator.sendBeacon.bind(navigator);navigator.sendBeacon=(n,r)=>t(typeof n==`string`?e(n):n,r)}}async initialize(){let e=this.trackingId,t=`metaPixelAnalytics`,n=this.routerService.getRouter(),r=()=>new Promise(e=>{let t=!1,n=()=>{t||(t=!0,e())};(function(e,t,r,i,a,o,s){if(e.fbq)return void n();a=e.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},e._fbq||(e._fbq=a),a.push=a,a.loaded=!0,a.version=`2.0`,a.queue=[],o=t.createElement(r),o.async=!0,o.src=i,o.onload=n,o.onerror=n,setTimeout(()=>{n()},1e4),s=t.getElementsByTagName(r)[0],s.parentNode.insertBefore(o,s)})(window,document,`script`,`https://connect.facebook.net/en_US/fbevents.js`)}),i=t=>{fbq(`set`,`autoConfig`,!1,e),fbq(`init`,e,{external_id:[t]})},a=()=>{let e=this.userService.getCurrentUserOrNull()?.id;e&&(this.userId!==e&&(i(e),this.userId=e),fbq(`track`,`PageView`))};this.initializeTrackerAsPlugin({trackingHandler:async()=>{this.patchTransportsForPiiFiltering(),await r(),await n.isReady(),a(),this.subscriptionService.exist(t)||this.subscriptionService.subscribeWithSubscriptionKey(Ur,a,t,!0)},loadOnCustomEvent:!0})}stripBlockedParamsFromDl(e){try{let t=new URL(e);if(t.hostname!==`facebook.com`&&t.hostname!==`www.facebook.com`||!t.pathname.startsWith(`/tr`))return e;let n=t.searchParams.get(`dl`);return n&&t.searchParams.set(`dl`,this.stripBlockedParamsFromUrl(n)),t.toString()}catch{return e}}stripBlockedParamsFromUrl(e){try{let t=new URL(e);for(let e of Array.from(t.searchParams.keys())){let n=e.split(`[`,1)[0];this.BLOCKED_PII_PARAMS.has(n)&&t.searchParams.delete(e)}return t.toString()}catch{return e}}};cY=U([g(),h(),B(0,m(V.RouterService)),B(1,m(V.SubscriptionService)),B(2,m(V.UserService))],cY);var lY=class extends tR{constructor(e,t){super(),this.cookieConsentService=e,this.subscriptionService=t,this.trackingId=`P4mw8TexLvvPVDSBaMFKj7`,this.isSdkRequested=!1,this.appliedConsent=void 0,this.visibilityHandler=()=>{document.hidden||this.syncConsent()}}getConfig(){return{id:this.trackingId}}getPlugin(){return{install:()=>this.initialize()}}async initialize(){let e=`openAiPixelConsent`;this.syncConsent(),!this.subscriptionService.exist(e)&&(this.subscriptionService.subscribeWithSubscriptionKey(Ur,()=>this.syncConsent(),e,!0),document.addEventListener(`visibilitychange`,this.visibilityHandler))}cleanUp(){document.removeEventListener(`visibilitychange`,this.visibilityHandler)}syncConsent(){let e=this.cookieConsentService.hasAdvertisementConsent();if(e!==this.appliedConsent){if(this.appliedConsent=e,!this.isSdkRequested){e&&this.loadSdk();return}window.oaiq?.(`consent`,e)}}loadSdk(){this.isSdkRequested=!0,this.initializeTrackerAsPlugin({trackingHandler:async()=>{(function(e,t,n,r){if(!e.oaiq){var i=function(){i.q.push(arguments)};i.q=[],e.oaiq=i;var a=t.createElement(n);a.async=1,a.src=r;var o=t.getElementsByTagName(n)[0];o.parentNode.insertBefore(a,o)}})(window,document,`script`,`https://bzrcdn.openai.com/sdk/oaiq.min.js`),window.oaiq(`consent`,!0),window.oaiq(`init`,{pixelId:this.trackingId,debug:!1})},loadOnCustomEvent:!0})}};lY=U([g(),h(),B(0,m(V.CookieConsentService)),B(1,m(V.SubscriptionService))],lY);
57var uY=`oppref`,dY=`tm_openai_oppref`,fY=`__obref`,pY=30,mY=`textmagic.com`,hY=`.${mY}`,gY=class{constructor(e,t){this.windowService=e,this.cookieConsentService=t}syncOpprefFromUrl(){if(!this.cookieConsentService.hasAdvertisementConsent()){this.removeOpprefCookie();return}let e=this.getOpprefFromUrl();e&&Un(dY,e,pY,this.getSharedCookieDomain())}getClickIds(){return this.cookieConsentService.hasAdvertisementConsent()?{oppref:this.getOppref(),obref:ta(fY)}:{oppref:null,obref:null}}removeOpprefCookie(){qn(dY,this.getSharedCookieDomain())}getOppref(){return this.getOpprefFromUrl()??ta(dY)}getOpprefFromUrl(){let e=`${uY}=`;return this.windowService.self().location.search.replace(/^\?/,``).split(`&`).find(t=>t.startsWith(e))?.slice(e.length)||null}getSharedCookieDomain(){let{hostname:e}=this.windowService.self().location;return e===mY||e.endsWith(hY)?hY:void 0}};gY=U([g(),B(0,m(V.WindowService)),B(1,m(V.CookieConsentService))],gY);var _Y=gY,vY=class{constructor(){this.shaid=`64212`}trackConversion({conversionType:e,orderId:t=``,orderAmt:n=``}){let{referrer:r,parentHref:i}=this.getPageContext(),a=Math.floor(Math.random()*0x16345785d8a0000),o=new URLSearchParams({conv:`1`,shaid:this.shaid,tdr:r,plh:i,cb:String(a),shoid:String(t),shoamt:String(n),type:e,shocur:``,shopid:``,shoq:``,shoup:``,shpil:``});this.injectPixelScript(`https://dx.mountain.com/spx?${o.toString()}`)}getPageContext(){let e,t;try{e=top?.document?.referer===``?``:encodeURIComponent((top?.document?.referrer??``).substring(0,2048))}catch{e=document.referrer===null?``:document.referrer.toString().substring(0,2048)}try{t=parent.location.href===``?``:encodeURIComponent(parent.location.href.toString().substring(0,2048))}catch{t=``}return{referrer:e,parentHref:t}}injectPixelScript(e){let t=document.createElement(`script`);t.type=`text/javascript`,t.async=!0,t.src=e;let n=document.getElementsByTagName(`script`),r=n[n.length-1];r?.parentNode?.insertBefore(t,r)}};vY=U([g()],vY);var yY=class{constructor(e,t){this.windowService=e,this.performanceMarkService=t,this.listeners=new Map,this.target=this.windowService.self()}emit(e){this.target.dispatchEvent(e),this.performanceMarkService.mark(`EventBus emit: ${e.id}`)}subscribe(e,t){let n=Symbol(e.id),r=e=>t(e);return this.target.addEventListener(e.id,r),this.listeners.set(n,{eventId:e.id,listener:r}),n}unsubscribe(e){let t=this.listeners.get(e);t&&(this.target.removeEventListener(t.eventId,t.listener),this.listeners.delete(e))}cleanup(){this.listeners.forEach((e,t)=>{this.target.removeEventListener(e.eventId,e.listener)}),this.listeners.clear()}};yY=U([g(),B(0,m(V.WindowService)),B(1,m(V.PerformanceMarkService))],yY);var bY=function(e){return e.SHOPIFY=`shopify_connection`,e.WOO_COMMERCE=`woocommerce_connection`,e.HUBSPOT=`hubspot_connection`,e.SHOPIFY_RECONNECTION=`shopify_reconnection`,e.WOO_COMMERCE_RECONNECTION=`woocommerce_reconnection`,e.HUBSPOT_RECONNECTION=`hubspot_reconnection`,e.HUBSPOT_MARKETPLACE_INSTALL=`hubspot_marketplace_install`,e.AUTOMATION_LOGS=`automation_logs`,e}({}),xY=function(e){return e.ERROR=`error`,e}({}),SY=function(e){return e.STORE_ALREADY_CONNECTED=`integration.store_already_connected`,e}({}),CY={[Sn.HUBSPOT]:{[SY.STORE_ALREADY_CONNECTED]:`externalIntegrations.hubspot.setup.errors.storeAlreadyConnected`}},wY=class{constructor(e,t,n,r,i,a){this.routerService=e,this.externalIntegrationsService=t,this.hubspotIntegrationService=n,this.notificationService=r,this.translateService=i,this.windowService=a,this.getResolverKeys=()=>[`redirectResolver`]}async resolve(e,t){let n=t.query;switch(n.type){case bY.SHOPIFY:return this.resolveConnectionRedirect(Sn.SHOPIFY,n.status,n.errorCode);case bY.WOO_COMMERCE:return this.resolveConnectionRedirect(Sn.WOO_COMMERCE,n.status,n.errorCode);case bY.HUBSPOT:return this.resolveConnectionRedirect(Sn.HUBSPOT,n.status,n.errorCode);case bY.SHOPIFY_RECONNECTION:return this.resolveReconnectionRedirect(Sn.SHOPIFY);case bY.WOO_COMMERCE_RECONNECTION:return this.resolveReconnectionRedirect(Sn.WOO_COMMERCE);case bY.HUBSPOT_RECONNECTION:return this.resolveReconnectionRedirect(Sn.HUBSPOT);case bY.HUBSPOT_MARKETPLACE_INSTALL:return this.resolveHubspotMarketplaceInstallRedirect(n.returnUrl);case bY.AUTOMATION_LOGS:return this.resolveAutomationLogsRedirect(n.automationId);default:return this.resolveUnknownRedirect()}}
57async resolveConnectionRedirect(e,t,n){await this.routerService.replace({name:L.IntegrationSetup,params:{provider:e}}),t===xY.ERROR&&this.notifyConnectionError(e,n)}notifyConnectionError(e,t){let n=t?CY[e]?.[t]:void 0;n&&this.notificationService.notifyError(this.translateService.t(n))}async resolveReconnectionRedirect(e){await this.externalIntegrationsService.loadData();let t=this.externalIntegrationsService.findEntityByIdOrNull(e);if(!t?.connectionId){await this.routerService.replace({name:L.Integrations});return}await this.routerService.replace({name:L.IntegrationDetails,params:{id:String(t.connectionId)}})}async resolveHubspotMarketplaceInstallRedirect(e){try{let t=await this.hubspotIntegrationService.getMarketplaceAuthorizeUrl(e);this.windowService.redirect(t)}catch(e){await this.routerService.replace({name:L.Integrations}),this.notificationService.notifyFromError(e)}}async resolveAutomationLogsRedirect(e){await this.routerService.replace({name:Ln.logs,state:{automationId:e}})}async resolveUnknownRedirect(){await this.routerService.replace({name:Ei})}};wY=U([g(),B(0,m(V.RouterService)),B(1,m(V.ExternalIntegrationsService)),B(2,m(V.HubspotIntegrationService)),B(3,m(V.NotificationService)),B(4,m(V.TranslateService)),B(5,m(V.WindowService))],wY);var TY=wY,EY=class{constructor(e){this.deletedEntityService=e}getModelName(e){return e.entity}async fillEntitiesByIds(e,t,n=[]){let r=t.map(e=>e.toString());if(!r.length)return[];let i=this.getModelName(e.settings().model),a=await e.fillEntitiesByIds(r,n),o=r.filter(e=>a.find(t=>t.id===e)===void 0);return this.deletedEntityService.markManyAsDeleted(i,o),a}async findOrFillEntitiesByIds(e,t,n=[]){let r=[],i=[],a=this.getModelName(e.getDomainSettings().model);t.forEach(t=>{let o=e.findEntityByIdOrNull(t,n);if(o){i.push(o);return}this.deletedEntityService.isDeleted(a,t)||r.push(t)});let o=await e.fillEntitiesByIds(r,n);return[...i,...o]}};EY=U([g(),B(0,m(V.DeletedEntityService))],EY);var DY=class extends qE{markManyAsDeleted(e,t){if(t.length)return this.getDomainRepository().insertOrUpdateRaw(t.map(t=>({id:this.getDeletedEntityId(e,t),entityType:e,entityId:t})))}isDeleted(e,t){return this.findEntityByIdOrNull(this.getDeletedEntityId(e,t))!==null}getDeletedEntityLabel(e){let t=`entities.${e}.name`,n=this.translateService.exists(t)?this.translateService.t(t):e;return this.translateService.t(`entities.deletedEntity`,{entity:n})}getDeletedEntityId(e,t){return`${e}-${t}`}};U([m(V.TranslateService)],DY.prototype,`translateService`,void 0),DY=U([oD({model:Pf}),g(),h()],DY);var OY=DY,kY=class extends Q{};kY=U([g(),h(),Y({model:Pf})],kY);var AY=kY,jY=class{constructor(e,t,n){this.routerService=e,this.routerPermissionsService=t,this.translateService=n,this.setFirstAvailableRoute=async()=>{let e=this.getFilteredRoutes().map(e=>e.route)[0]??{name:`user.compose.message`};await this.routerService.replace(e)}}getReportSmsSectionRoutes(){return[{name:`overview`,route:{name:_n}},{name:`trends`,route:{name:er}},{name:`numbers`,route:{name:Fi}},{name:`subAccounts`,route:{name:ji}},{name:`users`,route:{name:ar}}]}getReportEmailSectionRoutes(){return[{name:`overview`,route:{name:Ea}},{name:`trends`,route:{name:En}},{name:`users`,route:{name:sr}},{name:`sub-accounts`,route:{name:On}},{name:`senders`,route:{name:Cr}},{name:`links`,route:{name:wn}}]}getReportSectionRoutes(){return[{name:`sms`,route:{name:`user.reporting.sms`},childrenRoutesList:this.getReportSmsSectionRoutes()},{name:`email`,route:{name:`user.reporting.email`},childrenRoutesList:this.getReportEmailSectionRoutes()},{name:`calls`,route:{name:`user.reporting.calls`},childrenRoutesList:void 0},{name:`auditLogs`,route:{name:`user.reporting.auditLogs`},childrenRoutesList:void 0}]}async resolveStrategies(){let e=[];this.getReportSectionRoutes().forEach(t=>{t.childrenRoutesList&&t.childrenRoutesList.forEach(t=>{e.push(t.route)}),e.push(t.route)}),await Promise.all(e.map(e=>this.routerPermissionsService.resolveStrategiesForRoute(e)))}getFilteredRoutes(){let e=this.getReportSectionRoutes(),t=[],n={sms:this.translateService.t(`pageTitle.user.reporting.sms`),email:this.translateService.t(`pageTitle.user.reporting.email`),calls:this.translateService.t(`pageTitle.user.reporting.calls`),auditLogs:this.translateService.t(`pageTitle.user.reporting.auditLogs`)},r={email:`new`};
57return e.forEach(e=>{let i;if(e.childrenRoutesList){let t=e.childrenRoutesList.find(e=>this.routerPermissionsService.isAllowAccessToRoute(e.route));if(!t)return;i={itemType:`link`,title:n[e.name],route:t.route,badge:r[e.name],isSectionActive:this.routerService.isCurrentRouteChildOfByName(e.route)}}else if(this.routerPermissionsService.isAllowAccessToRoute(e.route))i={itemType:`link`,title:n[e.name],route:e.route,badge:r[e.name],isSectionActive:this.routerService.isCurrentRouteChildOfByName(e.route)};else return;t.push(i)}),t}async resolve(){this.routerService.isCurrentRouteByName(br)&&(await this.resolveStrategies(),await this.setFirstAvailableRoute())}};jY=U([g(),B(0,m(V.RouterService)),B(1,m(V.RouterPermissionsService)),B(2,m(V.TranslateService))],jY);var MY=jY,NY={PerformanceMarkService:K(fV),MonitoringService:K(hz),MicroSentryMonitoringService:K(EV),MonitoringLoggerService:K(pV),TelemetryService:K(bH),Config:K(Wo.config(),`value`),FieldMapper:K(FA,`value`),LoggerService:K(nc),VueService:K(XS),VuexService:K(xC),WindowService:K(dk),ScrollbarService:K(fk),TableScrollbarService:K(pk),PrimaryBrowserTabService:K(cW),BrowserIdentifierService:K(QW),AuthService:K(Fw),SsoAuthService:K(_H),LoggedInStatusService:K(sB),OAuthSignUpService:K(Wz),AccessControlService:K(fR),LocalStorageAdapter:K(yp),Api:K(Dp),EndpointsService:K(wC),EntityManager:K(jC),BaseRouterService:K(XC),HistoryService:K(gw),ResolverService:K(yw),ResolverExecutorService:K(dV),PromiseExecutorPoolManager:K(lV),NewQueryParamsService:K(KN),RouterService:K(QC),RoutePrefetchService:K(Nq),RouteLeaveService:K(rw),RouteLeaveResolver:jc(mw),ResolverManager:K(xw),RouterBuilderService:K(aw),RouteEntitiesService:K(Xj),SerializerService:K(Bw),BaseStorageTransport:K(Sp),LocalStorageTransport:K(pp),FilterSchemaService:K(GE),SubscriptionService:K(cp),ModelSubscriptionService:K(Op),ServerSubscriptionService:Cu([`ServerEventsSubscriptionConnectionBuilderService`],e=>{let t=e(`ServerEventsSubscriptionConnectionBuilderService`);return new bp(()=>t.createConnectionForMainServerSubscription())}),WorkspaceServerSubscriptionService:Cu([`ServerEventsSubscriptionConnectionBuilderService`],e=>{let t=e(`ServerEventsSubscriptionConnectionBuilderService`);return new bp(()=>t.createConnectionForWorkspaceServerSubscription())}),ServerEventsSubscriptionConnectionBuilderService:K(Cp),FormSubscriptionService:K(hp),TranslateService:K(Aw),NotificationService:K(VE),NativeNotificationService:K(YF),NotificationSoundService:K($F),ExportService:K(UE),FilterQueryService:K(eM),FilterBracketNotationQueryService:K(nM),FilterBuilderService:K($E),NumericService:K(RN),LocalStorageService:K(sF),SessionStorageService:K(cF),LRUCacheService:K(_k),QueryStorageService:K(uF),PhoneValidateAutocompleteService:K(RF),PhoneAutocompleteService:K(BF),GlobalStateService:K(AF),FeatureFlagsService:K(Gz),AuthLoaderService:K(PB),SmsContentService:K(wV),RestrictionPagesRouterService:K(MV),DateFilterMapper:K(nG),TagFilterMapper:K(FJ),CountryFilterMapper:K(LJ),UserFilterMapper:K(zJ),PhoneFilterMapper:K(UJ),EmailFilterMapper:K(KJ),WordFilterMapper:K(YJ),ListFilterMapper:K($J),ContactSourceFilterMapper:K(tY),NumericFilterMapper:K(rY),OptionFilterMapper:K(aY),ProgressService:K(Oq),UndoRedoHistoryService:K(DJ),DependencyPreloaderService:K(sY),EventBusService:K(yY),DataBulkFillerService:K(EY),DeletedEntityService:K(OY),BulkService:K(uA),BulkManager:K(cA),UserPreloaderService:nu(Hk),TicketCountPreloaderService:nu(AU),ModelPreloaderService:K(tD),TablePreloaderService:K(Lk),AutocompletePreloaderService:K(zA),PreloaderManager:K(Nk),AutocompleteKeyBuilder:K(UA),FacetManager:K(Qk),FaceterService:_c(eA),FromPaginationFaceterService:Bo(zB),WrapperManagerService:K(Wk),BaseWrapperService:ol(Xk),ModalService:ol(aD),TableWrapperService:ol(BN),TableQueryWrapperService:ol(WN),QueryModalService:ol(qN),SectionService:ol(VB),PartialUIWrapperService:ol(fA),PartialQueryUIWrapperService:ol(gA),GroupedPartialUIWrapperService:ol(mA),GroupedQueryPartialUIWrapperService:ol(vA),TableLocalStorageWrapperService:ol(mF),TableQueryLsWrapperService:ol(hF),ConfirmationService:K(rD),UserService:qo(dD),MarketingDataRepository:W(hD),MarketingDataService:qo(_D),MarketingDataFormService:Es(DD),MarketingDataResolverService:jc(kD),UserPersonalInfoService:qo(iG),UserSettingsService:qo(UH),UserRoleLabelDataService:K(qF),WrappersConfigService:K(TH),ValidationService:K(FO),ValidationRulesBuilderService:K(xk),CommonValidationRegistrator:Jc(HO),SpecialValidationRegistrator:Jc(YA),FileValidationRegistrator:Jc(lk),PhoneValidationRegistrator:Jc(lI),FormValidationService:K(PA),SubValidationService:K(Nn),FormBuilderFactoryService:K(TA,`factory`),StatusFieldBuilderService:K(tj),FormManager:K(DA),AttachmentsFormHelper:K(kA),FormFactoryManager:K(yU),CentrifugeClient:K(gp),PhoneService:K(KO),PasswordFieldBuilderService:K(dI),SenderPhoneFieldBuilderService:K(rU),CountrySenderPhoneListFieldBuilderService:K(iU),FieldSelectSearchWithCustomBuilderService:K(Fq),SelectInboxFieldBuilderService:K(mW),TypedFormBuilderFactoryService:K(YP,`factory`),GroupPropertyBuilderFactory:K(XP,`factory`),PropertyBuilderFactory:K(ZP,`factory`),TypedGroupFormBuilderFactoryService:K(QP,`factory`),TypedArrayFormBuilderService:K(PI,`factory`),FileUploadFieldBuilderService:K(_B),EditableBadgesFieldBuilderService:K(kB),WeekDaysTimeRangeFieldBuilder:K(_U),BulkFieldBuilderService:K(XW),MessagesAttachmentFileFormService:Es(tP),ExportFormService:Es(YN),ForwardAudioFormService:Es(TI),EntityExportService:K(Rz),ServiceDistributionRecipientsFormService:Es(xL),ServiceDistributionAdditionalSettingsFormService:Es(TL),EndFormGroupConfiguration:K(IP),MonthlyFormGroupConfiguration:K(RP),SendingDateTimeFormGroupConfiguration:K(zP),WeeklyFormGroupConfiguration:K(BP),YearlyFormGroupConfiguration:K(VP),ComposeScheduledInitFormData:K(cG),ScheduledMapperService:K(Cq),CallForwardingFormBuilderService:K(_F),BuyNumberCallForwardingFormService:Es(bF),ImportMatchingCountryFormService:Es(WF),UserAdminGridable:K(jB),UsersGridable:K(aJ),SenderSettingsCountriesGridable:K(_V,`factory`),DomainBaseService:K(qE),DomainManagerService:K(YE),DistributionDetail
57sService:qo(ML),MessagesPriceService:qo(xM),MessagesPriceForCountryService:qo(Pz),MessagesAttachmentFileService:qo(aP),NoteService:qo(lj),OrderService:K(zD),VisibilityService:K(VD),PermissionsService:K(hI),RouterPermissionsService:K(_I),SubAccountsPermissionsService:K(dJ),CountryService:qo(yk),UnauthenticatedCountryService:qo(Sz),TenDlcPhoneNumbersService:qo(WI),TenDlcCampaignsService:qo(JI),TollFreeBrandService:qo(sL),TenDlcTwilioBrandService:qo(dU),UserNumbersService:qo(OM),FieldSelectSearchSenderOptionsBuilder:K(HM),SenderChannelManager:K(WM),UserNumbersPreloaderService:K(XM),UserAnalyticsFieldsService:qo(cR),UserAnalyticsTraitsService:qo(XR),UserPresenceService:qo(RW),SipCallsService:qo(qj),SessionService:qo(iM),SessionShortService:qo(DW),SessionStatService:qo(TW),ForwardAudioService:qo(vN),SenderIdPriceService:qo(xI),TimezoneService:qo(lP),AreaCodesService:qo(eF),AvailableToBuyNumbersService:qo(nF),NumbersPriceService:qo(EF),PhoneNumbersService:qo(DN),TenDlcPricingService:qo(kI),RegulationsStatusService:qo(_L),RecipientService:K(DL),RecipientDataMapperService:K(OL),ByocService:qo(DB),AttachmentFileService:qo(Az),WizardService:qo(tB),SendReceiveSettingsService:qo(pB),GettingStartedInfoService:qo(iV),UiSettingsService:qo(NH),TeamWorkflowService:qo(VV),CentrifugeService:qo(iH),CentrifugeRepository:W(oH),TicketsCountRepository:W(DU),TicketCountService:qo(kU),UserRefusalSurveyService:K(WW),SubAccountPermissionsRepository:W(pJ),BonusInfoService:qo(yJ),BonusInfoRepository:W(xJ),TenDlcPhoneNumbersGridable:K(SN),NoteGridable:K(JH),CleanUpManager:K(Fk),TableCleanUper:rc(iA),AutocompleteCleanUper:Js(VA),ModelSearcherManager:K(BW),ModelSearcherServiceFactory:_c(HW),ForwardAudioColumnService:Eo(gN),BaseFilters:K(zT),FilterCompareService:K(ZU),FilterCleanupService:K(QU),FilterStrategyManager:K(BT),BaseFilterStrategy:K(VT),RangeFilterStrategy:K(iE),ArrayFilterStrategy:K(aE),ArrayWithIsEmptyFilterStrategy:K(oE),RangeWithBoolFilterStrategy:K(sE),ColumnsFromStoreFactory:Eo($A),BaseGrouperServiceFactory:La(lE),SorterSerializerService:K($U),BaseSorterServiceFactory:Vc(pE),BasePaginatorServiceFactory:Ru(aj),CursorPaginationServiceFactory:Ru(dj),TokenPaginationServiceFactory:Ru(GH),NoopGroupingServiceFactory:La(hE),NoopSorterServiceFactory:Vc(_E),NoColumnsServiceFactory:Eo(yE),ColumnsSizeService:K(IL),TableBuilderService:K(xE),TableGrouperManager:K(DE),TableManager:K(kE),TablePaginatorManager:K(jE),TableSearcherManager:K(NE),BaseSearcherServiceFactory:cu(FE),TableSorterManager:K(LE),TableColumnManager:K(sj),TableKeyBuilder:K(Cl),TableExpandService:K(KW),TenDlcPhoneNumbersDetailsColumnServiceFactory:Eo(yL),UserAdminsColumnServiceFactory:Eo(NB),SubAccountsSwitchColumnService:Eo(PV),TableBaseRecoveryService:K(LV),ResolversRouterBuilderMiddleware:K(Cw),ModulesRouterBuilderMiddleware:K(Tw),RoutesGatheringMiddleware:K(hV),DetailsPageRouterBuilderMiddleware:K(Qj),TitlersRouterBuilderMiddleware:K(Dw),TitlerManager:K(pw),DefaultTitlerService:Gu(sw),DomainTitlerService:Gu(lw),RouteTitlerService:Gu(dw),StaticPaginationService:K(Bz),StaticSortService:K(XV),TemplatesTableExpandLocalStorageService:K(JW),AuthStateRepository:W(Rj),OAuthSignUpRepository:W(Hz),BaseFormRepository:W(Hw),MessagesPriceRepository:W(_M),MessagesPriceForCountryRepository:W(Iz),MessagesAttachmentFileRepository:W(sP),TableRepository:W(Ww),TablePageStateRepository:W(Lq),TableRecoveryDataRepository:W(Kw),SelectedRowRepository:W(Jw),FacetRepository:W(nA),AllSelectedTablesRepository:W(Xw),PageMapPreloadRepository:W(zk),PaginationRepository:W(Qw),CursorPaginationPageRepository:W(fM),CounterRepository:W(uM),DeliveredSmsCounterRepository:W(eN),FailedSmsCounterRepository:W(iN),RejectedSmsCounterRepository:W(cN),SearchRepository:W(eT),NoteRepository:W(nT),UserRepository:W(lT),UserPersonalInfoRepository:W(oG),BaseFieldRepository:W(dT),SorterRepository:W(pT),GroupingRepository:W(hT),BaseWrapperRepository:W(Kk),ModalRepository:W(_T),FilterSchemaRepository:W(yT),CountryRepository:W(xT),UnauthenticatedCountryRepository:W(bz),TimezoneRepository:W(CT),ColumnRepository:W(TT),PreloadRepository:W(DT),OrderRepository:W(Dk),VisibilityRepository:W(kk),AutocompleteRepository:W(LA),SessionRepository:W(oM),SessionShortRepository:W(cM),SessionStatRepository:W(CW),TenDlcPhoneNumbersRepository:W(II),TenDlcCampaignsRepository:W(KI),TollFreeBrandRepository:W(QI),TenDlcTwilioBrandRepository:W(lU),PhoneNumbersRepository:W(uN),NumberAvailableCountriesService:K(IF),SipCallsRepository:W(Uj),ForwardAudioRepository:W(CM),UserNumbersRepository:W(KM),UserAnalyticsFieldsRepository:W(uR),UserAnalyticsTraitsRepository:W(QR),UserSettingsRepository:W(VH),UserPresenceRepository:W(IW),SenderIdPriceRepository:W(CI),AvailableToBuyNumbersRepository:W(pP),AreaCodesRepository:W(_P),NumbersPriceRepository:W(wF),NumberAvailableCountriesRepository:W(PF),GlobalStateRepository:W(OF),SenderSettingsCountriesRepository:W(sI),VoiceCallConfigRepository:W(rI),DistributionDetail
57sRepository:W(AL),TenDlcPricingRepository:W(jI),RegulationsStatusRepository:W(dL),ByocRepository:W(CB),AttachmentFileRepository:W(Oz),WizardRepository:W(Xz),SendReceiveSettingsRepository:W(hB),GettingStartedInfoRepository:W(oV),TeamWorkflowRepository:W(UV),UiSettingsRepository:W(jH),PrimaryBrowserTabRepository:W(uW),PrimaryBrowserTabLockRepository:W(fW),ProgressRepository:W(Aq),UndoRedoHistoryRepository:W(kJ),DeletedEntityRepository:W(AY),FilterServiceManager:K(XA),TableFilterServiceManager:K(ZA),UserFilterServiceFactory:dc(sJ),FilterSchemaResolver:jc(Ij),RootResolver:jc(UO),WizardPrivateUseCaseResolver:jc(OV),UserResolver:jc(ND),SubAccountsResolver:jc(LD),WizardResolverService:jc(rB),ModelResolver:jc(jD),FacetResolver:jc(ZN),ScriptResolverService:jc(hk),SingleModelResolverService:jc(oA),SingleSettingsModelResolverService:jc(tW),NotFoundResolverService:jc(Yj),SendReceiveSettingsResolver:jc($N),BaseResolverService:K(iF),RedirectableSingleModelResolverService:jc(aF),NonBlockedRedirectableSingleModelResolverService:jc(KH),AuthByProviderResolver:jc(HF),ModelSettingsResolverService:jc(pI),TenDlcPricesResolver:jc(NI),TenDlcPr
57icesPreloader:K(pH),TenDlcNumbersCountResolver:jc(xU),ByocAccessResolver:jc(RL),ByocSubscribeResolver:jc(GV),SystemExitResolver:jc(BL),StopImpersonateResolver:jc(eH),UserCustomFieldsEventResolver:jc(LH),SystemRefreshResolver:jc(HL),WizardAnalyticsResolverService:jc(lB),GettingStartedInfoResolverService:jc(cV),UiSettingsResolverService:jc(FH),MonthlyPlansResolverService:jc(IV),AppModuleResolverService:jc(QV),UserWorkflowAccountChangedResolverService:jc(cH),UserPolicyPrivacyChangedResolverService:jc(kW),TermsUpdateResolverService:jc(jW),ContactServerEventsResolverService:jc(fH),RedirectByPrevRouteResolverService:jc(yH),FetchAllAccountsResolver:jc(DH),FieldsDataCacheClearByModelEventResolverService:jc(tU),FieldAssigneeCacheClearResolverService:jc(CU),TicketCountResolverService:jc(jU),TicketCountSubscriptionResolverService:jc(MU),AdminSectionRedirectResolver:jc(rW),SettingsSectionRedirectResolver:jc(Yq),ReportingRedirectResolver:jc(MY),MainSidebarRoutesResolverService:jc(gW),MainSidebarRoutesPrefetchResolverService:jc(jJ),UserPresenceResolver:jc(yW),ProgressResolver:jc(Eq),CleanModelsResolver:jc(Mq),UserNumbersResolverService:jc(Uq),UserNumbersCacheClearResolverService:jc(Gq),ComposeSmsResolverService:jc(qq),SettingsEmailCampaignDomainsRouteResolverService:jc(Zq),SettingsEmailCampaignDomainResolverService:jc(rJ),SettingsTicketsResolverService:jc(lJ),EmailPriceResolver:jc(hJ),BonusInfoResolver:jc(CJ),HttpInterceptorManager:K(up),ApiErrorInterceptor:el(kp),NoResponseInterceptor:el(Ep),AuthInterceptor:el(mp),OldVersionInterceptor:el(fp),ImpersonationModeInterceptor:el(Tp),TokenIsLockedInterceptor:el(wp),StripeInvalidBillingDetailsInterceptor:el(xp),AppVersionInterceptor:el(lp),PdfWorkerService:K(JB),QrCodeWorkerService:K(eV),QrCodeService:K(YB),TrackingService:K(PL),ZendeskService:K(iR),ShareASaleService:K(ez),FirstPromoterService:K(nz),PostHogService:K(KV),PostHogFeatureFlagsService:K(JV),PosthogRecordingService:K(YH),PosthogRecordingServiceResolver:jc(aU),GoogleAnalyticsService:K(hH),MicrosoftUetService:K(wJ),GartnerConversionService:K(TJ),MetaPixelTrackingService:K(cY),OpenAiPixelService:K(lY),OpenAiAttributionService:K(_Y),MntnTrackingService:K(vY),SyncQueueService:K(aB,`factory`),SignUpTrackingService:K(zq),CookieConsentService:K(Vq),RedirectResolverService:jc(TY),PrivacyPolicyStrategy:K(LR),GettingStartedStrategy:K(hR),TenDlcStrategy:K(gR),TollFreeStrategy:K(_R),SenderIdsStrategy:K(vR),SubAccountsImportFlowStrategy:K(yR),UsersWorkflowNotUserRoleStrategy:K(CR),NotUserRoleStrategy:K(wR),UsersWorkflowSuperAdminRoleStrategy:K(TR),TasksReadOnlyStrategy:K(ER),SuperAdminRoleStrategy:K(OR),UsersWorkflowAdminRoleStrategy:K(kR),UserWorkflowStrategy:K(bR),SubAccountsWorkflowStrategy:K(xR),SubAccountDetailsStrategy:K(SR),WebWidgetsStrategy:K(AR),WebWidgetsAccessControlService:K(KR),DealsAccessControlService:K(mR),TasksAccessControlService:K(pR),DealsReadOnlyStrategy:K(DR),MonthlyPlansStrategy:K(jR),ByocStrategy:K(MR),PaymentCongratsStrategy:K(NR),PaymentStrategy:K(FR),PointAiManagementStrategy:K(IR),BillingStrategy:K(RR),SettingsWorkspaceSubaccountsStrategy:K(BR),SettingsWorkspaceUsersStrategy:K(VR),AutoRespondersStrategy:K(WR),IntegrationsSettingsStrategy:K(HR),ApiIntegrationsSettingsStrategy:K(UR),ReportingEmailStrategy:K(GR),UiStateService:qo(HB),UiStateRepository:W(UB),ReopenAccountRepository:W(yV),ReopenAccountService:K(xV),ReopenAccountResolver:jc(CV),ReopenAccountFormService:Es(AV),ErrorSerializerService:K(vp),ErrorsCustomRulesByStatusesMap:Hl(dp),OptimisticUpdateService:K(CH),PriorityHelperService:K(ZH),FieldDataCacheService:K($H)};z(H.DateTime,()=>R(()=>globalThis.__rdl__(() => import(`./B7FdeCF6.js`)),__vite__mapDeps([816,2,4,1,5,6,817]),import.meta.url),Wu),z(H.Chat,()=>R(()=>globalThis.__rdl__(() => import(`./NUXKr4Kf.js`)),__vite__mapDeps([818,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,257,258,259,84,229,789,421,820]),import.meta.url),vl),z(H.ChatStatistics,()=>R(()=>globalThis.__rdl__(() => import(`./CWJJrNVS.js`)),__vite__mapDeps([821,4,2,1,5,6,18,3,7,8,9,10,819,38,421,258,17,259,84,229,822]),import.meta.url),ju),z(H.ChatPreviewNext,()=>R(()=>globalThis.__rdl__(() => import(`./BlUuGHPI.js`)),__vite__mapDeps([823,4,2,1,5,6,819,3,7,8,9,10,38]),import.meta.url),Mu),z(H.Reporting,()=>R(()=>globalThis.__rdl__(() => import(`./BjHTf3KR.js`)),__vite__mapDeps([824,4,2,1,3,5,6,7,8,9,10,24,38,819,41,825,826,827,828,829,830]),import.meta.url),Kl),z(H.EmailToSms,()=>R(()=>globalThis.__rdl__(() => import(`./CTz8TfiR.js`)),__vite__mapDeps([831,4,2,1,3,5,6,7,8,9,10,20,819,38,326,832]),import.meta.url),pu),z(H.CarrierLookup,()=>R(()=>globalThis.__rdl__(() => import(`./DHZPUny0.js`)),__vite__mapDeps([833,4,2,1,5,6,819,3,7,8,9,10,38,492,834]),import.meta.url),il),z(H.CarrierLookupImport,()=>R(()=>globalThis.__rdl__(() => import(`./VsEiyUSf.js`)),__vite__mapDeps([835,5,4,2,1,6,836,24,20,834]),import.meta.url),mu),z(H.CarrierLookupSession,()=>R(()=>globalThis.__rdl__(() => import(`./CVgK-UWI.js`)),__vite__mapDeps([837,4,2,1,5,6,819,3,7,8,9,10,38,838,834]),import.meta.url),al),z(H.SmsSurveys,()=>R(()=>globalThis.__rdl__(() => import(`./BkpF3cCn.js`)),__vite__mapDeps([839,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,82,83,84,840,122,841,842,843]),import.meta.url),Kc),z(H.SenderSettings,()=>R(()=>globalThis.__rdl__(() => import(`./Cbw-MF0-.js`)),__vite__mapDeps([844,4,2,1,3,5,6,7,8,9,10,819,38,845]),import.meta.url),Uu),z(H.SenderSettingsCountries,()=>R(()=>globalThis.__rdl__(() => import(`./BdnJ6lXM.js`)),__vite__mapDeps([846,4,2,1,5,6]),import.meta.url),bc),z(H.EmailLookup,()=>R(()=>globalThis.__rdl__(() => import(`./CwgCSrGn.js`)),__vite__mapDeps([847,4,2,1,5,6,819,3,7,8,9,10,38,488,834]),import.meta.url),Bl),z(H.EmailLookupImport,()=>R(()=>globalThis.__rdl__(() => import(`./PlGgn90E.js`)),__vite__mapDeps([848,5,4,2,1,6,834,849,24,20]),import.meta.url),yl),z(H.EmailLookupSession,()=>R(()=>globalThis.__rdl__(() => import(`./DtFHCKhv.js`)),__vite__mapDeps([850,4,2,1,5,6,18,3,7,8,9,10,819,38,851,834]),import.meta.url),ql),z(H.AutomationRules,()=>R(()=>globalThis.__rdl__(() => import(`./CY4vSIOc.js`)),__vite__mapDeps([852,4,2,1,5,6]),import.meta.url),zc),z(H.AutomationRule,()=>R(()=>globalThis.__rdl__(() => import(`./BXPSmIVy.js`)),__vite__mapDeps([853,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),Xs),z(H.AutomationRulesDetails,()=>R(()=>globalThis.__rdl__(() => import(`./DzdZ7CPM.js`)),__vite__mapDeps([854,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,82,83,84]),import.meta.url),Ks),z(H.AutomationRulesLog,()=>R(()=>globalThis.__rdl__(() => import(`./BfxOGNnr.js`)),__vite__mapDeps([855,4,2,1,3,5,6,7,8,9,10,24,819,38,856]),import.meta.url),Ao),z(H.Keywords,()=>R(()=>globalThis.__rdl__(() => import(`./CsOXDHS6.js`)),__vite__mapDeps([857,4,2,1,3,5,6,7,8,9,10,20,819,38]),import.meta.url),ns),z(H.Invoices,()=>R(()=>globalThis.__rdl__(() => import(`./BXdGsDDH.js`)),__vite__mapDeps([858,4,2,1,5,6]),import.meta.url),Gs),z(H.InvoicesBase,()=>R(()=>globalThis.__rdl__(() =>
57 import(`./DXexH4av.js`)),__vite__mapDeps([859,4,2,1,5,6,819,3,7,8,9,10,38,860]),import.meta.url),Vl),z(H.Auth,()=>R(()=>globalThis.__rdl__(() => import(`./-_a56Lov.js`)),__vite__mapDeps([861,4,2,1,3,5,6,7,8,9,10,20,862]),import.meta.url),Ls),z(H.CheckEmailForSignup,()=>R(()=>globalThis.__rdl__(() => import(`./CrSMMmjr.js`)),__vite__mapDeps([863,4,2,1,3,5,6,7,8,9,10,24]),import.meta.url),ec),z(H.EmailConfirmation,()=>R(()=>globalThis.__rdl__(() => import(`./DbLTL8rM.js`)),__vite__mapDeps([864,4,2,1,3,5,6,7,8,9,10]),import.meta.url),Ss),z(H.LoginSSO,()=>R(()=>globalThis.__rdl__(() => import(`./BnwYaO8Y.js`)),__vite__mapDeps([865,4,2,1,5,6]),import.meta.url),yc),z(H.Logout,()=>R(()=>globalThis.__rdl__(() => import(`./FcvQrkUg.js`)),__vite__mapDeps([866,4,2,1,5,6,18,3,7,8,9,10]),import.meta.url),Pa),z(H.SignupByInvitePage,()=>R(()=>globalThis.__rdl__(() => import(`./BMCK5dGY.js`)),__vite__mapDeps([867,4,2,1,5,6,862,20]),import.meta.url),Au),z(H.SignupByOAuthPage,()=>R(()=>globalThis.__rdl__(() => import(`./Y8JFc6JY.js`)),__vite__mapDeps([868,4,2,1,5,6,862,20]),import.meta.url),kc),z(H.TFAPages,()=>R(()=>globalThis.__rdl__(() => import(`./DjFy-5_s.js`)),__vite__mapDeps([869,4,2,1,5,6,20]),import.meta.url),wl),z(H.Notifications,()=>R(()=>globalThis.__rdl__(() => import(`./oI1QGtLF.js`)),__vite__mapDeps([870,4,2,1,5,6,819,3,7,8,9,10,38]),import.meta.url),eu),z(H.ServicesApi,()=>R(()=>globalThis.__rdl__(() => import(`./CW1DmXTS.js`)),__vite__mapDeps([871,4,2,1,3,5,6,7,8,9,10,24,20,819,38,872]),import.meta.url),Lo),z(H.AccountSettings,()=>R(()=>globalThis.__rdl__(() => import(`./DFXcK1k7.js`)),__vite__mapDeps([873,4,2,1,3,5,6,7,8,9,10,24,20,819,38,31,40]),import.meta.url),Iu),z(H.VerifyEmail,()=>R(()=>globalThis.__rdl__(() => import(`./BC-0jdA6.js`)),__vite__mapDeps([874,4,2,1,5,6,24]),import.meta.url),ou),z(H.SignupPhoneVerification,()=>R(()=>globalThis.__rdl__(() => import(`./Bqoxc5It.js`)),__vite__mapDeps([875,4,2,1,5,6,20,876]),import.meta.url),Sc),z(H.SignupConfirmation,()=>R(()=>globalThis.__rdl__(() => import(`./DDewSzc7.js`)),__vite__mapDeps([877,4,2,1,5,6]),import.meta.url),Qc),z(H.ForgotPassword,()=>R(()=>globalThis.__rdl__(() => import(`./GH4qz5_6.js`)),__vite__mapDeps([878,4,2,1,5,6,20]),import.meta.url),oc),z(H.ResetPassword,()=>R(()=>globalThis.__rdl__(() => import(`./C__DYOi-.js`)),__vite__mapDeps([879,4,2,1,5,6,20]),import.meta.url),pc),z(H.SubAccounts,()=>R(()=>globalThis.__rdl__(() => import(`./CS0w8Qjx.js`)),__vite__mapDeps([880,4,2,1,3,5,6,7,8,9,10,20,881]),import.meta.url),bu),z(H.SubAccountsBase,()=>R(()=>globalThis.__rdl__(() => import(`./Dj8yYyEC.js`)),__vite__mapDeps([882,4,2,1,5,6]),import.meta.url),su),z(H.SubAccountsDetails,()=>R(()=>globalThis.__rdl__(() => import(`./VMgEFtXu.js`)),__vite__mapDeps([883,4,2,1,3,5,6,7,8,9,10]),import.meta.url),Ac),z(H.SubAccountsForm,()=>R(()=>globalThis.__rdl__(() => import(`./DPQOwis1.js`)),__vite__mapDeps([884,4,2,1,3,5,6,7,8,9,10]),import.meta.url),Tl),z(H.SubAccountsImportFlow,()=>R(()=>globalThis.__rdl__(() => import(`./vahExi3u.js`)),__vite__mapDeps([885,4,2,1,5,6,819,3,7,8,9,10,38,849,24,20]),import.meta.url),Cc),z(H.SubAccountsImportDetails,()=>R(()=>globalThis.__rdl__(() => import(`./-w6xv0HM.js`)),__vite__mapDeps([886,4,2,1,3,5,6,7,8,9,10,819,38,887]),import.meta.url),fl),z(H.AutoDetectedCountry,()=>R(()=>globalThis.__rdl__(() => import(`./BU0o6owh.js`)),__vite__mapDeps([888,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),Ho),z(H.Billing,()=>R(()=>globalThis.__rdl__(() => import(`./CEPtJUiU.js`)),__vite__mapDeps([889,4,2,1,3,5,6,7,8,9,10,819,38,890,891]),import.meta.url),Co),z(H.BillingBase,()=>R(()=>globalThis.__rdl__(() => import(`./BmVvDLzp.js`)),__vite__mapDeps([892,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),Fa),z(H.MyData,()=>R(()=>globalThis.__rdl__(() => import(`./BFu00Oo3.js`)),__vite__mapDeps([893,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),Ka),z(H.Note,()=>R(()=>globalThis.__rdl__(() => import(`./DDLklzH4.js`)),__vite__mapDeps([894,4,2,1,3,5,6,7,8,9,10,20]),import.meta.url),Tu),z(H.SentSmsBase,()=>R(()=>globalThis.__rdl__(() => import(`./Dabr-Rb0.js`)),__vite__mapDeps([895,4,2,1,3,5,6,7,8,9,10,24,17,18,20,130,38,819,31,896,897,898]),import.meta.url),jl),z(H.HistorySentSms,()=>R(()=>globalThis.__rdl__(() => import(`./BqedmqrR.js`)),__vite__mapDeps([899,4,2,1,3,5,6,7,8,9,10,24,20,819,38,896,820,17,18,898]),import.meta.url),ko),z(H.Templates,()=>R(()=>globalThis.__rdl__(() => import(`./BbjXB4qa.js`)),__vite__mapDeps([900,4,2,1,3,5,6,7,8,9,10,24,20,819,38,82,83,84,901,902]),import.meta.url),Ys),z(H.HistoryReceivedSms,()=>R(()=>globalThis.__rdl__(() => import(`./DzE1TXUX.js`)),__vite__mapDeps([903,4,2,1,3,5,6,7,8,9,10,24,20,18,819,38,31,898]),import.meta.url),yd),z(H.HistoryForwardedCalls,()=>R(()=>globalThis.__rdl__(() => import(`./Dm_iWeoF.js`)),__vite__mapDeps([904,4,2,1,5,6,905,24]),import.meta.url),Os),z(H.HistoryOutboundCalls,()=>R(()=>globalThis.__rdl__(() => import(`./Cfd8VeJg.js`)),__vite__mapDeps([906,4,2,1,3,5,6,7,8,9,10,819,38,905,24]),import.meta.url),Yo),z(H.HistoryInboundCalls,()=>R(()=>globalThis.__rdl__(() => import(`./DLx86PuG.js`)),__vite__mapDeps([907,4,2,1,3,5,6,7,8,9,10,819,38,905,24]),import.meta.url),No),z(H.Scheduled,()=>R(()=>globalThis.__rdl__(() => import(`./DjdjtAkh.js`)),__vite__mapDeps([908,4,2,1,3,5,6,7,8,9,10,38,819,909,910,901,911,912]),import.meta.url),Va),z(H.ScheduledUpcoming,()=>R(()=>globalThis.__rdl__(() => import(`./TFiTRI7_.js`)),__vite__mapDeps([913,4,2,1,3,5,6,7,8,9,10,914,915]),import.meta.url),go),z(H.ScheduledPaused,()=>R(()=>globalThis.__rdl__(() =>
57 import(`./P4ebect1.js`)),__vite__mapDeps([916,4,2,1,3,5,6,7,8,9,10,914,915]),import.meta.url),vs),z(H.ScheduledNotSent,()=>R(()=>globalThis.__rdl__(() => import(`./BlB3Nmta.js`)),__vite__mapDeps([917,4,2,1,3,5,6,7,8,9,10,18,819,38,915]),import.meta.url),os),z(H.ScheduledCompleted,()=>R(()=>globalThis.__rdl__(() => import(`./cyg06p8K.js`)),__vite__mapDeps([918,4,2,1,3,5,6,7,8,9,10,914,915]),import.meta.url),ts),z(H.ScheduledCalendar,()=>R(()=>globalThis.__rdl__(() => import(`./BbdnLR6C.js`)),__vite__mapDeps([919,4,2,1,3,5,6,7,8,9,10,912]),import.meta.url),Al),z(H.ScheduledEdit,()=>R(()=>globalThis.__rdl__(() => import(`./CtuX5rIo.js`)),__vite__mapDeps([920,4,2,1,3,5,6,7,8,9,10]),import.meta.url),tu),z(H.ScheduledDetails,()=>R(()=>globalThis.__rdl__(() => import(`./W38epTfg.js`)),__vite__mapDeps([921,4,2,1,5,6]),import.meta.url),Ll),z(H.ScheduledEmail,()=>R(()=>globalThis.__rdl__(() => import(`./BaZbYmRD.js`)),__vite__mapDeps([922,4,2,1,3,5,6,7,8,9,10,18,38,819,910,909,923,924,901]),import.meta.url),tl),z(H.BuyNumber,()=>R(()=>globalThis.__rdl__(() => import(`./B49SMKow.js`)),__vite__mapDeps([925,4,2,1,5,6,926,3,7,8,9,10]),import.meta.url),za),z(H.TenDlcTollFree,()=>R(()=>globalThis.__rdl__(() => import(`./jkBC1CJ4.js`)),__vite__mapDeps([927,4,2,1,3,5,6,7,8,9,10,20,819,38,928,929,890,926]),import.meta.url),Fl),z(H.TenDlcTollFreeRequest,()=>R(()=>globalThis.__rdl__(() => import(`./Bm8ikGWJ.js`)),__vite__mapDeps([930,4,2,1,5,6,819,3,7,8,9,10,38]),import.meta.url),Bc),z(H.Wizard,()=>R(()=>globalThis.__rdl__(() => import(`./BS1YDPuA.js`)),__vite__mapDeps([931,5,4,2,1,6]),import.meta.url),ds),z(H.ContactsUnsubscribed,()=>R(()=>globalThis.__rdl__(() => import(`./JSiLyijH.js`)),__vite__mapDeps([932,4,2,1,3,5,6,7,8,9,10,24,819,38,108]),import.meta.url),ao),z(H.ContactsBlocked,()=>R(()=>globalThis.__rdl__(() => import(`./88AFPgFm.js`)),__vite__mapDeps([933,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),uo),z(H.ContactsImportFlow,()=>R(()=>globalThis.__rdl__(() => import(`./DG0pgm-F.js`)),__vite__mapDeps([934,4,2,1,5,6,20,836,24]),import.meta.url),Pc),z(H.ContactsImportDetails,()=>R(()=>globalThis.__rdl__(() => import(`./Bpsaohux.js`)),__vite__mapDeps([935,4,2,1,3,5,6,7,8,9,10,17,18,819,38,936,937,24,20,268,887]),import.meta.url),pd),z(H.ContactsImportList,()=>R(()=>globalThis.__rdl__(() => import(`./BSKIop4l.js`)),__vite__mapDeps([938,4,2,1,5,6]),import.meta.url),Xu),z(H.Byoc,()=>R(()=>globalThis.__rdl__(() => import(`./yydNwLAx.js`)),__vite__mapDeps([939,4,2,1,3,5,6,7,8,9,10,18,819,38,515,516,845]),import.meta.url),Bs),z(H.ByocHelper,()=>R(()=>globalThis.__rdl__(() => import(`./BifOEiCM.js`)),__vite__mapDeps([940,4,2,1,3,5,6,7,8,9,10]),import.meta.url),Cs),z(H.WidgetSubscribe,()=>R(()=>globalThis.__rdl__(() => import(`./Wc6Hahzr.js`)),__vite__mapDeps([941,4,2,1,3,5,6,7,8,9,10,17,18,20,819,38,41,786,942,943,944,945]),import.meta.url),xd),z(H.WidgetClickToText,()=>R(()=>globalThis.__rdl__(() => import(`./CS4x-X_a.js`)),__vite__mapDeps([946,4,2,1,3,5,6,7,8,9,10,819,38,41,947,944,942,945]),import.meta.url),As),z(H.VoiceCall,()=>R(()=>globalThis.__rdl__(() => import(`./6gwN5SkD.js`)),__vite__mapDeps([948,4,2,1,5,6,24,20,819,3,7,8,9,10,38,949,950]),import.meta.url),nd),z(H.ContactsBase,()=>R(()=>globalThis.__rdl__(() => import(`./kpBOkHwq.js`)),__vite__mapDeps([951,4,2,1,3,5,6,7,8,9,10,24,17,18,38,819,31,952]),import.meta.url),Fs),z(H.Contacts,()=>R(()=>globalThis.__rdl__(() => import(`./izX9ah16.js`)),__vite__mapDeps([953,4,2,1,3,5,6,7,8,9,10,24,20,954,820,17,18,955,936,937,268]),import.meta.url),eo),z(H.Segments,()=>R(()=>globalThis.__rdl__(() => import(`./DjrzJRwv.js`)),__vite__mapDeps([956,4,2,1,3,5,6,7,8,9,10,24,20,819,38,957,898,936,958,17,18]),import.meta.url),Hc),z(H.Compose,()=>R(()=>globalThis.__rdl__(() => import(`./Cqj-88VT.js`)),__vite__mapDeps([959,4,2,1,3,5,6,7,8,9,10,20,819,38,82,83,84,911]),import.meta.url),sd),z(H.MessagesBulksProgress,()=>R(()=>globalThis.__rdl__(() => import(`./C5itHxgA.js`)),__vite__mapDeps([960,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),$c),z(H.ContactList,()=>R(()=>globalThis.__rdl__(() => import(`./CSNEfC53.js`)),__vite__mapDeps([961,4,2,1,3,5,6,7,8,9,10,24,20,18,38,819,954,820,17,955]),import.meta.url),qc),z(H.RRule,()=>R(()=>globalThis.__rdl__(() => import(`./CC0FyxE-.js`)),__vite__mapDeps([962,4,2,1,5,6]),import.meta.url),Eu),z(H.MessageSend,()=>R(()=>globalThis.__rdl__(() => import(`./opk9sOBG.js`)),__vite__mapDeps([963,4,2,1,3,5,6,7,8,9,10,17,18,20,82,83,84,841,876]),import.meta.url),Lu),z(H.ContactCounter,()=>R(()=>globalThis.__rdl__(() => import(`./DK5ed-fu.js`)),__vite__mapDeps([964,4,2,1,5,6,819,3,7,8,9,10,38,957,20,898,952]),import.meta.url),sc),z(H.ContactListCounter,()=>R(()=>globalThis.__rdl__(() => import(`./Dp_bWNND.js`)),__vite__mapDeps([965,4,2,1,5,6,24,20,819,3,7,8,9,10,38,898,952]),import.meta.url),hc),z(H.Activity,()=>R(()=>globalThis.__rdl__(() => import(`./v4z_YRkJ.js`)),__vite__mapDeps([966,4,2,1,3,5,6,7,8,9,10,819,38,967]),import.meta.url),Ro),z(H.CustomFields,()=>R(()=>globalThis.__rdl__(() => import(`./DUBEXDwT.js`)),__vite__mapDeps([968,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38]),import.meta.url),xu),z(H.Statements,()=>R(()=>globalThis.__rdl__(() => import(`./k3Fa_-Og.js`)),__vite__mapDeps([969,4,2,1,5,6,819,3,7,8,9,10,38,970]),import.meta.url),Uo),z(H.ComingSoon,()=>R(()=>globalThis.__rdl__(() => import(`./fFxA32Kf.js`)),__vite__mapDeps([971,5,4,2,1,6]),import.meta.url),wo),z(H.TeamWorkflow,()=>R(()=>globalThis.__rdl__(() => import(`./ECEDqDtp.js`)),__vite__mapDeps([972,4,2,1,3,5,6,7,8,9,10,881]),import.meta.url),tc),z(H.Payment,()=>R(()=>globalThis.__rdl__(() => import(`./DreFYNFP.js`)),__vite__mapDeps([973,4,2,1,3,5,6,7,8,9,10]),import.meta.url),Ya),z(H.TasksBase,()=>R(()=>globalThis.__rdl__(() => import(`./D_KXXDzE.js`)),__vite__mapDeps([974,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),Zo),z(H.Tasks,()=>R(()=>globalThis.__rdl__(() => import(`./Bdz_0dPx.js`)),__vite__mapDeps([975,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,407,268,566,976]),import.meta.url),Po),z(H.ForwardedCalls,()=>R(()=>globalThis.__rdl__(() => import(`./CYKJB49t.js`)),__vite__mapDeps([977,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),_o),z(H.NavigationOrder,()=>R(()=>globalThis.__rdl__(() => import(`./BkCxenTY.js`)),__vite__mapDeps([978,4,2,1,5,6,24,819,3,7,8,9,10,38]),import.meta.url),ys),z(H.RecentRecipient,()=>R(()=>globalThis.__rdl__(() => import(`./BStbIMbE.js`)),__vite__mapDeps([979,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),ss),z(H.EmailUnsubscribe,()=>R(()=>globalThis.__rdl__(() => import(`./7yqlpLAX.js`)),__vite__mapDeps([980,4,2,1,5,6,819,3,7,8,9,10,38]),import.meta.url),ps),z(H.EmailCampaignUnsubscribePage,()=>R(()=>globalThis.__rdl__(() => import(`./F6iPku3i.js`)),__vite__mapDeps([981,4,2,1,5,6,819,3,7,8,9,10,38]),import.meta.url),zu),z(H.NpsSurvey,()=>R(()=>globalThis.__rdl__(() => import(`./3t8PcDjB.js`)),__vite__mapDeps([982,4,2,1,5,6,20,819,3,7,8,9,10,38,983]),import.meta.url),uc),z(H.Sandbox,()=>R(()=>globalThis.__rdl__(() => import(`./CPVQ49kc.js`)),__vite__mapDeps([984,4,2,1,3,5,6,7,8,9,10,24,819,38]),import.meta.url),dl),z(H.PinnedContacts,()=>R(()=>globalThis.__rdl__(() => import(`./BEIeLEtn.js`)),__vite__mapDeps([985,4,2,1,5,6,24,819,3,7,8,9,10,38]),import.meta.url),oo),z(H.WebWidgets,()=>R(()=>globalThis.__rdl__(() => import(`./Bo1kCW7y.js`)),__vite__mapDeps([986,4,2,1,3,5,6,7,8,9,10,24,20,819,38,41,942,987,988,876]),import.meta.url),po),z(H.WhatsApp,()=>R(()=>globalThis.__rdl__(() => import(`./BzFQfqPr.js`)),__vite__mapDeps([989,4,2,1,3,5,6,7,8,9,10,24,18,130,819,38,790,990]),import.meta.url),Hs),z(H.Facebook,()=>R(()=>globalThis.__rdl__(() => import(`./D-QIVOZF.js`)),__vite__mapDeps([991,4,2,1,3,5,6,7,8,9,10,20,18,819,38]),import.meta.url),sl),z(H.StripeBilling,()=>R(()=>globalThis.__rdl__(() => import(`./EUbJyAvc.js`)),__vite__mapDeps([992,4,2,1,3,5,6,7,8,9,10,819,38,993]),import.meta.url),id),z(H.UserSession,()=>R(()=>globalThis.__rdl__(() => import(`./CBxZJw2C.js`)),__vite__mapDeps([994,4,2,1,5,6,819,3,7,8,9,10,38,995]),import.meta.url),fd),z(H.AuditLogs,()=>R(()=>globalThis.__rdl__(() => import(`./B2OeIbzB.js`)),__vite__mapDeps([996,4,2,1,5,6,24,18,3,7,8,9,10,819,38,465]),import.meta.url),ld),z(H.Tickets,()=>R(()=>globalThis.__rdl__(() => import(`./OkN-8uru.js`)),__vite__mapDeps([997,4,2,1,3,5,6,7,8,9,10,24,17,18,20,84,819,38,556,998,208,999,86,820]),import.meta.url),Ic),z(H.TicketsNotifications,()=>R(()=>globalThis.__rdl__(() => import(`./CLl4_BPO.js`)),__vite__mapDeps([1000,4,2,1,3,5,6,7,8,9,10,24,18,557]),import.meta.url),bl),z(H.Tags,()=>R(()=>globalThis.__rdl__(() => import(`./QOnUEK2N.js`)),__vite__mapDeps([1001,4,2,1,3,5,6,7,8,9,10,18,819,38,1002,901]),import.meta.url),hd),z(H.Labels,()=>R(()=>globalThis.__rdl__(() => import(`./BNdHXc6F.js`)),__vite__mapDeps([1003,4,2,1,3,5,6,7,8,9,10,24,20,819,38,876]),import.meta.url),Qu),z(H.FilteredViews,()=>R(()=>globalThis.__rdl__(() => import(`./Dwo4SC-7.js`)),__vite__mapDeps([1004,4,2,1,3,5,6,7,8,9,10,24,819,38,958,17,18]),import.meta.url),wc),z(H.Deals,()=>R(()=>globalThis.__rdl__(() => import(`./B-U9z4sc.js`)),__vite__mapDeps([1005,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,662,268,689,820,976]),import.meta.url),Yl),z(H.Typing,()=>R(()=>globalThis.__rdl__(() => import(`./DMMHckV1.js`)),__vite__mapDeps([1006,4,2,1,5,6,819,3,7,8,9,10,38,591]),import.meta.url),ml),z(H.Kanban,()=>R(()=>globalThis.__rdl__(() => import(`./Ck3oJrPj.js`)),__vite__mapDeps([1007,5,4,2,1,6]),import.meta.url),gu),z(H.AlsoHere,()=>R(()=>globalThis.__rdl__(() => import(`./C_p4aht-.js`)),__vite__mapDeps([1008,4,2,1,5,6,24,819,3,7,8,9,10,38]),import.meta.url),Yc),z(H.CampaignsSenders,()=>R(()=>globalThis.__rdl__(() => import(`./woWl3bVg.js`)),__vite__mapDeps([1009,2,4,1,3,5,6,7,8,9,10,20,18,819,38,709,1010,1011,1012,1013,1014,1015,876]),import.meta.url),Ku),z(H.PointAi,()=>R(()=>globalThis.__rdl__(() => import(`./B8fh1lTW.js`)),__vite__mapDeps([1016,4,2,1,3,5,6,7,8,9,10,24,20,819,38,1017,1018]),import.meta.url),Ul),z(H.Instagram,()=>R(()=>globalThis.__rdl__(() => import(`./C2myHwbs.js`)),__vite__mapDeps([1019,4,2,1,3,5,6,7,8,9,10,20,18,819,38]),import.meta.url),lu),z(H.ComposeEmail,()=>R(()=>globalThis.__rdl__(() => import(`./DzHH4gUW.js`)),__vite__mapDeps([1020,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,82,83,84,1021,1022,841,1023,86,85,21,87,88,155,413,1024]),import.meta.url),Mc),z(H.TmTiptapEditor,()=>R(()=>globalThis.__rdl__(() => import(`./CyFeWhGY.js`)),__vite__mapDeps([1025,2,4,1,3,5,6,7,8,9,10,17,18,84,83,86,87,85,21,20,88,411,157,158,47,208,155,154,24,156,145,27,28,11,159,160,169,1026,1027,1028,999,1023,413,1024]),import.meta.url),El),z(H.OutboundEmail
57s,()=>R(()=>globalThis.__rdl__(() => import(`./JLTP9g4e.js`)),__vite__mapDeps([1029,4,2,1,3,5,6,7,8,9,10,24,819,38,709,1012,820,17,18,891]),import.meta.url),Du),z(H.Recipient,()=>R(()=>globalThis.__rdl__(() => import(`./CgYOk0Cq.js`)),__vite__mapDeps([1030,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),iu),z(H.Stripo,()=>R(()=>globalThis.__rdl__(() => import(`./BN5zrOjC.js`)),__vite__mapDeps([1031,4,2,1,3,5,6,7,8,9,10,24,20,18,38,819,209,902]),import.meta.url),no),z(H.Automations,()=>R(()=>globalThis.__rdl__(() => import(`./X36MUZa1.js`)),__vite__mapDeps([1032,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,82,83,84,208,412,759,762,786,801,804,807,1033,1034,1015,990,790,820,954,901]),import.meta.url),Ia),z(H.GoogleServices,()=>R(()=>globalThis.__rdl__(() => import(`./CcbOSUcW.js`)),__vite__mapDeps([1035,4,2,1,5,6]),import.meta.url),Ts),z(H.ExternalIntegrations,()=>R(()=>globalThis.__rdl__(() => import(`./Cyp_n_Y7.js`)),__vite__mapDeps([1036,4,2,1,3,5,6,7,8,9,10,24,17,18,20,819,38,1037]),import.meta.url),xc),z(H.Consent,()=>R(()=>globalThis.__rdl__(() => import(`./CPgZ7Luc.js`)),__vite__mapDeps([1038,4,2,1,3,5,6,7,8,9,10,819,38]),import.meta.url),gc);var PY=/\bimport\((\s*(?:["']([^"']+)["']|`([^`$]+)`)\s*)\)/,FY=e=>{let t=PY.exec(e);return t?t[2]??t[3]??null:null},IY=e=>{let t=[],n,r=()=>{let n=t.splice(0,t.length),r=n.length===1?n[0]:AggregateError(n,`Retry dynamic import`);r instanceof AggregateError&&(r.stack+=n.join(` 58`)),e(r)};return(e,i)=>{e(i),t.push(i),clearTimeout(n),n=setTimeout(r,0)}},LY=e=>{let t=document.createElement(`link`);t.setAttribute(`rel`,`stylesheet`),t.setAttribute(`href`,e),document.head.appendChild(t),t.addEventListener(`load`,()=>{t.setAttribute(`is-loaded`,`true`)})},RY=()=>{document.querySelectorAll(`link[rel="stylesheet"]:not([is-loaded])`).forEach(e=>{let t=e.href,n=!1;if(t)try{let r=e.sheet;if(r!=null){if(!r.cssRules)throw Error(`CSS is not loaded ${t}`)}else n=!0;e.setAttribute(`is-loaded`,`true`)}catch{n||(e.remove(),LY(t))}})},zY=/(\w+.(js|css))/i,BY={},VY={offlineMessage:`No internet connection`,disableRetryingCSS:!1},HY=async()=>{if(!VY.checkOnlineUrl)return!1;try{return!(await fetch(VY.checkOnlineUrl)).ok}catch{return!0}},UY=e=>{VY.offlineCallback&&VY.offlineCallback(),e(Error(VY.offlineMessage))},WY=async e=>new Promise((t,n)=>{let r=async(t,n)=>{if(!window.navigator.onLine){if(VY.checkOnlineUrl!==null){if(await HY()){UY(n);return}}else{UY(n);return}}let i=e;BY[e]&&(i=e.includes(`?`)?e+`&t=`+Date.now():e+`?t=`+Date.now()),R(()=>import(i).then(n=>{BY[e]&&(BY[e]=1),t(n)}),[],import.meta.url).catch(i=>{if(BY[e]?BY[e]+=1:BY[e]=1,BY[e]<=3){let i=600*2**(BY[e]-1);setTimeout(()=>r(t,n),i)}else{BY[e]=1;let t=e,r=zY.exec(e);r&&(t=r[0]),typeof i==`string`&&i.indexOf(t)===-1?i+=` url=${e}`:i instanceof Error&&i.message.indexOf(t)===-1&&(i.message=`${i.message} url=${e}`),n(i)}})};r(t,n)}),GY=e=>{try{return FY(e.toString())}catch{return null}}
58,KY=e=>{Object.assign(VY,e)},qY=IY(e=>VY.onError?.(e)),JY={},YY=e=>new Promise((t,n)=>{WY(e).then(t).catch(e=>{qY(n,e)})});((e={})=>{KY(e),window.__rdl__=t=>(e.disableRetryingCSS||RY(),new Promise((e,n)=>{let r=GY(t);r?(JY[r]||(JY[r]=YY(r).finally(()=>{delete JY[r]})),JY[r].then(e,n)):t().then(e).catch(e=>{let t=e instanceof Error?e.message:String(e);qY(n,Error(`OriginalImport error: `+t,{cause:e}))})}))})({checkOnlineUrl:`https://app.textmagic.com/`,onError:e=>Pl().error(`globalException`,e.message,`AsyncChunk::${e.name}`)});var XY=yo(NY,Rl);R(()=>globalThis.__rdl__(() => import(`./D7EyjlFL.js`)),__vite__mapDeps([1039,5,4,2,1,6]),import.meta.url),Ns([new Xa,new zo(XY),new qs,new _l,...$o()]),Fo(`VueService`).create(tr,cv),kn(),is(),bo().subscribe(Rs,()=>{Nl(),gs()}),Fo(`TelemetryService`).init();export{tI as $,Bp as $a,Ig as $i,bD as $n,Vb as $r,Tj as $t,PR as A,xh as Aa,vv as Ai,ik as An,qS as Ar,CN as At,mL as B,qm as Ba,u_ as Bi,BO as Bn,Gx as Br,PM as Bt,TB as C,Kh as Ca,ry as Ci,xk as Cn,FT as Cr,AN as Ct,wz as D,jh as Da,Uv as Di,sk as Dn,VC as Dr,FN as Dt,Cz as E,Ih as Ea,Gv as Ei,QO as En,Mw as Er,NN as Et,WL as F,ah as Fa,b_ as Fi,qO as Fn,pS as Fr,BM as Ft,eL as G,Nm as Ga,i_ as Gi,pO as Gn,wx as Gr,qj as Gt,rL as H,Km as Ha,t_ as Hi,MO as Hn,Ax as Hr,EM as Ht,CL as I,th as Ia,g_ as Ii,WO as In,cS as Ir,zM as It,BI as J,um as Ja,e_ as Ji,aO as Jn,px as Jr,Vj as Jt,XI as K,Mm as Ka,r_ as Ki,mO as Kn,xx as Kr,Gj as Kt,SL as L,Qm as La,h_ as Li,zO as Ln,nS as Lr,LM as Lt,qL as M,yh as Ma,q_ as Mi,XO as Mn,MS as Mr,mN as Mt,YL as N,ph as Na,G_ as Ni,YO as Nn,DS as Nr,fN as Nt,Tz as O,Ah as Oa,zv as Oi,ak as On,NC as Or,wN as Ot,UL as P,dh as Pa,N_ as Pi,JO as Pn,gS as Pr,JM as Pt,aI as Q,$p as Qa,Rg as Qi,xD as Qn,Hb as Qr,Mj as Qt,pL as R,$m as Ra,p_ as Ri,LO as Rn,Jx as Rr,IM as Rt,FB as S,qh as Sa,Yv as Si,Ck as Sn,NT as Sr,PN as St,dB as T,Rh as Ta,qv as Ti,gk as Tn,MT as Tr,IN as Tt,iL as U,Vm as Ua,o_ as Ui,AO as Un,kx as Ur,hM as Ut,aL as V,Xm as Va,c_ as Vi,IO as Vn,Rx as Vr,MM as Vt,tL as W,Im as Wa,a_ as Wi,kO as Wn,Dx as Wr,uM as Wt,zI as X,am as Xa,Yg as Xi,FD as Xn,nx as Xr,Aj as Xt,HI as Y,X as Ya,$g as Yi,iO as Yn,lx as Yr,zj as Yt,RI as Z,om as Za,Ug as Zi,SD as Zn,$b as Zr,jj as Zt,pU as _,tg as _a,yy as _i,cA as _n,GT as _r,kP as _t,iq as a,Eg as aa,Db as ai,_j as an,ZE as ar,GP as at,zB as b,Zh as ba,ay as bi,Bk as bn,HT as br,EP as bt,_W as c,Cg as ca,mb as ci,gj as cn,pE as cr,vP as ct,HU as d,sg as da,Hy as di,$A as dn,YT as dr,wP as dt,Pg as ea,Rb as ei,Oj as en,yD as er,GF as et,KU as f,og as fa,Iy as fi,WA as fn,ZT as fr,xP as ft,hU as g,eg as ga,Ty as gi,uA as gn,KT as gr,OP as gt,mU as h,$h as ha,Dy as hi,KA as hn,eE as hr,DP as ht,lq as i,Dg as ia,kb as ii,Cj as in,sD as ir,qP as it,JL as j,bh as ja,lv as ji,ZO as jn,LS as jr,bN as jt,Ez as k,wh as ka,Sv as ki,ok as kn,Q as kr,TN as kt,zU as l,mg as la,Xy as li,dj as ln,JT as lr,SP as lt,qU as m,ng as ma,My as mi,GA as mn,$T as mr,NP as mt,tJ as n,Ag as na,Mb as ni,Sj as nn,cD as nr,aF as nt,rK as o,wg as oa,Tb as oi,vj as on,qE as or,FP as ot,YU as p,rg as pa,Fy as pi,qA as pn,tE as pr,bP as pt,VI as q,Am as qa,n_ as qi,fO as qn,yx as qr,Uj as qt,$q as r,Og as ra,jb as ri,wj as rn,oD as rr,KP as rt,PW as s,Tg as sa,bb as si,yj as sn,UE as sr,PP as st,Qq as t,Mg as ta,Fb as ti,Ej as tn,lD as tr,fF as tt,WU as u,fg as ua,Uy as ui,aj as un,qT as ur,CP as ut,sU as v,Yh as va,my as vi,oA as vn,UT as vr,TP as vt,xB as w,Wh as wa,Jv as wi,_k as wn,PT as wr,MN as wt,LB as x,Xh as xa,iy as xi,Tk as xn,zT as xr,yP as xt,uH as y,Jh as ya,fy as yi,eA as yn,WT as yr,AP as yt,hL as z,Ym as za,f_ as zi,RO as zn,qx as zr,NM as zt}; 59//# sourceMappingURL=index_6BOmQYt5.js.map
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.