marketplacepos 5.50.0 → 5.50.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/{chunk-NMFPLAWN.js → chunk-2DZHA445.js} +1 -1
- package/Marketplace/{chunk-5C24BA5F.js → chunk-2EGTHH3W.js} +1 -1
- package/Marketplace/{chunk-Z6LN3X5Q.js → chunk-2KQKQSUI.js} +1 -1
- package/Marketplace/chunk-2UKRRVAM.js +1 -0
- package/Marketplace/{chunk-2AXBEVQ7.js → chunk-2WQLSGW3.js} +1 -1
- package/Marketplace/{chunk-VH7JZJ2B.js → chunk-2Y3L7QOV.js} +1 -1
- package/Marketplace/{chunk-RZ5N5JLA.js → chunk-2ZKHC4YC.js} +1 -1
- package/Marketplace/{chunk-SIPZP62B.js → chunk-32IYUV7P.js} +1 -1
- package/Marketplace/{chunk-TKZ74HJD.js → chunk-36645CIP.js} +1 -1
- package/Marketplace/{chunk-FOKLBUX6.js → chunk-3NCMRK7E.js} +1 -1
- package/Marketplace/{chunk-QMHG3QTI.js → chunk-3T5VLB63.js} +1 -1
- package/Marketplace/{chunk-IKC5WEP5.js → chunk-3TK5BYAY.js} +1 -1
- package/Marketplace/{chunk-KR6UNAIL.js → chunk-3WGAMHZW.js} +1 -1
- package/Marketplace/chunk-42GDFAAQ.js +1 -0
- package/Marketplace/{chunk-G4T4VM5E.js → chunk-4GV67OQR.js} +1 -1
- package/Marketplace/{chunk-BL6MPO6D.js → chunk-4NT5VNJW.js} +2 -2
- package/Marketplace/{chunk-YQZHIZHO.js → chunk-56NTLHVB.js} +1 -1
- package/Marketplace/{chunk-4PG2EBJQ.js → chunk-5NJAMQES.js} +1 -1
- package/Marketplace/{chunk-YAWT3CLI.js → chunk-6F37VT6M.js} +1 -1
- package/Marketplace/{chunk-BMOMTOEW.js → chunk-6H7M43WO.js} +1 -1
- package/Marketplace/{chunk-S4JKTHY2.js → chunk-6LXQMIYX.js} +1 -1
- package/Marketplace/{chunk-IM7YH54S.js → chunk-6O446YFR.js} +1 -1
- package/Marketplace/{chunk-ZDBFIPDM.js → chunk-6Q4BDCI5.js} +1 -1
- package/Marketplace/{chunk-WAXAIL2I.js → chunk-6UM4NHOR.js} +1 -1
- package/Marketplace/{chunk-J6HA4ZHH.js → chunk-75IM3UUA.js} +1 -1
- package/Marketplace/{chunk-VP3XO25X.js → chunk-76AVMRJU.js} +1 -1
- package/Marketplace/{chunk-BYX6HZW7.js → chunk-7AJN7ECH.js} +1 -1
- package/Marketplace/{chunk-QMQCIH3X.js → chunk-7K6U3ABQ.js} +1 -1
- package/Marketplace/{chunk-TDMNVEUU.js → chunk-7T5DBPDP.js} +1 -1
- package/Marketplace/{chunk-JSQ7SYYK.js → chunk-7XA3VQEB.js} +1 -1
- package/Marketplace/{chunk-ZMQQVXQU.js → chunk-A4UF2QH6.js} +1 -1
- package/Marketplace/{chunk-Y3O22N4P.js → chunk-A6SP65CH.js} +1 -1
- package/Marketplace/{chunk-YLQU53ID.js → chunk-B5BQZD66.js} +1 -1
- package/Marketplace/{chunk-RN5CI3LE.js → chunk-BCK2GY66.js} +1 -1
- package/Marketplace/{chunk-654AVLKM.js → chunk-BGJEGBP5.js} +1 -1
- package/Marketplace/{chunk-DPB2343S.js → chunk-BTCNW6N3.js} +1 -1
- package/Marketplace/{chunk-ALLZQ6Y3.js → chunk-BTJN72MC.js} +1 -1
- package/Marketplace/{chunk-C2LAQOUW.js → chunk-BZWZ64N5.js} +1 -1
- package/Marketplace/{chunk-BC6LHZWP.js → chunk-C37O5TBF.js} +1 -1
- package/Marketplace/{chunk-DDFP4CNP.js → chunk-C4MTEDSW.js} +1 -1
- package/Marketplace/{chunk-6NS3D6KQ.js → chunk-C67KF7MG.js} +1 -1
- package/Marketplace/chunk-CGSMHTKB.js +2 -0
- package/Marketplace/{chunk-FJU2CZTJ.js → chunk-CHGAMAQX.js} +1 -1
- package/Marketplace/{chunk-B5ZK5TGW.js → chunk-CIWFLDCI.js} +1 -1
- package/Marketplace/{chunk-BAW6PICI.js → chunk-CKFHJ3IS.js} +1 -1
- package/Marketplace/{chunk-V6QH3IVL.js → chunk-CUSAKJLC.js} +1 -1
- package/Marketplace/{chunk-N3E43QWK.js → chunk-CVHFVFZQ.js} +1 -1
- package/Marketplace/{chunk-KDIXLH2S.js → chunk-CZICXKFA.js} +1 -1
- package/Marketplace/{chunk-MM7SAZOU.js → chunk-D6JH2KV4.js} +1 -1
- package/Marketplace/{chunk-EH3PIGLJ.js → chunk-DE3FRI5N.js} +1 -1
- package/Marketplace/{chunk-4KGXKQPG.js → chunk-DMENVSHH.js} +1 -1
- package/Marketplace/{chunk-RTLTTFZ7.js → chunk-DQXBBV26.js} +1 -1
- package/Marketplace/chunk-DYTXOFIM.js +1 -0
- package/Marketplace/{chunk-52YCKO3Z.js → chunk-E7LOFZQV.js} +1 -1
- package/Marketplace/{chunk-4ORO4H6Z.js → chunk-EDGT4W2Q.js} +1 -1
- package/Marketplace/{chunk-SZ33XJ4F.js → chunk-EKYPWTJN.js} +1 -1
- package/Marketplace/{chunk-4Q4I4JG4.js → chunk-ELAPYSP6.js} +1 -1
- package/Marketplace/{chunk-UB62TZOI.js → chunk-ET33HPF3.js} +1 -1
- package/Marketplace/{chunk-55E6VHIU.js → chunk-EU324R5S.js} +1 -1
- package/Marketplace/{chunk-VWMEDVEG.js → chunk-F24YPKYG.js} +1 -1
- package/Marketplace/{chunk-A53NYS6S.js → chunk-FDGH6XKK.js} +1 -1
- package/Marketplace/{chunk-QQF5ZMGS.js → chunk-FH2KAM6J.js} +1 -1
- package/Marketplace/{chunk-MAQQQB3T.js → chunk-FMZLGD5H.js} +1 -1
- package/Marketplace/{chunk-Z2XRGVGT.js → chunk-FSOZOROI.js} +1 -1
- package/Marketplace/{chunk-CC7KUBNZ.js → chunk-FUBZ75C7.js} +1 -1
- package/Marketplace/{chunk-P6RAMHDB.js → chunk-G3KVHCET.js} +1 -1
- package/Marketplace/{chunk-G6O6VFLS.js → chunk-GD6ZN56B.js} +1 -1
- package/Marketplace/{chunk-UMLV2ZUF.js → chunk-GLBJ4Y4T.js} +1 -1
- package/Marketplace/{chunk-YX65R6YJ.js → chunk-GLQBRY2Y.js} +1 -1
- package/Marketplace/{chunk-2NRHX6CZ.js → chunk-GNXSEYJF.js} +1 -1
- package/Marketplace/{chunk-FLNIURLD.js → chunk-GQT5IVF5.js} +1 -1
- package/Marketplace/{chunk-NY2YBW66.js → chunk-GRVGKVD6.js} +1 -1
- package/Marketplace/{chunk-AQVMOA6Z.js → chunk-HBWX22FY.js} +1 -1
- package/Marketplace/{chunk-JYSOUJ42.js → chunk-HWMXSD34.js} +1 -1
- package/Marketplace/{chunk-OCXIDX74.js → chunk-I6YNUCDO.js} +1 -1
- package/Marketplace/{chunk-5WT456T7.js → chunk-IA7NJXJD.js} +1 -1
- package/Marketplace/{chunk-7QP3VZ6H.js → chunk-INSRQ7YT.js} +1 -1
- package/Marketplace/{chunk-TOK5EWN4.js → chunk-IQGRGC3E.js} +1 -1
- package/Marketplace/{chunk-TYQYNICX.js → chunk-IQX2CRL5.js} +1 -1
- package/Marketplace/{chunk-QMIL5QUX.js → chunk-ITY2KKS5.js} +1 -1
- package/Marketplace/{chunk-PBAFAOKJ.js → chunk-IXURR6VG.js} +1 -1
- package/Marketplace/{chunk-O4D64GHO.js → chunk-IZZY74PN.js} +1 -1
- package/Marketplace/{chunk-QJCYEP2A.js → chunk-J3XO6ZVT.js} +1 -1
- package/Marketplace/{chunk-KSRL7Y2J.js → chunk-JHSG3KRS.js} +1 -1
- package/Marketplace/{chunk-LUJ3SHSP.js → chunk-JKRELT7N.js} +1 -1
- package/Marketplace/{chunk-RBZU7OVM.js → chunk-JMRRXRKO.js} +1 -1
- package/Marketplace/{chunk-OSGPJXJZ.js → chunk-JPWGFXZT.js} +1 -1
- package/Marketplace/{chunk-SPLGZRGH.js → chunk-JRCXHF2X.js} +1 -1
- package/Marketplace/{chunk-RXC5D64C.js → chunk-JTKEMQZT.js} +1 -1
- package/Marketplace/{chunk-NVPT5BF2.js → chunk-JU4ZP3HI.js} +1 -1
- package/Marketplace/{chunk-PSJVP2XO.js → chunk-JUWHPFPW.js} +1 -1
- package/Marketplace/{chunk-6C4UBIZK.js → chunk-K4Q33QIR.js} +1 -1
- package/Marketplace/{chunk-7E53IHXI.js → chunk-KA2HPWPG.js} +1 -1
- package/Marketplace/{chunk-SABMHH6B.js → chunk-KOQLZV3N.js} +1 -1
- package/Marketplace/{chunk-PN3KM4M4.js → chunk-KOUB5HRK.js} +1 -1
- package/Marketplace/{chunk-X35EOX3B.js → chunk-KUPGF23P.js} +1 -1
- package/Marketplace/{chunk-MTVUPPAN.js → chunk-L4EPB2CQ.js} +1 -1
- package/Marketplace/{chunk-SMZOSLIK.js → chunk-L6CRWJ2O.js} +1 -1
- package/Marketplace/{chunk-J3QDFXZ7.js → chunk-LQUMSCFQ.js} +1 -1
- package/Marketplace/{chunk-G3B6ETBU.js → chunk-LZHM5AMX.js} +1 -1
- package/Marketplace/{chunk-4S4BOPUV.js → chunk-M27MYADT.js} +1 -1
- package/Marketplace/{chunk-GVJLKDIO.js → chunk-MAT6VW43.js} +1 -1
- package/Marketplace/{chunk-P3XVM6DH.js → chunk-MHIYVGFS.js} +1 -1
- package/Marketplace/{chunk-M3DUXHYE.js → chunk-MORMHJFP.js} +1 -1
- package/Marketplace/{chunk-JM3NLPH4.js → chunk-MS5NHG4Z.js} +1 -1
- package/Marketplace/{chunk-GG3X4R7G.js → chunk-MSSRROS6.js} +1 -1
- package/Marketplace/{chunk-5UFP37GQ.js → chunk-NB2H6KA7.js} +1 -1
- package/Marketplace/{chunk-YD6BNJ2B.js → chunk-NJNRUDU6.js} +1 -1
- package/Marketplace/{chunk-7R2D2JZ6.js → chunk-O3BS4AC6.js} +1 -1
- package/Marketplace/{chunk-O4U34AC7.js → chunk-OH5T7D7O.js} +1 -1
- package/Marketplace/{chunk-W33M7S2S.js → chunk-OHAT7WXU.js} +1 -1
- package/Marketplace/{chunk-EHND5PFE.js → chunk-OUYOKQ57.js} +1 -1
- package/Marketplace/chunk-OWLZQ5WE.js +1 -0
- package/Marketplace/{chunk-IDGK6BMG.js → chunk-PCOAEOIL.js} +1 -1
- package/Marketplace/{chunk-JV4F6ZYF.js → chunk-PKYMYIGB.js} +1 -1
- package/Marketplace/{chunk-35N7HHLQ.js → chunk-PQM7IB5J.js} +1 -1
- package/Marketplace/{chunk-47JP6ZSE.js → chunk-PRM7MTFP.js} +1 -1
- package/Marketplace/{chunk-YABJCAAL.js → chunk-PUSOOHGT.js} +1 -1
- package/Marketplace/{chunk-XLQGQESJ.js → chunk-PV4OJSZI.js} +1 -1
- package/Marketplace/{chunk-FFJXYPVA.js → chunk-Q44OVAQU.js} +1 -1
- package/Marketplace/{chunk-LAMGWNDE.js → chunk-QB7PXKAO.js} +1 -1
- package/Marketplace/{chunk-WIRBYT7F.js → chunk-QETZ5VDX.js} +1 -1
- package/Marketplace/{chunk-BYL4N2KB.js → chunk-QJASIA27.js} +1 -1
- package/Marketplace/{chunk-NQVNAQCL.js → chunk-QSW7O4GN.js} +1 -1
- package/Marketplace/{chunk-2ST3DMR6.js → chunk-R2XKB6UH.js} +1 -1
- package/Marketplace/{chunk-PWOKOWVV.js → chunk-RIIIECQH.js} +1 -1
- package/Marketplace/{chunk-ZVNZGCYO.js → chunk-RNJHJCHP.js} +1 -1
- package/Marketplace/{chunk-24KZDZKS.js → chunk-RO7WOCSA.js} +1 -1
- package/Marketplace/{chunk-FEQXCPQI.js → chunk-RPHZK33A.js} +1 -1
- package/Marketplace/{chunk-OGF4VFSK.js → chunk-RZXE2MFY.js} +1 -1
- package/Marketplace/{chunk-WVA5LYVE.js → chunk-S22I47XG.js} +1 -1
- package/Marketplace/{chunk-2K5AP6IZ.js → chunk-S3H2JVI7.js} +1 -1
- package/Marketplace/{chunk-BUMWMFHU.js → chunk-SNRWOTPO.js} +1 -1
- package/Marketplace/{chunk-DI2VKA4Z.js → chunk-SS4PLPBF.js} +1 -1
- package/Marketplace/{chunk-NIJCYMZM.js → chunk-STOW2RQN.js} +1 -1
- package/Marketplace/{chunk-HORS2MKK.js → chunk-T5NCGRUA.js} +1 -1
- package/Marketplace/{chunk-XPA7U45N.js → chunk-TG7XOXCH.js} +1 -1
- package/Marketplace/{chunk-5ZS5MEG7.js → chunk-TH27YE6R.js} +1 -1
- package/Marketplace/{chunk-HFGQAVIU.js → chunk-TLCH5ENB.js} +1 -1
- package/Marketplace/{chunk-3HME327V.js → chunk-TQROQOXU.js} +1 -1
- package/Marketplace/{chunk-QJ55WDGL.js → chunk-TUJBAZ5Q.js} +1 -1
- package/Marketplace/{chunk-TZTW72NT.js → chunk-TUY6YGYA.js} +1 -1
- package/Marketplace/{chunk-AHMFSCTX.js → chunk-TVEI5B2O.js} +1 -1
- package/Marketplace/{chunk-NRSDIDOP.js → chunk-TVFILHVN.js} +1 -1
- package/Marketplace/{chunk-R3WIWDSP.js → chunk-TYSM3R5E.js} +1 -1
- package/Marketplace/{chunk-47Q5JJIA.js → chunk-U7FIZHGC.js} +1 -1
- package/Marketplace/{chunk-NQLMPUSB.js → chunk-UB3ZV5NW.js} +1 -1
- package/Marketplace/{chunk-A2RTZANN.js → chunk-UDNUDL5Z.js} +1 -1
- package/Marketplace/{chunk-YNL43MLU.js → chunk-UEXWQT5J.js} +1 -1
- package/Marketplace/{chunk-UE5E7JXK.js → chunk-UMIGDHOS.js} +1 -1
- package/Marketplace/{chunk-4XENFCCZ.js → chunk-UQ7PDZO3.js} +1 -1
- package/Marketplace/{chunk-5QDH4ZNS.js → chunk-VBQKMNR3.js} +1 -1
- package/Marketplace/{chunk-WQHFRJZZ.js → chunk-VFZ76Z6T.js} +1 -1
- package/Marketplace/{chunk-6F62N7RZ.js → chunk-VG66LDXQ.js} +1 -1
- package/Marketplace/{chunk-MT3CWRVG.js → chunk-VVNLTDLG.js} +1 -1
- package/Marketplace/{chunk-ZGIYCORM.js → chunk-VYI7JYH5.js} +1 -1
- package/Marketplace/{chunk-X52ZT4MU.js → chunk-WAZWPRUG.js} +1 -1
- package/Marketplace/{chunk-7IOQ6VVF.js → chunk-WCX3T6LK.js} +1 -1
- package/Marketplace/chunk-WD3ADLM3.js +1 -0
- package/Marketplace/{chunk-UE2QO2Y4.js → chunk-WG34QKGX.js} +1 -1
- package/Marketplace/chunk-WIRXMAIF.js +1 -0
- package/Marketplace/{chunk-IVKFEOCB.js → chunk-WTHYLNPX.js} +1 -1
- package/Marketplace/{chunk-CZWUOW55.js → chunk-WXXGLR46.js} +1 -1
- package/Marketplace/{chunk-YYV4FSYQ.js → chunk-X2CTSYKS.js} +1 -1
- package/Marketplace/{chunk-JZ3E5MLG.js → chunk-XCJ5XRFI.js} +1 -1
- package/Marketplace/{chunk-VVTBM3Z5.js → chunk-XF4A775R.js} +1 -1
- package/Marketplace/{chunk-IF7EJSQG.js → chunk-XHWASSX2.js} +1 -1
- package/Marketplace/{chunk-7X4B2T6C.js → chunk-XTNXL2IY.js} +1 -1
- package/Marketplace/{chunk-7HRL6MHY.js → chunk-XW5PNJJ3.js} +1 -1
- package/Marketplace/{chunk-PWCN6GJX.js → chunk-YBRWFONB.js} +1 -1
- package/Marketplace/{chunk-34ZZ4GCS.js → chunk-YLQBIIZH.js} +1 -1
- package/Marketplace/{chunk-BKZIKCX7.js → chunk-YQKEWN54.js} +1 -1
- package/Marketplace/{chunk-PUCIZX6E.js → chunk-YYKWI27U.js} +1 -1
- package/Marketplace/{chunk-LKJCOEGO.js → chunk-YZQDWPFY.js} +1 -1
- package/Marketplace/chunk-Z3PLQ27X.js +1 -0
- package/Marketplace/{chunk-OIWQSDTS.js → chunk-Z3YSNML6.js} +1 -1
- package/Marketplace/{chunk-LQPY6AYJ.js → chunk-Z4RYN6X5.js} +1 -1
- package/Marketplace/{chunk-PGX5ZJ6P.js → chunk-ZD5PSX3I.js} +1 -1
- package/Marketplace/{chunk-EBXGQWOL.js → chunk-ZLNNQRTE.js} +1 -1
- package/Marketplace/{chunk-5WQ3LCWP.js → chunk-ZZYFVEJO.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-IQOLSEWV.js → main-G6GGJLGW.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-3NAMEVOB.js +0 -1
- package/Marketplace/chunk-AUEWKPWQ.js +0 -1
- package/Marketplace/chunk-FTIUJUXI.js +0 -1
- package/Marketplace/chunk-IBE5KBZU.js +0 -1
- package/Marketplace/chunk-JNRCB7N3.js +0 -2
- package/Marketplace/chunk-SS6PBSX7.js +0 -1
- package/Marketplace/chunk-ZQHOCT7I.js +0 -1
- package/Marketplace/chunk-ZWUYPYHD.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as be}from"./chunk-A6QXXKPR.js";import{b as de,h as we}from"./chunk-QMQCIH3X.js";import{a as me}from"./chunk-AGBJEXIM.js";import{b as pe,e as _e}from"./chunk-MM7SAZOU.js";import{f as ge,g as fe,ma as U,qa as B,ra as ae}from"./chunk-OHGMB7HJ.js";import{a as _,b as $,c as N,i as g}from"./chunk-66YHNWRR.js";var C=class extends Error{constructor(e,t){let o=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=o}},P=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},O=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=o}},F=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=o}},q=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=o}},M=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},z=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=o}};var A=class{constructor(e,t,o){this.statusCode=e,this.statusText=t,this.content=o}},k=class{get(e,t){return this.send($(_({},t),{method:"GET",url:e}))}post(e,t){return this.send($(_({},t),{method:"POST",url:e}))}delete(e,t){return this.send($(_({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var i=(function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r})(i||{});var I=class{constructor(){}log(e,t){}};I.instance=new I;var Se="9.0.6";var d=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,o){if(!(e in t))throw new Error(`Unknown ${o} value: ${e}.`)}},p=class r{static get isBrowser(){return!r.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!r.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!r.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function x(r,e){let t="";return v(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${Ee(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function Ee(r){let e=new Uint8Array(r),t="";return e.forEach(o=>{let n=o<16?"0":"";t+=`0x${n}${o.toString(16)} `}),t.substr(0,t.length-1)}function v(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function V(r,e,t,o,n,s){return g(this,null,function*(){let c={},[a,l]=E();c[a]=l,r.log(i.Trace,`(${e} transport) sending data. ${x(n,s.logMessageContent)}.`);let u=v(n)?"arraybuffer":"text",f=yield t.post(o,{content:n,headers:_(_({},c),s.headers),responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});r.log(i.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function Ce(r){return r===void 0?new R(i.Information):r===null?I.instance:r.log!==void 0?r:new R(r)}var J=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},R=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let o=`[${new Date().toISOString()}] ${i[e]}: ${t}`;switch(e){case i.Critical:case i.Error:this.out.error(o);break;case i.Warning:this.out.warn(o);break;case i.Information:this.out.info(o);break;default:this.out.log(o);break}}}};function E(){let r="X-SignalR-User-Agent";return p.isNode&&(r="User-Agent"),[r,Te(Se,Pe(),Re(),xe())]}function Te(r,e,t,o){let n="Microsoft SignalR/",s=r.split(".");return n+=`${s[0]}.${s[1]}`,n+=` (${r}; `,e&&e!==""?n+=`${e}; `:n+="Unknown OS; ",n+=`${t}`,o?n+=`; ${o}`:n+="; Unknown Runtime Version",n+=")",n}function Pe(){if(p.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function xe(){if(p.isNode)return process.versions.node}function Re(){return p.isNode?"NodeJS":"Browser"}function K(r){return r.stack?r.stack:r.message?r.message:`${r}`}function ye(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var X=class extends k{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||p.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:N;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(ye());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:N;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return g(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,o;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),o=new S});let n=null;if(e.timeout){let l=e.timeout;n=setTimeout(()=>{t.abort(),this._logger.log(i.Warning,"Timeout from HTTP request."),o=new P},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},v(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:_({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw o||(this._logger.log(i.Warning,`Error from HTTP request. ${l}.`),l)}finally{n&&clearTimeout(n),e.abortSignal&&(e.abortSignal.onabort=null)}if(!s.ok){let l=yield ve(s,"text");throw new C(l||s.statusText,s.status)}let a=yield ve(s,e.responseType);return new A(s.status,s.statusText,a)})}getCookieString(e){let t="";return p.isNode&&this._jar&&this._jar.getCookies(e,(o,n)=>t=n.join("; ")),t}};function ve(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}var G=class extends k{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,o)=>{let n=new XMLHttpRequest;n.open(e.method,e.url,!0),n.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,n.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(v(e.content)?n.setRequestHeader("Content-Type","application/octet-stream"):n.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let s=e.headers;s&&Object.keys(s).forEach(c=>{n.setRequestHeader(c,s[c])}),e.responseType&&(n.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),o(new S)}),e.timeout&&(n.timeout=e.timeout),n.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),n.status>=200&&n.status<300?t(new A(n.status,n.statusText,n.response||n.responseText)):o(new C(n.response||n.responseText||n.statusText,n.status))},n.onerror=()=>{this._logger.log(i.Warning,`Error from HTTP request. ${n.status}: ${n.statusText}.`),o(new C(n.statusText,n.status))},n.ontimeout=()=>{this._logger.log(i.Warning,"Timeout from HTTP request."),o(new P)},n.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var Y=class extends k{constructor(e){if(super(),typeof fetch<"u"||p.isNode)this._httpClient=new X(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new G(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var y=class r{static write(e){return`${e}${r.RecordSeparator}`}static parse(e){if(e[e.length-1]!==r.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(r.RecordSeparator);return t.pop(),t}};y.RecordSeparatorCode=30;y.RecordSeparator=String.fromCharCode(y.RecordSeparatorCode);var Q=class{writeHandshakeRequest(e){return y.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,o;if(v(e)){let a=new Uint8Array(e),l=a.indexOf(y.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),o=a.byteLength>u?a.slice(u).buffer:null}else{let a=e,l=a.indexOf(y.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=a.substring(0,u),o=a.length>u?a.substring(u):null}let n=y.parse(t),s=JSON.parse(n[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[o,s]}};var h=(function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence",r})(h||{});var Z=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new J(this,e)}};var ee=class{constructor(e,t,o){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=o}_send(e){return g(this,null,function*(){let t=this._protocol.writeMessage(e),o=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let n=()=>{},s=()=>{};v(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((c,a)=>{n=c,s=a})),this._messages.push(new le(t,this._totalMessageCount,n,s))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield o})}_ack(e){let t=-1;for(let o=0;o<this._messages.length;o++){let n=this._messages[o];if(n._id<=e.sequenceId)t=o,v(n._message)?this._bufferedByteCount-=n._message.byteLength:this._bufferedByteCount-=n._message.length,n._resolver();else if(this._bufferedByteCount<this._bufferSize)n._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return g(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let o of t)yield this._connection.send(o._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>g(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},le=class{constructor(e,t,o,n){this._message=e,this._id=t,this._resolver=o,this._rejector=n}};var De=30*1e3,$e=15*1e3,Ne=1e5,m=(function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r})(m||{}),te=class r{static create(e,t,o,n,s,c,a){return new r(e,t,o,n,s,c,a)}constructor(e,t,o,n,s,c,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(i.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},d.isRequired(e,"connection"),d.isRequired(t,"logger"),d.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=s??De,this.keepAliveIntervalInMilliseconds=c??$e,this._statefulReconnectBufferSize=a??Ne,this._logger=t,this._protocol=o,this.connection=e,this._reconnectPolicy=n,this._handshakeProtocol=new Q,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return g(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(i.Debug,"Starting HubConnection.");try{yield this._startInternal(),p.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(i.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(i.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return g(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,o)=>{this._handshakeResolver=t,this._handshakeRejecter=o});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let o={protocol:this._protocol.name,version:t};if(this._logger.log(i.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(o)),this._logger.log(i.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new ee(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(i.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return g(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(i.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(i.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(i.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return g(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[o,n]=this._replaceStreamingParams(t),s=this._createStreamInvocation(e,t,n),c,a=new Z;return a.cancelCallback=()=>{let l=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],c.then(()=>this._sendWithProtocol(l))},this._callbacks[s.invocationId]=(l,u)=>{if(u){a.error(u);return}else l&&(l.type===h.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},c=this._sendWithProtocol(s).catch(l=>{a.error(l),delete this._callbacks[s.invocationId]}),this._launchStreams(o,c),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[o,n]=this._replaceStreamingParams(t),s=this._sendWithProtocol(this._createInvocation(e,t,!0,n));return this._launchStreams(o,s),s}invoke(e,...t){let[o,n]=this._replaceStreamingParams(t),s=this._createInvocation(e,t,!1,n);return new Promise((a,l)=>{this._callbacks[s.invocationId]=(f,T)=>{if(T){l(T);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):a(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(s).catch(f=>{l(f),delete this._callbacks[s.invocationId]});this._launchStreams(o,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let o=this._methods[e];if(o)if(t){let n=o.indexOf(t);n!==-1&&(o.splice(n,1),o.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let o of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(o)))switch(o.type){case h.Invocation:this._invokeClientMethod(o).catch(n=>{this._logger.log(i.Error,`Invoke client method threw error: ${K(n)}`)});break;case h.StreamItem:case h.Completion:{let n=this._callbacks[o.invocationId];if(n){o.type===h.Completion&&delete this._callbacks[o.invocationId];try{n(o)}catch(s){this._logger.log(i.Error,`Stream callback threw error: ${K(s)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(i.Information,"Close message received from server.");let n=o.error?new Error("Server returned an error on close: "+o.error):void 0;o.allowReconnect===!0?this.connection.stop(n):this._stopPromise=this._stopInternal(n);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(o);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(o);break;default:this._logger.log(i.Warning,`Invalid message type: ${o.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,o;try{[o,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(n){let s="Error parsing handshake response: "+n;this._logger.log(i.Error,s);let c=new Error(s);throw this._handshakeRejecter(c),c}if(t.error){let n="Server returned handshake error: "+t.error;this._logger.log(i.Error,n);let s=new Error(n);throw this._handshakeRejecter(s),s}else this._logger.log(i.Debug,"Server handshake complete.");return this._handshakeResolver(),o}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>g(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return g(this,null,function*(){let t=e.target.toLowerCase(),o=this._methods[t];if(!o){this._logger.log(i.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let n=o.slice(),s=!!e.invocationId,c,a,l;for(let u of n)try{let f=c;c=yield u.apply(this,e.arguments),s&&c&&f&&(this._logger.log(i.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(f){a=f,this._logger.log(i.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):s?(a?l=this._createCompletionMessage(e.invocationId,`${a}`,null):c!==void 0?l=this._createCompletionMessage(e.invocationId,null,c):(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):c&&this._logger.log(i.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(i.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),p.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(i.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return g(this,null,function*(){let t=Date.now(),o=0,n=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(o++,0,n);if(s===null){this._logger.log(i.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(i.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(i.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(c=>c.apply(this,[e]))}catch(c){this._logger.log(i.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(i.Information,`Reconnect attempt number ${o} will start in ${s} ms.`),yield new Promise(c=>{this._reconnectDelayHandle=setTimeout(c,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(i.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(c=>c.apply(this,[this.connection.connectionId]))}catch(c){this._logger.log(i.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(this._logger.log(i.Information,`Reconnect attempt failed because of error '${c}'.`),this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}n=c instanceof Error?c:new Error(c.toString()),s=this._getNextRetryDelay(o++,Date.now()-t,n)}}this._logger.log(i.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:o})}catch(n){return this._logger.log(i.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(o=>{let n=t[o];try{n(null,e)}catch(s){this._logger.log(i.Error,`Stream 'error' callback called with '${e}' threw error: ${K(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,o,n){if(o)return n.length!==0?{target:e,arguments:t,streamIds:n,type:h.Invocation}:{target:e,arguments:t,type:h.Invocation};{let s=this._invocationId;return this._invocationId++,n.length!==0?{target:e,arguments:t,invocationId:s.toString(),streamIds:n,type:h.Invocation}:{target:e,arguments:t,invocationId:s.toString(),type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let o in e)e[o].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:n=>{let s;n instanceof Error?s=n.message:n&&n.toString?s=n.toString():s="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,s)))},next:n=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,n)))}})}}_replaceStreamingParams(e){let t=[],o=[];for(let n=0;n<e.length;n++){let s=e[n];if(this._isObservable(s)){let c=this._invocationId;this._invocationId++,t[c]=s,o.push(c.toString()),e.splice(n,1)}}return[t,o]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,o){let n=this._invocationId;return this._invocationId++,o.length!==0?{target:e,arguments:t,invocationId:n.toString(),streamIds:o,type:h.StreamInvocation}:{target:e,arguments:t,invocationId:n.toString(),type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,o){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:o,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var Ae=[0,2e3,1e4,3e4,null],L=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Ae}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var D=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();var oe=class extends k{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return g(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let o=yield this._innerClient.send(e);return t&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):o})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[D.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[D.Authorization]&&delete e.headers[D.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=(function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r})(b||{}),w=(function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r})(w||{});var ne=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var W=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,o){this._httpClient=e,this._logger=t,this._pollAbort=new ne,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){if(d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(i.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[o,n]=E(),s=_({[o]:n},this._options.headers),c={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(c.responseType="arraybuffer");let a=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${a}.`);let l=yield this._httpClient.get(a,c);l.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new C(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,c)})}_poll(e,t){return g(this,null,function*(){try{for(;this._running;)try{let o=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${o}.`);let n=yield this._httpClient.get(o,t);n.statusCode===204?(this._logger.log(i.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):n.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${n.statusCode}.`),this._closeError=new C(n.statusText||"",n.statusCode),this._running=!1):n.content?(this._logger.log(i.Trace,`(LongPolling transport) data received. ${x(n.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(n.content)):this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof P?this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(i.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(i.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return g(this,null,function*(){return this._running?V(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return g(this,null,function*(){this._logger.log(i.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(i.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,o]=E();e[t]=o;let n={headers:_(_({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},s;try{yield this._httpClient.delete(this._url,n)}catch(c){s=c}s?s instanceof C&&(s.statusCode===404?this._logger.log(i.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(i.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(i.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(i.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(i.Trace,e),this.onclose(this._closeError)}}};var re=class{constructor(e,t,o,n){this._httpClient=e,this._accessToken=t,this._logger=o,this._options=n,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){return d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,n)=>{let s=!1;if(t!==w.Text){n(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let c;if(p.isBrowser||p.isWebWorker)c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let a=this._httpClient.getCookieString(e),l={};l.Cookie=a;let[u,f]=E();l[u]=f,c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:_(_({},l),this._options.headers)})}try{c.onmessage=a=>{if(this.onreceive)try{this._logger.log(i.Trace,`(SSE transport) data received. ${x(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){this._close(l);return}},c.onerror=a=>{s?this._close():n(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{this._logger.log(i.Information,`SSE connected to ${this._url}`),this._eventSource=c,s=!0,o()}}catch(a){n(a);return}})})}send(e){return g(this,null,function*(){return this._eventSource?V(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var se=class{constructor(e,t,o,n,s,c){this._logger=o,this._accessTokenFactory=t,this._logMessageContent=n,this._webSocketConstructor=s,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=c}connect(e,t){return g(this,null,function*(){d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(WebSockets transport) Connecting.");let o;return this._accessTokenFactory&&(o=yield this._accessTokenFactory()),new Promise((n,s)=>{e=e.replace(/^http/,"ws");let c,a=this._httpClient.getCookieString(e),l=!1;if(p.isNode||p.isReactNative){let u={},[f,T]=E();u[f]=T,o&&(u[D.Authorization]=`Bearer ${o}`),a&&(u[D.Cookie]=a),c=new this._webSocketConstructor(e,void 0,{headers:_(_({},u),this._headers)})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);c||(c=new this._webSocketConstructor(e)),t===w.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{this._logger.log(i.Information,`WebSocket connected to ${e}.`),this._webSocket=c,l=!0,n()},c.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(i.Information,`(WebSockets transport) ${f}.`)},c.onmessage=u=>{if(this._logger.log(i.Trace,`(WebSockets transport) data received. ${x(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},c.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(i.Trace,`(WebSockets transport) sending data. ${x(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(i.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var ke=100,ie=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,d.isRequired(e,"url"),this._logger=Ce(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let o=null,n=null;if(p.isNode&&typeof N<"u"){let s=typeof __webpack_require__=="function"?__non_webpack_require__:N;o=s("ws"),n=s("eventsource")}!p.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:p.isNode&&!t.WebSocket&&o&&(t.WebSocket=o),!p.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:p.isNode&&!t.EventSource&&typeof n<"u"&&(t.EventSource=n),this._httpClient=new oe(t.httpClient||new Y(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return g(this,null,function*(){if(e=e||w.Binary,d.isIn(e,w,"transferFormat"),this._logger.log(i.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(i.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(i.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new he(this.transport)),this._sendQueue.send(e))}stop(e){return g(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return g(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(i.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(i.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return g(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let o=null,n=0;do{if(o=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(t=o.url),o.accessToken){let s=o.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}n++}while(o.url&&n<ke);if(n===ke&&o.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,o,e)}this.transport instanceof W&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(i.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(i.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}})}_getNegotiationResponse(e){return g(this,null,function*(){let t={},[o,n]=E();t[o]=n;let s=this._resolveNegotiateUrl(e);this._logger.log(i.Debug,`Sending negotiation request: ${s}.`);try{let c=yield this._httpClient.post(s,{content:"",headers:_(_({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(c.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));let a=JSON.parse(c.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new M("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(c){let a="Failed to complete negotiation with the server: "+c;return c instanceof C&&c.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(i.Error,a),Promise.reject(new M(a))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,o,n){return g(this,null,function*(){let s=this._createConnectUrl(e,o.connectionToken);if(this._isITransport(t)){this._logger.log(i.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(s,n),this.connectionId=o.connectionId;return}let c=[],a=o.availableTransports||[],l=o;for(let u of a){let f=this._resolveTransportOrError(u,t,n,l?.useStatefulReconnect===!0);if(f instanceof Error)c.push(`${u.transport} failed:`),c.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(T){return Promise.reject(T)}s=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(s,n),this.connectionId=l.connectionId;return}catch(T){if(this._logger.log(i.Error,`Failed to start the transport '${u.transport}': ${T}`),l=void 0,c.push(new q(`${u.transport} failed: ${T}`,b[u.transport])),this._connectionState!=="Connecting"){let ue="Failed to select transport before stop() was called.";return this._logger.log(i.Debug,ue),Promise.reject(new S(ue))}}}}return c.length>0?Promise.reject(new z(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new se(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new re(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new W(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=o=>g(this,null,function*(){let n=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{n=!0}else{this._stopConnection(o);return}n&&this._stopConnection(o)}):this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(e,t)}_resolveTransportOrError(e,t,o,n){let s=b[e.transport];if(s==null)return this._logger.log(i.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(He(t,s))if(e.transferFormats.map(a=>w[a]).indexOf(o)>=0){if(s===b.WebSockets&&!this._options.WebSocket||s===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it is not supported in your environment.'`),new O(`'${b[s]}' is not supported in your environment.`,s);this._logger.log(i.Debug,`Selecting transport '${b[s]}'.`);try{return this.features.reconnect=s===b.WebSockets?n:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it does not support the requested transfer format '${w[o]}'.`),new Error(`'${b[s]}' does not support ${w[o]}.`);else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it was disabled by the client.`),new F(`'${b[s]}' is disabled by the client.`,s)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(i.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(i.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(i.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(i.Error,`Connection disconnected with error '${e}'.`):this._logger.log(i.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(i.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(i.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!p.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(i.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let o=new URLSearchParams(t.searchParams);return o.has("negotiateVersion")||o.append("negotiateVersion",this._negotiateVersion.toString()),o.has("useStatefulReconnect")?o.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&o.append("useStatefulReconnect","true"),t.search=o.toString(),t.toString()}};function He(r,e){return!r||(e&r)!==0}var he=class r{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new H,this._transportResult=new H,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new H),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return g(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new H;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):r._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(o){e.reject(o)}}})}static _concatBuffers(e){let t=e.map(s=>s.byteLength).reduce((s,c)=>s+c),o=new Uint8Array(t),n=0;for(let s of e)o.set(new Uint8Array(s),n),n+=s.byteLength;return o.buffer}},H=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var Me="json",ce=class{constructor(){this.name=Me,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=I.instance);let o=y.parse(e),n=[];for(let s of o){let c=JSON.parse(s);if(typeof c.type!="number")throw new Error("Invalid payload.");switch(c.type){case h.Invocation:this._isInvocationMessage(c);break;case h.StreamItem:this._isStreamItemMessage(c);break;case h.Completion:this._isCompletionMessage(c);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(c);break;case h.Sequence:this._isSequenceMessage(c);break;default:t.log(i.Information,"Unknown message type '"+c.type+"' ignored.");continue}n.push(c)}return n}writeMessage(e){return y.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var Le={trace:i.Trace,debug:i.Debug,info:i.Information,information:i.Information,warn:i.Warning,warning:i.Warning,error:i.Error,critical:i.Critical,none:i.None};function We(r){let e=Le[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}var j=class{configureLogging(e){if(d.isRequired(e,"logging"),je(e))this.logger=e;else if(typeof e=="string"){let t=We(e);this.logger=new R(t)}else this.logger=new R(e);return this}withUrl(e,t){return d.isRequired(e,"url"),d.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=_(_({},this.httpConnectionOptions),t):this.httpConnectionOptions=$(_({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return d.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new L(e):this.reconnectPolicy=e:this.reconnectPolicy=new L,this}withServerTimeout(e){return d.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return d.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new ie(this.url,e);return te.create(t,this.logger||I.instance,this.protocol||new ce,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function je(r){return r.log!==void 0}var Ie=(()=>{let e=class e{constructor(){this._onShowToast=new ge,this.onShowToast$=this._onShowToast.asObservable()}showToast(o){o.sticky=!0,this._onShowToast.next(o)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=U({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var Xo=(()=>{let e=class e{constructor(o,n,s){this.decodeTokenService=o,this.toastr=n,this.httpService=s,this.scanChannelToastr=ae(Ie),this.authService=ae(we),this.channels=this.authService.getChannels(),this.initNotifications(),this.parseToken=this.decodeTokenService.getParseToken(),this.buildConnection()}initNotifications(){let o=JSON.parse(localStorage.getItem("Notifications"));this._notifications=new fe(o||[])}setNotification(o){let s=[...this._notifications.value,o];this.saveNotificationTotal(s),this._notifications.next(s)}saveNotificationTotal(o=[]){localStorage.setItem("Notifications",JSON.stringify(o))}getNotification(){return this._notifications.asObservable()}getNotificationDetail(o){return this.httpService.post("/api/notification/GetByID",{ID:o})}getNotificationV2Detail(o){return this.httpService.post(me.GetJobScanDetail,{ID:o})}buildConnection(){this.hubConnection=new j().withUrl("/MarketplaceHub").withAutomaticReconnect().configureLogging(i.Information).build(),this.startConnection(),this.onConnectionClose(),this.subscribeNotification()}connectToRegister(){this.hubConnection.invoke("SubscribeGroup",this.parseToken.PID)}subscribeToJobGroup(o){try{this.hubConnection.send("SubscribeGroup",o)}catch(n){console.error("Error subscribing to job group:",n)}}startConnection(){this.hubConnection.start().then(()=>{this.connectToRegister()}).catch(o=>console.log("Error while starting connection: "+o))}onConnectionClose(){this.hubConnection.onclose(()=>{this.buildConnection()})}subscribeNotification(){this.hubConnection.on("Notification",o=>{this.handleNotification(o)})}handleNotification(o){if(typeof o=="string"){let n=JSON.parse(o);this.setNotification(n),n.ID==this.parseToken.PID&&(n.StatusCode!=200?this.toastr.error(n.Message,n.Title,{enableHtml:!0}):this.toastr.success(n.Message,n.Title,{enableHtml:!0}))}else{let n=o.message?JSON.parse(o.message):null;n&&(be.IsNotEmpty(n.Issue)?this.handlingErrorNotification(n):this.handlingSuccessNotification(n))}}handlingSuccessNotification(o){let n=this.channels.find(c=>c.ID===o.ChannelID),s=o.Duration?Math.floor(o.Duration/1e3):0;this.scanChannelToastr.showToast({text:"Scan Job Succeded",detail:`The Job takes <strong>${s}s</strong> to complete.`,severity:"success",data:{channelName:n.Name,channelTypeId:n.TypeID}})}handlingErrorNotification(o){let n=this.channels.find(c=>c.ID===o.ChannelID),s=o.Issue?JSON.parse(o.Issue)?.Message:"Unknown Error";this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:s,severity:"error",data:{channelName:n.Name,channelTypeId:n.TypeID}})}clearNotification(){localStorage.removeItem("Notifications"),this._notifications.next([])}};e.\u0275fac=function(n){return new(n||e)(B(de),B(pe),B(_e))},e.\u0275prov=U({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{Ie as a,Xo as b};
|
|
1
|
+
import{a as be}from"./chunk-A6QXXKPR.js";import{b as de,h as we}from"./chunk-7K6U3ABQ.js";import{a as me}from"./chunk-AGBJEXIM.js";import{b as pe,e as _e}from"./chunk-D6JH2KV4.js";import{f as ge,g as fe,ma as U,qa as B,ra as ae}from"./chunk-OHGMB7HJ.js";import{a as _,b as $,c as N,i as g}from"./chunk-66YHNWRR.js";var C=class extends Error{constructor(e,t){let o=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=o}},P=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},O=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=o}},F=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=o}},q=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=o}},M=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},z=class extends Error{constructor(e,t){let o=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=o}};var A=class{constructor(e,t,o){this.statusCode=e,this.statusText=t,this.content=o}},k=class{get(e,t){return this.send($(_({},t),{method:"GET",url:e}))}post(e,t){return this.send($(_({},t),{method:"POST",url:e}))}delete(e,t){return this.send($(_({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var i=(function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r})(i||{});var I=class{constructor(){}log(e,t){}};I.instance=new I;var Se="9.0.6";var d=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,o){if(!(e in t))throw new Error(`Unknown ${o} value: ${e}.`)}},p=class r{static get isBrowser(){return!r.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!r.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!r.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function x(r,e){let t="";return v(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${Ee(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function Ee(r){let e=new Uint8Array(r),t="";return e.forEach(o=>{let n=o<16?"0":"";t+=`0x${n}${o.toString(16)} `}),t.substr(0,t.length-1)}function v(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function V(r,e,t,o,n,s){return g(this,null,function*(){let c={},[a,l]=E();c[a]=l,r.log(i.Trace,`(${e} transport) sending data. ${x(n,s.logMessageContent)}.`);let u=v(n)?"arraybuffer":"text",f=yield t.post(o,{content:n,headers:_(_({},c),s.headers),responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});r.log(i.Trace,`(${e} transport) request complete. Response status: ${f.statusCode}.`)})}function Ce(r){return r===void 0?new R(i.Information):r===null?I.instance:r.log!==void 0?r:new R(r)}var J=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},R=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let o=`[${new Date().toISOString()}] ${i[e]}: ${t}`;switch(e){case i.Critical:case i.Error:this.out.error(o);break;case i.Warning:this.out.warn(o);break;case i.Information:this.out.info(o);break;default:this.out.log(o);break}}}};function E(){let r="X-SignalR-User-Agent";return p.isNode&&(r="User-Agent"),[r,Te(Se,Pe(),Re(),xe())]}function Te(r,e,t,o){let n="Microsoft SignalR/",s=r.split(".");return n+=`${s[0]}.${s[1]}`,n+=` (${r}; `,e&&e!==""?n+=`${e}; `:n+="Unknown OS; ",n+=`${t}`,o?n+=`; ${o}`:n+="; Unknown Runtime Version",n+=")",n}function Pe(){if(p.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function xe(){if(p.isNode)return process.versions.node}function Re(){return p.isNode?"NodeJS":"Browser"}function K(r){return r.stack?r.stack:r.message?r.message:`${r}`}function ye(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var X=class extends k{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||p.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:N;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(ye());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:N;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return g(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,o;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),o=new S});let n=null;if(e.timeout){let l=e.timeout;n=setTimeout(()=>{t.abort(),this._logger.log(i.Warning,"Timeout from HTTP request."),o=new P},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},v(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:_({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw o||(this._logger.log(i.Warning,`Error from HTTP request. ${l}.`),l)}finally{n&&clearTimeout(n),e.abortSignal&&(e.abortSignal.onabort=null)}if(!s.ok){let l=yield ve(s,"text");throw new C(l||s.statusText,s.status)}let a=yield ve(s,e.responseType);return new A(s.status,s.statusText,a)})}getCookieString(e){let t="";return p.isNode&&this._jar&&this._jar.getCookies(e,(o,n)=>t=n.join("; ")),t}};function ve(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}var G=class extends k{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,o)=>{let n=new XMLHttpRequest;n.open(e.method,e.url,!0),n.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,n.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(v(e.content)?n.setRequestHeader("Content-Type","application/octet-stream"):n.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let s=e.headers;s&&Object.keys(s).forEach(c=>{n.setRequestHeader(c,s[c])}),e.responseType&&(n.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),o(new S)}),e.timeout&&(n.timeout=e.timeout),n.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),n.status>=200&&n.status<300?t(new A(n.status,n.statusText,n.response||n.responseText)):o(new C(n.response||n.responseText||n.statusText,n.status))},n.onerror=()=>{this._logger.log(i.Warning,`Error from HTTP request. ${n.status}: ${n.statusText}.`),o(new C(n.statusText,n.status))},n.ontimeout=()=>{this._logger.log(i.Warning,"Timeout from HTTP request."),o(new P)},n.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var Y=class extends k{constructor(e){if(super(),typeof fetch<"u"||p.isNode)this._httpClient=new X(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new G(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var y=class r{static write(e){return`${e}${r.RecordSeparator}`}static parse(e){if(e[e.length-1]!==r.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(r.RecordSeparator);return t.pop(),t}};y.RecordSeparatorCode=30;y.RecordSeparator=String.fromCharCode(y.RecordSeparatorCode);var Q=class{writeHandshakeRequest(e){return y.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,o;if(v(e)){let a=new Uint8Array(e),l=a.indexOf(y.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),o=a.byteLength>u?a.slice(u).buffer:null}else{let a=e,l=a.indexOf(y.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=a.substring(0,u),o=a.length>u?a.substring(u):null}let n=y.parse(t),s=JSON.parse(n[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[o,s]}};var h=(function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence",r})(h||{});var Z=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new J(this,e)}};var ee=class{constructor(e,t,o){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=o}_send(e){return g(this,null,function*(){let t=this._protocol.writeMessage(e),o=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let n=()=>{},s=()=>{};v(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(o=new Promise((c,a)=>{n=c,s=a})),this._messages.push(new le(t,this._totalMessageCount,n,s))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield o})}_ack(e){let t=-1;for(let o=0;o<this._messages.length;o++){let n=this._messages[o];if(n._id<=e.sequenceId)t=o,v(n._message)?this._bufferedByteCount-=n._message.byteLength:this._bufferedByteCount-=n._message.length,n._resolver();else if(this._bufferedByteCount<this._bufferSize)n._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return g(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let o of t)yield this._connection.send(o._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>g(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},le=class{constructor(e,t,o,n){this._message=e,this._id=t,this._resolver=o,this._rejector=n}};var De=30*1e3,$e=15*1e3,Ne=1e5,m=(function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r})(m||{}),te=class r{static create(e,t,o,n,s,c,a){return new r(e,t,o,n,s,c,a)}constructor(e,t,o,n,s,c,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(i.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},d.isRequired(e,"connection"),d.isRequired(t,"logger"),d.isRequired(o,"protocol"),this.serverTimeoutInMilliseconds=s??De,this.keepAliveIntervalInMilliseconds=c??$e,this._statefulReconnectBufferSize=a??Ne,this._logger=t,this._protocol=o,this.connection=e,this._reconnectPolicy=n,this._handshakeProtocol=new Q,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return g(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(i.Debug,"Starting HubConnection.");try{yield this._startInternal(),p.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(i.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(i.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return g(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,o)=>{this._handshakeResolver=t,this._handshakeRejecter=o});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let o={protocol:this._protocol.name,version:t};if(this._logger.log(i.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(o)),this._logger.log(i.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new ee(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(i.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return g(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(i.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(i.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(i.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return g(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[o,n]=this._replaceStreamingParams(t),s=this._createStreamInvocation(e,t,n),c,a=new Z;return a.cancelCallback=()=>{let l=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],c.then(()=>this._sendWithProtocol(l))},this._callbacks[s.invocationId]=(l,u)=>{if(u){a.error(u);return}else l&&(l.type===h.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},c=this._sendWithProtocol(s).catch(l=>{a.error(l),delete this._callbacks[s.invocationId]}),this._launchStreams(o,c),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[o,n]=this._replaceStreamingParams(t),s=this._sendWithProtocol(this._createInvocation(e,t,!0,n));return this._launchStreams(o,s),s}invoke(e,...t){let[o,n]=this._replaceStreamingParams(t),s=this._createInvocation(e,t,!1,n);return new Promise((a,l)=>{this._callbacks[s.invocationId]=(f,T)=>{if(T){l(T);return}else f&&(f.type===h.Completion?f.error?l(new Error(f.error)):a(f.result):l(new Error(`Unexpected message type: ${f.type}`)))};let u=this._sendWithProtocol(s).catch(f=>{l(f),delete this._callbacks[s.invocationId]});this._launchStreams(o,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let o=this._methods[e];if(o)if(t){let n=o.indexOf(t);n!==-1&&(o.splice(n,1),o.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let o of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(o)))switch(o.type){case h.Invocation:this._invokeClientMethod(o).catch(n=>{this._logger.log(i.Error,`Invoke client method threw error: ${K(n)}`)});break;case h.StreamItem:case h.Completion:{let n=this._callbacks[o.invocationId];if(n){o.type===h.Completion&&delete this._callbacks[o.invocationId];try{n(o)}catch(s){this._logger.log(i.Error,`Stream callback threw error: ${K(s)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(i.Information,"Close message received from server.");let n=o.error?new Error("Server returned an error on close: "+o.error):void 0;o.allowReconnect===!0?this.connection.stop(n):this._stopPromise=this._stopInternal(n);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(o);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(o);break;default:this._logger.log(i.Warning,`Invalid message type: ${o.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,o;try{[o,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(n){let s="Error parsing handshake response: "+n;this._logger.log(i.Error,s);let c=new Error(s);throw this._handshakeRejecter(c),c}if(t.error){let n="Server returned handshake error: "+t.error;this._logger.log(i.Error,n);let s=new Error(n);throw this._handshakeRejecter(s),s}else this._logger.log(i.Debug,"Server handshake complete.");return this._handshakeResolver(),o}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>g(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return g(this,null,function*(){let t=e.target.toLowerCase(),o=this._methods[t];if(!o){this._logger.log(i.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let n=o.slice(),s=!!e.invocationId,c,a,l;for(let u of n)try{let f=c;c=yield u.apply(this,e.arguments),s&&c&&f&&(this._logger.log(i.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(f){a=f,this._logger.log(i.Error,`A callback for the method '${t}' threw error '${f}'.`)}l?yield this._sendWithProtocol(l):s?(a?l=this._createCompletionMessage(e.invocationId,`${a}`,null):c!==void 0?l=this._createCompletionMessage(e.invocationId,null,c):(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):c&&this._logger.log(i.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(i.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),p.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(i.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return g(this,null,function*(){let t=Date.now(),o=0,n=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(o++,0,n);if(s===null){this._logger.log(i.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(i.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(i.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(c=>c.apply(this,[e]))}catch(c){this._logger.log(i.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(i.Information,`Reconnect attempt number ${o} will start in ${s} ms.`),yield new Promise(c=>{this._reconnectDelayHandle=setTimeout(c,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(i.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(c=>c.apply(this,[this.connection.connectionId]))}catch(c){this._logger.log(i.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(this._logger.log(i.Information,`Reconnect attempt failed because of error '${c}'.`),this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}n=c instanceof Error?c:new Error(c.toString()),s=this._getNextRetryDelay(o++,Date.now()-t,n)}}this._logger.log(i.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${o} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,o){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:o})}catch(n){return this._logger.log(i.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(o=>{let n=t[o];try{n(null,e)}catch(s){this._logger.log(i.Error,`Stream 'error' callback called with '${e}' threw error: ${K(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,o,n){if(o)return n.length!==0?{target:e,arguments:t,streamIds:n,type:h.Invocation}:{target:e,arguments:t,type:h.Invocation};{let s=this._invocationId;return this._invocationId++,n.length!==0?{target:e,arguments:t,invocationId:s.toString(),streamIds:n,type:h.Invocation}:{target:e,arguments:t,invocationId:s.toString(),type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let o in e)e[o].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o)))},error:n=>{let s;n instanceof Error?s=n.message:n&&n.toString?s=n.toString():s="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(o,s)))},next:n=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(o,n)))}})}}_replaceStreamingParams(e){let t=[],o=[];for(let n=0;n<e.length;n++){let s=e[n];if(this._isObservable(s)){let c=this._invocationId;this._invocationId++,t[c]=s,o.push(c.toString()),e.splice(n,1)}}return[t,o]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,o){let n=this._invocationId;return this._invocationId++,o.length!==0?{target:e,arguments:t,invocationId:n.toString(),streamIds:o,type:h.StreamInvocation}:{target:e,arguments:t,invocationId:n.toString(),type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,o){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:o,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var Ae=[0,2e3,1e4,3e4,null],L=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Ae}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var D=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();var oe=class extends k{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return g(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let o=yield this._innerClient.send(e);return t&&o.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):o})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[D.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[D.Authorization]&&delete e.headers[D.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var b=(function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r})(b||{}),w=(function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r})(w||{});var ne=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var W=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,o){this._httpClient=e,this._logger=t,this._pollAbort=new ne,this._options=o,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){if(d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(i.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[o,n]=E(),s=_({[o]:n},this._options.headers),c={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(c.responseType="arraybuffer");let a=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${a}.`);let l=yield this._httpClient.get(a,c);l.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new C(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,c)})}_poll(e,t){return g(this,null,function*(){try{for(;this._running;)try{let o=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${o}.`);let n=yield this._httpClient.get(o,t);n.statusCode===204?(this._logger.log(i.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):n.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${n.statusCode}.`),this._closeError=new C(n.statusText||"",n.statusCode),this._running=!1):n.content?(this._logger.log(i.Trace,`(LongPolling transport) data received. ${x(n.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(n.content)):this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(o){this._running?o instanceof P?this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=o,this._running=!1):this._logger.log(i.Trace,`(LongPolling transport) Poll errored after shutdown: ${o.message}`)}}finally{this._logger.log(i.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return g(this,null,function*(){return this._running?V(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return g(this,null,function*(){this._logger.log(i.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(i.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,o]=E();e[t]=o;let n={headers:_(_({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},s;try{yield this._httpClient.delete(this._url,n)}catch(c){s=c}s?s instanceof C&&(s.statusCode===404?this._logger.log(i.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(i.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(i.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(i.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(i.Trace,e),this.onclose(this._closeError)}}};var re=class{constructor(e,t,o,n){this._httpClient=e,this._accessToken=t,this._logger=o,this._options=n,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){return d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((o,n)=>{let s=!1;if(t!==w.Text){n(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let c;if(p.isBrowser||p.isWebWorker)c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let a=this._httpClient.getCookieString(e),l={};l.Cookie=a;let[u,f]=E();l[u]=f,c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:_(_({},l),this._options.headers)})}try{c.onmessage=a=>{if(this.onreceive)try{this._logger.log(i.Trace,`(SSE transport) data received. ${x(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){this._close(l);return}},c.onerror=a=>{s?this._close():n(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{this._logger.log(i.Information,`SSE connected to ${this._url}`),this._eventSource=c,s=!0,o()}}catch(a){n(a);return}})})}send(e){return g(this,null,function*(){return this._eventSource?V(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var se=class{constructor(e,t,o,n,s,c){this._logger=o,this._accessTokenFactory=t,this._logMessageContent=n,this._webSocketConstructor=s,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=c}connect(e,t){return g(this,null,function*(){d.isRequired(e,"url"),d.isRequired(t,"transferFormat"),d.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(WebSockets transport) Connecting.");let o;return this._accessTokenFactory&&(o=yield this._accessTokenFactory()),new Promise((n,s)=>{e=e.replace(/^http/,"ws");let c,a=this._httpClient.getCookieString(e),l=!1;if(p.isNode||p.isReactNative){let u={},[f,T]=E();u[f]=T,o&&(u[D.Authorization]=`Bearer ${o}`),a&&(u[D.Cookie]=a),c=new this._webSocketConstructor(e,void 0,{headers:_(_({},u),this._headers)})}else o&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(o)}`);c||(c=new this._webSocketConstructor(e)),t===w.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{this._logger.log(i.Information,`WebSocket connected to ${e}.`),this._webSocket=c,l=!0,n()},c.onerror=u=>{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="There was an error with the transport",this._logger.log(i.Information,`(WebSockets transport) ${f}.`)},c.onmessage=u=>{if(this._logger.log(i.Trace,`(WebSockets transport) data received. ${x(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(f){this._close(f);return}},c.onclose=u=>{if(l)this._close(u);else{let f=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?f=u.error:f="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(f))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(i.Trace,`(WebSockets transport) sending data. ${x(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(i.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var ke=100,ie=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,d.isRequired(e,"url"),this._logger=Ce(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let o=null,n=null;if(p.isNode&&typeof N<"u"){let s=typeof __webpack_require__=="function"?__non_webpack_require__:N;o=s("ws"),n=s("eventsource")}!p.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:p.isNode&&!t.WebSocket&&o&&(t.WebSocket=o),!p.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:p.isNode&&!t.EventSource&&typeof n<"u"&&(t.EventSource=n),this._httpClient=new oe(t.httpClient||new Y(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return g(this,null,function*(){if(e=e||w.Binary,d.isIn(e,w,"transferFormat"),this._logger.log(i.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(i.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(i.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new he(this.transport)),this._sendQueue.send(e))}stop(e){return g(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return g(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(i.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(i.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return g(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let o=null,n=0;do{if(o=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(o.error)throw new Error(o.error);if(o.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(o.url&&(t=o.url),o.accessToken){let s=o.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}n++}while(o.url&&n<ke);if(n===ke&&o.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,o,e)}this.transport instanceof W&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(i.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(o){return this._logger.log(i.Error,"Failed to start the connection: "+o),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(o)}})}_getNegotiationResponse(e){return g(this,null,function*(){let t={},[o,n]=E();t[o]=n;let s=this._resolveNegotiateUrl(e);this._logger.log(i.Debug,`Sending negotiation request: ${s}.`);try{let c=yield this._httpClient.post(s,{content:"",headers:_(_({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(c.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));let a=JSON.parse(c.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new M("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(c){let a="Failed to complete negotiation with the server: "+c;return c instanceof C&&c.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(i.Error,a),Promise.reject(new M(a))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,o,n){return g(this,null,function*(){let s=this._createConnectUrl(e,o.connectionToken);if(this._isITransport(t)){this._logger.log(i.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(s,n),this.connectionId=o.connectionId;return}let c=[],a=o.availableTransports||[],l=o;for(let u of a){let f=this._resolveTransportOrError(u,t,n,l?.useStatefulReconnect===!0);if(f instanceof Error)c.push(`${u.transport} failed:`),c.push(f);else if(this._isITransport(f)){if(this.transport=f,!l){try{l=yield this._getNegotiationResponse(e)}catch(T){return Promise.reject(T)}s=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(s,n),this.connectionId=l.connectionId;return}catch(T){if(this._logger.log(i.Error,`Failed to start the transport '${u.transport}': ${T}`),l=void 0,c.push(new q(`${u.transport} failed: ${T}`,b[u.transport])),this._connectionState!=="Connecting"){let ue="Failed to select transport before stop() was called.";return this._logger.log(i.Debug,ue),Promise.reject(new S(ue))}}}}return c.length>0?Promise.reject(new z(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new se(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new re(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new W(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=o=>g(this,null,function*(){let n=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{n=!0}else{this._stopConnection(o);return}n&&this._stopConnection(o)}):this.transport.onclose=o=>this._stopConnection(o),this.transport.connect(e,t)}_resolveTransportOrError(e,t,o,n){let s=b[e.transport];if(s==null)return this._logger.log(i.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(He(t,s))if(e.transferFormats.map(a=>w[a]).indexOf(o)>=0){if(s===b.WebSockets&&!this._options.WebSocket||s===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it is not supported in your environment.'`),new O(`'${b[s]}' is not supported in your environment.`,s);this._logger.log(i.Debug,`Selecting transport '${b[s]}'.`);try{return this.features.reconnect=s===b.WebSockets?n:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it does not support the requested transfer format '${w[o]}'.`),new Error(`'${b[s]}' does not support ${w[o]}.`);else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it was disabled by the client.`),new F(`'${b[s]}' is disabled by the client.`,s)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(i.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(i.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(i.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(i.Error,`Connection disconnected with error '${e}'.`):this._logger.log(i.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(i.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(i.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!p.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(i.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let o=new URLSearchParams(t.searchParams);return o.has("negotiateVersion")||o.append("negotiateVersion",this._negotiateVersion.toString()),o.has("useStatefulReconnect")?o.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&o.append("useStatefulReconnect","true"),t.search=o.toString(),t.toString()}};function He(r,e){return!r||(e&r)!==0}var he=class r{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new H,this._transportResult=new H,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new H),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return g(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new H;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):r._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(o){e.reject(o)}}})}static _concatBuffers(e){let t=e.map(s=>s.byteLength).reduce((s,c)=>s+c),o=new Uint8Array(t),n=0;for(let s of e)o.set(new Uint8Array(s),n),n+=s.byteLength;return o.buffer}},H=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var Me="json",ce=class{constructor(){this.name=Me,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=I.instance);let o=y.parse(e),n=[];for(let s of o){let c=JSON.parse(s);if(typeof c.type!="number")throw new Error("Invalid payload.");switch(c.type){case h.Invocation:this._isInvocationMessage(c);break;case h.StreamItem:this._isStreamItemMessage(c);break;case h.Completion:this._isCompletionMessage(c);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(c);break;case h.Sequence:this._isSequenceMessage(c);break;default:t.log(i.Information,"Unknown message type '"+c.type+"' ignored.");continue}n.push(c)}return n}writeMessage(e){return y.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var Le={trace:i.Trace,debug:i.Debug,info:i.Information,information:i.Information,warn:i.Warning,warning:i.Warning,error:i.Error,critical:i.Critical,none:i.None};function We(r){let e=Le[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}var j=class{configureLogging(e){if(d.isRequired(e,"logging"),je(e))this.logger=e;else if(typeof e=="string"){let t=We(e);this.logger=new R(t)}else this.logger=new R(e);return this}withUrl(e,t){return d.isRequired(e,"url"),d.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=_(_({},this.httpConnectionOptions),t):this.httpConnectionOptions=$(_({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return d.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new L(e):this.reconnectPolicy=e:this.reconnectPolicy=new L,this}withServerTimeout(e){return d.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return d.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new ie(this.url,e);return te.create(t,this.logger||I.instance,this.protocol||new ce,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function je(r){return r.log!==void 0}var Ie=(()=>{let e=class e{constructor(){this._onShowToast=new ge,this.onShowToast$=this._onShowToast.asObservable()}showToast(o){o.sticky=!0,this._onShowToast.next(o)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=U({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();var Xo=(()=>{let e=class e{constructor(o,n,s){this.decodeTokenService=o,this.toastr=n,this.httpService=s,this.scanChannelToastr=ae(Ie),this.authService=ae(we),this.channels=this.authService.getChannels(),this.initNotifications(),this.parseToken=this.decodeTokenService.getParseToken(),this.buildConnection()}initNotifications(){let o=JSON.parse(localStorage.getItem("Notifications"));this._notifications=new fe(o||[])}setNotification(o){let s=[...this._notifications.value,o];this.saveNotificationTotal(s),this._notifications.next(s)}saveNotificationTotal(o=[]){localStorage.setItem("Notifications",JSON.stringify(o))}getNotification(){return this._notifications.asObservable()}getNotificationDetail(o){return this.httpService.post("/api/notification/GetByID",{ID:o})}getNotificationV2Detail(o){return this.httpService.post(me.GetJobScanDetail,{ID:o})}buildConnection(){this.hubConnection=new j().withUrl("/MarketplaceHub").withAutomaticReconnect().configureLogging(i.Information).build(),this.startConnection(),this.onConnectionClose(),this.subscribeNotification()}connectToRegister(){this.hubConnection.invoke("SubscribeGroup",this.parseToken.PID)}subscribeToJobGroup(o){try{this.hubConnection.send("SubscribeGroup",o)}catch(n){console.error("Error subscribing to job group:",n)}}startConnection(){this.hubConnection.start().then(()=>{this.connectToRegister()}).catch(o=>console.log("Error while starting connection: "+o))}onConnectionClose(){this.hubConnection.onclose(()=>{this.buildConnection()})}subscribeNotification(){this.hubConnection.on("Notification",o=>{this.handleNotification(o)})}handleNotification(o){if(typeof o=="string"){let n=JSON.parse(o);this.setNotification(n),n.ID==this.parseToken.PID&&(n.StatusCode!=200?this.toastr.error(n.Message,n.Title,{enableHtml:!0}):this.toastr.success(n.Message,n.Title,{enableHtml:!0}))}else{let n=o.message?JSON.parse(o.message):null;n&&(be.IsNotEmpty(n.Issue)?this.handlingErrorNotification(n):this.handlingSuccessNotification(n))}}handlingSuccessNotification(o){let n=this.channels.find(c=>c.ID===o.ChannelID),s=o.Duration?Math.floor(o.Duration/1e3):0;this.scanChannelToastr.showToast({text:"Scan Job Succeded",detail:`The Job takes <strong>${s}s</strong> to complete.`,severity:"success",data:{channelName:n.Name,channelTypeId:n.TypeID}})}handlingErrorNotification(o){let n=this.channels.find(c=>c.ID===o.ChannelID),s=o.Issue?JSON.parse(o.Issue)?.Message:"Unknown Error";this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:s,severity:"error",data:{channelName:n.Name,channelTypeId:n.TypeID}})}clearNotification(){localStorage.removeItem("Notifications"),this._notifications.next([])}};e.\u0275fac=function(n){return new(n||e)(B(de),B(pe),B(_e))},e.\u0275prov=U({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{Ie as a,Xo as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-3NCMRK7E.js";import{Aa as c,Hb as r,Lb as a,Pa as i,nc as C}from"./chunk-OHGMB7HJ.js";var p=["data-p-icon","check"],f=(()=>{class e extends s{static \u0275fac=(()=>{let t;return function(o){return(t||(t=i(e)))(o||e)}})();static \u0275cmp=r({type:e,selectors:[["","data-p-icon","check"]],features:[a],attrs:p,decls:1,vars:0,consts:[["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(n,o){n&1&&(c(),C(0,"path",0))},encapsulation:2})}return e})();export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ne,b as ae,c as pe,d as ce,e as se,f as le}from"./chunk-
|
|
1
|
+
import{a as ne,b as ae,c as pe,d as ce,e as se,f as le}from"./chunk-36645CIP.js";import{a as G}from"./chunk-XW5PNJJ3.js";import"./chunk-ET33HPF3.js";import"./chunk-OH5T7D7O.js";import{a as ie,b as re}from"./chunk-L4EPB2CQ.js";import"./chunk-GLBJ4Y4T.js";import"./chunk-QETZ5VDX.js";import"./chunk-S22I47XG.js";import"./chunk-3NCMRK7E.js";import{a as te,b as oe}from"./chunk-6Q4BDCI5.js";import"./chunk-C4MTEDSW.js";import"./chunk-JMRRXRKO.js";import{b as ee}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-JTKEMQZT.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import"./chunk-AGBJEXIM.js";import{A as Z,c as U,h as X,m as Y}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import{b as q}from"./chunk-D6JH2KV4.js";import{b as H,d as J,e as K,g as Q}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as z,w as j}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{$c as T,Hb as P,Ia as C,Lc as F,Mc as E,Nc as _,Oc as I,Pc as O,Rc as x,Sc as v,Tc as w,Uc as W,_c as B,aa as D,ac as V,ad as L,cc as N,dc as y,ea as R,fc as M,gc as S,hc as b,ic as n,id as $,jc as p,jd as A,ob as s,ra as g,rc as k,wc as h,ya as l,yc as f,za as d}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var de=()=>({display:"d-flex"}),me=a=>({"border-end-0":a});function ue(a,c){if(a&1){let i=k();n(0,"div",18),h("click",function(){let o=l(i).$implicit;return d(o.checked=!o.checked)}),n(1,"div",19)(2,"p-checkbox",20),w("ngModelChange",function(o){let e=l(i).$implicit;return v(e.checked,o)||(e.checked=o),d(o)}),h("click",function(o){return l(i),d(o.stopPropagation())}),p(),n(3,"p",21),_(4),p()()()}if(a&2){let i=c.$implicit,t=c.$index,o=f().$implicit;E(L(8,me,t!==o.Roles.length-1)),b("pTooltip",i.Description),s(2),F(T(10,de)),b("binary",!0),x("ngModel",i.checked),s(2),O(" ",i.Name," ")}}function _e(a,c){if(a&1){let i=k();n(0,"div",11)(1,"div",12),h("click",function(){let o=l(i).$implicit,e=f(2);return d(e.onPermissionGroupChange(!o.checked,o.ID))}),n(2,"div",13)(3,"span",14),_(4),p(),n(5,"p-checkbox",15),h("click",function(o){return l(i),d(o.stopPropagation())})("onChange",function(o){let e=l(i).$implicit,r=f(2);return d(r.onPermissionGroupChange(o.checked,e.ID))}),p()()(),n(6,"div",16)(7,"div",11),M(8,ue,5,11,"div",17,y),p()()()}if(a&2){let i=c.$implicit;s(4),I(i.Name),s(),F(T(5,de)),b("binary",!0)("ngModel",i.checked),s(3),S(i==null?null:i.Roles)}}function he(a,c){if(a&1&&(n(0,"div",9),M(1,_e,10,6,"div",11,y),p()),a&2){let i=f();s(),S(i.roleOptions())}}var Oe=(()=>{let c=class c{constructor(){this.groupService=g(G),this.activatedRoute=g(H),this.toastr=g(q),this.router=g(J),this.groupName=C(null),this.roleOptions=C([]),this.description=C(null),this.group$=this.activatedRoute.queryParams.pipe(D(t=>(this.groupID=t.ID,this.groupService.getGroupsForm(t.ID))),R(t=>{this.groupName.set(t.Group.Name),this.description.set(t.Group.Description),this.initRoleOptions(t.Options,t.RoleSelected)}))}initRoleOptions(t,o){t=t.map(e=>(e.Roles=e.Roles.map(r=>(r.checked=o.includes(r.ID),r)),e.checked=e.Roles.every(r=>r.checked),e)),this.roleOptions.set(t)}onPermissionGroupChange(t,o){this.roleOptions.update(e=>{let r=e.findIndex(m=>m.ID===o);return r!==-1&&(e[r].checked=t,e[r].Roles=e[r].Roles.map(m=>(m.checked=t,m))),[...e]})}onSubmit(){let t={Group:{ID:this.groupID,Name:this.groupName(),Description:this.description()},RoleSelected:this.getSelecedRoles()};this.groupService.submitGroup(t).subscribe({next:o=>{this.toastr.success("Group saved successfully","Success"),this.router.navigate(["/menu/users/groups"])}})}getSelecedRoles(){let t=[];return this.roleOptions().forEach(o=>{o.Roles.forEach(e=>{e.checked&&t.push(e.ID)})}),t}};c.\u0275fac=function(o){return new(o||c)},c.\u0275cmp=P({type:c,selectors:[["app-groups-form"]],features:[B([G])],decls:24,vars:8,consts:[["headerTitle","Groups Form",3,"headerTitle","hideSearchBox","hideSearchDropdown"],["routerLink","/menu/users/groups",1,"btn","btn-secondary","me-3"],[1,"btn","btn-success",3,"click"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12"],["type","text","pInputText","","placeholder","Group Name",1,"w-100","form-control","rounded-1",2,"padding-top","12px","padding-bottom","12px","font-size","14px",3,"ngModelChange","ngModel"],["value","0"],["value","1"],[1,"d-flex","flex-column","row-gap-6","ps-8"],["pInputTextarea","","rows","10","placeholder","Description",1,"w-100","form-control","rounded-1",3,"ngModelChange","ngModel"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between","border-end-0","cursor-pointer",2,"height","40px","background","#f6f6f6","cursor","pointer",3,"click"],[1,"d-flex","justify-content-center","w-100","align-items-center","gap-4"],[1,"fs-5","w-100","text-center"],["size","small",3,"click","onChange","binary","ngModel"],[1,"col"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white","cursor-pointer",2,"height","40px",3,"class","pTooltip"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white","cursor-pointer",2,"height","40px",3,"click","pTooltip"],[1,"d-flex","h-100","align-items-center","gap-4","px-2"],["size","small",3,"ngModelChange","click","binary","ngModel"],[1,"fs-6","text-dark",2,"margin","0"]],template:function(o,e){if(o&1){let r=k();W(0),$(1,"async"),n(2,"mainpanel",0)(3,"actions")(4,"a",1),_(5," Cancel "),p(),n(6,"button",2),h("click",function(){return l(r),d(e.onSubmit())}),_(7,"Save"),p()(),n(8,"content")(9,"div",3)(10,"div",4)(11,"div",5)(12,"input",6),w("ngModelChange",function(u){return l(r),v(e.groupName,u)||(e.groupName=u),d(u)}),p()()(),n(13,"p-tabs",7)(14,"p-tablist")(15,"p-tab",7),_(16,"Permission"),p(),n(17,"p-tab",8),_(18,"Description"),p()(),n(19,"p-tabpanels")(20,"p-tabpanel",7),V(21,he,3,0,"div",9),p(),n(22,"p-tabpanel",8)(23,"textarea",10),w("ngModelChange",function(u){return l(r),v(e.description,u)||(e.description=u),d(u)}),p()()()()()()()}if(o&2){let r=A(1,6,e.group$);s(2),b("headerTitle",e.groupName()?"Edit Group - "+e.groupName():"New Group Form")("hideSearchBox",!0)("hideSearchDropdown",!0),s(10),x("ngModel",e.groupName),s(9),N(r?21:-1),s(2),x("ngModel",e.description)}},dependencies:[z,ee,le,se,ce,pe,ne,ae,Z,U,X,Y,re,ie,oe,te,Q,K,j],styles:["[_nghost-%COMP%] .p-checkbox{display:flex!important;--p-checkbox-checked-background: #0976b4;--p-checkbox-hover-border-color: #0976b4;--p-checkbox-checked-border-color: #0976b4;--p-checkbox-checked-hover-border-color: #0976b4;--p-checkbox-hover-border-color-background: #0669a2;--p-checkbox-checked-hover-background: #0976b4}[_nghost-%COMP%] .p-tabs{--p-tabs-tab-active-color: #555555;--p-tabs-tab-color: #0976b4}[_nghost-%COMP%] .p-tabs .p-tabpanels{padding-left:0!important}[_nghost-%COMP%] .p-tabs .p-tablist-active-bar{background-color:#555!important}[_nghost-%COMP%] .p-panel .p-panel-header{display:none!important}"],changeDetection:0});let a=c;return a})();export{Oe as GroupsFormComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-
|
|
1
|
+
import{a as pe}from"./chunk-3NCMRK7E.js";import{b as te,c as ce,d as ae,e as v}from"./chunk-JMRRXRKO.js";import{la as ie,ma as T,na as oe,ua as re}from"./chunk-JTKEMQZT.js";import{B as ne,q as X,t as Y,v as ee}from"./chunk-CGSMHTKB.js";import{Aa as I,Ac as Z,Bc as P,Dc as D,Ec as A,Fd as F,Hb as x,Ib as R,Ic as $,Jc as q,Lb as w,Mb as Q,Mc as d,Nb as m,Nc as G,Oc as U,Pa as h,_b as _,_c as J,hc as c,ic as f,jc as g,kc as K,lc as E,ld as W,ma as L,mb as z,mc as B,na as N,nc as V,ob as a,oc as M,pa as j,pc as S,ra as b,rc as u,sc as O,tb as k,wc as C,ya as s,yc as r,za as l,zc as H}from"./chunk-OHGMB7HJ.js";var fe=["data-p-icon","times-circle"],se=(()=>{class n extends pe{pathId;onInit(){this.pathId="url(#"+te()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=h(n)))(i||n)}})();static \u0275cmp=x({type:n,selectors:[["","data-p-icon","times-circle"]],features:[w],attrs:fe,decls:5,vars:2,consts:[["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(t,i){t&1&&(I(),E(0,"g"),V(1,"path",0),B(),E(2,"defs")(3,"clipPath",1),V(4,"rect",2),B()()),t&2&&(_("clip-path",i.pathId),a(3),O("id",i.pathId))},encapsulation:2})}return n})();var le=`
|
|
2
2
|
.p-chip {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ve}from"./chunk-LUJ3SHSP.js";import{b as Me}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import{a as P,b as ie,c as _e,i as T,j as I}from"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-ZC526ERX.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{a as G}from"./chunk-AGBJEXIM.js";import{b as y,c as W}from"./chunk-UPRDDI4K.js";import{A as K,B as ne,c as D,e as V,h as R,i as x,j as X,l as O,m as $,n as ee,q as te,s as oe,w as Se,y as be}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import{b as fe,e as ge}from"./chunk-MM7SAZOU.js";import{d as Ce,e as ye}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as J,q as E}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Ac as ue,G as z,Hb as M,Ic as Z,Nc as r,Oa as pe,Pc as Q,Rc as j,Sc as q,Tc as Y,aa as F,ac as c,ad as A,bd as ce,cc as h,hc as s,hd as he,ic as o,jc as l,kc as v,mb as de,ob as p,ra as C,rc as L,tb as me,ud as B,v as ae,wc as f,ya as b,yc as k,za as _,zc as se}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var De=t=>({invalid:t});function Re(t,n){t&1&&(o(0,"small"),r(1," URL is required "),l())}function Oe(t,n){if(t&1&&(o(0,"div",10),c(1,Re,2,0,"small"),l()),t&2){k();let g=Z(10);p(),h(g.errors.required?1:-1)}}function Pe(t,n){t&1&&(o(0,"small"),r(1," Email is required "),l())}function Ie(t,n){t&1&&(o(0,"small"),r(1," Email is not valid "),l())}function Ve(t,n){if(t&1&&(o(0,"div",10),c(1,Pe,2,0,"small"),c(2,Ie,2,0,"small"),l()),t&2){k();let g=Z(16);p(),h(g.errors.required?1:-1),p(),h(g.errors.pattern?2:-1)}}var Te=(()=>{let n=class n{constructor(){this.dialogRef=C(P)}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new T,this.modalConfig.title="Fill data for Customer Support"}onSubmit(i){i!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-contact-support"]],decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],[1,"text-danger"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"]],template:function(d,e){if(d&1){let a=L();o(0,"modal-material",2),f("onClose",function(){return b(a),_(e.onClose())})("onCancel",function(){return b(a),_(e.onClose())})("onOk",function(u){return b(a),_(e.onSubmit(u))}),o(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),l(),o(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),l()(),o(9,"input",9,0),Y("ngModelChange",function(u){return b(a),q(e.formData.URL,u)||(e.formData.URL=u),_(u)}),l()(),c(11,Oe,2,1,"div",10),o(12,"label",11),r(13,"Requester's Email"),l(),o(14,"div",6)(15,"input",12,1),Y("ngModelChange",function(u){return b(a),q(e.formData.Email,u)||(e.formData.Email=u),_(u)}),l()(),c(17,Ve,3,2,"div",10),l()()()}if(d&2){let a=Z(10),m=Z(16);s("dynamicValidated",!a.invalid&&!m.invalid)("config",e.modalConfig),p(7),s("ngClass",A(7,De,a.invalid&&(a.dirty||a.touched))),p(2),j("ngModel",e.formData.URL),p(2),h(a.invalid&&(a.dirty||a.touched)?11:-1),p(4),j("ngModel",e.formData.Email),p(2),h(m.invalid&&(m.dirty||m.touched)?17:-1)}},dependencies:[I,E,K,D,R,Se,be,$],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let t=n;return t})();var ke=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.data=C(ie)}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new T,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(d,e){if(d&1){let a=L();o(0,"modal-material",1),f("onClose",function(){return b(a),_(e.onClose())})("onCancel",function(){return b(a),_(e.onClose())})("onOk",function(){return b(a),_(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),Y("ngModelChange",function(u){return b(a),q(e.shopID,u)||(e.shopID=u),_(u)}),l(),o(5,"label",5),r(6,"Shop ID"),l()()()()}d&2&&(s("dynamicValidated",e.shopID)("config",e.modalConfig),p(3),j("ngModel",e.shopID))},dependencies:[I,K,D,R,$],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let t=n;return t})();var Ue=t=>({"input-group":t}),Ne=(t,n)=>({"is-invalid":t,"input-shopify rounded-start":n}),Ae=t=>({"is-invalid":t});function ze(t,n){t&1&&(o(0,"label",3),r(1,"Shopify URL"),l())}function Fe(t,n){t&1&&(o(0,"label",3),r(1,"URL"),l())}function Le(t,n){t&1&&(o(0,"span",6),r(1,"myshopify.com"),l())}function We(t,n){if(t&1&&(o(0,"div"),r(1),l()),t&2){let g=k(2);p(),Q("",g.data==null?null:g.data.title," url is required")}}function Ke(t,n){if(t&1&&(o(0,"div",7),c(1,We,2,1,"div"),l()),t&2){let g,i=k();p(),h(!(i.formGroup==null||(g=i.formGroup.get("URL"))==null)&&g.getError("required")?1:-1)}}function Ze(t,n){t&1&&r(0," API Key ")}function je(t,n){t&1&&r(0," Consumer Key ")}function qe(t,n){t&1&&(r(0," ("),o(1,"a",11),r(2,"help center article"),l(),r(3,") "))}function Ye(t,n){t&1&&(o(0,"div",7),r(1,"API Key is required"),l())}function Be(t,n){t&1&&r(0," Admin API Access Token ")}function He(t,n){t&1&&r(0," Consumer Secret ")}function Qe(t,n){t&1&&(o(0,"div",7),r(1,"Consumer Secret is required"),l())}var re=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.data=C(ie),this.modalConfig=new T,this.urlCtrl=new O(null),this.channelType=y}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let i=[V.required];this.formGroup=new X({URL:new O(null,i),ConsumerKey:new O(null,[V.required]),ConsumerSecret:new O(null,[V.required])})}initModalConfig(){this.modalConfig=new T,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let i=this.formGroup?.get("URL")?.getError("pattern"),d=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||i&&d&&e){let m=this.formGroup.value;m=this.trimShopifyUrl(m),this.dialogRef.close(m)}}trimShopifyUrl(i){if(this.data?.channelType==this.channelType.Shopify){let d=i.URL?.trim()||"";d=d.replace(/^https?:\/\//,""),d.includes(".myshopify.com")||(d=`${d}.myshopify.com`),i.URL=d}return i}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-register-channel"]],decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(d,e){if(d&1&&(o(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2),c(3,ze,2,0,"label",3),o(4,"div",4),c(5,Fe,2,0,"label",3),v(6,"input",5),c(7,Le,2,0,"span",6),c(8,Ke,2,1,"div",7),l(),o(9,"div",8)(10,"label",3)(11,"span"),c(12,Ze,1,0)(13,je,1,0),l(),c(14,qe,4,0),l(),v(15,"input",9),c(16,Ye,2,0,"div",7),l(),o(17,"div",8)(18,"label",3),c(19,Be,1,0)(20,He,1,0),l(),v(21,"input",10),c(22,Qe,2,0,"div",7),l()()()()),d&2){let a,m,u,S,U,N;s("config",e.modalConfig),p(2),s("formGroup",e.formGroup),p(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),p(),s("ngClass",A(18,Ue,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),p(),h((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),p(),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/")("ngClass",ce(20,Ne,(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),p(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),p(),h(!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.invalid&&(!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.dirty||!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.touched)?8:-1),p(4),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),p(2),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),p(),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",A(23,Ae,(e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.invalid)&&((e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.dirty)||(e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.touched)))),p(),h(!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.getError("required")&&(!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.dirty||!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.touched)?16:-1),p(3),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),p(2),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",A(25,Ae,(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.invalid)&&((e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.dirty)||(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.touched)))),p(),h(!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.getError("required")&&(!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.dirty||!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.touched)?22:-1)}},dependencies:[I,K,ee,D,R,x,ne,te,oe,E],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]});let t=n;return t})();var we=t=>({"is-invalid":t});function xe(t,n){t&1&&(o(0,"div",6),r(1,"Api Key is required"),l())}function Xe(t,n){t&1&&(o(0,"div",6),r(1,"Vendor ID is required"),l())}var Ee=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.config=new T,this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config=new T,this.config.title="Register Plugo",this.config.okText="SAVE"}initFormGroup(){this.formGroup=new X({ApiKey:new O(null,[V.required]),VendorID:new O(null,[V.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let i=this.formGroup.value;this.dialogRef.close(i)}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-register-plugo"]],decls:13,vars:10,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control",3,"ngClass"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control",3,"ngClass"],["for","VendorID"]],template:function(d,e){if(d&1&&(o(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onOk()}),o(1,"div",1)(2,"form",2)(3,"div",3),v(4,"input",4),o(5,"label",5),r(6,"Api Key"),l(),c(7,xe,2,0,"div",6),l(),o(8,"div",3),v(9,"input",7),o(10,"label",8),r(11,"Vendor ID"),l(),c(12,Xe,2,0,"div",6),l()()()()),d&2){let a,m,u,S;s("config",e.config),p(2),s("formGroup",e.formGroup),p(2),s("ngClass",A(6,we,(e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.touched)))),p(3),h(!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.getError("required")&&(!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.dirty||!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.touched)?7:-1),p(2),s("ngClass",A(8,we,(e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.invalid)&&((e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.dirty)||(e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.touched)))),p(3),h(!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.getError("required")&&(!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.dirty||!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.touched)?12:-1)}},dependencies:[J,E,I,ne,ee,D,R,x,te,oe],encapsulation:2});let t=n;return t})();var w=(function(t){return t.SHOPEE="https://resc.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",t.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",t.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG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ksGG0NDvgyawrAYTituVQfCHQkY7rZkCb826VVuLDD5kqdqobiHYAodJ6clGBo0SceBDRzU85hpk0NFh9jwkk4blejIKphFf5xmYAQdBzRS8C7XaKAOHINOuYiUwMoJCoezAQTcwRWj0vjoZhZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",t.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",t.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",t.TIKTOK="https://resc.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",t.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",t.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",t})(w||{});var $e=["*"],et=(t,n,g,i,d,e,a,m)=>({"btn-shopee":t,"btn-lazada":n,"btn-tiktok":g,"btn-woocommerce":i,"btn-tokopedia":d,"btn-shopify":e,"btn-kalcare":a,"btn-plugo":m});function tt(t,n){t&1&&(o(0,"div",1)(1,"span"),r(2,"BETA"),l()())}var Ge=(()=>{let n=class n{constructor(){this.disabled=B(!1),this.type=B(void 0),this.isBeta=B(!1),this.authorize=new me,this.channelType=y,this.buttonName=B("Authorize Account")}ngOnChanges(i){i.type&&(this.initChannelImage(),this.channelType.Shopee)}initChannelImage(){switch(this.type()){case y.Tokopedia:this.image=w.TOKOPEDIA;break;case y.WooCommerce:this.image=w.WOOCOMMERCE;break;case y.Shopee:this.image=w.SHOPEE;break;case y.Tiktok:this.image=w.TIKTOK;break;case y.Lazada:this.image=w.LAZADA;break;case y.Shopify:this.image=w.SHOPIFY;break;case y.Plugo:this.image=w.PLUGO;break}}onAuthorize(){this.authorize.emit()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-channel-widget"]],inputs:{disabled:[1,"disabled"],type:[1,"type"],isBeta:[1,"isBeta"],buttonName:[1,"buttonName"]},outputs:{authorize:"onAuthorize"},features:[pe],ngContentSelectors:$e,decls:10,vars:13,consts:[[1,"card","h-100","ribbon-box"],[1,"ribbon","ribbon-top-right"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click","ngClass"]],template:function(d,e){d&1&&(se(),o(0,"div",0),c(1,tt,3,0,"div",1),o(2,"div",2),v(3,"img",3),l(),o(4,"div",4)(5,"div"),ue(6),l()(),o(7,"div",5)(8,"a",6),f("click",function(){return e.onAuthorize()}),r(9),l()()()),d&2&&(p(),h(e.isBeta()?1:-1),p(2),s("src",e.image,de),p(5),s("ngClass",he(4,et,e.type()==e.channelType.Shopee,e.type()==e.channelType.Lazada,e.type()==e.channelType.Tiktok,e.type()==e.channelType.WooCommerce,e.type()==e.channelType.Tokopedia,e.type()==e.channelType.Shopify,e.type()==e.channelType.KalCare,e.type()==e.channelType.Plugo)),p(),Q(" ",e.buttonName()," "))},dependencies:[J,E],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}']});let t=n;return t})();function ot(t,n){if(t&1){let g=L();o(0,"div",3)(1,"div",6)(2,"app-channel-widget",9),f("onAuthorize",function(){b(g);let d=k();return _(d.openPlugoDialog())}),o(3,"p"),r(4,"Authorize DEALPOS to manage your Plugo Store."),l(),o(5,"p"),r(6," Configure Plugo x DealPOS integration by visiting this "),o(7,"a",14),r(8," article. "),l()()()()()}if(t&2){let g=k();p(2),s("type",g.channelType.Plugo)}}var ao=(()=>{let n=class n{constructor(){this.http=C(ge),this.router=C(Ce),this.dialog=C(_e),this.toastr=C(fe),this.disabled=!1,this.newFeatureVisible=!1,this.channelType=y}shopeeAuthorize(){this.http.post(G.ShopeeV2_URL).subscribe(i=>{window.open(i.Url,"_blank")})}tiktokAuthorize(){this.http.post(G.Tiktok_URL).subscribe(i=>{window.open(i.Url,"_blank")})}lazadaAuthorize(){this.http.post(G.Lazada_URL).subscribe(i=>{window.open(i.Url,"_blank")})}openTokopediaDialog(){this.dialog.open(ke,{data:{title:"Tokopedia"},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddTokopedia,{ShopID:i}))).subscribe(i=>{this.onSuccessAddChannel()})}openShopifyDialog(){this.dialog.open(re,{data:{title:"Shopify",channelType:y.Shopify},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddShopify,i))).subscribe(()=>{this.onSuccessAddChannel()})}openWooCommerceDialog(){this.dialog.open(re,{data:{title:"WooCommerce",channelType:y.WooCommerce},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddWoocommerce,i))).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ee,{width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddPlugo,i))).subscribe(()=>{this.onSuccessAddChannel()})}contactSupport(){this.dialog.open(Te,{width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>{let d={URL:i.URL,Email:i.Email};return this.http.post("/api/ChannelAuthorization/Tokopedia_Intercom",d).pipe(ae(()=>i))})).subscribe(i=>{this.toastr.success("Your request has been received, we will be in touch at "+i.Email,"Thank you!")})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}onToggleNewVersion(i){this.newFeatureVisible=i}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-marketplace-add"]],decls:56,vars:10,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Authorization is Closed",3,"type","disabled"],["type","button","href","https://seller-id.tokopedia.com/university/essay?knowledge_id=1189016095426305&default_language=id-ID&identity=1",1,"button","text-primary","fw-bold"],["buttonName","Register",3,"onAuthorize","type"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"p-5","text-start"],[3,"change"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"]],template:function(d,e){d&1&&(o(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Cancel"),l()(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),f("onAuthorize",function(){return e.shopeeAuthorize()}),o(9,"p"),r(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),l(),o(11,"p"),r(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),l()()(),o(13,"div",6)(14,"app-channel-widget",7)(15,"p"),r(16," Starting from middle of Quarter 1 2025, Seller can no longer create or authorize their shop to Third Party Service without having a merge to their Tiktok Seller Account. "),l(),v(17,"br"),o(18,"p"),r(19," Please visit "),o(20,"a",8),r(21,"This Article From Tiktok x Tokopedia"),l(),r(22," to complete the merge process. After that seller can authorize their shop to DEALPOS only via Tiktok x Tokopedia Options. "),l()()(),o(23,"div",4)(24,"app-channel-widget",5),f("onAuthorize",function(){return e.tiktokAuthorize()}),o(25,"p"),r(26," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),l(),o(27,"p"),r(28," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),l()()()(),o(29,"div",3)(30,"div",6)(31,"app-channel-widget",9),f("onAuthorize",function(){return e.openWooCommerceDialog()}),o(32,"p"),r(33,"Authorize DEALPOS to manage your Personal Website."),l(),o(34,"p"),r(35," Configure woocommerce integration by visiting "),o(36,"a",10),r(37,"this article."),l()()()(),o(38,"div",6)(39,"app-channel-widget",5),f("onAuthorize",function(){return e.lazadaAuthorize()}),o(40,"p"),r(41," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),l(),o(42,"p"),r(43," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),l()()(),o(44,"div",4)(45,"app-channel-widget",9),f("onAuthorize",function(){return e.openShopifyDialog()}),o(46,"p"),r(47,"Authorize DEALPOS to manage your Personal Website."),l(),o(48,"p"),r(49," Configure Shopify integration by visiting "),o(50,"a",11),r(51,"this article."),l()()()()(),c(52,ot,9,1,"div",3),l(),o(53,"div",12)(54,"mat-slide-toggle",13),f("change",function(m){return e.onToggleNewVersion(m.checked)}),r(55,"Show Beta Channel Integration "),l()()()()),d&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),p(8),s("type",e.channelType.Shopee),p(6),s("type",e.channelType.Tokopedia)("disabled",e.disabled),p(10),s("type",e.channelType.Tiktok),p(7),s("type",e.channelType.WooCommerce),p(8),s("type",e.channelType.Lazada),p(6),s("type",e.channelType.Shopify),p(7),h(e.newFeatureVisible?52:-1))},dependencies:[Me,ye,Ge,ve],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"]});let t=n;return t})();export{ao as MarketplaceAddComponent};
|
|
1
|
+
import{a as ve}from"./chunk-JKRELT7N.js";import{b as Me}from"./chunk-SNRWOTPO.js";import"./chunk-ROS2QMKF.js";import{a as P,b as ie,c as _e,i as T,j as I}from"./chunk-IA7NJXJD.js";import"./chunk-UEXWQT5J.js";import"./chunk-ZC526ERX.js";import"./chunk-6H7M43WO.js";import"./chunk-HO2TMGLM.js";import"./chunk-IZZY74PN.js";import"./chunk-O3BS4AC6.js";import{a as G}from"./chunk-AGBJEXIM.js";import{b as y,c as W}from"./chunk-UPRDDI4K.js";import{A as K,B as ne,c as D,e as V,h as R,i as x,j as X,l as O,m as $,n as ee,q as te,s as oe,w as Se,y as be}from"./chunk-6UM4NHOR.js";import"./chunk-RQUCYFCB.js";import{b as fe,e as ge}from"./chunk-D6JH2KV4.js";import{d as Ce,e as ye}from"./chunk-UB3ZV5NW.js";import"./chunk-JPWGFXZT.js";import{B as J,q as E}from"./chunk-CGSMHTKB.js";import"./chunk-XBIHN6D3.js";import{Ac as ue,G as z,Hb as M,Ic as Z,Nc as r,Oa as pe,Pc as Q,Rc as j,Sc as q,Tc as Y,aa as F,ac as c,ad as A,bd as ce,cc as h,hc as s,hd as he,ic as o,jc as l,kc as v,mb as de,ob as p,ra as C,rc as L,tb as me,ud as B,v as ae,wc as f,ya as b,yc as k,za as _,zc as se}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var De=t=>({invalid:t});function Re(t,n){t&1&&(o(0,"small"),r(1," URL is required "),l())}function Oe(t,n){if(t&1&&(o(0,"div",10),c(1,Re,2,0,"small"),l()),t&2){k();let g=Z(10);p(),h(g.errors.required?1:-1)}}function Pe(t,n){t&1&&(o(0,"small"),r(1," Email is required "),l())}function Ie(t,n){t&1&&(o(0,"small"),r(1," Email is not valid "),l())}function Ve(t,n){if(t&1&&(o(0,"div",10),c(1,Pe,2,0,"small"),c(2,Ie,2,0,"small"),l()),t&2){k();let g=Z(16);p(),h(g.errors.required?1:-1),p(),h(g.errors.pattern?2:-1)}}var Te=(()=>{let n=class n{constructor(){this.dialogRef=C(P)}ngOnInit(){this.formData={URL:"",Email:""},this.initModalConfig()}initModalConfig(){this.modalConfig=new T,this.modalConfig.title="Fill data for Customer Support"}onSubmit(i){i!="Enter"&&this.dialogRef.close(this.formData)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-contact-support"]],decls:18,vars:9,consts:[["url","ngModel"],["email","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mx-4"],["for","customerURL"],[1,"input-group","mb-2"],[1,"input-group-prepend"],["id","tokopediaUrl",1,"border-start-0","rounded-start","input-group-text","pointer-default","bg-light",2,"height","58px",3,"ngClass"],["required","","type","text","id","customerURL","name","customerURL","title","customerURL",1,"form-control","border-start-0","customerUrl",3,"ngModelChange","ngModel"],[1,"text-danger"],["for","customerEmail"],["required","","type","text","id","customerEmail","name","customerEmail","title","customerEmail","pattern","\\b[\\w\\.-]+@[\\w\\.-]+\\.\\w{2,4}\\b",1,"form-control",3,"ngModelChange","ngModel"]],template:function(d,e){if(d&1){let a=L();o(0,"modal-material",2),f("onClose",function(){return b(a),_(e.onClose())})("onCancel",function(){return b(a),_(e.onClose())})("onOk",function(u){return b(a),_(e.onSubmit(u))}),o(1,"div",3)(2,"div",4)(3,"label",5),r(4,"Tokopedia URL"),l(),o(5,"div",6)(6,"div",7)(7,"span",8),r(8,"https://tokopedia.com/"),l()(),o(9,"input",9,0),Y("ngModelChange",function(u){return b(a),q(e.formData.URL,u)||(e.formData.URL=u),_(u)}),l()(),c(11,Oe,2,1,"div",10),o(12,"label",11),r(13,"Requester's Email"),l(),o(14,"div",6)(15,"input",12,1),Y("ngModelChange",function(u){return b(a),q(e.formData.Email,u)||(e.formData.Email=u),_(u)}),l()(),c(17,Ve,3,2,"div",10),l()()()}if(d&2){let a=Z(10),m=Z(16);s("dynamicValidated",!a.invalid&&!m.invalid)("config",e.modalConfig),p(7),s("ngClass",A(7,De,a.invalid&&(a.dirty||a.touched))),p(2),j("ngModel",e.formData.URL),p(2),h(a.invalid&&(a.dirty||a.touched)?11:-1),p(4),j("ngModel",e.formData.Email),p(2),h(m.invalid&&(m.dirty||m.touched)?17:-1)}},dependencies:[I,E,K,D,R,Se,be,$],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.input-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.input-group[_ngcontent-%COMP%] > input.ng-invalid.ng-touched[_ngcontent-%COMP%]{border-color:#fb404b}.input-group[_ngcontent-%COMP%] > input.customerUrl[_ngcontent-%COMP%]{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.invalid[_ngcontent-%COMP%]{border-color:#fb404b}.pointer-default[_ngcontent-%COMP%]{cursor:default}"]});let t=n;return t})();var ke=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.data=C(ie)}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new T,this.modalConfig.title=this.data?.title,this.modalConfig.okText="SAVE"}onSubmit(){this.dialogRef.close(this.shopID)}onClose(){this.dialogRef.close()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-dialog-tokopedia"]],decls:7,vars:3,consts:[["name","ngModel"],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"form-label-group"],["type","text","id","shopid","placeholder","Shop ID","name","ShopID","data-toggle","tooltip","title","Channel Name",1,"form-control",3,"ngModelChange","ngModel"],["for","shopid"]],template:function(d,e){if(d&1){let a=L();o(0,"modal-material",1),f("onClose",function(){return b(a),_(e.onClose())})("onCancel",function(){return b(a),_(e.onClose())})("onOk",function(){return b(a),_(e.onSubmit())}),o(1,"div",2)(2,"div",3)(3,"input",4,0),Y("ngModelChange",function(u){return b(a),q(e.shopID,u)||(e.shopID=u),_(u)}),l(),o(5,"label",5),r(6,"Shop ID"),l()()()()}d&2&&(s("dynamicValidated",e.shopID)("config",e.modalConfig),p(3),j("ngModel",e.shopID))},dependencies:[I,K,D,R,$],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let t=n;return t})();var Ue=t=>({"input-group":t}),Ne=(t,n)=>({"is-invalid":t,"input-shopify rounded-start":n}),Ae=t=>({"is-invalid":t});function ze(t,n){t&1&&(o(0,"label",3),r(1,"Shopify URL"),l())}function Fe(t,n){t&1&&(o(0,"label",3),r(1,"URL"),l())}function Le(t,n){t&1&&(o(0,"span",6),r(1,"myshopify.com"),l())}function We(t,n){if(t&1&&(o(0,"div"),r(1),l()),t&2){let g=k(2);p(),Q("",g.data==null?null:g.data.title," url is required")}}function Ke(t,n){if(t&1&&(o(0,"div",7),c(1,We,2,1,"div"),l()),t&2){let g,i=k();p(),h(!(i.formGroup==null||(g=i.formGroup.get("URL"))==null)&&g.getError("required")?1:-1)}}function Ze(t,n){t&1&&r(0," API Key ")}function je(t,n){t&1&&r(0," Consumer Key ")}function qe(t,n){t&1&&(r(0," ("),o(1,"a",11),r(2,"help center article"),l(),r(3,") "))}function Ye(t,n){t&1&&(o(0,"div",7),r(1,"API Key is required"),l())}function Be(t,n){t&1&&r(0," Admin API Access Token ")}function He(t,n){t&1&&r(0," Consumer Secret ")}function Qe(t,n){t&1&&(o(0,"div",7),r(1,"Consumer Secret is required"),l())}var re=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.data=C(ie),this.modalConfig=new T,this.urlCtrl=new O(null),this.channelType=y}ngOnInit(){this.initModalConfig(),this.initFormGroup()}initFormGroup(){let i=[V.required];this.formGroup=new X({URL:new O(null,i),ConsumerKey:new O(null,[V.required]),ConsumerSecret:new O(null,[V.required])})}initModalConfig(){this.modalConfig=new T,this.modalConfig.title=this.data.title,this.modalConfig.okText="SAVE"}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let i=this.formGroup?.get("URL")?.getError("pattern"),d=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||i&&d&&e){let m=this.formGroup.value;m=this.trimShopifyUrl(m),this.dialogRef.close(m)}}trimShopifyUrl(i){if(this.data?.channelType==this.channelType.Shopify){let d=i.URL?.trim()||"";d=d.replace(/^https?:\/\//,""),d.includes(".myshopify.com")||(d=`${d}.myshopify.com`),i.URL=d}return i}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-register-channel"]],decls:23,vars:27,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation",3,"ngClass"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded",3,"placeholder","ngClass"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-secondary"],[1,"invalid-feedback"],[1,"mb-8","has-validation"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder","ngClass"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(d,e){if(d&1&&(o(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),o(1,"div",1)(2,"form",2),c(3,ze,2,0,"label",3),o(4,"div",4),c(5,Fe,2,0,"label",3),v(6,"input",5),c(7,Le,2,0,"span",6),c(8,Ke,2,1,"div",7),l(),o(9,"div",8)(10,"label",3)(11,"span"),c(12,Ze,1,0)(13,je,1,0),l(),c(14,qe,4,0),l(),v(15,"input",9),c(16,Ye,2,0,"div",7),l(),o(17,"div",8)(18,"label",3),c(19,Be,1,0)(20,He,1,0),l(),v(21,"input",10),c(22,Qe,2,0,"div",7),l()()()()),d&2){let a,m,u,S,U,N;s("config",e.modalConfig),p(2),s("formGroup",e.formGroup),p(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),p(),s("ngClass",A(18,Ue,(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),p(),h((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),p(),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/")("ngClass",ce(20,Ne,(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("URL"))==null?null:a.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),p(),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),p(),h(!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.invalid&&(!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.dirty||!(e.formGroup==null||(m=e.formGroup.get("URL"))==null)&&m.touched)?8:-1),p(4),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?12:13),p(2),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?14:-1),p(),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]")("ngClass",A(23,Ae,(e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.invalid)&&((e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.dirty)||(e.formGroup==null||(u=e.formGroup.get("ConsumerKey"))==null?null:u.touched)))),p(),h(!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.getError("required")&&(!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.dirty||!(e.formGroup==null||(S=e.formGroup.get("ConsumerKey"))==null)&&S.touched)?16:-1),p(3),h((e.data==null?null:e.data.channelType)==e.channelType.Shopify?19:20),p(2),s("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************")("ngClass",A(25,Ae,(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.invalid)&&((e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.dirty)||(e.formGroup==null||(U=e.formGroup.get("ConsumerSecret"))==null?null:U.touched)))),p(),h(!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.getError("required")&&(!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.dirty||!(e.formGroup==null||(N=e.formGroup.get("ConsumerSecret"))==null)&&N.touched)?22:-1)}},dependencies:[I,K,ee,D,R,x,ne,te,oe,E],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"]});let t=n;return t})();var we=t=>({"is-invalid":t});function xe(t,n){t&1&&(o(0,"div",6),r(1,"Api Key is required"),l())}function Xe(t,n){t&1&&(o(0,"div",6),r(1,"Vendor ID is required"),l())}var Ee=(()=>{let n=class n{constructor(){this.dialogRef=C(P),this.config=new T,this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config=new T,this.config.title="Register Plugo",this.config.okText="SAVE"}initFormGroup(){this.formGroup=new X({ApiKey:new O(null,[V.required]),VendorID:new O(null,[V.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let i=this.formGroup.value;this.dialogRef.close(i)}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-modal-register-plugo"]],decls:13,vars:10,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control",3,"ngClass"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control",3,"ngClass"],["for","VendorID"]],template:function(d,e){if(d&1&&(o(0,"modal-material",0),f("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onOk()}),o(1,"div",1)(2,"form",2)(3,"div",3),v(4,"input",4),o(5,"label",5),r(6,"Api Key"),l(),c(7,xe,2,0,"div",6),l(),o(8,"div",3),v(9,"input",7),o(10,"label",8),r(11,"Vendor ID"),l(),c(12,Xe,2,0,"div",6),l()()()()),d&2){let a,m,u,S;s("config",e.config),p(2),s("formGroup",e.formGroup),p(2),s("ngClass",A(6,we,(e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.invalid)&&((e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.dirty)||(e.formGroup==null||(a=e.formGroup.get("ApiKey"))==null?null:a.touched)))),p(3),h(!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.getError("required")&&(!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.dirty||!(e.formGroup==null||(m=e.formGroup.get("ApiKey"))==null)&&m.touched)?7:-1),p(2),s("ngClass",A(8,we,(e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.invalid)&&((e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.dirty)||(e.formGroup==null||(u=e.formGroup.get("VendorID"))==null?null:u.touched)))),p(3),h(!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.getError("required")&&(!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.dirty||!(e.formGroup==null||(S=e.formGroup.get("VendorID"))==null)&&S.touched)?12:-1)}},dependencies:[J,E,I,ne,ee,D,R,x,te,oe],encapsulation:2});let t=n;return t})();var w=(function(t){return t.SHOPEE="https://resc.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",t.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",t.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et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zU85hpk0NFh9jwkk4blejIKphFf5xmYAQdBzRS8C7XaKAOHINOuYiUwMoJCoezAQTcwRWj0vjoZhZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",t.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",t.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",t.TIKTOK="https://resc.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",t.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",t.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",t})(w||{});var $e=["*"],et=(t,n,g,i,d,e,a,m)=>({"btn-shopee":t,"btn-lazada":n,"btn-tiktok":g,"btn-woocommerce":i,"btn-tokopedia":d,"btn-shopify":e,"btn-kalcare":a,"btn-plugo":m});function tt(t,n){t&1&&(o(0,"div",1)(1,"span"),r(2,"BETA"),l()())}var Ge=(()=>{let n=class n{constructor(){this.disabled=B(!1),this.type=B(void 0),this.isBeta=B(!1),this.authorize=new me,this.channelType=y,this.buttonName=B("Authorize Account")}ngOnChanges(i){i.type&&(this.initChannelImage(),this.channelType.Shopee)}initChannelImage(){switch(this.type()){case y.Tokopedia:this.image=w.TOKOPEDIA;break;case y.WooCommerce:this.image=w.WOOCOMMERCE;break;case y.Shopee:this.image=w.SHOPEE;break;case y.Tiktok:this.image=w.TIKTOK;break;case y.Lazada:this.image=w.LAZADA;break;case y.Shopify:this.image=w.SHOPIFY;break;case y.Plugo:this.image=w.PLUGO;break}}onAuthorize(){this.authorize.emit()}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-channel-widget"]],inputs:{disabled:[1,"disabled"],type:[1,"type"],isBeta:[1,"isBeta"],buttonName:[1,"buttonName"]},outputs:{authorize:"onAuthorize"},features:[pe],ngContentSelectors:$e,decls:10,vars:13,consts:[[1,"card","h-100","ribbon-box"],[1,"ribbon","ribbon-top-right"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click","ngClass"]],template:function(d,e){d&1&&(se(),o(0,"div",0),c(1,tt,3,0,"div",1),o(2,"div",2),v(3,"img",3),l(),o(4,"div",4)(5,"div"),ue(6),l()(),o(7,"div",5)(8,"a",6),f("click",function(){return e.onAuthorize()}),r(9),l()()()),d&2&&(p(),h(e.isBeta()?1:-1),p(2),s("src",e.image,de),p(5),s("ngClass",he(4,et,e.type()==e.channelType.Shopee,e.type()==e.channelType.Lazada,e.type()==e.channelType.Tiktok,e.type()==e.channelType.WooCommerce,e.type()==e.channelType.Tokopedia,e.type()==e.channelType.Shopify,e.type()==e.channelType.KalCare,e.type()==e.channelType.Plugo)),p(),Q(" ",e.buttonName()," "))},dependencies:[J,E],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}']});let t=n;return t})();function ot(t,n){if(t&1){let g=L();o(0,"div",3)(1,"div",6)(2,"app-channel-widget",9),f("onAuthorize",function(){b(g);let d=k();return _(d.openPlugoDialog())}),o(3,"p"),r(4,"Authorize DEALPOS to manage your Plugo Store."),l(),o(5,"p"),r(6," Configure Plugo x DealPOS integration by visiting this "),o(7,"a",14),r(8," article. "),l()()()()()}if(t&2){let g=k();p(2),s("type",g.channelType.Plugo)}}var ao=(()=>{let n=class n{constructor(){this.http=C(ge),this.router=C(Ce),this.dialog=C(_e),this.toastr=C(fe),this.disabled=!1,this.newFeatureVisible=!1,this.channelType=y}shopeeAuthorize(){this.http.post(G.ShopeeV2_URL).subscribe(i=>{window.open(i.Url,"_blank")})}tiktokAuthorize(){this.http.post(G.Tiktok_URL).subscribe(i=>{window.open(i.Url,"_blank")})}lazadaAuthorize(){this.http.post(G.Lazada_URL).subscribe(i=>{window.open(i.Url,"_blank")})}openTokopediaDialog(){this.dialog.open(ke,{data:{title:"Tokopedia"},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddTokopedia,{ShopID:i}))).subscribe(i=>{this.onSuccessAddChannel()})}openShopifyDialog(){this.dialog.open(re,{data:{title:"Shopify",channelType:y.Shopify},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddShopify,i))).subscribe(()=>{this.onSuccessAddChannel()})}openWooCommerceDialog(){this.dialog.open(re,{data:{title:"WooCommerce",channelType:y.WooCommerce},width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddWoocommerce,i))).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ee,{width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>this.http.post(G.AddPlugo,i))).subscribe(()=>{this.onSuccessAddChannel()})}contactSupport(){this.dialog.open(Te,{width:"30%"}).afterClosed().pipe(z(i=>W.IsNotEmpty(i)),F(i=>{let d={URL:i.URL,Email:i.Email};return this.http.post("/api/ChannelAuthorization/Tokopedia_Intercom",d).pipe(ae(()=>i))})).subscribe(i=>{this.toastr.success("Your request has been received, we will be in touch at "+i.Email,"Thank you!")})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}onToggleNewVersion(i){this.newFeatureVisible=i}};n.\u0275fac=function(d){return new(d||n)},n.\u0275cmp=M({type:n,selectors:[["app-marketplace-add"]],decls:56,vars:10,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Authorization is Closed",3,"type","disabled"],["type","button","href","https://seller-id.tokopedia.com/university/essay?knowledge_id=1189016095426305&default_language=id-ID&identity=1",1,"button","text-primary","fw-bold"],["buttonName","Register",3,"onAuthorize","type"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"p-5","text-start"],[3,"change"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"]],template:function(d,e){d&1&&(o(0,"mainpanel",0)(1,"actions")(2,"a",1),r(3,"Cancel"),l()(),o(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),f("onAuthorize",function(){return e.shopeeAuthorize()}),o(9,"p"),r(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),l(),o(11,"p"),r(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),l()()(),o(13,"div",6)(14,"app-channel-widget",7)(15,"p"),r(16," Starting from middle of Quarter 1 2025, Seller can no longer create or authorize their shop to Third Party Service without having a merge to their Tiktok Seller Account. "),l(),v(17,"br"),o(18,"p"),r(19," Please visit "),o(20,"a",8),r(21,"This Article From Tiktok x Tokopedia"),l(),r(22," to complete the merge process. After that seller can authorize their shop to DEALPOS only via Tiktok x Tokopedia Options. "),l()()(),o(23,"div",4)(24,"app-channel-widget",5),f("onAuthorize",function(){return e.tiktokAuthorize()}),o(25,"p"),r(26," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),l(),o(27,"p"),r(28," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),l()()()(),o(29,"div",3)(30,"div",6)(31,"app-channel-widget",9),f("onAuthorize",function(){return e.openWooCommerceDialog()}),o(32,"p"),r(33,"Authorize DEALPOS to manage your Personal Website."),l(),o(34,"p"),r(35," Configure woocommerce integration by visiting "),o(36,"a",10),r(37,"this article."),l()()()(),o(38,"div",6)(39,"app-channel-widget",5),f("onAuthorize",function(){return e.lazadaAuthorize()}),o(40,"p"),r(41," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),l(),o(42,"p"),r(43," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),l()()(),o(44,"div",4)(45,"app-channel-widget",9),f("onAuthorize",function(){return e.openShopifyDialog()}),o(46,"p"),r(47,"Authorize DEALPOS to manage your Personal Website."),l(),o(48,"p"),r(49," Configure Shopify integration by visiting "),o(50,"a",11),r(51,"this article."),l()()()()(),c(52,ot,9,1,"div",3),l(),o(53,"div",12)(54,"mat-slide-toggle",13),f("change",function(m){return e.onToggleNewVersion(m.checked)}),r(55,"Show Beta Channel Integration "),l()()()()),d&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),p(8),s("type",e.channelType.Shopee),p(6),s("type",e.channelType.Tokopedia)("disabled",e.disabled),p(10),s("type",e.channelType.Tiktok),p(7),s("type",e.channelType.WooCommerce),p(8),s("type",e.channelType.Lazada),p(6),s("type",e.channelType.Shopify),p(7),h(e.newFeatureVisible?52:-1))},dependencies:[Me,ye,Ge,ve],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"]});let t=n;return t})();export{ao as MarketplaceAddComponent};
|