{"version":3,"file":"app/vendors-node_modules_webex_internal-plugin-dss_node_modules_webex_internal-plugin-mercury_dis-852dcc.edc39481.js","mappings":";;;;;;;;;;AAAa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf,cAAc,mBAAO,CAAC,6GAAe;AACrC,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,sBAAsB,OAAO,sBAAsB,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ,wCAAwC;AAChD,QAAQ,wCAAwC;AAChD;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,QAAQ,+BAA+B;AACvC;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;;;;;;;;;;ACxEa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,qBAAqB,GAAG,+BAA+B,GAAG,gCAAgC,GAAG,sCAAsC,GAAG,oCAAoC,GAAG,yCAAyC,GAAG,qBAAqB,GAAG,wBAAwB;AACzQ;AACA,mCAAmC,oCAAoC;AACvE,qCAAqC,sCAAsC;AAC3E,8BAA8B,+BAA+B;AAC7D,uBAAuB,wBAAwB;AAC/C,+BAA+B,gCAAgC;AAC/D,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,yCAAyC;AACjF,oBAAoB,qBAAqB;AACzC;;;;;;;;;;;ACtBa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,wCAAwC,mBAAO,CAAC,kKAAm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,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,gEAAgE;;AAE/G;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,gEAAgE,oEAAoE,mDAAmD;AACvL;AACA,QAAQ,IAAI;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,yCAAyC,4DAA4D,2CAA2C;AAChJ,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kDAAkD,sEAAsE,qDAAqD;;AAE7K;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;;AAEA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA,+BAA+B;;AAE/B;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,2EAA2E,eAAe;AAC1F;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;AC/zBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,kDAAkD,mBAAO,CAAC,6FAAsB;AAChF,2CAA2C,mBAAO,CAAC,gJAAiB;AACpE;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACpCa;;AAEb,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CA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;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,cAAc,wBAAwB;AACtC,eAAe,QAAQ;AACvB;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;AClMa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,8EAAiB;AACtE,iBAAiB,mBAAO,CAAC,gIAAc;AACvC,gDAAgD,mBAAO,CAAC,0JAAsB;AAC9E;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;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ACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;AC5Fa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACtOa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;;;;;;;;;;;ACZa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,sBAAsB;AACtB,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA,CAAC,GAAG;AACJ;;;;;;;;;;;ACda;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;;;;;;;;;;;ACba;;AAEb,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,eAAe,mBAAO,CAAC,8GAAyC;AAChE,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,mBAAO,CAAC,6IAA+B;AACvC,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,wCAAwC,mBAAO,CAAC,qHAAmB;AACnE,uCAAuC,gDAAgD,4CAA4C,0EAA0E,mBAAmB;AAChO,yCAAyC,uCAAuC,6EAA6E,cAAc,qCAAqC,oCAAoC,UAAU,iBAAiB,kEAAkE,sFAAsF,2DAA2D,yEAAyE;AAC3iB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,OAAO,sCAAsC,6CAA6C;AACvG,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACvIa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AAC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A8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,sBAAsB,uBAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mBAAmB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/Ga;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAO,CAAC,6IAA+B;AACvC,mBAAO,CAAC,+IAAgC;AACxC,mBAAO,CAAC,+IAAgC;AACxC,iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C,sCAA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wE,KAAK;AAChc;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM;AACN,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,0EAA0E,aAAa;AACvF;AACA;AACA;AACA,KAAK;AACL;AACA,6EAA6E,eAAe;AAC5F;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gDAAgD;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+HAA+H,+CAA+C;AAC9K;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA,cAAc,IAAsC;AACpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,2EAA2E,eAAe;AAC1F;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAA+F;AAC/F;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA,YAAY;AACZ,+EAA+E;AAC/E;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,QAAQ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D,cAAc,mBAAO,CAAC,2HAAW;AACjC,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAe;AAC5B;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;AACV,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX,UAAU;AACV,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;ACzfa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,yCAAyC,mBAAO,CAAC,2IAAe;AAChE;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI,gBAAgB,qBAAM;AAC1B,SAAS,qBAAM,cAAc,qBAAM;AACnC,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACnCa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,6CAA6C,mBAAO,CAAC,wHAA8C;AACnG,qCAAqC,mBAAO,CAAC,0GAAuC;AACpF,kCAAkC,mBAAO,CAAC,8GAAyC;AACnF,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C,oBAAoB,mBAAO,CAAC,2HAAsB;AAClD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA,cAAc,MAAqC,GAAG,CAAI;AAC1D;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACtIa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,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HAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,6CAA6C,mBAAO,CAAC,4IAAmB;AACxE,yBAAyB,yBAAyB,qCAAqC,0CAA0C,kCAAkC,2DAA2D,0BAA0B;AACxP,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,uEAAuE,KAAK;AAC/b,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY;AAC3T;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AAC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8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;ACriBa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,mBAAmB,mBAAO,CAAC,oHAA4C;AACvE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,0CAA0C,mBAAO,CAAC,0GAAoC;AACtF,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F,gDAAgD,mBAAO,CAAC,8HAAiD;AACzG,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,qDAAqD,mBAAO,CAAC,wIAAsD;AACnH,wCAAwC,mBAAO,C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AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,YAAY,IAAI;AAChB;AACA,WAAW;AACX;AACA,WAAW,oCAAoC;AAC/C;AACA,WAAW,4CAA4C;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;A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iBAAiB,mBAAO,CAAC,qHAAmB;AAC5C,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,cAAc,mBAAO,CAAC,0IAAU;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,wBAAwB,yBAAyB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,yBAAyB,6CAA6C;AAC5I;AACA;AACA;AACA,gEAAgE,aAAoB;AACpF;AACA,2DAA2D,aAAoB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iCAAiC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,8BAA8B,+BAA+B;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,gCAAgC,iCAAiC;AACjE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,0BAA0B,2BAA2B;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,8BAA8B,+BAA+B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+BAA+B;AAC7D;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4MAA4M,aAAoB;AAChO;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,QAAQ;AACrB;AACA,kCAAkC,mCAAmC;AACrE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,6BAA6B,8BAA8B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,4CAA4C;AACvF;AACA;AACA;AACA;AACA,mDAAmD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChXa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,+BAA+B,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,qDAAqD,GAAG,oCAAoC,GAAG,mCAAmC,GAAG,qBAAqB,GAAG,uCAAuC,GAAG,6CAA6C,GAAG,+BAA+B,GAAG,4CAA4C,GAAG,+CAA+C,GAAG,+CAA+C,GAAG,0BAA0B,GAAG,yCAAyC,GAAG,0CAA0C,GAAG,sCAAsC,GAAG,4CAA4C,GAAG,0DAA0D,GAAG,kCAAkC;AAC7yB,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG;AACA;AACA;AACA;;AAEA,qCAAqC,sCAAsC;AAC3E,iCAAiC,kCAAkC;AACnE,oBAAoB,qBAAqB;AACzC,kCAAkC,mCAAmC;AACrE,4CAA4C,6CAA6C;AACzF,oBAAoB,qBAAqB,SAAS;AAClD,8BAA8B,+BAA+B;AAC7D,sCAAsC,uCAAuC;AAC7E,wCAAwC,yCAAyC;AACjF,2CAA2C,4CAA4C;AACvF,8CAA8C,+CAA+C;AAC7F,8CAA8C,+CAA+C;AAC7F,sBAAsB,uBAAuB,gBAAgB;;AAE7D,8BAA8B,+BAA+B;AAC7D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,0DAA0D,qPAAqP;AACxW,mCAAmC,oCAAoC;AACvE;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,qDAAqD;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0CAA0C;AACnF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,CAAC;AACD,2CAA2C,4CAA4C;AACvF;;;;;;;;;;;AChnBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,sCAAsC,mBAAO,CAAC,4HAAW;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACpCa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,qDAAqD,mBAAO,CAAC,8JAA4B;AACzF;AACA;AACA;AACA;AACA,aAAa,KAAK;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;AC/Ba;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,C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ACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,QAAQ;AACvB,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;ACvLa;;AAEb,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,eAAe,mBAAO,CAAC,8GAAyC;AAChE,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAA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AAC3T;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E;AACA,SAAS;AACT;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB,QAAQ;AACzB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gBAAgB;AAChB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB,SAAS;AAC1B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB,iBAAiB,SAAS;AAC1B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;AC5aa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;AC9Na;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,mCAAmC;AACnC,wCAAwC,mBAAO,CAAC,0HAA+C;AAC/F;AACA;AACA;AACA,WAAW,KAAK;AAChB,aAAa;AACb;AACA,kCAAkC,mCAAmC;AACrE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;;ACzBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,eAAe,mBAAO,CAAC,6HAAe;AACtC,gDAAgD,mBAAO,CAAC,qIAAsB;AAC9E;AACA;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAW;AACtB;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,aAAa,iBAAW;AACxB;AACA;AACA;AACA,gBAAgB;AAChB;AACA,WAAW,iCAA2B,IAAI,CAAiC;AAC3E,KAAK;AACL;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,iBAAW;AACxB,uBAAuB,iBAAW;AAClC,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,6CAA6C,mBAAO,CAAC,8EAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa,iBAAW;AACxB;AACA,KAAK;AACL;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa,iBAAW;AACxB;AACA,KAAK;AACL;AACA;AACA,QAAQ;AACR,cAAc;AACd;AACA,2CAA2C,iBAAW,+BAA+B,iBAAW;AAChG;AACA;AACA,QAAQ,6CAA6C;AACrD;AACA;AACA,cAAc;AACd;AACA,oCAAoC,iBAAW,kCAAkC,iBAAW;AAC5F;AACA,QAAQ;AACR,cAAc;AACd;AACA,iCAAiC,iBAAW,oBAAoB,iBAAW,8BAA8B,iBAAW;AACpH;AACA,QAAQ;AACR,cAAc;AACd;AACA,qCAAqC,iBAAW,wBAAwB,iBAAW,kCAAkC,iBAAW;AAChI;AACA,QAAQ;AACR,cAAc;AACd;AACA,oCAAoC,iBAAW,uBAAuB,iBAAW,iCAAiC,iBAAW;AAC7H;AACA,QAAQ;AACR,cAAc;AACd;AACA,6BAA6B,iBAAW,gBAAgB,iBAAW,iBAAiB,iBAAW,0BAA0B,iBAAW;AACpI;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,QAAQ;AACR,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,QAAQ;AACR,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,QAAQ;AACR,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,eAAe,iBAAW;AAC1B,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,eAAe,iBAAW;AAC1B,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;AChKa;;AAEb,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,eAAe,mBAAO,CAAC,8GAAyC;AAChE,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAA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AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;;AAEA;AACA,aAAa;AACb,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;AC5Ma;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,gBAAgB,mBAAO,C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AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,OAAO;AACpB,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP,KAAK;AACL,0BAA0B,MAAqC,GAAG,CAAM;AACxE;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,cAAc;AAC3B,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,6BAA6B;AAC1C,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;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AACA,KAAK;AACL;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,gCAAgC,cAAc;AAC9C,aAAa;AACb;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,cAAc,OAAO;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,OAAO;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,OAAO;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ,WAAW;AAChC,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA,iEAAiE;AACjE;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,0BAA0B,kCAAkC;AAC5D;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACnjBa;;AAEb,yBAAyB,mBAAO,CAAC,gIAAkD;AACnF,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe,GAAG,kBAAkB;AACpC,+CAA+C,mBAAO,CAAC,8IAAyD;AAChH,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wCAAwC,mBAAO,CAAC,8GAAyC;AACzF,yDAAyD,mBAAO,CAAC,gJAA0D;AAC3H,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,cAAc,mBAAO,CAAC,6GAAe;AACrC,iCAAiC,6DAA6D,yCAAyC,4DAA4D,iCAAiC,iEAAiE,4DAA4D,OAAO,yCAAyC;AACjZ,uCAAuC,yEAAyE,2CAA2C,8CAA8C,MAAM,6EAA6E,IAAI,eAAe,YAAY,kBAAkB;AAC7U;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;AC1Ja;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,mBAAO,CAAC,yHAAkB;AAC3C,0CAA0C,mBAAO,CAAC,uIAAe;AACjE,aAAa,mBAAO,CAAC,2HAAS;AAC9B,oCAAoC,mBAAO,CAAC,2HAAS;A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C5C,QAAQ,0BAA0B;AAClC;AACA,oBAAoB,cAAc;AAClC,QAAQ,mCAAmC;AAC3C,QAAQ,oCAAoC;AAC5C,wBAAwB;AACxB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,QAAQ,2BAA2B;AACnC,QAAQ,4CAA4C;AACpD;AACA,oBAAoB,cAAc;AAClC,QAAQ,2CAA2C;AACnD,QAAQ,4CAA4C;AACpD,wBAAwB;AACxB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yDAAyD,qBAAqB;AAC9E,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ,SAAS;AAC9B,aAAa,QAAQ,WAAW;AAChC,WAAW;AACX,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+DAA+D,YAAY;AAC3E;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA,MAAM;AACN;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,YAAY,IAAqC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,YAAY;AACxD;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAE1C;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,iBAAW,yBAAyB,iBAAW;AACnE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B;;;;;;;;;;;ACzhBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,sCAAsC,mBAAO,CAAC,8GAAyC;AACvF,sCAAsC,mBAAO,CAAC,0HAA+C;AAC7F,uCAAuC,mBAAO,CAAC,4HAAgD;AAC/F;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAe;AAC1B;AACA,kBAAkB;AAClB,aAAa,cAAc;AAC3B,aAAa,YAAY;AACzB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;;AAEA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA,OAAO,IAAI;AACX;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;ACpMa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,mCAAmC,GAAG,wBAAwB,GAAG,iBAAiB,GAAG,kCAAkC;AACvH,gBAAgB,iBAAiB;AACjC,uBAAuB,wBAAwB;AAC/C,kCAAkC,mCAAmC;AACrE;AACA;AACA;;AAEA;AACA,iCAAiC,kCAAkC;AACnE;;;;;;;;;;;AChBa;;AAEb,cAAc,mBAAO,CAAC,0GAAuC;AAC7D,eAAe,mBAAO,CAAC,8GAAyC;AAChE,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;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jC,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,4EAA4E,0BAA0B;AACtG;AACA;AACA;AACA;AACA,4BAA4B,8BAA8B;AAC1D;AACA;AACA;AACA;AACA;AACA,iCAAiC,gCAAgC;AACjE;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gCAAgC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,eAAe;AAC5B,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,eAAe;AAC5B,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,uFAAuF;AACvF;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA,eAAe,kBAAe;AAC9B;;;;;;;;;;;AChba;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F;AACA;AACA,CAAC;AACD,kBAAe;AACf,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;;;;;;;;;;;ACXa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAu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AAmB;AAChC;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,kBAAkB,SAAS;AAC3B,kBAAkB,SAAS;AAC3B,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C,iBAAiB,aAAa;AAC9B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;AC3Sa;;AAEb,oBAAoB,mBAAO,CAAC,oHAA4C;AACxE,oCAAoC,mBAAO,CAAC,4JAAgE;AAC5G,uCAAuC,mBAAO,CAAC,kKAAmE;AAClH,wCAAwC,mBAAO,CAAC,oKAAoE;AACpH,+BAA+B,mBAAO,CAAC,8IAAyD;AAChG,6BAA6B,mBAAO,CAAC,0IAAu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C,OAAO,IAAI;AACX;;AAEA;AACA,gCAAgC,mBAAmB;AACnD,QAAQ,6BAA6B;AACrC,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB,oBAAoB,eAAe,kBAAkB;AACtE;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA,6BAA6B,mBAAmB;AAChD,QAAQ,6BAA6B;AACrC,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB,oBAAoB,OAAO,kBAAkB;AAC9D;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA,eAAe,SAAS;AACxB,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,wBAAwB,kBAAkB;AAC1C,QAAQ,kBAAkB,UAAU,6BAA6B;AACjE;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB,oBAAoB;AACrC;AACA,GAAG;AACH;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,kCAAkC,mBAAmB;AACrD,yCAAyC,mBAAmB;AAC5D,QAAQ,6BAA6B;AACrC;AACA;AACA;AACA,eAAe,mCAAmC;AAClD,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,6BAA6B,mBAAmB;AAChD,QAAQ,6BAA6B;AACrC,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB,oBAAoB,OAAO,kBAAkB;AAC9D;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;;AAEA;AACA,mDAAmD,mBAAmB;AACtE,yBAAyB,6BAA6B;AACtD,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA,eAAe,YAAY;AAC3B,iBAAiB,oBAAoB,OAAO,kBAAkB;AAC9D;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;AACA;AACA;;AAEA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,kBAAkB,iBAAiB;AACnC,kBAAkB,6BAA6B;AAC/C,iBAAiB,eAAe;AAChC;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,4BAA4B;AAC7D;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;ACrhBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,iBAAiB,mBAAO,CAAC,gIAAa;AACtC;AACA,kDAAkD,mBAAmB;AACrE;AACA,aAAa,yBAAyB;AACtC,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAe;AAClC;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,iBAAiB;AACjB;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA,iBAAiB,cAAc,iBAAiB,mBAAmB;AACnE;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;;;;;;;;;;AChGa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,kCAAkC,mBAAO,CAAC,0CAAK;AAC/C,6CAA6C,mBAAO,CAAC,8EAAiB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK,IAAI;AACT,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eA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K;AAC/b;;AAEA;AACA,sBAAsB,uBAAuB;AAC7C;AACA,8BAA8B,+BAA+B;AAC7D,sBAAsB,iBAAW;AACjC,iCAAiC,iBAAW;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe,IAAI,uBAAuB;AACpD;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe,IAAI,oBAAoB;AACjD;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB,kBAAkB,sBAAsB;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc,kBAAkB,mBAAmB;AAClE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA,sDAAsD;AACtD,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA,sDAAsD;AACtD,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,oDAAoD,mBAAmB;AACvE,aAAa,QAAQ;AACrB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA;AACA,iDAAiD,mBAAmB;AACpE,aAAa,QAAQ;AACrB,gBAAgB,SAAS;AACzB,gBAAgB,SAAS;AACzB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,2CAA2C,UAAU;AACrD;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,oDAAoD,yBAAyB;AAC7E,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA,sFAAsF;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,oDAAoD,qBAAqB;AACzE;AACA,eAAe,QAAQ;AACvB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,YAAY;AAC7E;AACA,WAAW;AACX;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,gBAAgB;AAC1E;AACA,aAAa;AACb;AACA,SAAS;AACT,OAAO;AACP;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,aAAa,QAAQ;AACrB,aAAa,MAAM;AACnB;AACA,eAAe,QAAQ;AACvB;AACA;AACA,sFAAsF;AACtF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,OAAO;AACd;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB,eAAe,aAAa;AAC5B,eAAe,oBAAoB;AACnC,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,YAAY;AACvD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;AACH;AACA,CAAC;AACD;AACA,eAAe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Eb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,eAAe;AACf,oBAAoB;AACpB,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,sCAAsC,mBAAO,CAAC,0GAAuC;AACrF,iDAAiD,mBAAO,CAAC,gIAAkD;AAC3G,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,cAAc,mBAAO,CAAC,6GAAe;AACrC,cAAc,mBAAO,CAAC,yHAAU;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,aAAa,SAAS;AACtB;AACA;AACA,sEAAsE,aAAa;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,eAAe;AAC1H;AACA;AACA;AACA;;AAEA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB,WAA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A;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA,4EAA4E,aAAa;AACzF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB,iBAAiB,KAAK;AACtB,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yDAAyD,KAAqC;AAC9F;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;ACzMa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,8CAA8C,mBAAO,CAAC,0HAA+C;AACrG,2CAA2C,mBAAO,CAAC,oHAA4C;AAC/F,wDAAwD,mBAAO,CAAC,8IAAyD;AACzH,sCAAsC,mBAAO,CAAC,8GAAyC;AACvF,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,uDAAuD,mBAAO,CAAC,kKAAmE;AAClI,qCAAqC,mBAAO,CAAC,wHAA8C;AAC3F,8CAA8C,mBAAO,CAAC,iFAAkB;AACxE,cAAc,mBAAO,CAAC,6GAAe;AACrC;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB,iBAAiB,QAAQ;AACzB,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB,iBAAiB,QAAQ;AACzB,mBAAmB;AACnB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB,iBAAiB,QAAQ;AACzB,iBAAiB,KAAK;AACtB,mBAAmB,SAAS;AAC5B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;ACnKa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,kCAAkC,mBAAO,CAAC,oGAAoC;AAC9E,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,cAAc,mBAAO,CAAC,yHAAU;AAChC;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,eAAe,kBAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/Ea;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO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ACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;;;;;;;;;;ACvFa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,6CAA6C,mBAAO,CAAC,4IAAwD;AAC7G,cAAc,mBAAO,CAAC,mDAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;ACvGa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,oCAAoC,mBAAO,CAAC,wHAA8C;AAC1F,sCAAsC,mBAAO,CAAC,4GAAwC;AACtF,mCAAmC,mBAAO,CAAC,6CAAM;AACjD,6CAA6C,mBAAO,CAAC,8EAAiB;AACtE,cAAc,mBAAO,CAAC,mDAAQ;AAC9B,eAAe,mBAAO,CAAC,yHAAW;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,sDAAsD;AACtD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,+FAA+F,eAAe;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,eAAe;A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,2DAA2D,mBAAO,CAAC,yKAAwC;AAC3G,gDAAgD,mBAAO,CAAC,uIAAuB;AAC/E;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B,qCAAqC,0CAA0C,kCAAkC,4DAA4D,0BAA0B;AAC1P,4BAA4B,gBAAgB,sBAAsB,OAAO,kDAAkD,sDAAsD,4CAA4C,sJAAsJ,wEAAwE,KAAK;AAChc;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAW,2BAA2B,iBAAW;AAC7E,6BAA6B,iBAAW,2BAA2B,iBAAW;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA,2FAA2F,aAAa;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,eAAe;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC,kDAAkD;AAClD;AACA,QAAQ,gCAAgC;AACxC,2DAA2D,EAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,OAAO;AACX;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,OAAO;AACX;AACA,KAAK;;AAEL;AACA;AACA;AACA,+EAA+E,eAAe;AAC9F;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA,uCAAuC;AACvC,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,oBAAoB;AACpB,UAAU;AACV,SAAS;AACT;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA,+FAA+F,eAAe;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,qFAAqF,eAAe;AACpG;AACA;AACA;AACA,aAAa;AACb,mDAAmD;AACnD,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA,6EAA6E,eAAe;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,QAAQ,KAA+B,EAAE,EAIpC;AACL;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA,eAAe,kBAAe;AAC9B;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnqBa;;AAEb,6BAA6B,mBAAO,CAAC,0IAAuD;AAC5F,6BAA6B,mBAAO,CAAC,wIAAsD;AAC3F;AACA;AACA,CAAC;AACD,kBAAe;AACf,mCAAmC,mBAAO,CAAC,oHAA4C;AACvF,mCAAmC,mBAAO,CAAC,6CAAM;AACjD,6CAA6C,mBAAO,CAAC,8EAAiB;AACtE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,CAAC;AACD,eAAe,kBAAe;AAC9B","sources":["webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/device.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/features/feature-collection.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/features/feature-model.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/features/features-model.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/features/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/interceptors/device-url.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/ipNetworkDetector.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-device/dist/types.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-feature/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-feature/dist/feature.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-feature/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-mercury/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-mercury/dist/errors.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-mercury/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-mercury/dist/mercury.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-mercury/dist/socket/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-mercury/dist/socket/socket-base.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-mercury/dist/socket/socket.shim.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/batcher.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/behavioral-metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/business-metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/call-diagnostic/call-diagnostic-metrics-batcher.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/call-diagnostic/call-diagnostic-metrics-latencies.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/call-diagnostic/call-diagnostic-metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/call-diagnostic/call-diagnostic-metrics.util.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/call-diagnostic/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/client-metrics-batcher.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/client-metrics-prelogin-batcher.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/generic-metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/new-metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/operational-metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/prelogin-metrics-batcher.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/rtcMetrics/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/rtcMetrics/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/internal-plugin-metrics/dist/utils.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/credentials-config.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/auth.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/default-options.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/embargo.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/network-timing.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/payload-transformer.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/rate-limit.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/redirect.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/request-event.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/request-logger.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/request-timing.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/response-logger.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/user-agent.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/webex-tracking-id.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/interceptors/webex-user-agent.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/batcher.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/credentials/credentials.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/credentials/grant-errors.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/credentials/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/credentials/scope.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/credentials/token-collection.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/credentials/token.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/page.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/constants.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/interceptors/hostmap.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/interceptors/server-error.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/interceptors/service.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/metrics.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/service-catalog.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/service-fed-ramp.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/service-host.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/service-registry.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/service-state.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/service-url.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/services/services.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/stateless-webex-plugin.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/storage/decorators.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/storage/errors.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/storage/index.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/storage/make-webex-plugin-store.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/storage/make-webex-store.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/storage/memory-store-adapter.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/webex-core-plugin-mixin.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/webex-http-error.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/webex-internal-core-plugin-mixin.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/lib/webex-plugin.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/plugins/logger.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/webex-core.js","webpack://@agentx/agentx/../../node_modules/@webex/internal-plugin-dss/node_modules/@webex/webex-core/dist/webex-internal-core.js"],"sourcesContent":["\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _common = require(\"@webex/common\");\nvar _default = exports.default = {\n device: {\n /**\n * The duration to wait for the catalog to populate in seconds.\n *\n * @type {number}\n */\n canRegisterWaitDuration: 10,\n /**\n * The default configuration group when sending registration requests.\n *\n * @type {Object}\n */\n defaults: {\n /**\n * The default body configuration of registration requests.\n *\n * @type {Object}\n */\n body: {\n name: (typeof process.title === 'string' ? process.title.trim() : undefined) || _common.inBrowser && 'browser' || 'javascript',\n deviceType: _common.deviceType.WEB,\n model: 'web-js-sdk',\n localizedModel: 'webex-js-sdk',\n systemName: 'WEBEX_JS_SDK',\n systemVersion: '1.0.0'\n }\n },\n /**\n * When true, the **wdm** service will enforce an inactivity duration.\n *\n * @type {boolean}\n */\n enableInactivityEnforcement: false,\n /**\n * When true, the device registration will include a ttl value of\n * {@link config.device.ephemeralDeviceTTL} and refresh on an interval of\n * {@link config.device.ephemeralDeviceTTL} / 2 + 60 seconds.\n *\n * @type {boolean}\n */\n ephemeral: false,\n /**\n * The ttl value to include in device registration if\n * {@link config.device.ephemeral} is true. Measured in seconds.\n *\n * @type {boolean}\n */\n ephemeralDeviceTTL: 30 * 60,\n /**\n * energyForcast\n * @type {boolean}\n */\n energyForecast: false\n },\n /**\n * installationId is used exclusively as web client for fraud prevention,\n * and is aliased to as machineId by CA.\n *\n * @alias device.machineId\n * @type {string}\n */\n installationId: undefined\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FEATURE_TYPES = exports.FEATURE_COLLECTION_USER = exports.FEATURE_COLLECTION_NAMES = exports.FEATURE_COLLECTION_ENTITLEMENT = exports.FEATURE_COLLECTION_DEVELOPER = exports.DEVICE_EVENT_REGISTRATION_SUCCESS = exports.DEVICE_EVENTS = exports.CISCO_DEVICE_URL = void 0;\n// Feature constants.\nvar FEATURE_COLLECTION_DEVELOPER = exports.FEATURE_COLLECTION_DEVELOPER = 'developer';\nvar FEATURE_COLLECTION_ENTITLEMENT = exports.FEATURE_COLLECTION_ENTITLEMENT = 'entitlement';\nvar FEATURE_COLLECTION_USER = exports.FEATURE_COLLECTION_USER = 'user';\nvar CISCO_DEVICE_URL = exports.CISCO_DEVICE_URL = 'cisco-device-url';\nvar FEATURE_COLLECTION_NAMES = exports.FEATURE_COLLECTION_NAMES = [FEATURE_COLLECTION_DEVELOPER, FEATURE_COLLECTION_ENTITLEMENT, FEATURE_COLLECTION_USER];\nvar FEATURE_TYPES = exports.FEATURE_TYPES = {\n BOOLEAN: 'boolean',\n NUMBER: 'number',\n STRING: 'string'\n};\n\n// Device constants.\nvar DEVICE_EVENT_REGISTRATION_SUCCESS = exports.DEVICE_EVENT_REGISTRATION_SUCCESS = 'registration:success';\nvar DEVICE_EVENTS = exports.DEVICE_EVENTS = [DEVICE_EVENT_REGISTRATION_SUCCESS];\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor2 = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _common = require(\"@webex/common\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _commonTimers = require(\"@webex/common-timers\");\nvar _lodash = require(\"lodash\");\nvar _metrics = _interopRequireDefault(require(\"./metrics\"));\nvar _constants = require(\"./constants\");\nvar _featuresModel = _interopRequireDefault(require(\"./features/features-model\"));\nvar _ipNetworkDetector = _interopRequireDefault(require(\"./ipNetworkDetector\"));\nvar _types = require(\"./types\");\nvar _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _obj; // Internal Dependencies\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor2(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor2(t, r)); }); } return e; }\n/**\n * Determine if the plugin should be initialized based on cached storage.\n *\n * @returns {boolean} - If the device is ephemeral.\n */\nfunction decider() {\n return !this.config.ephemeral;\n}\nvar Device = _webexCore.WebexPlugin.extend((_dec = (0, _webexCore.waitForValue)('@'), _dec2 = (0, _webexCore.waitForValue)('@'), _dec3 = (0, _webexCore.waitForValue)('@'), _dec4 = (0, _webexCore.waitForValue)('@'), _dec5 = (0, _common.deprecated)('device#markUrlFailedAndGetNew(): Use services#markFailedUrl()'), _dec6 = (0, _webexCore.persist)('@', decider), (_obj = {\n // Ampersand property members.\n\n namespace: 'Device',\n // Allow for extra properties to prevent the plugin from failing due to\n // **WDM** service DTO changes.\n extraProperties: 'allow',\n idAttribute: 'url',\n children: {\n /**\n * The class object that contains all of the feature collections.\n *\n * @type {FeaturesModel}\n */\n features: _featuresModel.default,\n /**\n * Helper class for detecting what IP network version (ipv4, ipv6) we're on.\n *\n * @type {IpNetworkDetector}\n */\n ipNetworkDetector: _ipNetworkDetector.default\n },\n /**\n * A collection of device properties mostly assigned by the retrieved DTO from\n * the **WDM** service that are mapped against the ampersand properties.\n *\n * @type {Object}\n */\n props: {\n /**\n * This property determines whether or not giphy support is enabled.\n *\n * @type {'ALLOW' | 'BLOCK'}\n */\n clientMessagingGiphy: 'string',\n /**\n * This property should store the company name.\n *\n * @type {string}\n */\n customerCompanyName: 'string',\n /**\n * This property should store the logo url.\n *\n * @type {string}\n */\n customerLogoUrl: 'string',\n /**\n * This property doesn't have any real values, but is sent during device\n * refresh to prevent the **wdm** service from falling back to an iOS device\n * type.\n *\n * @type {string}\n */\n deviceType: 'string',\n /**\n * This property should store the help url.\n *\n * @type {string}\n */\n helpUrl: 'string',\n /**\n * This property should store the intranet inactivity timer duration.\n *\n * @type {number}\n */\n intranetInactivityDuration: 'number',\n /**\n * This property stores the url required to validate if the device is able\n * to actively reach the intranet network.\n *\n * @type {string}\n */\n intranetInactivityCheckUrl: 'string',\n /**\n * This property stores the inactivity timer duration, and could possibly\n * deprecate the `intranetInactivityDuration` property.\n *\n * @type {number}\n */\n inNetworkInactivityDuration: 'number',\n /**\n * This property stores the ECM (external content management) enabled value\n * for the whole organization.\n *\n * @type {boolean}\n */\n ecmEnabledForAllUsers: ['boolean', false, false],\n /**\n * This property stores an array of ECM (external content management)\n * providers that are currently available.\n *\n * @returns {Array}\n */\n ecmSupportedStorageProviders: ['array', false, function () {\n return [];\n }],\n /**\n * This property stores the modification time value retrieved from the\n * **WDM** endpoint formatted as ISO 8601.\n *\n * @type {string}\n */\n modificationTime: 'string',\n /**\n * This property stores the navigation bar color.\n *\n * @type {string}\n */\n navigationBarColor: 'string',\n /**\n * This property stores the partner company's name when available.\n *\n * @type {string}\n */\n partnerCompanyName: 'string',\n /**\n * This property stores the partner company's logo when available.\n *\n * @type {string}\n */\n partnerLogoUrl: 'string',\n /**\n * This property stores the availability of people data from the **WDM**\n * service.\n *\n * @type {boolean}\n */\n peopleInsightsEnabled: 'boolean',\n /**\n * This property stores the reporting site's description when available.\n *\n * @type {string}\n */\n reportingSiteDesc: 'string',\n /**\n * This property stores the reporting site's access url when available.\n *\n * @type {string}\n */\n reportingSiteUrl: 'string',\n /**\n * This property stores the encryption key url when available.\n *\n * @type {string}\n */\n searchEncryptionKeyUrl: 'string',\n /**\n * This property stores the availability of support-provided text from the\n * **WDM** service.\n *\n * @type {boolean}\n */\n showSupportText: 'boolean',\n /**\n * This property stores the support provider's company name when available.\n *\n * @type {string}\n */\n supportProviderCompanyName: 'string',\n /**\n * This property stores the support provider's logo url when available.\n *\n * @type {string}\n */\n supportProviderLogoUrl: 'string',\n /**\n * This property stores the device's url retrieved from a registration\n * request. This property gets set via the initial registration process by a\n * `this.set()` method.\n *\n * @type {string}\n */\n url: 'string',\n /**\n * This property stores the device's userId uuid value, which can also be\n * derived from the device's registerd user's userId retrieved from\n * the **Hydra** service.\n *\n * @type {string}\n */\n userId: 'string',\n /**\n * This property stores whether or not file sharing is enabled\n *\n * @type {'BLOCK_BOTH' | 'BLOCK_UPLOAD'}\n */\n webFileShareControl: 'string',\n /**\n * This property stores the current web socket url used by the registered\n * device.\n *\n * @type {string}\n */\n webSocketUrl: 'string',\n /**\n * This property stores the value indicating whether or not white board file\n * sharing is enabled for the current device.\n *\n * @type {'ALLOW' | 'BLOCK'}\n */\n whiteboardFileShareControl: 'string'\n },\n /**\n * A list of derived properties that populate based when their parent data\n * available via the device's properties.\n *\n * @type {Object}\n */\n derived: {\n /**\n * This property determines if the current device is registered.\n *\n * @type {boolean}\n */\n registered: {\n deps: ['url'],\n /**\n * Checks if the device is registered by validating that the url exists.\n * Amperstand does not allow this to method to be written as an arrow\n * function.\n *\n * @returns {boolean}\n */\n fn: function fn() {\n return !!this.url;\n }\n }\n },\n /**\n * Stores timer data as well as other state details.\n *\n * @type {Object}\n */\n session: {\n /**\n * This property stores the logout timer object\n *\n * @type {any}\n */\n logoutTimer: 'any',\n /**\n * This property stores the date for the last activity the user made\n * with the current device.\n *\n * @type {number}\n */\n lastUserActivityDate: 'number',\n /**\n * This property stores whether or not the reachability check has been\n * performed to prevent the reachability check from performing its\n * operation more than once after a successful check.\n *\n * @returns {boolean}\n */\n isReachabilityChecked: ['boolean', false, false],\n /**\n * This property stores whether or not the next refresh or register request should request energy forecast data\n * in order to prevent over fetching energy forecasts\n *\n * @type {boolean}\n */\n energyForecastConfig: 'boolean',\n /**\n * This property stores whether or not the current device is in a meeting\n * to prevent an unneeded timeout of a meeting due to inactivity.\n *\n * @type {boolean}\n */\n isInMeeting: 'boolean',\n /**\n * This property identifies if the device is currently in network to prevent\n * the `resetLogoutTimer()` method from being called repeatedly once its\n * known client is connected to the organization's internal network.\n *\n * @type {boolean}\n */\n isInNetwork: 'boolean'\n },\n // Event method members.\n /**\n * Trigger meeting started event for webex instance. Used by web-client team.\n *\n * @returns {void}\n */\n meetingStarted: function meetingStarted() {\n this.webex.trigger('meeting started');\n },\n /**\n * Trigger meeting ended event for webex instance. Used by web-client team.\n *\n * @returns {void}\n */\n meetingEnded: function meetingEnded() {\n this.webex.trigger('meeting ended');\n },\n /**\n * Set the value of energy forecast config for the current registered device.\n * @param {boolean} [energyForecastConfig=false] - fetch an energy forecast on the next refresh/register\n * @returns {void}\n */\n setEnergyForecastConfig: function setEnergyForecastConfig() {\n var energyForecastConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.energyForecastConfig = energyForecastConfig;\n },\n refresh: function refresh() {\n var _this = this;\n var deviceRegistrationOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger.info('device: refreshing');\n\n // Validate that the device can be registered.\n return this.canRegister().then(function () {\n // Validate if the device is not registered and register instead.\n if (!_this.registered) {\n _this.logger.info('device: device not registered, registering');\n return _this.register(deviceRegistrationOptions);\n }\n\n // Merge body configurations, overriding defaults.\n var body = _objectSpread(_objectSpread({}, _this.serialize()), _this.config.body ? _this.config.body : {});\n\n // Remove unneeded properties from the body object.\n delete body.features;\n delete body.mediaCluster;\n delete body.etag;\n\n // Append a ttl value if the device is marked as ephemeral.\n if (_this.config.ephemeral) {\n body.ttl = _this.config.ephemeralDeviceTTL;\n }\n\n // Merge header configurations, overriding defaults.\n var headers = _objectSpread(_objectSpread(_objectSpread({}, _this.config.defaults.headers ? _this.config.defaults.headers : {}), _this.config.headers ? _this.config.headers : {}), _this.etag ? {\n 'If-None-Match': _this.etag\n } : {});\n var _deviceRegistrationOp = deviceRegistrationOptions.includeDetails,\n includeDetails = _deviceRegistrationOp === void 0 ? _types.CatalogDetails.all : _deviceRegistrationOp;\n return _this.request({\n method: 'PUT',\n uri: _this.url,\n body: body,\n headers: headers,\n qs: {\n includeUpstreamServices: \"\".concat(includeDetails).concat(_this.config.energyForecast && _this.energyForecastConfig ? ',energyforecast' : '')\n }\n }).then(function (response) {\n return _this.processRegistrationSuccess(response);\n }).catch(function (reason) {\n // Handle a 404 error, which indicates that the device is no longer\n // valid and needs to be registered as a new device.\n if (reason.statusCode === 404) {\n _this.logger.info('device: refresh failed, device is not valid');\n _this.logger.info('device: attempting to register a new device');\n _this.clear();\n return _this.register(deviceRegistrationOptions);\n }\n return _promise.default.reject(reason);\n });\n });\n },\n /**\n * Fetches the web devices and deletes the third of them which are not recent devices in use\n * @returns {Promise}\n */\n deleteDevices: function deleteDevices() {\n var _this2 = this;\n // Fetch devices with a GET request\n return this.request({\n method: 'GET',\n service: 'wdm',\n resource: 'devices'\n }).then(function (response) {\n var devices = response.body.devices;\n var _this2$_getBody = _this2._getBody(),\n deviceType = _this2$_getBody.deviceType;\n\n // Filter devices of type deviceType\n var webDevices = devices.filter(function (item) {\n return item.deviceType === deviceType;\n });\n var sortedDevices = (0, _lodash.orderBy)(webDevices, [function (item) {\n return new Date(item.modificationTime);\n }]);\n\n // If there are more than two devices, delete the last third\n if (sortedDevices.length > 2) {\n var totalItems = sortedDevices.length;\n var countToDelete = Math.ceil(totalItems / 3);\n var urlsToDelete = sortedDevices.slice(0, countToDelete).map(function (item) {\n return item.url;\n });\n return _promise.default.race(urlsToDelete.map(function (url) {\n return _this2.request({\n uri: url,\n method: 'DELETE'\n });\n }));\n }\n return _promise.default.resolve();\n }).catch(function (error) {\n _this2.logger.error('Failed to retrieve devices:', error);\n return _promise.default.reject(error);\n });\n },\n register: function register() {\n var _this3 = this;\n var deviceRegistrationOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this._registerInternal(deviceRegistrationOptions).catch(function (error) {\n var _error$body;\n if ((error === null || error === void 0 ? void 0 : (_error$body = error.body) === null || _error$body === void 0 ? void 0 : _error$body.message) === 'User has excessive device registrations') {\n return _this3.deleteDevices().then(function () {\n return _this3._registerInternal(deviceRegistrationOptions);\n });\n }\n throw error;\n });\n },\n _getBody: function _getBody() {\n return _objectSpread(_objectSpread({}, this.config.defaults.body ? this.config.defaults.body : {}), this.config.body ? this.config.body : {});\n },\n _registerInternal: function _registerInternal() {\n var _this4 = this;\n var deviceRegistrationOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger.info('device: registering');\n this.webex.internal.newMetrics.callDiagnosticMetrics.setDeviceInfo(this);\n\n // Validate that the device can be registered.\n return this.canRegister().then(function () {\n // Validate if the device is already registered and refresh instead.\n if (_this4.registered) {\n _this4.logger.info('device: device already registered, refreshing');\n return _this4.refresh(deviceRegistrationOptions);\n }\n\n // Merge body configurations, overriding defaults.\n var body = _this4._getBody();\n\n // Merge header configurations, overriding defaults.\n var headers = _objectSpread(_objectSpread({}, _this4.config.defaults.headers ? _this4.config.defaults.headers : {}), _this4.config.headers ? _this4.config.headers : {});\n\n // Append a ttl value if the device is marked as ephemeral\n if (_this4.config.ephemeral) {\n body.ttl = _this4.config.ephemeralDeviceTTL;\n }\n _this4.webex.internal.newMetrics.submitInternalEvent({\n name: 'internal.register.device.request'\n });\n var _deviceRegistrationOp2 = deviceRegistrationOptions.includeDetails,\n includeDetails = _deviceRegistrationOp2 === void 0 ? _types.CatalogDetails.all : _deviceRegistrationOp2;\n\n // This will be replaced by a `create()` method.\n return _this4.request({\n method: 'POST',\n service: 'wdm',\n resource: 'devices',\n body: body,\n headers: headers,\n qs: {\n includeUpstreamServices: \"\".concat(includeDetails).concat(_this4.config.energyForecast && _this4.energyForecastConfig ? ',energyforecast' : '')\n }\n }).catch(function (error) {\n _this4.webex.internal.newMetrics.submitInternalEvent({\n name: 'internal.register.device.response'\n });\n throw error;\n }).then(function (response) {\n // Do not add any processing of response above this as that will affect timestamp\n _this4.webex.internal.newMetrics.submitInternalEvent({\n name: 'internal.register.device.response'\n });\n _this4.webex.internal.metrics.submitClientMetrics(_metrics.default.JS_SDK_WDM_REGISTRATION_SUCCESSFUL);\n return _this4.processRegistrationSuccess(response);\n }).catch(function (error) {\n _this4.webex.internal.metrics.submitClientMetrics(_metrics.default.JS_SDK_WDM_REGISTRATION_FAILED, {\n fields: {\n error: error\n }\n });\n throw error;\n });\n });\n },\n unregister: function unregister() {\n var _this5 = this;\n this.logger.info('device: unregistering');\n if (!this.registered) {\n this.logger.warn('device: not registered');\n return _promise.default.resolve();\n }\n return this.request({\n uri: this.url,\n method: 'DELETE'\n }).then(function () {\n return _this5.clear();\n });\n },\n /* eslint-enable require-jsdoc */\n // Helper method members\n /**\n * Determine if registration methods can be performed. This method utilizes\n * the `services` plugin to confirm if the appropriate service urls are\n * available for device registration.\n *\n * @returns {Promise}\n */\n canRegister: function canRegister() {\n this.logger.info('device: validating if registration can occur');\n\n // Destructure the services plugin for ease of reference.\n var services = this.webex.internal.services;\n\n // Wait for the postauth catalog to populate.\n return services.waitForCatalog('postauth', this.config.canRegisterWaitDuration).then(function () {\n return (\n // Validate that the service exists after waiting for the catalog.\n services.get('wdm') ? _promise.default.resolve() : _promise.default.reject(new Error(['device: cannot register,', \"'wdm' service is not available from the postauth catalog\"].join(' ')))\n );\n });\n },\n /**\n * Check if the device can currently reach the inactivity check url.\n *\n * @returns {Promise}\n */\n checkNetworkReachability: function checkNetworkReachability() {\n var _this6 = this;\n this.logger.info('device: checking network reachability');\n\n // Validate if the device has been checked and reset the logout timer.\n if (this.isReachabilityChecked) {\n return _promise.default.resolve(this.resetLogoutTimer());\n }\n this.isReachabilityChecked = true;\n\n // Validate if the device has a intranet checking url.\n if (!this.intranetInactivityCheckUrl) {\n this.isInNetwork = false;\n return _promise.default.resolve(this.resetLogoutTimer());\n }\n\n // Clear unnecessary headers for reachability request.\n var headers = {\n 'cisco-no-http-redirect': null,\n 'spark-user-agent': null,\n trackingid: null\n };\n\n // Send the network reachability request.\n return this.request({\n headers: headers,\n method: 'GET',\n uri: this.intranetInactivityCheckUrl\n }).then(function () {\n _this6.isInNetwork = true;\n return _promise.default.resolve(_this6.resetLogoutTimer());\n }).catch(function () {\n _this6.logger.info('device: did not reach ping endpoint');\n _this6.logger.info('device: triggering off-network timer');\n _this6.isInNetwork = false;\n return _promise.default.resolve(_this6.resetLogoutTimer());\n });\n },\n /**\n * Clears the registration ttl value if available.\n *\n * @param {Object} options - Values to be cleared.\n * @returns {void}\n */\n clear: function clear() {\n this.logger.info('device: clearing registered device');\n\n // Prototype the extended class in order to preserve the parent member.\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (0, _apply.default)(_webexCore.WebexPlugin.prototype.clear, this, args);\n },\n /**\n * Get the current websocket url with the appropriate priority host.\n *\n * @param {boolean} [wait=false] - Willing to wait on a valid url.\n * @returns {Promise} - The priority-mapped web socket url.\n */\n getWebSocketUrl: function getWebSocketUrl() {\n var _this7 = this;\n var wait = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.logger.info('device: getting the current websocket url');\n\n // Destructure the services plugin for ease of reference.\n var services = this.webex.internal.services;\n\n // Validate if the method should wait for registration.\n if (wait) {\n return this.waitForRegistration().then(function () {\n return services.convertUrlToPriorityHostUrl(_this7.webSocketUrl);\n }).catch(function (error) {\n _this7.logger.warn(error.message);\n return _promise.default.reject(new Error('device: failed to get the current websocket url'));\n });\n }\n\n // Validate if the device is registered.\n if (!this.registered) {\n return _promise.default.reject(new Error('device: cannot get websocket url, device is not registered'));\n }\n\n // Attempt to collect the priority-host-mapped web socket URL.\n var wsUrl = services.convertUrlToPriorityHostUrl(this.webSocketUrl);\n\n // Validate that the url was collected.\n if (wsUrl) {\n return _promise.default.resolve(wsUrl);\n }\n return _promise.default.reject(new Error('device: failed to get the current websocket url'));\n },\n /**\n * Process a successful device registration.\n *\n * @param {Object} response - response object from registration success.\n * @returns {void}\n */\n processRegistrationSuccess: function processRegistrationSuccess(response) {\n var _this8 = this;\n this.logger.info('device: received registration payload');\n\n // Clone the response body for service cleaning.\n var body = _objectSpread({}, response.body);\n\n // Clean service data.\n delete body.services;\n delete body.serviceHostMap;\n var _ref = response.headers || {},\n etag = _ref.etag;\n if (this.etag && etag && this.etag === etag) {\n // If current etag matches the previous one and we have sent\n // If-None-Match header the developer and entitlement feature\n // toggles will not be returned\n var features = body.features;\n delete body.features;\n // When using the etag feature cache, user and entitlement features are still returned\n this.features.user.reset(features.user);\n this.features.entitlement.reset(features.entitlement);\n }\n\n // Assign the recieved DTO from **WDM** to this device.\n this.set(body);\n\n // Assign the new etag to this device.\n this.set({\n etag: etag\n });\n\n // Validate if device is ephemeral and setup refresh timer.\n if (this.config.ephemeral) {\n this.logger.info('device: enqueuing device refresh');\n var delay = (this.config.ephemeralDeviceTTL / 2 + 60) * 1000;\n this.refreshTimer = (0, _commonTimers.safeSetTimeout)(function () {\n return _this8.refresh();\n }, delay);\n }\n\n // Emit the registration:success event.\n this.trigger(_constants.DEVICE_EVENT_REGISTRATION_SUCCESS, this);\n },\n /**\n * Reset the current local logout timer for the registered device if\n * registered.\n *\n * @returns {void}\n */\n resetLogoutTimer: function resetLogoutTimer() {\n this.logger.info('device: resetting logout timer');\n\n // Clear current logout timer.\n clearTimeout(this.logoutTimer);\n\n // Remove last activity date event listener.\n this.off('change:lastUserActivityDate');\n\n // Remove the logout timer.\n this.unset('logoutTimer');\n\n // Validate if the device is currently in a meeting and is configured to\n // required inactivity enforcement.\n if (!this.isInMeeting && this.config.enableInactivityEnforcement && this.isReachabilityChecked) {\n if (this.isInNetwork) {\n this.setLogoutTimer(this.inNetworkInactivityDuration);\n } else {\n this.setLogoutTimer(this.intranetInactivityDuration);\n }\n }\n },\n /**\n * Set the value of the logout timer for the current registered device.\n *\n * @param {number} duration - Value in seconds of the new logout timer.\n * @returns {void}\n */\n setLogoutTimer: function setLogoutTimer(duration) {\n var _this9 = this;\n this.logger.info('device: setting logout timer');\n if (!duration || duration <= 0) {\n return;\n }\n\n // Setup user activity date event listener.\n this.on('change:lastUserActivityDate', function () {\n _this9.resetLogoutTimer();\n });\n\n // Initialize a new timer.\n this.logoutTimer = (0, _commonTimers.safeSetTimeout)(function () {\n _this9.webex.logout();\n }, duration * 1000);\n },\n /**\n * Wait for the device to be registered.\n *\n * @param {number} [timeout=10] - The maximum duration to wait, in seconds.\n * @returns {Promise}\n */\n waitForRegistration: function waitForRegistration() {\n var _this10 = this;\n var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;\n this.logger.info('device: waiting for registration');\n return new _promise.default(function (resolve, reject) {\n if (_this10.registered) {\n resolve();\n }\n var timeoutTimer = (0, _commonTimers.safeSetTimeout)(function () {\n return reject(new Error('device: timeout occured while waiting for registration'));\n }, timeout * 1000);\n _this10.once(_constants.DEVICE_EVENT_REGISTRATION_SUCCESS, function () {\n clearTimeout(timeoutTimer);\n resolve();\n });\n });\n },\n markUrlFailedAndGetNew: function markUrlFailedAndGetNew(url) {\n return _promise.default.resolve(this.webex.internal.services.markFailedUrl(url));\n },\n initialize: function initialize() {\n var _this11 = this;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n // Prototype the extended class in order to preserve the parent member.\n (0, _apply.default)(_webexCore.WebexPlugin.prototype.initialize, this, args);\n\n // Initialize feature events and listeners.\n _constants.FEATURE_COLLECTION_NAMES.forEach(function (collectionName) {\n _this11.features.on(\"change:\".concat(collectionName), function (model, value, options) {\n _this11.trigger('change', _this11, options);\n _this11.trigger('change:features', _this11, _this11.features, options);\n });\n });\n\n // Initialize network reachability checking event for url change.\n this.on('change:intranetInactivityCheckUrl', function () {\n _this11.checkNetworkReachability();\n });\n\n // Initialize network reachability checking event for duration change.\n this.on('change:intranetInactivityDuration', function () {\n _this11.checkNetworkReachability();\n });\n\n // Initialize network reachability checking event for duration change.\n this.on('change:inNetworkInactivityDuration', function () {\n _this11.checkNetworkReachability();\n });\n\n // Initialize listener for activity checking.\n this.listenTo(this.webex, 'user-activity', function () {\n _this11.lastUserActivityDate = (0, _now.default)();\n });\n\n // Initialize listener for meeting started event.\n this.listenTo(this.webex, 'meeting started', function () {\n _this11.isInMeeting = true;\n _this11.resetLogoutTimer();\n });\n\n // Initialize listener for meeting ended event.\n this.listenTo(this.webex, 'meeting ended', function () {\n _this11.isInMeeting = false;\n _this11.resetLogoutTimer();\n });\n } /* eslint-enable require-jsdoc */,\n version: \"3.7.0\"\n}, ((0, _applyDecoratedDescriptor2.default)(_obj, \"refresh\", [_common.oneFlight, _dec], (0, _getOwnPropertyDescriptor.default)(_obj, \"refresh\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"register\", [_common.oneFlight, _dec2], (0, _getOwnPropertyDescriptor.default)(_obj, \"register\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"_registerInternal\", [_common.oneFlight, _dec3], (0, _getOwnPropertyDescriptor.default)(_obj, \"_registerInternal\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"unregister\", [_common.oneFlight, _dec4], (0, _getOwnPropertyDescriptor.default)(_obj, \"unregister\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"markUrlFailedAndGetNew\", [_dec5], (0, _getOwnPropertyDescriptor.default)(_obj, \"markUrlFailedAndGetNew\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"initialize\", [_dec6], (0, _getOwnPropertyDescriptor.default)(_obj, \"initialize\"), _obj)), _obj)));\nvar _default = exports.default = Device;\n//# sourceMappingURL=device.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ampersandCollection = _interopRequireDefault(require(\"ampersand-collection\"));\nvar _featureModel = _interopRequireDefault(require(\"./feature-model\"));\n// External dependencies.\n\n// Local Dependencies\n\n/**\n * Feature collection model.\n *\n * @description\n * This model contains a collection of features under a specific collection\n * group.\n */\nvar FeatureCollection = _ampersandCollection.default.extend({\n /**\n * The unique identifier for the models in this collection.\n *\n * @type {string}\n */\n mainIndex: 'key',\n /**\n * The type of model this collection can contain.\n *\n * @type {Class}\n */\n model: _featureModel.default\n});\nvar _default = exports.default = FeatureCollection;\n//# sourceMappingURL=feature-collection.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _isNan = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/number/is-nan\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\nvar _lodash = require(\"lodash\");\nvar _constants = require(\"../constants\");\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } // External dependencies.\n/**\n * The model returned from the {@link FeatureModel#parse} method.\n *\n * @typedef {Object} ParsedFeatureModel\n * @property {boolean|number|string} ParsedFeatureModel.value - The parsed val.\n * @property {string} ParsedFeatureModel.type - The type of the parsed val.\n */\n/**\n * Feature model.\n *\n * @description\n * This model contains details on a single feature and is received from the\n * **WDM** service upon registration.\n */\nvar FeatureModel = _ampersandState.default.extend({\n idAttribute: 'key',\n // needed by Ampersand to determine unique item\n\n // Ampersand property members.\n\n props: {\n /**\n * Contains the unique identifier for this feature to be addressed by.\n *\n * @type {string}\n */\n key: 'string',\n /**\n * This property contains the date in which this feature was last modified.\n *\n * @type {date}\n */\n lastModified: 'date',\n /**\n * This property defines whether or not the feature is mutable.\n *\n * @type {boolean}\n */\n mutable: 'boolean',\n /**\n * This property contains the data type the string value should be\n * interpreted as.\n *\n * @type {FEATURE_TYPES}\n */\n type: 'string',\n /**\n * This property contains the string value of this feature.\n *\n * @type {string}\n */\n val: 'string',\n /**\n * This property contains the interpreted value of this feature.\n *\n * @type {any}\n */\n value: 'any'\n },\n /**\n * Class object constructor. This method safely initializes the class object\n * prior to it fully loading to allow data to be accessed and modified\n * immediately after construction instead of initialization.\n *\n * @override\n * @param {Object} attrs - An object to map against the feature's properties.\n * @param {Object} [options={}] - Ampersand options for `parse` and `parent`.\n */\n constructor: function constructor(attrs) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _lodash.defaults)(options, {\n parse: true\n });\n return (0, _apply.default)(_ampersandState.default.prototype.constructor, this, [attrs, options]);\n },\n // Ampsersand method members.\n /**\n * Parse {@link FeatureModel} properties recieved as strings from **WDM**\n * and cast them as their appropriate types.\n *\n * @private\n * @memberof FeatureModel\n * @param {Object} model - The model to parse.\n * @property {string} model.val - The value to be parsed.\n * @returns {ParsedFeatureModel} - The parsed model.\n */\n parse: function parse(model) {\n // Validate that a model was provided and that it is an object.\n if (!model || (0, _typeof2.default)(model) !== 'object') {\n // Return an empty object to satisfy the requirements of `Ampersand`.\n return {};\n }\n var parsedModel = _objectSpread({}, model);\n var val = parsedModel.val;\n\n // Validate that the value is a number.\n if (!(0, _isNan.default)(Number(val))) {\n parsedModel.type = _constants.FEATURE_TYPES.NUMBER;\n parsedModel.value = Number(val);\n }\n // Validate if the value should be a true boolean.\n else if (typeof val === 'string' && val.toLowerCase() === 'true') {\n parsedModel.type = _constants.FEATURE_TYPES.BOOLEAN;\n parsedModel.value = true;\n }\n // Validate if the value should be a false boolean.\n else if (typeof val === 'string' && val.toLowerCase() === 'false') {\n parsedModel.type = _constants.FEATURE_TYPES.BOOLEAN;\n parsedModel.value = false;\n }\n // In all other cases, the value is string, even if it is undefined.\n else {\n parsedModel.type = _constants.FEATURE_TYPES.STRING;\n parsedModel.value = val;\n }\n return parsedModel;\n },\n /**\n * Serialize the feature using the parent ampersand method with its date as an\n * ISO string. This converts the feature into a request-transportable object.\n *\n * @override\n * @param {Record} [args] - List of properties to serialize.\n * @returns {Object} - The request-ready transport object.\n */\n serialize: function serialize() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Call the overloaded class member.\n var attrs = (0, _apply.default)(_ampersandState.default.prototype.serialize, this, args);\n\n // Validate that the overloaded class member returned an object with the\n // `lastModified` key-value pair and instance it as an ISO string.\n if (attrs.lastModified) {\n attrs.lastModified = new Date(attrs.lastModified).toISOString();\n }\n return attrs;\n },\n /**\n * Set a property of this object to a specific value. This method utilizes\n * code that exists within the `ampersand-state` dependency to handle\n * scenarios in which `key = {\"key\": \"value\"}` or\n * `key = \"key\", value = \"value\"`. Since the snippet is pulled directly from\n * `ampersand-state`, there is no need to test both scenarios.\n *\n * @override\n * @param {object | string} key - The key value, or object to be set.\n * @param {any} value - The key value or object to set the keyed pair to.\n * @param {any} options - The object to set the keyed pair to.\n * @returns {any} - The changed property.\n */\n set: function set(key, value, options) {\n // Declare formatted output variables for properly setting the targetted\n // property for this method.\n var attrs;\n var optns;\n\n // Validate if the key is an instance of any object or not.\n if ((0, _lodash.isObject)(key) || key === null) {\n attrs = key;\n optns = value;\n } else {\n attrs = {};\n attrs[key] = value;\n optns = options;\n }\n attrs = this.parse(attrs, optns);\n return (0, _apply.default)(_ampersandState.default.prototype.set, this, [attrs, optns]);\n }\n});\nvar _default = exports.default = FeatureModel;\n//# sourceMappingURL=feature-model.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\nvar _constants = require(\"../constants\");\nvar _featureCollection = _interopRequireDefault(require(\"./feature-collection\"));\n// External dependencies.\n\n// Local Dependencies\n\n/**\n * Feature collection parent container.\n *\n * @description\n * This class contains all of the feature collection class objects to help\n * organize the data retrieved from the **wdm** service on device registration.\n */\nvar FeaturesModel = _ampersandState.default.extend({\n // Ampersand property members.\n\n collections: {\n /**\n * This collection contains the developer feature collection.\n *\n * @type {FeatureCollection}\n */\n developer: _featureCollection.default,\n /**\n * This collection contains the entitlement feature collection.\n *\n * @type {FeatureCollection}\n */\n entitlement: _featureCollection.default,\n /**\n * This collection contains the user feature collection.\n *\n * @type {FeatureCollection}\n */\n user: _featureCollection.default\n },\n // Helper method members.\n /**\n * Recursively clear attributes, children, and collections.\n *\n * @param {Object} options - Attribute options to unset.\n * @returns {this}\n */\n clear: function clear(options) {\n var _this = this;\n // Clear the ampersand attributes safely if there are any. This class should\n // never have any attributes.\n (0, _keys.default)(this.attributes).forEach(function (key) {\n _this.unset(key, options);\n });\n\n // Clear the ampersand children safely if there are any. This class should\n // never have any children.\n /* eslint-disable-next-line no-underscore-dangle */\n (0, _keys.default)(this._children).forEach(function (key) {\n _this[key].clear();\n });\n\n // Clear the ampersand collections safely.\n /* eslint-disable-next-line no-underscore-dangle */\n (0, _keys.default)(this._collections).forEach(function (key) {\n _this[key].reset();\n });\n return this;\n },\n // Ampersand method members.\n /**\n * Initializer method for FeatureModel class object.\n *\n * @override\n * @returns {void}\n */\n initialize: function initialize() {\n var _this2 = this;\n // Declare the collection event names.\n var eventNames = ['change:value', 'add', 'remove'];\n\n // Initialize collection event listeners.\n eventNames.forEach(function (eventName) {\n _constants.FEATURE_COLLECTION_NAMES.forEach(function (collectionName) {\n _this2[collectionName].on(eventName, function (model, options) {\n _this2.trigger(\"change:\".concat(collectionName), _this2, _this2[collectionName], options);\n });\n });\n });\n }\n});\nvar _default = exports.default = FeaturesModel;\n//# sourceMappingURL=features-model.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"FeatureCollection\", {\n enumerable: true,\n get: function get() {\n return _featureCollection.default;\n }\n});\n_Object$defineProperty(exports, \"FeatureModel\", {\n enumerable: true,\n get: function get() {\n return _featureModel.default;\n }\n});\n_Object$defineProperty(exports, \"FeaturesModel\", {\n enumerable: true,\n get: function get() {\n return _featuresModel.default;\n }\n});\nvar _featureCollection = _interopRequireDefault(require(\"./feature-collection\"));\nvar _featureModel = _interopRequireDefault(require(\"./feature-model\"));\nvar _featuresModel = _interopRequireDefault(require(\"./features-model\"));\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"CatalogDetails\", {\n enumerable: true,\n get: function get() {\n return _types.CatalogDetails;\n }\n});\n_Object$defineProperty(exports, \"DeviceRegistrationOptions\", {\n enumerable: true,\n get: function get() {\n return _types.DeviceRegistrationOptions;\n }\n});\n_Object$defineProperty(exports, \"DeviceUrlInterceptor\", {\n enumerable: true,\n get: function get() {\n return _deviceUrl.default;\n }\n});\n_Object$defineProperty(exports, \"FeatureCollection\", {\n enumerable: true,\n get: function get() {\n return _index.FeatureCollection;\n }\n});\n_Object$defineProperty(exports, \"FeatureModel\", {\n enumerable: true,\n get: function get() {\n return _index.FeatureModel;\n }\n});\n_Object$defineProperty(exports, \"FeaturesModel\", {\n enumerable: true,\n get: function get() {\n return _index.FeaturesModel;\n }\n});\n_Object$defineProperty(exports, \"config\", {\n enumerable: true,\n get: function get() {\n return _config.default;\n }\n});\nexports.constants = void 0;\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _device.default;\n }\n});\nrequire(\"@webex/internal-plugin-metrics\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _device = _interopRequireDefault(require(\"./device\"));\nvar _index = require(\"./features/index\");\nvar _deviceUrl = _interopRequireDefault(require(\"./interceptors/device-url\"));\nvar constants = _interopRequireWildcard(require(\"./constants\"));\nexports.constants = constants;\nvar _config = _interopRequireDefault(require(\"./config\"));\nvar _types = require(\"./types\");\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n// Internal dependencies.\n// Need to import metrics plugin for the devices to send metrics on succes/failure registration\n\n// Plugin dependencies.\n\n(0, _webexCore.registerInternalPlugin)('device', _device.default, {\n config: _config.default,\n interceptors: {\n DeviceUrlInterceptor: _deviceUrl.default.create\n },\n /**\n * Unregister the device in the case that the webex instance has logged out.\n *\n * @returns {Promise}\n */\n onBeforeLogout: function onBeforeLogout() {\n return this.unregister();\n }\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nvar _lodash = require(\"lodash\");\nvar _constants = require(\"../constants\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Adds 'cisco-device-url' header, as appropriate, to requests\n */\nvar DeviceUrlInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(DeviceUrlInterceptor, _Interceptor);\n var _super = _createSuper(DeviceUrlInterceptor);\n function DeviceUrlInterceptor() {\n (0, _classCallCheck2.default)(this, DeviceUrlInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(DeviceUrlInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n var headers = options.headers,\n service = options.service,\n uri = options.uri;\n var _this$webex$internal = this.webex.internal,\n device = _this$webex$internal.device,\n services = _this$webex$internal.services;\n\n // Check if header is already set before moving forward\n if (!device.url || headers && _constants.CISCO_DEVICE_URL in headers && !!headers[_constants.CISCO_DEVICE_URL]) {\n return _promise.default.resolve(options);\n }\n\n // Wait for catalog and service to be defined.\n return services.waitForService({\n service: service,\n url: uri\n }).then(function (url) {\n // Grab the service name with the url returned from waitForService\n var _ref = services.getServiceFromUrl(url) || {},\n serviceName = _ref.name;\n var invalidServices = ['idbroker', 'oauth', 'saml'];\n\n // Check if service is not one of the invalid services\n // Assign the url to the device header\n if (serviceName && !invalidServices.includes(serviceName)) {\n (0, _lodash.set)(options, \"headers['\".concat(_constants.CISCO_DEVICE_URL, \"']\"), device.url);\n }\n return options;\n }).catch(function (error) {\n // Validate that the error came from getServiceFromUrl\n if (error.message.match(/was not found after waiting/)) {\n return options;\n }\n return _promise.default.reject(error);\n });\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {DeviceUrlInterceptor}\n */\n function create() {\n /* eslint no-invalid-this: [0] */\n return new DeviceUrlInterceptor({\n webex: this\n });\n }\n }]);\n return DeviceUrlInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=device-url.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _webexCore = require(\"@webex/webex-core\");\n/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar STATE = {\n INITIAL: 'initial',\n IN_PROGRESS: 'in-progress',\n IDLE: 'idle'\n};\n\n/**\n * @class\n */\nvar IpNetworkDetector = _webexCore.WebexPlugin.extend({\n idAttribute: 'IpNetworkDetectorId',\n namespace: 'Device',\n props: {\n firstIpV4: ['number', true, -1],\n // time [ms] it took to receive first IPv4 candidate\n firstIpV6: ['number', true, -1],\n // time [ms] it took to receive first IPv6 candidate\n firstMdns: ['number', true, -1],\n // time [ms] it took to receive first mDNS candidate\n totalTime: ['number', true, -1],\n // total time [ms] it took to do the last IP network detection\n state: ['string', true, STATE.INITIAL],\n pendingDetection: ['object', false, undefined]\n },\n derived: {\n /**\n * True if we know we're on an IPv4 network,\n * False if we know that we are not on an IPv4 network,\n * undefined if we are not sure\n */\n supportsIpV4: {\n deps: ['firstIpV4', 'firstIpV6', 'firstMdns', 'totalTime'],\n /**\n * Function for calculating the value of supportsIpV4 prop\n * @returns {boolean | undefined}\n */\n fn: function fn() {\n if (this.firstIpV4 >= 0) {\n return true;\n }\n if (this.totalTime < 0) {\n // we haven't completed the detection, yet\n return undefined;\n }\n if (this.receivedOnlyMDnsCandidates()) {\n return undefined;\n }\n return false;\n }\n },\n /**\n * True if we know we're on an IPv6 network,\n * False if we know that we are not on an IPv6 network,\n * undefined if we are not sure\n */\n supportsIpV6: {\n deps: ['firstIpV4', 'firstIpV6', 'firstMdns', 'totalTime'],\n /**\n * Function for calculating the value of supportsIpV6 prop\n * @returns {boolean | undefined}\n */\n fn: function fn() {\n if (this.firstIpV6 >= 0) {\n return true;\n }\n if (this.totalTime < 0) {\n // we haven't completed the detection, yet\n return undefined;\n }\n if (this.receivedOnlyMDnsCandidates()) {\n return undefined;\n }\n return false;\n }\n }\n },\n /**\n * Returns true if we have received only mDNS candidates - browsers usually do that if we don't have any user media permissions\n *\n * @private\n * @returns {boolean}\n */\n receivedOnlyMDnsCandidates: function receivedOnlyMDnsCandidates() {\n return this.totalTime >= 0 && this.firstMdns >= 0 && this.firstIpV4 < 0 && this.firstIpV6 < 0;\n },\n /**\n *\n * @param {RTCPeerConnection} pc Peer connection to use\n * @private\n * @returns {Promise}\n */\n gatherLocalCandidates: function gatherLocalCandidates(pc) {\n var _this = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", new _promise.default(function (resolve, reject) {\n var done = false;\n _this.firstIpV4 = -1;\n _this.firstIpV6 = -1;\n _this.firstMdns = -1;\n _this.totalTime = -1;\n var startTime = performance.now();\n var doneGatheringIceCandidates = function doneGatheringIceCandidates() {\n if (done) {\n return;\n }\n done = true;\n _this.totalTime = performance.now() - startTime;\n resolve();\n };\n pc.onicecandidate = function (event) {\n var _event$candidate;\n if ((_event$candidate = event.candidate) !== null && _event$candidate !== void 0 && _event$candidate.address) {\n if (event.candidate.address.endsWith('.local')) {\n // if we don't have camera/mic permissions, browser just gives us mDNS candidates\n if (_this.firstMdns === -1) {\n _this.firstMdns = performance.now() - startTime;\n }\n } else if (event.candidate.address.includes(':')) {\n if (_this.firstIpV6 === -1) {\n _this.firstIpV6 = performance.now() - startTime;\n }\n } else if (_this.firstIpV4 === -1) {\n _this.firstIpV4 = performance.now() - startTime;\n }\n if (_this.firstIpV4 >= 0 && _this.firstIpV6 >= 0) {\n // if we've got both ipv4 and ipv6 candidates, there is no need to wait for any more candidates, we can resolve now\n resolve();\n }\n } else if (event.candidate === null) {\n doneGatheringIceCandidates();\n }\n };\n pc.onicegatheringstatechange = function () {\n if (pc.iceGatheringState === 'complete') {\n doneGatheringIceCandidates();\n }\n };\n pc.createDataChannel('data');\n pc.createOffer().then(function (offer) {\n return pc.setLocalDescription(offer);\n }).catch(function (e) {\n _this.webex.logger.error('Failed to detect ip network version:', e);\n reject(e);\n });\n }));\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }))();\n },\n /**\n * Detects if we are on IPv4 and/or IPv6 network. Once it resolves, read the\n * supportsIpV4 and supportsIpV6 props to find out the result.\n *\n * @param {boolean} force - if false, the detection will only be done if we haven't managed to get any meaningful results yet\n * @returns {Promise}\n */\n detect: function detect() {\n var _arguments = arguments,\n _this2 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {\n var force, results, pc, forceParam;\n return _regenerator.default.wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n force = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : false;\n if (!(_this2.state === STATE.IN_PROGRESS)) {\n _context2.next = 4;\n break;\n }\n _this2.pendingDetection = {\n force: force\n };\n return _context2.abrupt(\"return\");\n case 4:\n if (!(!force && _this2.state !== STATE.INITIAL && !_this2.receivedOnlyMDnsCandidates())) {\n _context2.next = 6;\n break;\n }\n return _context2.abrupt(\"return\");\n case 6:\n _context2.prev = 6;\n _this2.state = STATE.IN_PROGRESS;\n pc = new RTCPeerConnection();\n _context2.next = 11;\n return _this2.gatherLocalCandidates(pc);\n case 11:\n results = _context2.sent;\n case 12:\n _context2.prev = 12;\n pc.close();\n _this2.state = STATE.IDLE;\n return _context2.finish(12);\n case 16:\n if (_this2.pendingDetection) {\n forceParam = _this2.pendingDetection.force;\n _this2.pendingDetection = undefined;\n _this2.detect(forceParam);\n }\n case 17:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[6,, 12, 16]]);\n }))();\n },\n version: \"3.7.0\"\n});\nvar _default = exports.default = IpNetworkDetector;\n//# sourceMappingURL=ipNetworkDetector.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// Metric to do with WDM registration\nvar _default = exports.default = {\n JS_SDK_WDM_REGISTRATION_SUCCESSFUL: 'JS_SDK_WDM_REGISTRATION_SUCCESSFUL',\n JS_SDK_WDM_REGISTRATION_FAILED: 'JS_SDK_WDM_REGISTRATION_FAILED'\n};\n//# sourceMappingURL=metrics.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CatalogDetails = void 0;\nvar CatalogDetails = exports.CatalogDetails = /*#__PURE__*/function (CatalogDetails) {\n CatalogDetails[\"all\"] = \"all\";\n CatalogDetails[\"features\"] = \"features\";\n CatalogDetails[\"websocket\"] = \"websocket\";\n CatalogDetails[\"none\"] = \"none\";\n return CatalogDetails;\n}({});\n//# sourceMappingURL=types.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar _default = exports.default = {\n feature: {}\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nrequire(\"@webex/internal-plugin-device\");\nvar _lodash = require(\"lodash\");\nvar WebexCore = _interopRequireWildcard(require(\"@webex/webex-core\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar Feature = WebexCore.WebexPlugin.extend({\n namespace: 'Feature',\n /**\n * Returns the value of the requested feature toggle.\n * @param {string} keyType \n * @param {string} key\n * @param {Object} options\n * @param {boolean} options.full to get full feature record including metadata.\n * @returns {string|boolean|number|FeatureModel|null}\n */\n getFeature: function getFeature(keyType, key, options) {\n if (keyType !== 'developer' && keyType !== 'user' && keyType !== 'entitlement') {\n return _promise.default.reject(new Error('Invalid feature keyType provided. Only `developer`, `user`, and `entitlement` feature toggles are permitted.'));\n }\n options = options || {};\n var feature = this.webex.internal.device.features[keyType].get(key);\n if (!feature) {\n return _promise.default.resolve(null);\n }\n if (options.full) {\n return _promise.default.resolve(feature.serialize());\n }\n return _promise.default.resolve(feature.value);\n },\n /**\n * Handles a feature toggle update from the server.\n * When one of these legacy feature gets updated, this event handler be triggered\n * * group-message-notifications\n * * mention-notifications\n * * thread-notifications,\n * This handler is being listened from mercury connection success method for the event \"event:featureToggle_update\"\n * @param {Object} feature\n * @returns {undefined}\n */\n updateFeature: function updateFeature(feature) {\n if (feature) {\n var keyType = feature.type.toLowerCase();\n if (keyType === 'user' || keyType === 'developer') {\n this.webex.internal.device.features[keyType].add([feature], {\n merge: true\n });\n }\n }\n },\n /**\n * Issues request to server to set a value for a feature toggle.\n * @param {string} keyType \n * @param {string} key\n * @param {string} value\n * @returns {Promise} Refreshes the local device and resolves with the features endpoint's response.\n */\n setFeature: function setFeature(keyType, key, value) {\n var _this = this;\n // Limit only to developer feature toggles for now.\n if (keyType !== 'developer' && keyType !== 'user') {\n return _promise.default.reject(new Error('Only `developer` and `user` feature toggles can be set.'));\n }\n return this.request({\n method: 'POST',\n api: 'feature',\n resource: \"features/users/\".concat(this.webex.internal.device.userId, \"/\").concat(keyType),\n body: {\n key: key,\n mutable: true,\n val: value\n }\n }).then(function (res) {\n return _this.webex.internal.device.features[keyType].add(res.body, {\n merge: true\n });\n });\n },\n /**\n * Issues request to server to set a value for a feature toggle.\n * @param {array} featureList - in the form of `Array<{ type: 'USER' | 'DEV', key: string, val: any }>`\n * @returns {Promise} Refreshes the local device and resolves with the features endpoint`s response.\n */\n setBundledFeatures: function setBundledFeatures(featureList) {\n var _this2 = this;\n featureList.forEach(function (item) {\n item.mutable = item.mutable || 'true';\n if (item.type !== 'USER' && item.type !== 'DEV') {\n item.type = 'USER';\n }\n });\n return this.request({\n method: 'POST',\n api: 'feature',\n resource: \"features/users/\".concat(this.webex.internal.device.userId, \"/toggles\"),\n body: featureList\n }).then(function (res) {\n var partitionedToggles = (0, _lodash.partition)(res.body.featureToggles, {\n type: 'USER'\n });\n _this2.webex.internal.device.features.user.add(partitionedToggles[0], {\n merge: true\n });\n _this2.webex.internal.device.features.developer.add(partitionedToggles[1], {\n merge: true\n });\n });\n },\n initialize: function initialize() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (0, _apply.default)(WebexCore.WebexPlugin.prototype.initialize, this, args);\n this.listenToAndRun(this.webex, 'change:internal.device.features.developer', this.trigger.bind(this, 'change:developer'));\n this.listenToAndRun(this.webex, 'change:internal.device.features.entitlement', this.trigger.bind(this, 'change:entitlement'));\n this.listenToAndRun(this.webex, 'change:internal.device.features.user', this.trigger.bind(this, 'change:user'));\n }\n});\nvar _default = exports.default = Feature;\n//# sourceMappingURL=feature.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _feature.default;\n }\n});\nvar _webexCore = require(\"@webex/webex-core\");\nvar _feature = _interopRequireDefault(require(\"./feature\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n(0, _webexCore.registerInternalPlugin)('feature', _feature.default, {\n config: _config.default\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar _default = exports.default = {\n mercury: {\n /**\n * Milliseconds between pings sent up the socket\n * @type {number}\n */\n pingInterval: process.env.MERCURY_PING_INTERVAL || 15000,\n /**\n * Milliseconds to wait for a pong before declaring the connection dead\n * @type {number}\n */\n pongTimeout: process.env.MERCURY_PONG_TIMEOUT || 14000,\n /**\n * Maximum milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeMax: process.env.MERCURY_BACKOFF_TIME_MAX || 32000,\n /**\n * Initial milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeReset: process.env.MERCURY_BACKOFF_TIME_RESET || 1000,\n /**\n * Milliseconds to wait for a close frame before declaring the socket dead and\n * discarding it\n * @type {[type]}\n */\n forceCloseDelay: process.env.MERCURY_FORCE_CLOSE_DELAY || 2000,\n /**\n * When logging out, use default reason which can trigger a reconnect,\n * or set to something else, like `done (permanent)` to prevent reconnect\n * @type {String}\n */\n beforeLogoutOptionsCloseReason: process.env.MERCURY_LOGOUT_REASON || 'done (forced)'\n }\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.UnknownResponse = exports.NotAuthorized = exports.Forbidden = exports.ConnectionError = exports.BadRequest = void 0;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _common = require(\"@webex/common\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Exception thrown when a websocket gets closed\n */\nvar ConnectionError = exports.ConnectionError = /*#__PURE__*/function (_Exception) {\n (0, _inherits2.default)(ConnectionError, _Exception);\n var _super = _createSuper(ConnectionError);\n function ConnectionError() {\n (0, _classCallCheck2.default)(this, ConnectionError);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(ConnectionError, [{\n key: \"parse\",\n value:\n /**\n * @param {CloseEvent} event\n * @returns {string}\n */\n function parse() {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n (0, _defineProperties.default)(this, {\n code: {\n value: event.code\n },\n reason: {\n value: event.reason\n }\n });\n return event.reason;\n }\n }]);\n return ConnectionError;\n}(_common.Exception);\n/**\n * thrown for CloseCode 4400\n */\n(0, _defineProperty2.default)(ConnectionError, \"defaultMessage\", 'Failed to connect to socket');\nvar UnknownResponse = exports.UnknownResponse = /*#__PURE__*/function (_ConnectionError) {\n (0, _inherits2.default)(UnknownResponse, _ConnectionError);\n var _super2 = _createSuper(UnknownResponse);\n function UnknownResponse() {\n (0, _classCallCheck2.default)(this, UnknownResponse);\n return _super2.apply(this, arguments);\n }\n return (0, _createClass2.default)(UnknownResponse);\n}(ConnectionError);\n/**\n * thrown for CloseCode 4400\n */\n(0, _defineProperty2.default)(UnknownResponse, \"defaultMessage\", 'UnknownResponse is produced by IE when we receive a 4XXX. You probably want to treat this like a NotFound');\nvar BadRequest = exports.BadRequest = /*#__PURE__*/function (_ConnectionError2) {\n (0, _inherits2.default)(BadRequest, _ConnectionError2);\n var _super3 = _createSuper(BadRequest);\n function BadRequest() {\n (0, _classCallCheck2.default)(this, BadRequest);\n return _super3.apply(this, arguments);\n }\n return (0, _createClass2.default)(BadRequest);\n}(ConnectionError);\n/**\n * thrown for CloseCode 4401\n */\n(0, _defineProperty2.default)(BadRequest, \"defaultMessage\", 'BadRequest usually implies an attempt to use service account credentials');\nvar NotAuthorized = exports.NotAuthorized = /*#__PURE__*/function (_ConnectionError3) {\n (0, _inherits2.default)(NotAuthorized, _ConnectionError3);\n var _super4 = _createSuper(NotAuthorized);\n function NotAuthorized() {\n (0, _classCallCheck2.default)(this, NotAuthorized);\n return _super4.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotAuthorized);\n}(ConnectionError);\n/**\n * thrown for CloseCode 4403\n */\n(0, _defineProperty2.default)(NotAuthorized, \"defaultMessage\", 'Please refresh your access token');\nvar Forbidden = exports.Forbidden = /*#__PURE__*/function (_ConnectionError4) {\n (0, _inherits2.default)(Forbidden, _ConnectionError4);\n var _super5 = _createSuper(Forbidden);\n function Forbidden() {\n (0, _classCallCheck2.default)(this, Forbidden);\n return _super5.apply(this, arguments);\n }\n return (0, _createClass2.default)(Forbidden);\n}(ConnectionError); // /**\n// * thrown for CloseCode 4404\n// */\n// export class NotFound extends ConnectionError {\n// static defaultMessage = `Please refresh your Mercury registration (typically via a WDM refresh)`;\n// }\n(0, _defineProperty2.default)(Forbidden, \"defaultMessage\", 'Forbidden usually implies these credentials are not entitled for Webex');\n//# sourceMappingURL=errors.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"BadRequest\", {\n enumerable: true,\n get: function get() {\n return _errors.BadRequest;\n }\n});\n_Object$defineProperty(exports, \"ConnectionError\", {\n enumerable: true,\n get: function get() {\n return _errors.ConnectionError;\n }\n});\n_Object$defineProperty(exports, \"Forbidden\", {\n enumerable: true,\n get: function get() {\n return _errors.Forbidden;\n }\n});\n_Object$defineProperty(exports, \"Mercury\", {\n enumerable: true,\n get: function get() {\n return _mercury.default;\n }\n});\n_Object$defineProperty(exports, \"NotAuthorized\", {\n enumerable: true,\n get: function get() {\n return _errors.NotAuthorized;\n }\n});\n_Object$defineProperty(exports, \"Socket\", {\n enumerable: true,\n get: function get() {\n return _socket.default;\n }\n});\n_Object$defineProperty(exports, \"UnknownResponse\", {\n enumerable: true,\n get: function get() {\n return _errors.UnknownResponse;\n }\n});\n_Object$defineProperty(exports, \"config\", {\n enumerable: true,\n get: function get() {\n return _config.default;\n }\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _mercury.default;\n }\n});\nrequire(\"@webex/internal-plugin-device\");\nrequire(\"@webex/internal-plugin-feature\");\nrequire(\"@webex/internal-plugin-metrics\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _mercury = _interopRequireDefault(require(\"./mercury\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\nvar _socket = _interopRequireDefault(require(\"./socket\"));\nvar _errors = require(\"./errors\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n(0, _webexCore.registerInternalPlugin)('mercury', _mercury.default, {\n config: _config.default,\n onBeforeLogout: function onBeforeLogout() {\n return this.logout();\n }\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$keys2 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor2 = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _url = _interopRequireDefault(require(\"url\"));\nvar _webexCore = require(\"@webex/webex-core\");\nvar _common = require(\"@webex/common\");\nvar _lodash = require(\"lodash\");\nvar _backoff = _interopRequireDefault(require(\"backoff\"));\nvar _socket = _interopRequireDefault(require(\"./socket\"));\nvar _errors = require(\"./errors\");\nvar _dec, _dec2, _obj;\n/* eslint-disable require-jsdoc */\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor2(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor2(t, r)); }); } return e; }\nvar normalReconnectReasons = ['idle', 'done (forced)', 'pong not received', 'pong mismatch'];\nvar Mercury = _webexCore.WebexPlugin.extend((_dec = (0, _common.deprecated)('Mercury#listen(): Use Mercury#connect() instead'), _dec2 = (0, _common.deprecated)('Mercury#stopListening(): Use Mercury#disconnect() instead'), (_obj = {\n namespace: 'Mercury',\n lastError: undefined,\n session: {\n connected: {\n default: false,\n type: 'boolean'\n },\n connecting: {\n default: false,\n type: 'boolean'\n },\n hasEverConnected: {\n default: false,\n type: 'boolean'\n },\n socket: 'object',\n localClusterServiceUrls: 'object'\n },\n derived: {\n listening: {\n deps: ['connected'],\n fn: function fn() {\n return this.connected;\n }\n }\n },\n initialize: function initialize() {\n var _this = this;\n /*\n When one of these legacy feature gets updated, this event would be triggered\n * group-message-notifications\n * mention-notifications\n * thread-notifications\n */\n this.on('event:featureToggle_update', function (envelope) {\n if (envelope && envelope.data) {\n _this.webex.internal.feature.updateFeature(envelope.data.featureToggle);\n }\n });\n },\n /**\n * Get the last error.\n * @returns {any} The last error.\n */\n getLastError: function getLastError() {\n return this.lastError;\n },\n connect: function connect(webSocketUrl) {\n var _this2 = this;\n if (this.connected) {\n this.logger.info(\"\".concat(this.namespace, \": already connected, will not connect again\"));\n return _promise.default.resolve();\n }\n this.connecting = true;\n return _promise.default.resolve(this.webex.internal.device.registered || this.webex.internal.device.register()).then(function () {\n _this2.logger.info(\"\".concat(_this2.namespace, \": connecting\"));\n return _this2._connectWithBackoff(webSocketUrl);\n });\n },\n logout: function logout() {\n return this.disconnect(this.config.beforeLogoutOptionsCloseReason && !normalReconnectReasons.includes(this.config.beforeLogoutOptionsCloseReason) ? {\n code: 1050,\n reason: this.config.beforeLogoutOptionsCloseReason\n } : undefined);\n },\n disconnect: function disconnect(options) {\n var _this3 = this;\n return new _promise.default(function (resolve) {\n if (_this3.backoffCall) {\n _this3.logger.info(\"\".concat(_this3.namespace, \": aborting connection\"));\n _this3.backoffCall.abort();\n }\n if (_this3.socket) {\n _this3.socket.removeAllListeners('message');\n _this3.once('offline', resolve);\n resolve(_this3.socket.close(options || undefined));\n }\n resolve();\n });\n },\n listen: function listen() {\n /* eslint no-invalid-this: [0] */\n return this.connect();\n },\n stopListening: function stopListening() {\n /* eslint no-invalid-this: [0] */\n return this.disconnect();\n },\n processRegistrationStatusEvent: function processRegistrationStatusEvent(message) {\n this.localClusterServiceUrls = message.localClusterServiceUrls;\n },\n _applyOverrides: function _applyOverrides(event) {\n if (!event || !event.headers) {\n return;\n }\n var headerKeys = (0, _keys.default)(event.headers);\n headerKeys.forEach(function (keyPath) {\n (0, _lodash.set)(event, keyPath, event.headers[keyPath]);\n });\n },\n _prepareUrl: function _prepareUrl(webSocketUrl) {\n var _this4 = this;\n if (!webSocketUrl) {\n webSocketUrl = this.webex.internal.device.webSocketUrl;\n }\n return this.webex.internal.feature.getFeature('developer', 'web-high-availability').then(function (haMessagingEnabled) {\n if (haMessagingEnabled) {\n return _this4.webex.internal.services.convertUrlToPriorityHostUrl(webSocketUrl);\n }\n return webSocketUrl;\n }).then(function (wsUrl) {\n webSocketUrl = wsUrl;\n }).then(function () {\n return _this4.webex.internal.feature.getFeature('developer', 'web-shared-mercury');\n }).then(function (webSharedMercury) {\n webSocketUrl = _url.default.parse(webSocketUrl, true);\n (0, _assign.default)(webSocketUrl.query, {\n outboundWireFormat: 'text',\n bufferStates: true,\n aliasHttpStatus: true\n });\n if (webSharedMercury) {\n (0, _assign.default)(webSocketUrl.query, {\n mercuryRegistrationStatus: true,\n isRegistrationRefreshEnabled: true\n });\n (0, _deleteProperty.default)(webSocketUrl.query, 'bufferStates');\n }\n if ((0, _lodash.get)(_this4, 'webex.config.device.ephemeral', false)) {\n webSocketUrl.query.multipleConnections = true;\n }\n webSocketUrl.query.clientTimestamp = (0, _now.default)();\n return _url.default.format(webSocketUrl);\n });\n },\n _attemptConnection: function _attemptConnection(socketUrl, callback) {\n var _this5 = this;\n var socket = new _socket.default();\n var attemptWSUrl;\n socket.on('close', function () {\n return _this5._onclose.apply(_this5, arguments);\n });\n socket.on('message', function () {\n return _this5._onmessage.apply(_this5, arguments);\n });\n socket.on('sequence-mismatch', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _this5._emit.apply(_this5, ['sequence-mismatch'].concat(args));\n });\n socket.on('ping-pong-latency', function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return _this5._emit.apply(_this5, ['ping-pong-latency'].concat(args));\n });\n _promise.default.all([this._prepareUrl(socketUrl), this.webex.credentials.getUserToken()]).then(function (_ref) {\n var _ref2 = (0, _slicedToArray2.default)(_ref, 2),\n webSocketUrl = _ref2[0],\n token = _ref2[1];\n if (!_this5.backoffCall) {\n var msg = \"\".concat(_this5.namespace, \": prevent socket open when backoffCall no longer defined\");\n _this5.logger.info(msg);\n return _promise.default.reject(new Error(msg));\n }\n attemptWSUrl = webSocketUrl;\n var options = {\n forceCloseDelay: _this5.config.forceCloseDelay,\n pingInterval: _this5.config.pingInterval,\n pongTimeout: _this5.config.pongTimeout,\n token: token.toString(),\n trackingId: \"\".concat(_this5.webex.sessionId, \"_\").concat((0, _now.default)()),\n logger: _this5.logger\n };\n\n // if the consumer has supplied request options use them\n if (_this5.webex.config.defaultMercuryOptions) {\n _this5.logger.info(\"\".concat(_this5.namespace, \": setting custom options\"));\n options = _objectSpread(_objectSpread({}, options), _this5.webex.config.defaultMercuryOptions);\n }\n\n // Set the socket before opening it. This allows a disconnect() to close\n // the socket if it is in the process of being opened.\n _this5.socket = socket;\n _this5.logger.info(\"\".concat(_this5.namespace, \" connection url: \").concat(webSocketUrl));\n return socket.open(webSocketUrl, options);\n }).then(function () {\n _this5.logger.info(\"\".concat(_this5.namespace, \": connected to mercury, success, action: connected, url: \").concat(attemptWSUrl));\n callback();\n return _this5.webex.internal.feature.getFeature('developer', 'web-high-availability').then(function (haMessagingEnabled) {\n if (haMessagingEnabled) {\n return _this5.webex.internal.device.refresh();\n }\n return _promise.default.resolve();\n });\n }).catch(function (reason) {\n _this5.lastError = reason; // remember the last error\n\n // Suppress connection errors that appear to be network related. This\n // may end up suppressing metrics during outages, but we might not care\n // (especially since many of our outages happen in a way that client\n // metrics can't be trusted).\n if (reason.code !== 1006 && _this5.backoffCall && _this5.backoffCall.getNumRetries() > 0) {\n _this5._emit('connection_failed', reason, {\n retries: _this5.backoffCall.getNumRetries()\n });\n }\n _this5.logger.info(\"\".concat(_this5.namespace, \": connection attempt failed\"), reason);\n // UnknownResponse is produced by IE for any 4XXX; treated it like a bad\n // web socket url and let WDM handle the token checking\n if (reason instanceof _errors.UnknownResponse) {\n _this5.logger.info(\"\".concat(_this5.namespace, \": received unknown response code, refreshing device registration\"));\n return _this5.webex.internal.device.refresh().then(function () {\n return callback(reason);\n });\n }\n // NotAuthorized implies expired token\n if (reason instanceof _errors.NotAuthorized) {\n _this5.logger.info(\"\".concat(_this5.namespace, \": received authorization error, reauthorizing\"));\n return _this5.webex.credentials.refresh({\n force: true\n }).then(function () {\n return callback(reason);\n });\n }\n // // NotFound implies expired web socket url\n // else if (reason instanceof NotFound) {\n // this.logger.info(`mercury: received not found error, refreshing device registration`);\n // return this.webex.internal.device.refresh()\n // .then(() => callback(reason));\n // }\n // BadRequest implies current credentials are for a Service Account\n // Forbidden implies current user is not entitle for Webex\n if (reason instanceof _errors.BadRequest || reason instanceof _errors.Forbidden) {\n _this5.logger.warn(\"\".concat(_this5.namespace, \": received unrecoverable response from mercury\"));\n _this5.backoffCall.abort();\n return callback(reason);\n }\n if (reason instanceof _errors.ConnectionError) {\n return _this5.webex.internal.feature.getFeature('developer', 'web-high-availability').then(function (haMessagingEnabled) {\n if (haMessagingEnabled) {\n _this5.logger.info(\"\".concat(_this5.namespace, \": received a generic connection error, will try to connect to another datacenter. failed, action: 'failed', url: \").concat(attemptWSUrl, \" error: \").concat(reason.message));\n return _this5.webex.internal.services.markFailedUrl(attemptWSUrl);\n }\n return null;\n }).then(function () {\n return callback(reason);\n });\n }\n return callback(reason);\n }).catch(function (reason) {\n _this5.logger.error(\"\".concat(_this5.namespace, \": failed to handle connection failure\"), reason);\n callback(reason);\n });\n },\n _connectWithBackoff: function _connectWithBackoff(webSocketUrl) {\n var _this6 = this;\n return new _promise.default(function (resolve, reject) {\n // eslint gets confused about whether or not call is actually used\n // eslint-disable-next-line prefer-const\n var call;\n var onComplete = function onComplete(err) {\n _this6.connecting = false;\n _this6.backoffCall = undefined;\n if (err) {\n _this6.logger.info(\"\".concat(_this6.namespace, \": failed to connect after \").concat(call.getNumRetries(), \" retries; log statement about next retry was inaccurate; \").concat(err));\n return reject(err);\n }\n _this6.connected = true;\n _this6.hasEverConnected = true;\n _this6._emit('online');\n return resolve();\n };\n\n // eslint-disable-next-line prefer-reflect\n call = _backoff.default.call(function (callback) {\n _this6.logger.info(\"\".concat(_this6.namespace, \": executing connection attempt \").concat(call.getNumRetries()));\n _this6._attemptConnection(webSocketUrl, callback);\n }, onComplete);\n call.setStrategy(new _backoff.default.ExponentialStrategy({\n initialDelay: _this6.config.backoffTimeReset,\n maxDelay: _this6.config.backoffTimeMax\n }));\n if (_this6.config.initialConnectionMaxRetries && !_this6.hasEverConnected) {\n call.failAfter(_this6.config.initialConnectionMaxRetries);\n } else if (_this6.config.maxRetries) {\n call.failAfter(_this6.config.maxRetries);\n }\n call.on('abort', function () {\n _this6.logger.info(\"\".concat(_this6.namespace, \": connection aborted\"));\n reject(new Error('Mercury Connection Aborted'));\n });\n call.on('callback', function (err) {\n if (err) {\n var number = call.getNumRetries();\n var delay = Math.min(call.strategy_.nextBackoffDelay_, _this6.config.backoffTimeMax);\n _this6.logger.info(\"\".concat(_this6.namespace, \": failed to connect; attempting retry \").concat(number + 1, \" in \").concat(delay, \" ms\"));\n /* istanbul ignore if */\n if (process.env.NODE_ENV === 'development') {\n _this6.logger.debug(\"\".concat(_this6.namespace, \": \"), err, err.stack);\n }\n return;\n }\n _this6.logger.info(\"\".concat(_this6.namespace, \": connected\"));\n });\n call.start();\n _this6.backoffCall = call;\n });\n },\n _emit: function _emit() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n try {\n this.trigger.apply(this, args);\n } catch (error) {\n this.logger.error(\"\".concat(this.namespace, \": error occurred in event handler:\"), error, ' with args: ', args);\n }\n },\n _getEventHandlers: function _getEventHandlers(eventType) {\n var _eventType$split = eventType.split('.'),\n _eventType$split2 = (0, _slicedToArray2.default)(_eventType$split, 2),\n namespace = _eventType$split2[0],\n name = _eventType$split2[1];\n var handlers = [];\n if (!this.webex[namespace] && !this.webex.internal[namespace]) {\n return handlers;\n }\n var handlerName = (0, _lodash.camelCase)(\"process_\".concat(name, \"_event\"));\n if ((this.webex[namespace] || this.webex.internal[namespace])[handlerName]) {\n handlers.push({\n name: handlerName,\n namespace: namespace\n });\n }\n return handlers;\n },\n _onclose: function _onclose(event) {\n // I don't see any way to avoid the complexity or statement count in here.\n /* eslint complexity: [0] */\n\n try {\n var reason = event.reason && event.reason.toLowerCase();\n var socketUrl = this.socket.url;\n this.socket.removeAllListeners();\n this.unset('socket');\n this.connected = false;\n this._emit('offline', event);\n switch (event.code) {\n case 1003:\n // metric: disconnect\n this.logger.info(\"\".concat(this.namespace, \": Mercury service rejected last message; will not reconnect: \").concat(event.reason));\n this._emit('offline.permanent', event);\n break;\n case 4000:\n // metric: disconnect\n this.logger.info(\"\".concat(this.namespace, \": socket replaced; will not reconnect\"));\n this._emit('offline.replaced', event);\n break;\n case 1001:\n case 1005:\n case 1006:\n case 1011:\n this.logger.info(\"\".concat(this.namespace, \": socket disconnected; reconnecting\"));\n this._emit('offline.transient', event);\n this._reconnect(socketUrl);\n // metric: disconnect\n // if (code == 1011 && reason !== ping error) metric: unexpected disconnect\n break;\n case 1000:\n case 1050:\n // 1050 indicates logout form of closure, default to old behavior, use config reason defined by consumer to proceed with the permanent block\n if (normalReconnectReasons.includes(reason)) {\n this.logger.info(\"\".concat(this.namespace, \": socket disconnected; reconnecting\"));\n this._emit('offline.transient', event);\n this._reconnect(socketUrl);\n // metric: disconnect\n // if (reason === done forced) metric: force closure\n } else {\n this.logger.info(\"\".concat(this.namespace, \": socket disconnected; will not reconnect: \").concat(event.reason));\n this._emit('offline.permanent', event);\n }\n break;\n default:\n this.logger.info(\"\".concat(this.namespace, \": socket disconnected unexpectedly; will not reconnect\"));\n // unexpected disconnect\n this._emit('offline.permanent', event);\n }\n } catch (error) {\n this.logger.error(\"\".concat(this.namespace, \": error occurred in close handler\"), error);\n }\n },\n _onmessage: function _onmessage(event) {\n var _this7 = this;\n var envelope = event.data;\n if (process.env.ENABLE_MERCURY_LOGGING) {\n this.logger.debug(\"\".concat(this.namespace, \": message envelope: \"), envelope);\n }\n var data = envelope.data;\n this._applyOverrides(data);\n return this._getEventHandlers(data.eventType).reduce(function (promise, handler) {\n return promise.then(function () {\n var namespace = handler.namespace,\n name = handler.name;\n return new _promise.default(function (resolve) {\n return resolve((_this7.webex[namespace] || _this7.webex.internal[namespace])[name](data));\n }).catch(function (reason) {\n return _this7.logger.error(\"\".concat(_this7.namespace, \": error occurred in autowired event handler for \").concat(data.eventType), reason);\n });\n });\n }, _promise.default.resolve()).then(function () {\n _this7._emit('event', event.data);\n var _data$eventType$split = data.eventType.split('.'),\n _data$eventType$split2 = (0, _slicedToArray2.default)(_data$eventType$split, 1),\n namespace = _data$eventType$split2[0];\n if (namespace === data.eventType) {\n _this7._emit(\"event:\".concat(namespace), envelope);\n } else {\n _this7._emit(\"event:\".concat(namespace), envelope);\n _this7._emit(\"event:\".concat(data.eventType), envelope);\n }\n }).catch(function (reason) {\n _this7.logger.error(\"\".concat(_this7.namespace, \": error occurred processing socket message\"), reason);\n });\n },\n _reconnect: function _reconnect(webSocketUrl) {\n this.logger.info(\"\".concat(this.namespace, \": reconnecting\"));\n return this.connect(webSocketUrl);\n },\n version: \"3.7.0\"\n}, ((0, _applyDecoratedDescriptor2.default)(_obj, \"connect\", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, \"connect\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"disconnect\", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, \"disconnect\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"listen\", [_dec], (0, _getOwnPropertyDescriptor.default)(_obj, \"listen\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"stopListening\", [_dec2], (0, _getOwnPropertyDescriptor.default)(_obj, \"stopListening\"), _obj)), _obj)));\nvar _default = exports.default = Mercury;\n//# sourceMappingURL=mercury.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _socket.default;\n }\n});\nvar _socket = _interopRequireDefault(require(\"./socket\"));\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _parseInt2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/parse-int\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _events = require(\"events\");\nvar _common = require(\"@webex/common\");\nvar _commonTimers = require(\"@webex/common-timers\");\nvar _lodash = require(\"lodash\");\nvar _uuid = _interopRequireDefault(require(\"uuid\"));\nvar _errors = require(\"../errors\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar sockets = new _weakMap.default();\n\n/**\n * Generalized socket abstraction\n */\nvar Socket = exports.default = /*#__PURE__*/function (_EventEmitter) {\n (0, _inherits2.default)(Socket, _EventEmitter);\n var _super = _createSuper(Socket);\n /**\n * constructor\n * @returns {Socket}\n */\n function Socket() {\n var _this;\n (0, _classCallCheck2.default)(this, Socket);\n _this = _super.call(this);\n _this._domain = 'unknown-domain';\n _this.onmessage = _this.onmessage.bind((0, _assertThisInitialized2.default)(_this));\n _this.onclose = _this.onclose.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * @returns {string}\n */\n (0, _createClass2.default)(Socket, [{\n key: \"binaryType\",\n get: function get() {\n return sockets.get(this).binaryType;\n }\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * @returns {number}\n */\n }, {\n key: \"bufferedAmount\",\n get: function get() {\n return sockets.get(this).bufferedAmount;\n }\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * @returns {string}\n */\n }, {\n key: \"extensions\",\n get: function get() {\n return sockets.get(this).extensions;\n }\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * @returns {string}\n */\n }, {\n key: \"protocol\",\n get: function get() {\n return sockets.get(this).protocol;\n }\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * @returns {number}\n */\n }, {\n key: \"readyState\",\n get: function get() {\n return sockets.get(this).readyState;\n }\n\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n * @returns {string}\n */\n }, {\n key: \"url\",\n get: function get() {\n return sockets.get(this).url;\n }\n\n /**\n * Provides the environmentally appropriate constructor (ws in NodeJS,\n * WebSocket in browsers)\n * @returns {WebSocket}\n */\n }, {\n key: \"close\",\n value:\n /**\n * Closes the socket\n * @param {Object} options\n * @param {string} options.reason\n * @param {number} options.code\n * @returns {Promise}\n */\n function close(options) {\n var _this2 = this;\n return new _promise.default(function (resolve, reject) {\n var socket = sockets.get(_this2);\n if (!socket) {\n // Open has not been called yet so there is no socket to close\n resolve();\n return;\n }\n // logger is defined once open is called\n _this2.logger.info(\"socket,\".concat(_this2._domain, \": closing\"));\n if (socket.readyState === 2 || socket.readyState === 3) {\n _this2.logger.info(\"socket,\".concat(_this2._domain, \": already closed\"));\n resolve();\n return;\n }\n options = options || {};\n if (options.code && options.code !== 1000 && options.code !== 1050 && (options.code < 3000 || options.code > 4999)) {\n reject(new Error('`options.code` must be 1000 or 1050 or between 3000 and 4999 (inclusive)'));\n return;\n }\n options = (0, _lodash.defaults)(options, {\n code: 1000,\n reason: 'Done'\n });\n var closeTimer = (0, _commonTimers.safeSetTimeout)(function () {\n try {\n _this2.logger.info(\"socket,\".concat(_this2._domain, \": no close event received, forcing closure\"));\n resolve(_this2.onclose(options.code === 1050 ? {\n code: 1050,\n reason: options.reason\n } : {\n code: 1000,\n reason: 'Done (forced)'\n }));\n } catch (error) {\n _this2.logger.warn(\"socket,\".concat(_this2._domain, \": force-close failed\"), error);\n }\n }, _this2.forceCloseDelay);\n socket.onclose = function (event) {\n _this2.logger.info(\"socket,\".concat(_this2._domain, \": close event fired\"), event.code, event.reason);\n clearTimeout(closeTimer);\n _this2.onclose(event);\n resolve(event);\n };\n socket.close(options.code, options.reason);\n });\n }\n\n /**\n * Opens a WebSocket\n * @param {string} url\n * @param {options} options\n * @param {number} options.forceCloseDelay (required)\n * @param {number} options.pingInterval (required)\n * @param {number} options.pongTimeout (required)\n * @param {string} options.token (required)\n * @param {string} options.trackingId (required)\n * @param {Logger} options.logger (required)\n * @param {string} options.logLevelToken\n * @returns {Promise}\n */\n }, {\n key: \"open\",\n value: function open(url, options) {\n var _this3 = this;\n try {\n this._domain = new URL(url).hostname;\n } catch (_unused) {\n this._domain = url;\n }\n return new _promise.default(function (resolve, reject) {\n /* eslint complexity: [0] */\n if (!url) {\n reject(new Error('`url` is required'));\n return;\n }\n if (sockets.get(_this3)) {\n reject(new Error('Socket#open() can only be called once per instance'));\n return;\n }\n options = options || {};\n (0, _common.checkRequired)(['forceCloseDelay', 'pingInterval', 'pongTimeout', 'token', 'trackingId', 'logger'], options);\n (0, _keys.default)(options).forEach(function (key) {\n (0, _defineProperty.default)(_this3, key, {\n enumerable: false,\n value: options[key]\n });\n });\n var WebSocket = Socket.getWebSocketConstructor();\n _this3.logger.info(\"socket,\".concat(_this3._domain, \": creating WebSocket\"));\n var socket = new WebSocket(url, [], options);\n socket.binaryType = 'arraybuffer';\n socket.onmessage = _this3.onmessage;\n socket.onclose = function (event) {\n event = _this3._fixCloseCode(event);\n _this3.logger.info(\"socket,\".concat(_this3._domain, \": closed before open\"), event.code, event.reason);\n switch (event.code) {\n case 1005:\n // IE 11 doesn't seem to allow 4XXX codes, so if we get a 1005, assume\n // it's a bad websocket url. That'll trigger a device refresh; if it\n // turns out we had a bad token, the device refresh should 401 and\n // trigger a token refresh.\n return reject(new _errors.UnknownResponse(event));\n case 4400:\n return reject(new _errors.BadRequest(event));\n case 4401:\n return reject(new _errors.NotAuthorized(event));\n case 4403:\n return reject(new _errors.Forbidden(event));\n // case 4404:\n // return reject(new NotFound(event));\n default:\n return reject(new _errors.ConnectionError(event));\n }\n };\n socket.onopen = function () {\n _this3.logger.info(\"socket,\".concat(_this3._domain, \": connected\"));\n _this3._authorize().then(function () {\n _this3.logger.info(\"socket,\".concat(_this3._domain, \": authorized\"));\n socket.onclose = _this3.onclose;\n resolve();\n }).catch(reject);\n };\n socket.onerror = function (event) {\n _this3.logger.warn(\"socket,\".concat(_this3._domain, \": error event fired\"), event);\n };\n sockets.set(_this3, socket);\n _this3.logger.info(\"socket,\".concat(_this3._domain, \": waiting for server\"));\n });\n }\n\n /**\n * Handles incoming CloseEvents\n * @param {CloseEvent} event\n * @returns {undefined}\n */\n }, {\n key: \"onclose\",\n value: function onclose(event) {\n this.logger.info(\"socket,\".concat(this._domain, \": closed\"), event.code, event.reason);\n clearTimeout(this.pongTimer);\n clearTimeout(this.pingTimer);\n event = this._fixCloseCode(event);\n this.emit('close', event);\n\n // Remove all listeners to (a) avoid reacting to late pongs and (b) ensure\n // we don't have a retain cycle.\n this.removeAllListeners();\n }\n\n /**\n * Handles incoming message events\n * @param {MessageEvent} event\n * @returns {undefined}\n */\n }, {\n key: \"onmessage\",\n value: function onmessage(event) {\n try {\n var data = JSON.parse(event.data);\n var sequenceNumber = (0, _parseInt2.default)(data.sequenceNumber, 10);\n this.logger.debug(\"socket,\".concat(this._domain, \": sequence number: \"), sequenceNumber);\n if (this.expectedSequenceNumber && sequenceNumber !== this.expectedSequenceNumber) {\n this.logger.debug(\"socket,\".concat(this._domain, \": sequence number mismatch indicates lost mercury message. expected: \").concat(this.expectedSequenceNumber, \", actual: \").concat(sequenceNumber));\n this.emit('sequence-mismatch', sequenceNumber, this.expectedSequenceNumber);\n }\n this.expectedSequenceNumber = sequenceNumber + 1;\n\n // Yes, it's a little weird looking; we want to emit message events that\n // look like normal socket message events, but event.data cannot be\n // modified and we don't actually care about anything but the data property\n var processedEvent = {\n data: data\n };\n this._acknowledge(processedEvent);\n if (data.type === 'pong') {\n this.emit('pong', processedEvent);\n } else {\n this.emit('message', processedEvent);\n }\n } catch (error) {\n // The above code should only be able to throw if we receive an unparsable\n // message from Mercury. At this time, the only action we have is to\n // ignore it and move on.\n /* istanbul ignore next */\n this.logger.warn(\"socket,\".concat(this._domain, \": error while receiving WebSocket message\"), error);\n }\n }\n\n /**\n * Sends a message up the socket\n * @param {mixed} data\n * @returns {Promise}\n */\n }, {\n key: \"send\",\n value: function send(data) {\n var _this4 = this;\n return new _promise.default(function (resolve, reject) {\n if (_this4.readyState !== 1) {\n return reject(new Error('INVALID_STATE_ERROR'));\n }\n if ((0, _lodash.isObject)(data)) {\n data = (0, _stringify.default)(data);\n }\n var socket = sockets.get(_this4);\n socket.send(data);\n return resolve();\n });\n }\n\n /**\n * Sends an acknowledgment for a specific event\n * @param {MessageEvent} event\n * @returns {Promise}\n */\n }, {\n key: \"_acknowledge\",\n value: function _acknowledge(event) {\n if (!event) {\n return _promise.default.reject(new Error('`event` is required'));\n }\n if (!(0, _lodash.has)(event, 'data.id')) {\n return _promise.default.reject(new Error('`event.data.id` is required'));\n }\n return this.send({\n messageId: event.data.id,\n type: 'ack'\n });\n }\n\n /**\n * Sends an auth message up the socket\n * @private\n * @returns {Promise}\n */\n }, {\n key: \"_authorize\",\n value: function _authorize() {\n var _this5 = this;\n return new _promise.default(function (resolve) {\n _this5.logger.info(\"socket,\".concat(_this5._domain, \": authorizing\"));\n _this5.send({\n id: _uuid.default.v4(),\n type: 'authorization',\n data: {\n token: _this5.token\n },\n trackingId: _this5.trackingId,\n logLevelToken: _this5.logLevelToken\n });\n var waitForBufferState = function waitForBufferState(event) {\n if (!event.data.type && (event.data.data.eventType === 'mercury.buffer_state' || event.data.data.eventType === 'mercury.registration_status')) {\n _this5.removeListener('message', waitForBufferState);\n _this5._ping();\n resolve();\n }\n };\n _this5.once('message', waitForBufferState);\n });\n }\n\n /**\n * Deals with the fact that some browsers drop some close codes (but not\n * close reasons).\n * @param {CloseEvent} event\n * @private\n * @returns {CloseEvent}\n */\n }, {\n key: \"_fixCloseCode\",\n value: function _fixCloseCode(event) {\n if (event.code === 1005 && event.reason) {\n switch (event.reason.toLowerCase()) {\n case 'replaced':\n this.logger.info(\"socket,\".concat(this._domain, \": fixing CloseEvent code for reason: \"), event.reason);\n event.code = 4000;\n break;\n case 'authentication failed':\n case 'authentication did not happen within the timeout window of 30000 seconds.':\n this.logger.info(\"socket,\".concat(this._domain, \": fixing CloseEvent code for reason: \"), event.reason);\n event.code = 1008;\n break;\n default:\n // do nothing\n }\n }\n\n return event;\n }\n\n /**\n * Sends a ping up the socket and confirms we get it back\n * @param {[type]} id\n * @private\n * @returns {[type]}\n */\n }, {\n key: \"_ping\",\n value: function _ping(id) {\n var _this6 = this;\n var confirmPongId = function confirmPongId(event) {\n try {\n _this6.logger.debug(\"socket,\".concat(_this6._domain, \": pong\"), event.data.id);\n if (event.data && event.data.id !== id) {\n _this6.logger.info(\"socket,\".concat(_this6._domain, \": received pong for wrong ping id, closing socket\"));\n _this6.logger.debug(\"socket,\".concat(_this6._domain, \": expected\"), id, 'received', event.data.id);\n _this6.close({\n code: 1000,\n reason: 'Pong mismatch'\n });\n }\n } catch (error) {\n // This try/catch block was added as a debugging step; to the best of my\n // knowledge, the above can never throw.\n /* istanbul ignore next */\n _this6.logger.error(\"socket,\".concat(_this6._domain, \": error occurred in confirmPongId\"), error);\n }\n };\n var onPongNotReceived = function onPongNotReceived() {\n try {\n _this6.logger.info(\"socket,\".concat(_this6._domain, \": pong not receive in expected period, closing socket\"));\n _this6.close({\n code: 1000,\n reason: 'Pong not received'\n }).catch(function (reason) {\n _this6.logger.warn(\"socket,\".concat(_this6._domain, \": failed to close socket after missed pong\"), reason);\n });\n } catch (error) {\n // This try/catch block was added as a debugging step; to the best of my\n // knowledge, the above can never throw.\n /* istanbul ignore next */\n _this6.logger.error(\"socket,\".concat(_this6._domain, \": error occurred in onPongNotReceived\"), error);\n }\n };\n var scheduleNextPingAndCancelPongTimer = function scheduleNextPingAndCancelPongTimer() {\n try {\n clearTimeout(_this6.pongTimer);\n _this6.pingTimer = (0, _commonTimers.safeSetTimeout)(function () {\n return _this6._ping();\n }, _this6.pingInterval);\n } catch (error) {\n // This try/catch block was added as a debugging step; to the best of my\n // knowledge, the above can never throw.\n /* istanbul ignore next */\n _this6.logger.error(\"socket,\".concat(_this6._domain, \": error occurred in scheduleNextPingAndCancelPongTimer\"), error);\n }\n };\n var calculateLatency = function calculateLatency(pingTimestamp) {\n var now = performance.now();\n var latency = now - pingTimestamp;\n _this6.logger.debug(\"socket,\".concat(_this6._domain, \": latency: \"), latency);\n _this6.emit('ping-pong-latency', latency);\n };\n id = id || _uuid.default.v4();\n var pingTimestamp = performance.now();\n this.pongTimer = (0, _commonTimers.safeSetTimeout)(onPongNotReceived, this.pongTimeout);\n this.once('pong', scheduleNextPingAndCancelPongTimer);\n this.once('pong', confirmPongId);\n this.once('pong', function () {\n return calculateLatency(pingTimestamp);\n });\n this.logger.debug(\"socket,\".concat(this._domain, \": ping \").concat(id));\n return this.send({\n id: id,\n type: 'ping'\n });\n }\n }], [{\n key: \"getWebSocketConstructor\",\n value: function getWebSocketConstructor() {\n throw new Error('Socket.getWebSocketConstructor() must be implemented in an environmentally appropriate way');\n }\n }]);\n return Socket;\n}(_events.EventEmitter);\n//# sourceMappingURL=socket-base.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _socketBase = _interopRequireDefault(require(\"./socket-base\"));\n/* eslint-disable no-restricted-globals */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint-env browser */\n\n_socketBase.default.getWebSocketConstructor = function getWebSocketConstructor() {\n // Grabed from https://github.com/heineiuo/isomorphic-ws/blob/9b977394ac875638c045fd9cf774ed418484b394/browser.js\n var ws;\n if (typeof WebSocket !== 'undefined') {\n ws = WebSocket;\n } else if (typeof MozWebSocket !== 'undefined') {\n // eslint-disable-next-line no-undef\n ws = MozWebSocket;\n } else if (typeof global !== 'undefined') {\n ws = global.WebSocket || global.MozWebSocket;\n } else if (typeof window !== 'undefined') {\n ws = window.WebSocket || window.MozWebSocket;\n } else if (typeof self !== 'undefined') {\n ws = self.WebSocket || self.MozWebSocket;\n }\n return ws;\n};\nvar _default = exports.default = _socketBase.default;\n//# sourceMappingURL=socket.shim.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _symbol = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/symbol\"));\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _webexCore = require(\"@webex/webex-core\");\nvar _commonTimers = require(\"@webex/common-timers\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar sym = (0, _symbol.default)('metric id');\n\n/**\n * @class\n * @extends Batcher\n * @memberof Metrics\n */\nvar MetricsBatcher = _webexCore.Batcher.extend({\n namespace: 'Metrics',\n /**\n * @param {any} item\n * @returns {Promise}\n */\n prepareItem: function prepareItem(item) {\n // Keep non-prod data out of metrics\n var env = process.env.NODE_ENV === 'production' ? null : 'TEST';\n item.appType = item.appType || this.config.appType;\n item.env = item.env || env;\n item.time = item.time || (0, _now.default)();\n item.version = item.version || this.webex.version;\n return _promise.default.resolve(item);\n },\n /**\n * @param {any[]} queue\n * @returns {Promise}\n */\n prepareRequest: function prepareRequest(queue) {\n return _promise.default.resolve(queue.map(function (item) {\n item.postTime = item.postTime || (0, _now.default)();\n return item;\n }));\n },\n /**\n * @param {any} payload\n * @returns {Promise}\n */\n submitHttpRequest: function submitHttpRequest(payload) {\n return this.webex.request({\n method: 'POST',\n service: 'metrics',\n resource: 'metrics',\n body: {\n metrics: payload\n },\n waitForServiceTimeout: this.webex.config.metrics.waitForServiceTimeout\n });\n },\n /**\n * @param {any} res\n * @returns {Promise}\n */\n handleHttpSuccess: function handleHttpSuccess(res) {\n var _this = this;\n return _promise.default.all(res.options.body.metrics.map(function (item) {\n return _this.acceptItem(item);\n }));\n },\n /**\n * @param {any} reason\n * @returns {Promise}\n */\n handleHttpError: function handleHttpError(reason) {\n var _this2 = this;\n if (reason instanceof _webexCore.WebexHttpError.NetworkOrCORSError) {\n this.logger.warn('metrics-batcher: received network error submitting metrics, reenqueuing payload');\n return _promise.default.all(reason.options.body.metrics.map(function (item) {\n return new _promise.default(function (resolve) {\n var delay = item[sym].nextDelay;\n if (delay < _this2.config.batcherRetryPlateau) {\n item[sym].nextDelay *= 2;\n }\n (0, _commonTimers.safeSetTimeout)(function () {\n resolve(_this2.rerequest(item));\n }, delay);\n });\n }));\n }\n return (0, _apply.default)(_webexCore.Batcher.prototype.handleHttpError, this, [reason]);\n },\n /**\n * @param {any} item\n * @returns {Promise}\n */\n rerequest: function rerequest(item) {\n var _this3 = this;\n return _promise.default.all([this.getDeferredForRequest(item), this.prepareItem(item)]).then(function (_ref) {\n var _ref2 = (0, _slicedToArray2.default)(_ref, 2),\n defer = _ref2[0],\n req = _ref2[1];\n _this3.enqueue(req).then(function () {\n return _this3.bounce();\n }).catch(function (reason) {\n return defer.reject(reason);\n });\n });\n },\n /**\n * @param {any} item\n * @returns {Promise}\n */\n fingerprintRequest: function fingerprintRequest(item) {\n item[sym] = item[sym] || {\n nextDelay: 1000\n };\n return _promise.default.resolve(item[sym]);\n },\n /**\n * @param {any} item\n * @returns {Promise}\n */\n fingerprintResponse: function fingerprintResponse(item) {\n return _promise.default.resolve(item[sym]);\n }\n});\nvar _default = exports.default = MetricsBatcher;\n//# sourceMappingURL=batcher.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _genericMetrics = _interopRequireDefault(require(\"./generic-metrics\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * @description Util class to handle Behavioral Metrics\n * @export\n * @class BehavioralMetrics\n */\nvar BehavioralMetrics = exports.default = /*#__PURE__*/function (_GenericMetrics) {\n (0, _inherits2.default)(BehavioralMetrics, _GenericMetrics);\n var _super = _createSuper(BehavioralMetrics);\n function BehavioralMetrics() {\n (0, _classCallCheck2.default)(this, BehavioralMetrics);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(BehavioralMetrics, [{\n key: \"submitBehavioralEvent\",\n value:\n /**\n * Submit a behavioral metric to our metrics endpoint.\n * @param {MetricEventProduct} product the product from which the metric is being submitted, e.g. 'webex' web client, 'wxcc_desktop'\n * @param {MetricEventAgent} agent the source of the action for this metric\n * @param {string} target the 'thing' that this metric includes information about\n * @param {MetricEventVerb} verb the action that this metric includes information about\n * @param {EventPayload} payload information specific to this event. This should be flat, i.e. it should not include nested objects.\n * @returns {Promise}\n */\n function submitBehavioralEvent(_ref) {\n var product = _ref.product,\n agent = _ref.agent,\n target = _ref.target,\n verb = _ref.verb,\n payload = _ref.payload;\n var name = \"\".concat(product, \".\").concat(agent, \".\").concat(target, \".\").concat(verb);\n var event = this.createTaggedEventObject({\n type: ['behavioral'],\n name: name,\n payload: payload\n });\n this.submitEvent({\n kind: 'behavioral-events -> ',\n name: name,\n event: event\n });\n }\n }]);\n return BehavioralMetrics;\n}(_genericMetrics.default);\n//# sourceMappingURL=behavioral-metrics.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _genericMetrics = _interopRequireDefault(require(\"./generic-metrics\"));\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * @description Util class to handle Buisness Metrics\n * @export\n * @class BusinessMetrics\n */\nvar BusinessMetrics = exports.default = /*#__PURE__*/function (_GenericMetrics) {\n (0, _inherits2.default)(BusinessMetrics, _GenericMetrics);\n var _super = _createSuper(BusinessMetrics);\n function BusinessMetrics() {\n (0, _classCallCheck2.default)(this, BusinessMetrics);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(BusinessMetrics, [{\n key: \"submitCallEndEvent\",\n value:\n /**\n * unfortunately, the pinot team does not allow changes to the schema of wbxapp_callend_metrics\n * so we have to shim this layer specifically for this\n * https://confluence-eng-gpk2.cisco.com/conf/display/WAP/Table+wbxapp_callend_metrics\n * @param {EventPayload} payload payload of the metric\n * @returns {Promise}\n */\n function submitCallEndEvent(_ref) {\n var payload = _ref.payload;\n var event = {\n type: ['business'],\n eventPayload: {\n key: 'callEnd',\n client_timestamp: new Date().toISOString(),\n appType: 'Web Client',\n value: _objectSpread({}, payload)\n }\n };\n return this.submitEvent({\n kind: 'buisness-events:wbxapp_callend_metrics -> ',\n name: 'wbxapp_callend_metrics',\n event: event\n });\n }\n\n /**\n * Submit a buisness metric to our metrics endpoint, going to the default business_ucf table\n * all event payload keys are converted into a hex string value\n * unfortunately, the pinot team does not allow changes to the schema of business_metrics\n * so we have to shim this layer specifically for this\n * https://confluence-eng-gpk2.cisco.com/conf/display/WAP/Table%3A+business_metrics\n * @param {string} name of the metric\n * @param {EventPayload} payload payload of the metric\n * @returns {Promise}\n */\n }, {\n key: \"submitBusinessMetricsEvent\",\n value: function submitBusinessMetricsEvent(_ref2) {\n var name = _ref2.name,\n payload = _ref2.payload;\n var event = {\n type: ['business'],\n eventPayload: {\n key: name,\n client_timestamp: new Date().toISOString(),\n appType: 'Web Client',\n value: _objectSpread(_objectSpread(_objectSpread({}, this.getContext()), this.getBrowserDetails()), payload)\n }\n };\n return this.submitEvent({\n kind: 'buisness-events:business_metrics -> ',\n name: name,\n event: event\n });\n }\n\n /**\n * Submit a buisness metric to our metrics endpoint, going to the default business_ucf table\n * all event payload keys are converted into a hex string value\n * https://confluence-eng-gpk2.cisco.com/conf/display/WAP/Business+metrics++-%3E+ROMA\n * @param {string} name of the metric\n * @param {EventPayload} user payload of the metric\n * @returns {Promise}\n */\n }, {\n key: \"submitDefaultEvent\",\n value: function submitDefaultEvent(_ref3) {\n var name = _ref3.name,\n payload = _ref3.payload;\n var event = {\n type: ['business'],\n eventPayload: {\n key: name,\n appType: 'Web Client',\n client_timestamp: new Date().toISOString(),\n context: this.getContext(),\n browserDetails: this.getBrowserDetails(),\n value: payload\n }\n };\n return this.submitEvent({\n kind: 'buisness-events:default -> ',\n name: name,\n event: event\n });\n }\n\n /**\n * Submit a buisness metric to our metrics endpoint.\n * routes to the correct table with the correct schema payload by table\n * https://confluence-eng-gpk2.cisco.com/conf/display/WAP/Business+metrics++-%3E+ROMA\n * @param {string} name of the metric, ignored if going to wbxapp_callend_metrics\n * @param {EventPayload} payload user payload of the metric\n * @param {Table} table optional - to submit the metric to and adapt the sent schema\n * @returns {Promise}\n */\n }, {\n key: \"submitBusinessEvent\",\n value: function submitBusinessEvent(_ref4) {\n var name = _ref4.name,\n payload = _ref4.payload,\n table = _ref4.table;\n if (!table) {\n table = 'default';\n }\n switch (table) {\n case 'wbxapp_callend_metrics':\n return this.submitCallEndEvent({\n payload: payload\n });\n case 'business_metrics':\n return this.submitBusinessMetricsEvent({\n name: name,\n payload: payload\n });\n case 'business_ucf':\n return this.submitDefaultEvent({\n name: name,\n payload: payload\n });\n case 'default':\n default:\n return this.submitDefaultEvent({\n name: name,\n payload: payload\n });\n }\n }\n }]);\n return BusinessMetrics;\n}(_genericMetrics.default);\n//# sourceMappingURL=business-metrics.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _lodash = require(\"lodash\");\nvar _batcher = _interopRequireDefault(require(\"../batcher\"));\nvar _callDiagnosticMetrics = require(\"./call-diagnostic-metrics.util\");\nvar _config = require(\"./config\");\nvar _utils = require(\"../utils\");\nvar CallDiagnosticEventsBatcher = _batcher.default.extend({\n namespace: 'Metrics',\n /**\n * Prepare item\n * @param {any} item\n * @returns {Promise}\n */\n prepareItem: function prepareItem(item) {\n return _promise.default.resolve((0, _callDiagnosticMetrics.prepareDiagnosticMetricItem)(this.webex, item));\n },\n /**\n * Prepare request, add time sensitive date etc.\n * @param {any[]} queue\n * @returns {Promise}\n */\n prepareRequest: function prepareRequest(queue) {\n // Add sent timestamp\n queue.forEach(function (item) {\n item.eventPayload.originTime = item.eventPayload.originTime || {};\n item.eventPayload.originTime.sent = new Date().toISOString();\n });\n return _promise.default.resolve(queue);\n },\n /**\n *\n * @param {any} payload\n * @returns {Promise}\n */\n submitHttpRequest: function submitHttpRequest(payload) {\n var _this = this;\n var batchId = (0, _lodash.uniqueId)('ca-batch-');\n return this.webex.request({\n method: 'POST',\n service: 'metrics',\n resource: 'clientmetrics',\n body: {\n metrics: payload\n },\n waitForServiceTimeout: this.webex.config.metrics.waitForServiceTimeout\n }).then(function (res) {\n _this.webex.logger.log(_config.CALL_DIAGNOSTIC_LOG_IDENTIFIER, \"CallDiagnosticEventsBatcher: @submitHttpRequest#\".concat(batchId, \". Request successful.\"));\n return res;\n }).catch(function (err) {\n _this.webex.logger.error(_config.CALL_DIAGNOSTIC_LOG_IDENTIFIER, \"CallDiagnosticEventsBatcher: @submitHttpRequest#\".concat(batchId, \". Request failed:\"), \"error: \".concat((0, _utils.generateCommonErrorMetadata)(err)));\n return _promise.default.reject(err);\n });\n }\n});\nvar _default = exports.default = CallDiagnosticEventsBatcher;\n//# sourceMappingURL=call-diagnostic-metrics-batcher.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _webexCore = require(\"@webex/webex-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable class-methods-use-this */ /* eslint-disable valid-jsdoc */\n// we only care about client event and feature event for now\n/**\n * @description Helper class to store latencies timestamp and to calculate various latencies for CA.\n * @exports\n * @class CallDiagnosticLatencies\n */\nvar CallDiagnosticLatencies = exports.default = /*#__PURE__*/function (_WebexPlugin) {\n (0, _inherits2.default)(CallDiagnosticLatencies, _WebexPlugin);\n var _super = _createSuper(CallDiagnosticLatencies);\n /**\n * @constructor\n */\n function CallDiagnosticLatencies() {\n var _this;\n (0, _classCallCheck2.default)(this, CallDiagnosticLatencies);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"latencyTimestamps\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"precomputedLatencies\", void 0);\n // meetingId that the current latencies are for\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"meetingId\", void 0);\n _this.latencyTimestamps = new _map.default();\n _this.precomputedLatencies = new _map.default();\n return _this;\n }\n\n /**\n * Clear timestamps\n */\n (0, _createClass2.default)(CallDiagnosticLatencies, [{\n key: \"clearTimestamps\",\n value: function clearTimestamps() {\n this.latencyTimestamps.clear();\n this.precomputedLatencies.clear();\n }\n\n /**\n * Associate current latencies with a meeting id\n * @param meetingId\n */\n }, {\n key: \"setMeetingId\",\n value: function setMeetingId(meetingId) {\n this.meetingId = meetingId;\n }\n\n /**\n * Returns the meeting object associated with current latencies\n * @returns meeting object\n */\n }, {\n key: \"getMeeting\",\n value: function getMeeting() {\n if (this.meetingId) {\n // @ts-ignore\n return this.webex.meetings.getBasicMeetingInformation(this.meetingId);\n }\n return undefined;\n }\n\n /**\n * Store timestamp value\n * @param key - key\n * @param value - value\n * @param options - store options\n * @throws\n * @returns\n */\n }, {\n key: \"saveTimestamp\",\n value: function saveTimestamp(_ref) {\n var key = _ref.key,\n _ref$value = _ref.value,\n value = _ref$value === void 0 ? new Date().getTime() : _ref$value,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options;\n // save the meetingId so we can use the meeting object in latency calculations if needed\n var meetingId = options.meetingId;\n if (meetingId) {\n this.setMeetingId(meetingId);\n }\n // for some events we're only interested in the first timestamp not last\n // as these events can happen multiple times\n if (key === 'client.media.rx.start' || key === 'client.media.tx.start' || key === 'internal.client.meetinginfo.request' || key === 'internal.client.meetinginfo.response') {\n this.saveFirstTimestampOnly(key, value);\n } else {\n this.latencyTimestamps.set(key, value);\n }\n }\n\n /**\n * Store precomputed latency value\n * @param key - key\n * @param value - value\n * @param accumulate - when it is true, it overwrites existing value with sum of the current value and the new measurement otherwise just store the new measurement\n * @throws\n * @returns\n */\n }, {\n key: \"saveLatency\",\n value: function saveLatency(key, value) {\n var accumulate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var existingValue = accumulate ? this.precomputedLatencies.get(key) || 0 : 0;\n this.precomputedLatencies.set(key, value + existingValue);\n }\n\n /**\n * Measure latency for a request\n * @param callback - callback for which you would like to measure latency\n * @param key - key\n * @param accumulate - when it is true, it overwrites existing value with sum of the current value and the new measurement otherwise just store the new measurement\n * @returns\n */\n }, {\n key: \"measureLatency\",\n value: function measureLatency(callback, key) {\n var _this2 = this;\n var accumulate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var start = performance.now();\n return callback().finally(function () {\n _this2.saveLatency(key, performance.now() - start, accumulate);\n });\n }\n\n /**\n * Store only the first timestamp value for the given key\n * @param key - key\n * @param value -value\n * @throws\n * @returns\n */\n }, {\n key: \"saveFirstTimestampOnly\",\n value: function saveFirstTimestampOnly(key) {\n var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date().getTime();\n if (this.latencyTimestamps.has(key)) {\n return;\n }\n this.latencyTimestamps.set(key, value);\n }\n\n /**\n * Helper to calculate end - start\n * @param a start\n * @param b end\n * @returns latency\n */\n }, {\n key: \"getDiffBetweenTimestamps\",\n value: function getDiffBetweenTimestamps(a, b) {\n var start = this.latencyTimestamps.get(a);\n var end = this.latencyTimestamps.get(b);\n if (start && end) {\n return end - start;\n }\n return undefined;\n }\n\n /**\n * Meeting Info Request\n * @note Meeting Info request happen not just in the join phase. CA requires\n * metrics around meeting info request that are only part of join phase.\n * This internal.* event is used to track the real timestamps\n * (when the actual request/response happen). This is because the actual CA event is\n * sent inside the join method on the meeting object based on some logic, but that's not exactly when\n * those events are actually fired. The logic only confirms that they have happened, and we send them over.\n * @returns - latency\n */\n }, {\n key: \"getMeetingInfoReqResp\",\n value: function getMeetingInfoReqResp() {\n return this.getDiffBetweenTimestamps('internal.client.meetinginfo.request', 'internal.client.meetinginfo.response');\n }\n\n /**\n * Interstitial Time\n * @returns - latency\n */\n }, {\n key: \"getShowInterstitialTime\",\n value: function getShowInterstitialTime() {\n return this.getDiffBetweenTimestamps('client.interstitial-window.start-launch', 'internal.client.interstitial-window.click.joinbutton');\n }\n\n /**\n * getU2CTime\n * @returns - latency\n */\n }, {\n key: \"getU2CTime\",\n value: function getU2CTime() {\n var u2cLatency = this.precomputedLatencies.get('internal.get.u2c.time');\n return u2cLatency ? Math.floor(u2cLatency) : undefined;\n }\n\n /**\n * Device Register Time\n * @returns - latency\n */\n }, {\n key: \"getRegisterWDMDeviceJMT\",\n value: function getRegisterWDMDeviceJMT() {\n return this.getDiffBetweenTimestamps('internal.register.device.request', 'internal.register.device.response');\n }\n\n /**\n * Call Init Join Request\n * @returns - latency\n */\n }, {\n key: \"getCallInitJoinReq\",\n value: function getCallInitJoinReq() {\n return this.getDiffBetweenTimestamps('internal.client.interstitial-window.click.joinbutton', 'client.locus.join.request');\n }\n\n /**\n * Locus Join Request\n * @returns - latency\n */\n }, {\n key: \"getJoinReqResp\",\n value: function getJoinReqResp() {\n return this.getDiffBetweenTimestamps('client.locus.join.request', 'client.locus.join.response');\n }\n\n /**\n * Time taken to do turn discovery\n * @returns - latency\n */\n }, {\n key: \"getTurnDiscoveryTime\",\n value: function getTurnDiscoveryTime() {\n return this.getDiffBetweenTimestamps('internal.client.add-media.turn-discovery.start', 'internal.client.add-media.turn-discovery.end');\n }\n\n /**\n * Local SDP Generated Remote SDP REceived\n * @returns - latency\n */\n }, {\n key: \"getLocalSDPGenRemoteSDPRecv\",\n value: function getLocalSDPGenRemoteSDPRecv() {\n return this.getDiffBetweenTimestamps('client.media-engine.local-sdp-generated', 'client.media-engine.remote-sdp-received');\n }\n\n /**\n * ICE Setup Time\n * @returns - latency\n */\n }, {\n key: \"getICESetupTime\",\n value: function getICESetupTime() {\n return this.getDiffBetweenTimestamps('client.ice.start', 'client.ice.end');\n }\n\n /**\n * Audio ICE time\n * @returns - latency\n */\n }, {\n key: \"getAudioICESetupTime\",\n value: function getAudioICESetupTime() {\n return this.getDiffBetweenTimestamps('client.ice.start', 'client.ice.end');\n }\n\n /**\n * Video ICE Time\n * @returns - latency\n */\n }, {\n key: \"getVideoICESetupTime\",\n value: function getVideoICESetupTime() {\n return this.getDiffBetweenTimestamps('client.ice.start', 'client.ice.end');\n }\n\n /**\n * Share ICE Time\n * @returns - latency\n */\n }, {\n key: \"getShareICESetupTime\",\n value: function getShareICESetupTime() {\n return this.getDiffBetweenTimestamps('client.ice.start', 'client.ice.end');\n }\n\n /**\n * Stay Lobby Time\n * @returns - latency\n */\n }, {\n key: \"getStayLobbyTime\",\n value: function getStayLobbyTime() {\n return this.getDiffBetweenTimestamps('client.locus.join.response', 'internal.host.meeting.participant.admitted');\n }\n\n /**\n * Page JMT\n * @returns - latency\n */\n }, {\n key: \"getPageJMT\",\n value: function getPageJMT() {\n return this.precomputedLatencies.get('internal.client.pageJMT') || undefined;\n }\n\n /**\n * Download Time JMT\n * @returns - latency\n */\n }, {\n key: \"getDownloadTimeJMT\",\n value: function getDownloadTimeJMT() {\n return this.precomputedLatencies.get('internal.download.time') || undefined;\n }\n\n /**\n * Click To Interstitial\n * @returns - latency\n */\n }, {\n key: \"getClickToInterstitial\",\n value: function getClickToInterstitial() {\n // for normal join (where green join button exists before interstitial, i.e reminder, space list etc)\n if (this.latencyTimestamps.get('internal.client.meeting.click.joinbutton')) {\n return this.getDiffBetweenTimestamps('internal.client.meeting.click.joinbutton', 'internal.client.meeting.interstitial-window.showed');\n }\n\n // for cross launch and guest flows\n return this.precomputedLatencies.get('internal.click.to.interstitial') || undefined;\n }\n\n /**\n * Interstitial To Join Ok\n * @returns - latency\n */\n }, {\n key: \"getInterstitialToJoinOK\",\n value: function getInterstitialToJoinOK() {\n return this.getDiffBetweenTimestamps('internal.client.interstitial-window.click.joinbutton', 'client.locus.join.response');\n }\n\n /**\n * Call Init To MediaEngineReady\n * @returns - latency\n */\n }, {\n key: \"getCallInitMediaEngineReady\",\n value: function getCallInitMediaEngineReady() {\n return this.getDiffBetweenTimestamps('internal.client.interstitial-window.click.joinbutton', 'client.media-engine.ready');\n }\n\n /**\n * Interstitial To Media Ok\n * @returns - latency\n */\n }, {\n key: \"getInterstitialToMediaOKJMT\",\n value: function getInterstitialToMediaOKJMT() {\n var interstitialJoinClickTimestamp = this.latencyTimestamps.get('internal.client.interstitial-window.click.joinbutton');\n\n // get the first timestamp\n var connectedMedia = this.latencyTimestamps.get('client.ice.end');\n var lobbyTime = this.getStayLobbyTime() || 0;\n if (interstitialJoinClickTimestamp && connectedMedia) {\n return connectedMedia - interstitialJoinClickTimestamp - lobbyTime;\n }\n return undefined;\n }\n\n /**\n * Total JMT\n * @returns - latency\n */\n }, {\n key: \"getTotalJMT\",\n value: function getTotalJMT() {\n var clickToInterstitial = this.getClickToInterstitial();\n var interstitialToJoinOk = this.getInterstitialToJoinOK();\n if (clickToInterstitial && interstitialToJoinOk) {\n return clickToInterstitial + interstitialToJoinOk;\n }\n return undefined;\n }\n\n /**\n * Join Conf JMT\n * @returns - latency\n */\n }, {\n key: \"getJoinConfJMT\",\n value: function getJoinConfJMT() {\n var joinReqResp = this.getJoinReqResp();\n var ICESetupTime = this.getICESetupTime();\n if (joinReqResp && ICESetupTime) {\n return joinReqResp + ICESetupTime;\n }\n return undefined;\n }\n\n /**\n * Total Media JMT\n * @returns - latency\n */\n }, {\n key: \"getTotalMediaJMT\",\n value: function getTotalMediaJMT() {\n var clickToInterstitial = this.getClickToInterstitial();\n var interstitialToJoinOk = this.getInterstitialToJoinOK();\n var joinConfJMT = this.getJoinConfJMT();\n var lobbyTime = this.getStayLobbyTime();\n if (clickToInterstitial && interstitialToJoinOk && joinConfJMT) {\n var _this$getMeeting;\n var totalMediaJMT = clickToInterstitial + interstitialToJoinOk + joinConfJMT;\n if ((_this$getMeeting = this.getMeeting()) !== null && _this$getMeeting !== void 0 && _this$getMeeting.allowMediaInLobby) {\n return totalMediaJMT;\n }\n return totalMediaJMT - lobbyTime;\n }\n return undefined;\n }\n\n /**\n * Client JMT\n * @returns - latency\n */\n }, {\n key: \"getClientJMT\",\n value: function getClientJMT() {\n var interstitialToJoinOk = this.getInterstitialToJoinOK();\n var joinConfJMT = this.getJoinConfJMT();\n if (interstitialToJoinOk && joinConfJMT) {\n return interstitialToJoinOk - joinConfJMT;\n }\n return undefined;\n }\n\n /**\n * Audio setup delay receive\n */\n }, {\n key: \"getAudioJoinRespRxStart\",\n value: function getAudioJoinRespRxStart() {\n return this.getDiffBetweenTimestamps('client.locus.join.response', 'client.media.rx.start');\n }\n\n /**\n * Video setup delay receive\n */\n }, {\n key: \"getVideoJoinRespRxStart\",\n value: function getVideoJoinRespRxStart() {\n return this.getDiffBetweenTimestamps('client.locus.join.response', 'client.media.rx.start');\n }\n\n /**\n * Total latency for all get cluster request.\n */\n }, {\n key: \"getReachabilityClustersReqResp\",\n value: function getReachabilityClustersReqResp() {\n var reachablityClusterReqResp = this.precomputedLatencies.get('internal.get.cluster.time');\n return reachablityClusterReqResp ? Math.floor(reachablityClusterReqResp) : undefined;\n }\n\n /**\n * Audio setup delay transmit\n */\n }, {\n key: \"getAudioJoinRespTxStart\",\n value: function getAudioJoinRespTxStart() {\n return this.getDiffBetweenTimestamps('client.locus.join.response', 'client.media.tx.start');\n }\n\n /**\n * Video setup delay transmit\n */\n }, {\n key: \"getVideoJoinRespTxStart\",\n value: function getVideoJoinRespTxStart() {\n return this.getDiffBetweenTimestamps('client.locus.join.response', 'client.media.tx.start');\n }\n\n /**\n * Total latency for all exchange ci token.\n */\n }, {\n key: \"getExchangeCITokenJMT\",\n value: function getExchangeCITokenJMT() {\n var exchangeCITokenJMT = this.precomputedLatencies.get('internal.exchange.ci.token.time');\n return exchangeCITokenJMT ? Math.floor(exchangeCITokenJMT) : undefined;\n }\n\n /**\n * Total latency for all refresh captcha requests.\n */\n }, {\n key: \"getRefreshCaptchaReqResp\",\n value: function getRefreshCaptchaReqResp() {\n var refreshCaptchaReqResp = this.precomputedLatencies.get('internal.refresh.captcha.time');\n return refreshCaptchaReqResp ? Math.floor(refreshCaptchaReqResp) : undefined;\n }\n\n /**\n * Get the latency for downloading intelligence models.\n * @returns - latency\n */\n }, {\n key: \"getDownloadIntelligenceModelsReqResp\",\n value: function getDownloadIntelligenceModelsReqResp() {\n var downloadIntelligenceModelsReqResp = this.precomputedLatencies.get('internal.api.fetch.intelligence.models');\n return downloadIntelligenceModelsReqResp ? Math.floor(downloadIntelligenceModelsReqResp) : undefined;\n }\n\n /**\n * Get the total latency for all other app API requests.\n * Excludes meeting info, because it's measured separately.\n * @returns - latency\n */\n }, {\n key: \"getOtherAppApiReqResp\",\n value: function getOtherAppApiReqResp() {\n var otherAppApiJMT = this.precomputedLatencies.get('internal.other.app.api.time');\n return otherAppApiJMT > 0 ? Math.floor(otherAppApiJMT) : undefined;\n }\n }]);\n return CallDiagnosticLatencies;\n}(_webexCore.WebexPlugin);\n//# sourceMappingURL=call-diagnostic-metrics-latencies.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _common = require(\"@webex/common\");\nvar _uuid = _interopRequireDefault(require(\"uuid\"));\nvar _lodash = require(\"lodash\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _metrics = require(\"../metrics\");\nvar _callDiagnosticMetrics = require(\"./call-diagnostic-metrics.util\");\nvar _config = require(\"../config\");\nvar _callDiagnosticMetricsBatcher = _interopRequireDefault(require(\"./call-diagnostic-metrics-batcher\"));\nvar _preloginMetricsBatcher = _interopRequireDefault(require(\"../prelogin-metrics-batcher\"));\nvar _config2 = require(\"./config\");\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable class-methods-use-this */ /* eslint-disable valid-jsdoc */\nvar _BrowserDetection = (0, _common.BrowserDetection)(),\n getOSVersion = _BrowserDetection.getOSVersion,\n getBrowserName = _BrowserDetection.getBrowserName,\n getBrowserVersion = _BrowserDetection.getBrowserVersion;\n/**\n * @description Util class to handle Call Analyzer Metrics\n * @export\n * @class CallDiagnosticMetrics\n */\nvar CallDiagnosticMetrics = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {\n (0, _inherits2.default)(CallDiagnosticMetrics, _StatelessWebexPlugin);\n var _super = _createSuper(CallDiagnosticMetrics);\n /**\n * Constructor\n * @param args\n */\n function CallDiagnosticMetrics() {\n var _this;\n (0, _classCallCheck2.default)(this, CallDiagnosticMetrics);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n // @ts-ignore\n // @ts-ignore\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"callDiagnosticEventsBatcher\", void 0);\n // @ts-ignore\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"preLoginMetricsBatcher\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"logger\", void 0);\n // to avoid adding @ts-ignore everywhere\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"hasLoggedBrowserSerial\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"device\", void 0);\n // the default validator before piping an event to the batcher\n // this function can be overridden by the user\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"validator\", function (options) {\n return _promise.default.resolve({\n event: options === null || options === void 0 ? void 0 : options.event,\n valid: true\n });\n });\n /**\n * Prepare the event and send the request to metrics-a service, pre login.\n * @param event\n * @param preLoginId\n * @returns\n */\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"submitToCallDiagnosticsPreLogin\", function (event, preLoginId) {\n // build metrics-a event type\n var finalEvent = {\n eventPayload: event,\n type: ['diagnostic-event']\n };\n _this.preLoginMetricsBatcher.savePreLoginId(preLoginId);\n return _this.preLoginMetricsBatcher.request(finalEvent);\n });\n _this.logger = _this.webex.logger;\n // @ts-ignore\n _this.callDiagnosticEventsBatcher = new _callDiagnosticMetricsBatcher.default({}, {\n parent: _this.webex\n });\n // @ts-ignore\n _this.preLoginMetricsBatcher = new _preloginMetricsBatcher.default({}, {\n parent: _this.webex\n });\n return _this;\n }\n\n /**\n * Returns the login type of the current user\n * @returns one of 'login-ci','unverified-guest', null\n */\n (0, _createClass2.default)(CallDiagnosticMetrics, [{\n key: \"getCurLoginType\",\n value: function getCurLoginType() {\n // @ts-ignore\n if (this.webex.canAuthorize) {\n // @ts-ignore\n return this.webex.credentials.isUnverifiedGuest ? 'unverified-guest' : 'login-ci';\n }\n return null;\n }\n\n /**\n * Returns if the meeting has converged architecture enabled\n * @param options.meetingId\n */\n }, {\n key: \"getIsConvergedArchitectureEnabled\",\n value: function getIsConvergedArchitectureEnabled(_ref) {\n var meetingId = _ref.meetingId;\n if (meetingId) {\n var _meeting$meetingInfo;\n // @ts-ignore\n var meeting = this.webex.meetings.getBasicMeetingInformation(meetingId);\n return meeting === null || meeting === void 0 ? void 0 : (_meeting$meetingInfo = meeting.meetingInfo) === null || _meeting$meetingInfo === void 0 ? void 0 : _meeting$meetingInfo.enableConvergedArchitecture;\n }\n return undefined;\n }\n\n /**\n * Returns meeting's subServiceType\n * @param meeting\n * @returns\n */\n }, {\n key: \"getSubServiceType\",\n value: function getSubServiceType(meeting) {\n if (meeting) {\n // @ts-ignore\n var meetingInfo = meeting === null || meeting === void 0 ? void 0 : meeting.meetingInfo;\n // if not Scheduled, not Webinar, pmr - then pmr\n if (!(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.webexScheduled) && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.enableEvent) && meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.pmr) {\n return _config2.WEBEX_SUB_SERVICE_TYPES.PMR;\n }\n // if Scheduled, not Webinar, not pmr - then ScheduledMeeting\n if (meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.webexScheduled && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.enableEvent) && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.pmr)) {\n return _config2.WEBEX_SUB_SERVICE_TYPES.SCHEDULED_MEETING;\n }\n // if Scheduled, Webinar, not pmr - then Webinar\n if (meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.webexScheduled && meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.enableEvent && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.pmr)) {\n return _config2.WEBEX_SUB_SERVICE_TYPES.WEBINAR;\n }\n }\n return undefined;\n }\n\n /**\n * Get origin object for Call Diagnostic Event payload.\n * @param options\n * @param meetingId\n * @returns\n */\n }, {\n key: \"getOrigin\",\n value: function getOrigin(options, meetingId) {\n var _this$webex$meetings$, _this$webex$meetings$2, _this$webex$meetings$3, _this$webex$meetings$4, _this$webex$meetings$5, _this$webex$meetings$6;\n var defaultClientType = // @ts-ignore\n (_this$webex$meetings$ = this.webex.meetings.config) === null || _this$webex$meetings$ === void 0 ? void 0 : (_this$webex$meetings$2 = _this$webex$meetings$.metrics) === null || _this$webex$meetings$2 === void 0 ? void 0 : _this$webex$meetings$2.clientType;\n var defaultSubClientType = // @ts-ignore\n (_this$webex$meetings$3 = this.webex.meetings.config) === null || _this$webex$meetings$3 === void 0 ? void 0 : (_this$webex$meetings$4 = _this$webex$meetings$3.metrics) === null || _this$webex$meetings$4 === void 0 ? void 0 : _this$webex$meetings$4.subClientType;\n // @ts-ignore\n var providedClientVersion = (_this$webex$meetings$5 = this.webex.meetings.config) === null || _this$webex$meetings$5 === void 0 ? void 0 : (_this$webex$meetings$6 = _this$webex$meetings$5.metrics) === null || _this$webex$meetings$6 === void 0 ? void 0 : _this$webex$meetings$6.clientVersion;\n // @ts-ignore\n var defaultSDKClientVersion = \"\".concat(_config.CLIENT_NAME, \"/\").concat(this.webex.version);\n var versionMetadata = {};\n\n // sdk version split doesn't really make sense for now...\n if (providedClientVersion) {\n versionMetadata = (0, _callDiagnosticMetrics.extractVersionMetadata)(providedClientVersion);\n }\n if (!this.hasLoggedBrowserSerial) {\n this.logger.log(_config2.CALL_DIAGNOSTIC_LOG_IDENTIFIER, \"CallDiagnosticMetrics: @createClientEventObjectInMeeting => collected browser data\", (0, _stringify.default)((0, _common.getBrowserSerial)()));\n this.hasLoggedBrowserSerial = true;\n }\n if (defaultClientType && defaultSubClientType || options.clientType && options.subClientType) {\n var _this$webex$meetings, _this$webex$meetings$7, _this$webex$meetings$8, _this$webex$meetings$9, _this$webex$meetings$10, _this$webex$meetings$11;\n var origin = {\n name: 'endpoint',\n networkType: (options === null || options === void 0 ? void 0 : options.networkType) || 'unknown',\n userAgent: (0, _callDiagnosticMetrics.userAgentToString)({\n // @ts-ignore\n clientName: (_this$webex$meetings = this.webex.meetings) === null || _this$webex$meetings === void 0 ? void 0 : (_this$webex$meetings$7 = _this$webex$meetings.config) === null || _this$webex$meetings$7 === void 0 ? void 0 : (_this$webex$meetings$8 = _this$webex$meetings$7.metrics) === null || _this$webex$meetings$8 === void 0 ? void 0 : _this$webex$meetings$8.clientName,\n // @ts-ignore\n webexVersion: this.webex.version\n }),\n clientInfo: _objectSpread(_objectSpread({\n clientType: (options === null || options === void 0 ? void 0 : options.clientType) || defaultClientType,\n clientVersion: providedClientVersion || defaultSDKClientVersion\n }, versionMetadata), {}, {\n publicNetworkPrefix:\n // @ts-ignore\n (0, _callDiagnosticMetrics.anonymizeIPAddress)((_this$webex$meetings$9 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$9 === void 0 ? void 0 : _this$webex$meetings$9.clientAddress) || undefined,\n localNetworkPrefix: (0, _callDiagnosticMetrics.anonymizeIPAddress)( // @ts-ignore\n (_this$webex$meetings$10 = this.webex.meetings.meetingCollection.get(meetingId)) === null || _this$webex$meetings$10 === void 0 ? void 0 : (_this$webex$meetings$11 = _this$webex$meetings$10.statsAnalyzer) === null || _this$webex$meetings$11 === void 0 ? void 0 : _this$webex$meetings$11.getLocalIpAddress()) || undefined,\n osVersion: getOSVersion() || 'unknown',\n subClientType: (options === null || options === void 0 ? void 0 : options.subClientType) || defaultSubClientType,\n os: (0, _metrics.getOSNameInternal)(),\n browser: getBrowserName(),\n browserVersion: getBrowserVersion()\n })\n };\n if (meetingId) {\n // @ts-ignore\n var meeting = this.webex.meetings.getBasicMeetingInformation(meetingId);\n if (meeting !== null && meeting !== void 0 && meeting.environment) {\n origin.environment = meeting.environment;\n }\n }\n if (options !== null && options !== void 0 && options.environment) {\n origin.environment = options.environment;\n }\n if (options !== null && options !== void 0 && options.newEnvironment) {\n origin.newEnvironment = options.newEnvironment;\n }\n if (options !== null && options !== void 0 && options.clientLaunchMethod) {\n origin.clientInfo.clientLaunchMethod = options.clientLaunchMethod;\n }\n if (options !== null && options !== void 0 && options.browserLaunchMethod) {\n origin.clientInfo.browserLaunchMethod = options.browserLaunchMethod;\n }\n return origin;\n }\n throw new Error(\"ClientType and SubClientType can't be undefined\");\n }\n\n /**\n * Gather identifier details for call diagnostic payload.\n * @throws Error if initialization fails.\n * @param options\n */\n }, {\n key: \"getIdentifiers\",\n value: function getIdentifiers(options) {\n var _meeting$locusInfo, _meeting$meetingInfo2, _meeting$meetingInfo3, _meeting$meetingInfo6, _meeting$meetingInfo8;\n var meeting = options.meeting,\n mediaConnections = options.mediaConnections,\n correlationId = options.correlationId,\n webexConferenceIdStr = options.webexConferenceIdStr,\n globalMeetingId = options.globalMeetingId,\n preLoginId = options.preLoginId,\n sessionCorrelationId = options.sessionCorrelationId;\n var identifiers = {\n correlationId: 'unknown' // concerned with setting this to unknown. This will fail diagnostic events parsing because it's not a uuid pattern\n };\n\n if (meeting) {\n identifiers.correlationId = meeting.correlationId;\n if (meeting.sessionCorrelationId) {\n identifiers.sessionCorrelationId = meeting.sessionCorrelationId;\n }\n }\n if (sessionCorrelationId) {\n identifiers.sessionCorrelationId = sessionCorrelationId;\n }\n if (sessionCorrelationId) {\n identifiers.sessionCorrelationId = sessionCorrelationId;\n }\n if (correlationId) {\n identifiers.correlationId = correlationId;\n }\n\n // TODO: should we use patterns.uuid to validate correlationId and session correlation id? they will fail the diagnostic events validation pipeline if improperly formatted\n\n if (this.device) {\n var device = this.device;\n var _ref2 = (device === null || device === void 0 ? void 0 : device.config) || {},\n installationId = _ref2.installationId;\n identifiers.userId = (device === null || device === void 0 ? void 0 : device.userId) || preLoginId;\n identifiers.deviceId = device === null || device === void 0 ? void 0 : device.url;\n identifiers.orgId = device === null || device === void 0 ? void 0 : device.orgId;\n // @ts-ignore\n identifiers.locusUrl = this.webex.internal.services.get('locus');\n if (installationId) {\n identifiers.machineId = installationId;\n }\n }\n if (meeting !== null && meeting !== void 0 && (_meeting$locusInfo = meeting.locusInfo) !== null && _meeting$locusInfo !== void 0 && _meeting$locusInfo.fullState) {\n identifiers.locusUrl = meeting.locusUrl;\n identifiers.locusId = meeting.locusUrl && meeting.locusUrl.split('/').pop();\n identifiers.locusStartTime = meeting.locusInfo.fullState && meeting.locusInfo.fullState.lastActive;\n }\n if (meeting !== null && meeting !== void 0 && (_meeting$meetingInfo2 = meeting.meetingInfo) !== null && _meeting$meetingInfo2 !== void 0 && _meeting$meetingInfo2.confIdStr || meeting !== null && meeting !== void 0 && (_meeting$meetingInfo3 = meeting.meetingInfo) !== null && _meeting$meetingInfo3 !== void 0 && _meeting$meetingInfo3.confID) {\n var _meeting$meetingInfo4, _meeting$meetingInfo5;\n identifiers.webexConferenceIdStr = \"\".concat(((_meeting$meetingInfo4 = meeting.meetingInfo) === null || _meeting$meetingInfo4 === void 0 ? void 0 : _meeting$meetingInfo4.confIdStr) || ((_meeting$meetingInfo5 = meeting.meetingInfo) === null || _meeting$meetingInfo5 === void 0 ? void 0 : _meeting$meetingInfo5.confID));\n }\n if (meeting !== null && meeting !== void 0 && (_meeting$meetingInfo6 = meeting.meetingInfo) !== null && _meeting$meetingInfo6 !== void 0 && _meeting$meetingInfo6.meetingId) {\n var _meeting$meetingInfo7;\n identifiers.globalMeetingId = (_meeting$meetingInfo7 = meeting.meetingInfo) === null || _meeting$meetingInfo7 === void 0 ? void 0 : _meeting$meetingInfo7.meetingId;\n }\n if (meeting !== null && meeting !== void 0 && (_meeting$meetingInfo8 = meeting.meetingInfo) !== null && _meeting$meetingInfo8 !== void 0 && _meeting$meetingInfo8.siteName) {\n var _meeting$meetingInfo9;\n identifiers.webexSiteName = (_meeting$meetingInfo9 = meeting.meetingInfo) === null || _meeting$meetingInfo9 === void 0 ? void 0 : _meeting$meetingInfo9.siteName;\n }\n if (mediaConnections) {\n var _mediaConnections$, _mediaConnections$2;\n identifiers.mediaAgentAlias = mediaConnections === null || mediaConnections === void 0 ? void 0 : (_mediaConnections$ = mediaConnections[0]) === null || _mediaConnections$ === void 0 ? void 0 : _mediaConnections$.mediaAgentAlias;\n identifiers.mediaAgentGroupId = mediaConnections === null || mediaConnections === void 0 ? void 0 : (_mediaConnections$2 = mediaConnections[0]) === null || _mediaConnections$2 === void 0 ? void 0 : _mediaConnections$2.mediaAgentGroupId;\n }\n if (!(identifiers !== null && identifiers !== void 0 && identifiers.webexConferenceIdStr) && webexConferenceIdStr) {\n identifiers.webexConferenceIdStr = \"\".concat(webexConferenceIdStr);\n }\n if (!(identifiers !== null && identifiers !== void 0 && identifiers.globalMeetingId) && globalMeetingId) {\n identifiers.globalMeetingId = globalMeetingId;\n }\n if (identifiers.correlationId === undefined) {\n throw new Error('Identifiers initialization failed.');\n }\n return identifiers;\n }\n\n /**\n * Create diagnostic event, which can hold client event, feature event or MQE event data.\n * This just initiates the shared properties that are required for all the 3 event categories.\n * @param eventData\n * @param options\n * @returns\n */\n }, {\n key: \"prepareDiagnosticEvent\",\n value: function prepareDiagnosticEvent(eventData, options) {\n var _this$webex$meetings$12;\n var meetingId = options.meetingId;\n var origin = this.getOrigin(options, meetingId);\n var event = {\n eventId: _uuid.default.v4(),\n version: 1,\n origin: origin,\n originTime: {\n triggered: new Date().toISOString(),\n // is overridden in prepareRequest batcher\n sent: 'not_defined_yet'\n },\n // @ts-ignore\n senderCountryCode: (_this$webex$meetings$12 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$12 === void 0 ? void 0 : _this$webex$meetings$12.countryCode,\n event: eventData\n };\n\n // sanitize (remove empty properties, CA requires it)\n // but we don't want to sanitize MQE as most of the times\n // values will be 0, [] etc, and they are required.\n if (eventData.name !== 'client.mediaquality.event') {\n (0, _callDiagnosticMetrics.clearEmptyKeysRecursively)(event);\n }\n return event;\n }\n\n /**\n * TODO: NOT IMPLEMENTED\n * Submit Feature Event\n * @returns\n */\n }, {\n key: \"submitFeatureEvent\",\n value: function submitFeatureEvent() {\n throw Error('Not implemented');\n }\n\n /**\n * Submit Media Quality Event\n * @param args - submit params\n * @param arg.name - event key\n * @param arg.payload - additional payload to be merge with the default payload\n * @param arg.options - options\n */\n }, {\n key: \"submitMQE\",\n value: function submitMQE(_ref3) {\n var name = _ref3.name,\n payload = _ref3.payload,\n options = _ref3.options;\n var meetingId = options.meetingId,\n mediaConnections = options.mediaConnections,\n webexConferenceIdStr = options.webexConferenceIdStr,\n globalMeetingId = options.globalMeetingId;\n\n // events that will most likely happen in join phase\n if (meetingId) {\n // @ts-ignore\n var meeting = this.webex.meetings.getBasicMeetingInformation(meetingId);\n if (!meeting) {\n console.warn('Attempt to send MQE but no meeting was found...', \"event: \".concat(name, \", meetingId: \").concat(meetingId));\n // @ts-ignore\n this.webex.internal.metrics.submitClientMetrics(_config2.CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND, {\n fields: {\n meetingId: meetingId,\n name: name\n }\n });\n return;\n }\n\n // merge identifiers\n var identifiers = this.getIdentifiers({\n meeting: meeting,\n mediaConnections: meeting.mediaConnections || mediaConnections,\n webexConferenceIdStr: webexConferenceIdStr,\n globalMeetingId: globalMeetingId\n });\n\n // create media quality event object\n var clientEventObject = {\n name: name,\n canProceed: true,\n identifiers: identifiers,\n eventData: {\n webClientDomain: window.location.hostname\n },\n intervals: payload.intervals,\n callingServiceType: 'LOCUS',\n meetingJoinInfo: {\n clientSignallingProtocol: 'WebRTC'\n },\n sourceMetadata: {\n applicationSoftwareType: _config.CLIENT_NAME,\n // @ts-ignore\n applicationSoftwareVersion: this.webex.version,\n mediaEngineSoftwareType: getBrowserName() || 'browser',\n mediaEngineSoftwareVersion: getOSVersion() || 'unknown',\n startTime: new Date().toISOString()\n }\n };\n\n // merge any new properties, or override existing ones\n clientEventObject = (0, _lodash.merge)(clientEventObject, payload);\n\n // append media quality event data to the call diagnostic event\n var diagnosticEvent = this.prepareDiagnosticEvent(clientEventObject, options);\n this.validator({\n type: 'mqe',\n event: diagnosticEvent\n });\n this.submitToCallDiagnostics(diagnosticEvent);\n } else {\n throw new Error('Media quality events cant be sent outside the context of a meeting. Meeting id is required.');\n }\n }\n\n /**\n * Return Client Event payload by client error code\n * @param arg - get error arg\n * @param arg.clientErrorCode\n * @param arg.serviceErrorCode\n * @param arg.payloadOverrides\n * @param arg.httpStatusCode\n * @returns\n */\n }, {\n key: \"getErrorPayloadForClientErrorCode\",\n value: function getErrorPayloadForClientErrorCode(_ref4) {\n var clientErrorCode = _ref4.clientErrorCode,\n serviceErrorCode = _ref4.serviceErrorCode,\n serviceErrorName = _ref4.serviceErrorName,\n rawErrorMessage = _ref4.rawErrorMessage,\n payloadOverrides = _ref4.payloadOverrides,\n httpStatusCode = _ref4.httpStatusCode;\n var error;\n if (clientErrorCode) {\n var partialParsedError = _config2.CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD[clientErrorCode];\n if (partialParsedError) {\n error = (0, _lodash.merge)({\n fatal: true,\n shownToUser: false,\n name: 'other',\n category: 'other'\n },\n // default values\n {\n errorCode: clientErrorCode\n }, serviceErrorName ? {\n errorData: {\n errorName: serviceErrorName\n }\n } : {}, {\n serviceErrorCode: serviceErrorCode\n }, {\n rawErrorMessage: rawErrorMessage\n }, httpStatusCode === undefined ? {} : {\n httpStatusCode: httpStatusCode\n }, partialParsedError, payloadOverrides || {});\n return error;\n }\n }\n return undefined;\n }\n\n /**\n * Generate error payload for Client Event\n * @param rawError\n */\n }, {\n key: \"generateClientEventErrorPayload\",\n value: function generateClientEventErrorPayload(rawError) {\n var _rawError$error, _rawError$error$body, _rawError$body, _rawError$body2, _rawError$body3, _rawError$body3$reaso;\n var rawErrorMessage = rawError.message;\n var httpStatusCode = rawError.statusCode;\n if (rawError.name) {\n if ((0, _callDiagnosticMetrics.isBrowserMediaErrorName)(rawError.name)) {\n return this.getErrorPayloadForClientErrorCode({\n serviceErrorCode: undefined,\n clientErrorCode: _config2.BROWSER_MEDIA_ERROR_NAME_TO_CLIENT_ERROR_CODES_MAP[rawError.name],\n serviceErrorName: rawError.name,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n }\n if ((0, _callDiagnosticMetrics.isSdpOfferCreationError)(rawError)) {\n var _rawError$cause;\n // error code is 30005, but that's not specific enough. we also need to check error.cause.type\n var causeType = (_rawError$cause = rawError.cause) === null || _rawError$cause === void 0 ? void 0 : _rawError$cause.type;\n return this.getErrorPayloadForClientErrorCode({\n serviceErrorCode: undefined,\n clientErrorCode: _config2.SDP_OFFER_CREATION_ERROR_MAP[causeType] || _config2.SDP_OFFER_CREATION_ERROR_MAP.GENERAL,\n serviceErrorName: rawError.name,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n var serviceErrorCode = (rawError === null || rawError === void 0 ? void 0 : (_rawError$error = rawError.error) === null || _rawError$error === void 0 ? void 0 : (_rawError$error$body = _rawError$error.body) === null || _rawError$error$body === void 0 ? void 0 : _rawError$error$body.errorCode) || (rawError === null || rawError === void 0 ? void 0 : (_rawError$body = rawError.body) === null || _rawError$body === void 0 ? void 0 : _rawError$body.errorCode) || (rawError === null || rawError === void 0 ? void 0 : (_rawError$body2 = rawError.body) === null || _rawError$body2 === void 0 ? void 0 : _rawError$body2.code) || (rawError === null || rawError === void 0 ? void 0 : (_rawError$body3 = rawError.body) === null || _rawError$body3 === void 0 ? void 0 : (_rawError$body3$reaso = _rawError$body3.reason) === null || _rawError$body3$reaso === void 0 ? void 0 : _rawError$body3$reaso.reasonCode);\n if (serviceErrorCode) {\n var clientErrorCode = _config2.SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP[serviceErrorCode];\n if (clientErrorCode) {\n return this.getErrorPayloadForClientErrorCode({\n clientErrorCode: clientErrorCode,\n serviceErrorCode: serviceErrorCode,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n\n // by default, if it is locus error, return new locus err\n if ((0, _callDiagnosticMetrics.isLocusServiceErrorCode)(serviceErrorCode)) {\n return this.getErrorPayloadForClientErrorCode({\n clientErrorCode: _config2.NEW_LOCUS_ERROR_CLIENT_CODE,\n serviceErrorCode: serviceErrorCode,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n }\n if ((0, _callDiagnosticMetrics.isMeetingInfoServiceError)(rawError)) {\n return this.getErrorPayloadForClientErrorCode({\n clientErrorCode: _config2.MEETING_INFO_LOOKUP_ERROR_CLIENT_CODE,\n serviceErrorCode: serviceErrorCode,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n if ((0, _callDiagnosticMetrics.isNetworkError)(rawError)) {\n return this.getErrorPayloadForClientErrorCode({\n clientErrorCode: _config2.NETWORK_ERROR,\n serviceErrorCode: serviceErrorCode,\n payloadOverrides: rawError.payloadOverrides,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n if ((0, _callDiagnosticMetrics.isUnauthorizedError)(rawError)) {\n return this.getErrorPayloadForClientErrorCode({\n clientErrorCode: _config2.AUTHENTICATION_FAILED_CODE,\n serviceErrorCode: serviceErrorCode,\n payloadOverrides: rawError.payloadOverrides,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n\n // otherwise return unkown error but passing serviceErrorCode and serviceErrorName so that we know the issue\n return this.getErrorPayloadForClientErrorCode({\n clientErrorCode: _config2.UNKNOWN_ERROR,\n serviceErrorCode: serviceErrorCode || _config2.UNKNOWN_ERROR,\n serviceErrorName: rawError === null || rawError === void 0 ? void 0 : rawError.name,\n payloadOverrides: rawError.payloadOverrides,\n rawErrorMessage: rawErrorMessage,\n httpStatusCode: httpStatusCode\n });\n }\n\n /**\n * Create client event object for in meeting events\n * @param arg - create args\n * @param arg.event - event key\n * @param arg.options - options\n * @returns object\n */\n }, {\n key: \"createClientEventObjectInMeeting\",\n value: function createClientEventObjectInMeeting(_ref5) {\n var _options$joinFlowVers, _meeting$callStateFor;\n var name = _ref5.name,\n options = _ref5.options,\n errors = _ref5.errors;\n var meetingId = options.meetingId,\n mediaConnections = options.mediaConnections,\n globalMeetingId = options.globalMeetingId,\n webexConferenceIdStr = options.webexConferenceIdStr,\n sessionCorrelationId = options.sessionCorrelationId;\n\n // @ts-ignore\n var meeting = this.webex.meetings.getBasicMeetingInformation(meetingId);\n if (!meeting) {\n console.warn('Attempt to send client event but no meeting was found...', \"name: \".concat(name, \", meetingId: \").concat(meetingId));\n // @ts-ignore\n this.webex.internal.metrics.submitClientMetrics(_config2.CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND, {\n fields: {\n meetingId: meetingId,\n name: name\n }\n });\n return undefined;\n }\n\n // grab identifiers\n var identifiers = this.getIdentifiers({\n meeting: meeting,\n mediaConnections: (meeting === null || meeting === void 0 ? void 0 : meeting.mediaConnections) || mediaConnections,\n webexConferenceIdStr: webexConferenceIdStr,\n globalMeetingId: globalMeetingId,\n sessionCorrelationId: sessionCorrelationId\n });\n\n // create client event object\n var clientEventObject = {\n name: name,\n canProceed: true,\n identifiers: identifiers,\n errors: errors,\n eventData: {\n webClientDomain: window.location.hostname\n },\n userType: meeting.getCurUserType(),\n loginType: 'loginType' in meeting.callStateForMetrics ? meeting.callStateForMetrics.loginType : this.getCurLoginType(),\n isConvergedArchitectureEnabled: this.getIsConvergedArchitectureEnabled({\n meetingId: meetingId\n }),\n webexSubServiceType: this.getSubServiceType(meeting)\n };\n var joinFlowVersion = (_options$joinFlowVers = options.joinFlowVersion) !== null && _options$joinFlowVers !== void 0 ? _options$joinFlowVers : (_meeting$callStateFor = meeting.callStateForMetrics) === null || _meeting$callStateFor === void 0 ? void 0 : _meeting$callStateFor.joinFlowVersion;\n if (joinFlowVersion) {\n clientEventObject.joinFlowVersion = joinFlowVersion;\n }\n return clientEventObject;\n }\n\n /**\n * Create client event object for pre meeting events\n * @param arg - create args\n * @param arg.event - event key\n * @param arg.options - payload\n * @returns object\n */\n }, {\n key: \"createClientEventObjectPreMeeting\",\n value: function createClientEventObjectPreMeeting(_ref6) {\n var name = _ref6.name,\n options = _ref6.options,\n errors = _ref6.errors;\n var correlationId = options.correlationId,\n globalMeetingId = options.globalMeetingId,\n webexConferenceIdStr = options.webexConferenceIdStr,\n preLoginId = options.preLoginId,\n sessionCorrelationId = options.sessionCorrelationId;\n\n // grab identifiers\n var identifiers = this.getIdentifiers({\n correlationId: correlationId,\n sessionCorrelationId: sessionCorrelationId,\n preLoginId: preLoginId,\n globalMeetingId: globalMeetingId,\n webexConferenceIdStr: webexConferenceIdStr\n });\n\n // create client event object\n var clientEventObject = {\n name: name,\n errors: errors,\n canProceed: true,\n identifiers: identifiers,\n eventData: {\n webClientDomain: window.location.hostname\n },\n loginType: this.getCurLoginType()\n };\n if (options.joinFlowVersion) {\n clientEventObject.joinFlowVersion = options.joinFlowVersion;\n }\n return clientEventObject;\n }\n\n /**\n * Prepare Client Event CA event.\n * @param arg - submit params\n * @param arg.event - event key\n * @param arg.payload - additional payload to be merged with default payload\n * @param arg.options - payload\n * @returns {any} options to be with fetch\n * @throws\n */\n }, {\n key: \"prepareClientEvent\",\n value: function prepareClientEvent(_ref7) {\n var name = _ref7.name,\n payload = _ref7.payload,\n options = _ref7.options;\n var meetingId = options.meetingId,\n correlationId = options.correlationId,\n rawError = options.rawError;\n var clientEventObject;\n\n // check if we need to generate errors\n var errors = [];\n if (rawError) {\n var generatedError = this.generateClientEventErrorPayload(rawError);\n if (generatedError) {\n errors.push(generatedError);\n }\n this.logger.log(_config2.CALL_DIAGNOSTIC_LOG_IDENTIFIER, 'CallDiagnosticMetrics: @prepareClientEvent. Generated errors:', \"generatedError: \".concat((0, _stringify.default)(generatedError)));\n }\n\n // events that will most likely happen in join phase\n if (meetingId) {\n clientEventObject = this.createClientEventObjectInMeeting({\n name: name,\n options: options,\n errors: errors\n });\n } else if (correlationId) {\n // any pre join events or events that are outside the meeting.\n clientEventObject = this.createClientEventObjectPreMeeting({\n name: name,\n options: options,\n errors: errors\n });\n } else {\n throw new Error('Not implemented');\n }\n\n // merge any new properties, or override existing ones\n clientEventObject = (0, _lodash.merge)(clientEventObject, payload);\n\n // append client event data to the call diagnostic event\n var diagnosticEvent = this.prepareDiagnosticEvent(clientEventObject, options);\n return diagnosticEvent;\n }\n\n /**\n * Submit Client Event CA event.\n * @param arg - submit params\n * @param arg.event - event key\n * @param arg.payload - additional payload to be merged with default payload\n * @param arg.options - payload\n * @throws\n */\n }, {\n key: \"submitClientEvent\",\n value: function submitClientEvent(_ref8) {\n var name = _ref8.name,\n payload = _ref8.payload,\n options = _ref8.options;\n this.logger.log(_config2.CALL_DIAGNOSTIC_LOG_IDENTIFIER, 'CallDiagnosticMetrics: @submitClientEvent. Submit Client Event CA event.', \"name: \".concat(name));\n var diagnosticEvent = this.prepareClientEvent({\n name: name,\n payload: payload,\n options: options\n });\n if (options !== null && options !== void 0 && options.preLoginId) {\n return this.submitToCallDiagnosticsPreLogin(diagnosticEvent, options === null || options === void 0 ? void 0 : options.preLoginId);\n }\n this.validator({\n type: 'ce',\n event: diagnosticEvent\n });\n return this.submitToCallDiagnostics(diagnosticEvent);\n }\n\n /**\n * Prepare the event and send the request to metrics-a service.\n * @param event\n * @returns promise\n */\n }, {\n key: \"submitToCallDiagnostics\",\n value: function submitToCallDiagnostics(event) {\n // build metrics-a event type\n var finalEvent = {\n eventPayload: event,\n type: ['diagnostic-event']\n };\n return this.callDiagnosticEventsBatcher.request(finalEvent);\n }\n }, {\n key: \"buildClientEventFetchRequestOptions\",\n value: (\n /**\n * Builds a request options object to later be passed to fetch().\n * @param arg - submit params\n * @param arg.event - event key\n * @param arg.payload - additional payload to be merged with default payload\n * @param arg.options - client event options\n * @returns {Promise}\n * @throws\n */\n function () {\n var _buildClientEventFetchRequestOptions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref9) {\n var name, payload, options, clientEvent, diagnosticEvent, request;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n name = _ref9.name, payload = _ref9.payload, options = _ref9.options;\n this.logger.log(_config2.CALL_DIAGNOSTIC_LOG_IDENTIFIER, 'CallDiagnosticMetrics: @buildClientEventFetchRequestOptions. Building request options object for fetch()...', \"name: \".concat(name));\n clientEvent = this.prepareClientEvent({\n name: name,\n payload: payload,\n options: options\n }); // build metrics-a event type\n // @ts-ignore\n diagnosticEvent = (0, _callDiagnosticMetrics.prepareDiagnosticMetricItem)(this.webex, {\n eventPayload: clientEvent,\n type: ['diagnostic-event']\n });\n request = {\n method: 'POST',\n service: 'metrics',\n resource: 'clientmetrics',\n body: {\n metrics: [diagnosticEvent]\n },\n headers: {},\n // @ts-ignore\n waitForServiceTimeout: this.webex.internal.metrics.config.waitForServiceTimeout\n };\n if (options.preLoginId) {\n request.headers = {\n authorization: false,\n 'x-prelogin-userid': options.preLoginId\n };\n request.resource = 'clientmetrics-prelogin';\n }\n\n // @ts-ignore\n return _context.abrupt(\"return\", this.webex.prepareFetchOptions(request));\n case 7:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function buildClientEventFetchRequestOptions(_x) {\n return _buildClientEventFetchRequestOptions.apply(this, arguments);\n }\n return buildClientEventFetchRequestOptions;\n }()\n /**\n * Returns true if the specified serviceErrorCode maps to an expected error.\n * @param {number} serviceErrorCode the service error code\n * @returns {boolean}\n */\n )\n }, {\n key: \"isServiceErrorExpected\",\n value: function isServiceErrorExpected(serviceErrorCode) {\n var clientErrorCode = _config2.SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP[serviceErrorCode];\n var clientErrorPayload = _config2.CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD[clientErrorCode];\n return (clientErrorPayload === null || clientErrorPayload === void 0 ? void 0 : clientErrorPayload.category) === 'expected';\n }\n\n /**\n * This method is used to set the device information by internal-plugin-device\n * @param {device} object The webex.internal.device object\n * @returns {undefined}\n */\n }, {\n key: \"setDeviceInfo\",\n value: function setDeviceInfo(device) {\n // This was created to fix the circular dependency between internal-plugin-device and internal-plugin-metrics\n this.logger.log('CallDiagnosticMetrics: @setDeviceInfo called', device);\n this.device = device;\n }\n }]);\n return CallDiagnosticMetrics;\n}(_webexCore.StatelessWebexPlugin);\n//# sourceMappingURL=call-diagnostic-metrics.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.userAgentToString = exports.setMetricTimings = exports.prepareDiagnosticMetricItem = exports.isUnauthorizedError = exports.isSdpOfferCreationError = exports.isNetworkError = exports.isMeetingInfoServiceError = exports.isLocusServiceErrorCode = exports.isBrowserMediaErrorName = exports.getBuildType = exports.generateClientErrorCodeForIceFailure = exports.extractVersionMetadata = exports.clearEmptyKeysRecursively = exports.anonymizeIPAddress = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/toConsumableArray\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _isArray = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/is-array\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _parseInt2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/parse-int\"));\nvar _ipAnonymize = _interopRequireDefault(require(\"ip-anonymize\"));\nvar _util = _interopRequireDefault(require(\"util\"));\nvar _common = require(\"@webex/common\");\nvar _webexCore = require(\"@webex/webex-core\");\nvar _lodash = require(\"lodash\");\nvar _config = require(\"./config\");\n/* eslint-disable valid-jsdoc */\n\nvar _BrowserDetection = (0, _common.BrowserDetection)(),\n getOSName = _BrowserDetection.getOSName,\n getOSVersion = _BrowserDetection.getOSVersion,\n getBrowserName = _BrowserDetection.getBrowserName,\n getBrowserVersion = _BrowserDetection.getBrowserVersion;\nvar anonymizeIPAddress = exports.anonymizeIPAddress = function anonymizeIPAddress(localIp) {\n return (0, _ipAnonymize.default)(localIp, 28, 96);\n};\n\n/**\n * Returns a formated string of the user agent.\n *\n * @returns {string} formatted user agent information\n */\nvar userAgentToString = exports.userAgentToString = function userAgentToString(_ref) {\n var clientName = _ref.clientName,\n webexVersion = _ref.webexVersion;\n var userAgentOption;\n var browserInfo;\n var clientInfo = _util.default.format('client=%s', \"\".concat(clientName));\n if (['chrome', 'firefox', 'msie', 'msedge', 'safari'].indexOf(getBrowserName().toLowerCase()) !== -1) {\n browserInfo = _util.default.format('browser=%s', \"\".concat(getBrowserName().toLowerCase(), \"/\").concat(getBrowserVersion().split('.')[0]));\n }\n var osInfo = _util.default.format('os=%s', \"\".concat(getOSName(), \"/\").concat(getOSVersion().split('.')[0]));\n if (browserInfo) {\n userAgentOption = \"(\".concat(browserInfo);\n }\n if (osInfo) {\n userAgentOption = userAgentOption ? \"\".concat(userAgentOption, \"; \").concat(clientInfo, \"; \").concat(osInfo) : \"\".concat(clientInfo, \"; (\").concat(osInfo);\n }\n if (userAgentOption) {\n userAgentOption += ')';\n return _util.default.format('webex-js-sdk/%s %s', \"\".concat(process.env.NODE_ENV, \"-\").concat(webexVersion), userAgentOption);\n }\n return _util.default.format('webex-js-sdk/%s', \"\".concat(process.env.NODE_ENV, \"-\").concat(webexVersion));\n};\n\n/**\n * Iterates object recursively and removes any\n * property that returns isEmpty for it's associated value\n * isEmpty = implementation from Lodash.\n *\n * It modifies the object in place (mutable)\n *\n * @param obj - input\n * @returns\n */\nvar clearEmptyKeysRecursively = exports.clearEmptyKeysRecursively = function clearEmptyKeysRecursively(obj) {\n // Check if the object is empty\n if ((0, _keys.default)(obj).length === 0) {\n return;\n }\n (0, _keys.default)(obj).forEach(function (key) {\n if (((0, _typeof2.default)(obj[key]) === 'object' || typeof obj[key] === 'string' || (0, _isArray.default)(obj[key])) && (0, _lodash.isEmpty)(obj[key])) {\n delete obj[key];\n }\n if ((0, _isArray.default)(obj[key])) {\n obj[key] = (0, _toConsumableArray2.default)(obj[key].filter(function (x) {\n return !!x;\n }));\n }\n if ((0, _typeof2.default)(obj[key]) === 'object') {\n clearEmptyKeysRecursively(obj[key]);\n }\n });\n};\n\n/**\n * Locus error codes start with 2. The next three digits are the\n * HTTP status code related to the error code (like 400, 403, 502, etc.)\n * The remaining three digits are just an increasing integer.\n * If it is 7 digits and starts with a 2, it is locus.\n *\n * @param errorCode\n * @returns {boolean}\n */\nvar isLocusServiceErrorCode = exports.isLocusServiceErrorCode = function isLocusServiceErrorCode(errorCode) {\n var code = \"\".concat(errorCode);\n if (code.length === 7 && code.charAt(0) === '2') {\n return true;\n }\n return false;\n};\n\n/**\n * MeetingInfo errors sometimes has body.data.meetingInfo object\n * MeetingInfo errors come with a wbxappapi url\n *\n * @param {Object} rawError\n * @returns {boolean}\n */\nvar isMeetingInfoServiceError = exports.isMeetingInfoServiceError = function isMeetingInfoServiceError(rawError) {\n var _rawError$body, _rawError$body$data, _rawError$body2, _rawError$body2$url;\n if ((_rawError$body = rawError.body) !== null && _rawError$body !== void 0 && (_rawError$body$data = _rawError$body.data) !== null && _rawError$body$data !== void 0 && _rawError$body$data.meetingInfo || (_rawError$body2 = rawError.body) !== null && _rawError$body2 !== void 0 && (_rawError$body2$url = _rawError$body2.url) !== null && _rawError$body2$url !== void 0 && _rawError$body2$url.includes(_config.WBX_APP_API_URL)) {\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if the raw error is a network related error\n *\n * @param {Object} rawError\n * @returns {boolean}\n */\nvar isNetworkError = exports.isNetworkError = function isNetworkError(rawError) {\n if (rawError instanceof _webexCore.WebexHttpError.NetworkOrCORSError) {\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if the error is an unauthorized error\n *\n * @param {Object} rawError\n * @returns {boolean}\n */\nvar isUnauthorizedError = exports.isUnauthorizedError = function isUnauthorizedError(rawError) {\n if (rawError instanceof _webexCore.WebexHttpError.Unauthorized) {\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if the error is an SdpOfferCreation error\n *\n * @param {Object} rawError\n * @returns {boolean}\n */\nvar isSdpOfferCreationError = exports.isSdpOfferCreationError = function isSdpOfferCreationError(rawError) {\n // would LIKE to do rawError instanceof Errors.SdpOfferCreationError\n // but including internal-media-core in plugin-metrics breaks meetings and metrics unit tests\n if (rawError.name === _config.ERROR_DESCRIPTIONS.SDP_OFFER_CREATION_ERROR) {\n return true;\n }\n return false;\n};\n\n/**\n * MDN Media Devices getUserMedia() method returns a name if it errs\n * Documentation can be found here: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\n *\n * @param errorCode\n * @returns\n */\nvar isBrowserMediaErrorName = exports.isBrowserMediaErrorName = function isBrowserMediaErrorName(errorName) {\n if (_config.BROWSER_MEDIA_ERROR_NAME_TO_CLIENT_ERROR_CODES_MAP[errorName]) {\n return true;\n }\n return false;\n};\n\n/**\n * @param {Object} webex sdk instance\n * @param webClientDomain\n * @returns\n */\nvar getBuildType = exports.getBuildType = function getBuildType(webex, webClientDomain) {\n var _webex$internal$metri, _webex$internal$metri2;\n var markAsTestEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // used temporary to test pre join in production without creating noise data, SPARK-468456\n if (markAsTestEvent) {\n return 'test';\n }\n if ((_webex$internal$metri = webex.internal.metrics) !== null && _webex$internal$metri !== void 0 && (_webex$internal$metri2 = _webex$internal$metri.config) !== null && _webex$internal$metri2 !== void 0 && _webex$internal$metri2.caBuildType) {\n return webex.internal.metrics.config.caBuildType;\n }\n if (webClientDomain !== null && webClientDomain !== void 0 && webClientDomain.includes('localhost') || webClientDomain !== null && webClientDomain !== void 0 && webClientDomain.includes('127.0.0.1') || process.env.NODE_ENV !== 'production') {\n return 'test';\n }\n return 'prod';\n};\n\n/**\n * Prepare metric item for submission.\n * @param {Object} webex sdk instance\n * @param {Object} item\n * @returns {Object} prepared item\n */\nvar prepareDiagnosticMetricItem = exports.prepareDiagnosticMetricItem = function prepareDiagnosticMetricItem(webex, item) {\n var _item$eventPayload, _item$eventPayload$ev, _item$eventPayload$ev2, _item$eventPayload2, _item$eventPayload2$e, _item$eventPayload2$e2, _item$eventPayload3, _item$eventPayload3$e;\n var buildType = getBuildType(webex, (_item$eventPayload = item.eventPayload) === null || _item$eventPayload === void 0 ? void 0 : (_item$eventPayload$ev = _item$eventPayload.event) === null || _item$eventPayload$ev === void 0 ? void 0 : (_item$eventPayload$ev2 = _item$eventPayload$ev.eventData) === null || _item$eventPayload$ev2 === void 0 ? void 0 : _item$eventPayload$ev2.webClientDomain, (_item$eventPayload2 = item.eventPayload) === null || _item$eventPayload2 === void 0 ? void 0 : (_item$eventPayload2$e = _item$eventPayload2.event) === null || _item$eventPayload2$e === void 0 ? void 0 : (_item$eventPayload2$e2 = _item$eventPayload2$e.eventData) === null || _item$eventPayload2$e2 === void 0 ? void 0 : _item$eventPayload2$e2.markAsTestEvent);\n\n // Set upgradeChannel to 'gold' if buildType is 'prod', otherwise to the buildType value\n var upgradeChannel = buildType === 'prod' ? 'gold' : buildType;\n var origin = {\n buildType: buildType,\n networkType: 'unknown',\n upgradeChannel: upgradeChannel\n };\n\n // check event names and append latencies?\n var eventName = (_item$eventPayload3 = item.eventPayload) === null || _item$eventPayload3 === void 0 ? void 0 : (_item$eventPayload3$e = _item$eventPayload3.event) === null || _item$eventPayload3$e === void 0 ? void 0 : _item$eventPayload3$e.name;\n var joinTimes = {};\n var audioSetupDelay = {};\n var videoSetupDelay = {};\n var cdl = webex.internal.newMetrics.callDiagnosticLatencies;\n switch (eventName) {\n case 'client.webexapp.launched':\n joinTimes.downloadTime = cdl.getDownloadTimeJMT();\n break;\n case 'client.login.end':\n joinTimes.otherAppApiReqResp = cdl.getOtherAppApiReqResp();\n joinTimes.exchangeCITokenJMT = cdl.getExchangeCITokenJMT();\n break;\n case 'client.interstitial-window.launched':\n joinTimes.meetingInfoReqResp = cdl.getMeetingInfoReqResp();\n joinTimes.clickToInterstitial = cdl.getClickToInterstitial();\n joinTimes.refreshCaptchaServiceReqResp = cdl.getRefreshCaptchaReqResp();\n joinTimes.downloadIntelligenceModelsReqResp = cdl.getDownloadIntelligenceModelsReqResp();\n break;\n case 'client.call.initiated':\n joinTimes.meetingInfoReqResp = cdl.getMeetingInfoReqResp();\n joinTimes.showInterstitialTime = cdl.getShowInterstitialTime();\n joinTimes.registerWDMDeviceJMT = cdl.getRegisterWDMDeviceJMT();\n joinTimes.getU2CTime = cdl.getU2CTime();\n joinTimes.getReachabilityClustersReqResp = cdl.getReachabilityClustersReqResp();\n break;\n case 'client.locus.join.response':\n joinTimes.meetingInfoReqResp = cdl.getMeetingInfoReqResp();\n joinTimes.callInitJoinReq = cdl.getCallInitJoinReq();\n joinTimes.joinReqResp = cdl.getJoinReqResp();\n joinTimes.pageJmt = cdl.getPageJMT();\n joinTimes.clickToInterstitial = cdl.getClickToInterstitial();\n joinTimes.interstitialToJoinOK = cdl.getInterstitialToJoinOK();\n joinTimes.totalJmt = cdl.getTotalJMT();\n joinTimes.clientJmt = cdl.getClientJMT();\n joinTimes.downloadTime = cdl.getDownloadTimeJMT();\n break;\n case 'client.ice.end':\n joinTimes.ICESetupTime = cdl.getICESetupTime();\n joinTimes.audioICESetupTime = cdl.getAudioICESetupTime();\n joinTimes.videoICESetupTime = cdl.getVideoICESetupTime();\n joinTimes.shareICESetupTime = cdl.getShareICESetupTime();\n break;\n case 'client.media.rx.start':\n joinTimes.localSDPGenRemoteSDPRecv = cdl.getLocalSDPGenRemoteSDPRecv();\n audioSetupDelay.joinRespRxStart = cdl.getAudioJoinRespRxStart();\n videoSetupDelay.joinRespRxStart = cdl.getVideoJoinRespRxStart();\n break;\n case 'client.media-engine.ready':\n joinTimes.totalMediaJMT = cdl.getTotalMediaJMT();\n joinTimes.interstitialToMediaOKJMT = cdl.getInterstitialToMediaOKJMT();\n joinTimes.callInitMediaEngineReady = cdl.getCallInitMediaEngineReady();\n joinTimes.stayLobbyTime = cdl.getStayLobbyTime();\n break;\n case 'client.media.tx.start':\n audioSetupDelay.joinRespTxStart = cdl.getAudioJoinRespTxStart();\n videoSetupDelay.joinRespTxStart = cdl.getVideoJoinRespTxStart();\n }\n if (!(0, _lodash.isEmpty)(joinTimes)) {\n item.eventPayload.event = (0, _lodash.merge)(item.eventPayload.event, {\n joinTimes: joinTimes\n });\n }\n if (!(0, _lodash.isEmpty)(audioSetupDelay)) {\n item.eventPayload.event = (0, _lodash.merge)(item.eventPayload.event, {\n audioSetupDelay: audioSetupDelay\n });\n }\n if (!(0, _lodash.isEmpty)(videoSetupDelay)) {\n item.eventPayload.event = (0, _lodash.merge)(item.eventPayload.event, {\n videoSetupDelay: videoSetupDelay\n });\n }\n item.eventPayload.origin = (0, _assign.default)(origin, item.eventPayload.origin);\n webex.logger.log(\"CallDiagnosticLatencies,prepareDiagnosticMetricItem: \".concat((0, _stringify.default)({\n latencies: Object.fromEntries(cdl.latencyTimestamps),\n event: item\n })));\n return item;\n};\n\n/**\n * Sets the originTime value(s) before the request/fetch.\n * This function is only useful if you are about to submit a metrics\n * request using pre-built fetch options;\n *\n * @param {any} options\n * @returns {any} the updated options object\n */\nvar setMetricTimings = exports.setMetricTimings = function setMetricTimings(options) {\n if (options.body && options.json) {\n var _body$metrics;\n var body = JSON.parse(options.body);\n var now = new Date().toISOString();\n (_body$metrics = body.metrics) === null || _body$metrics === void 0 ? void 0 : _body$metrics.forEach(function (metric) {\n if (metric.eventPayload) {\n // The event will effectively be triggered and sent at the same time.\n // The existing triggered time is from when the options were built.\n metric.eventPayload.originTime = {\n triggered: now,\n sent: now\n };\n }\n });\n options.body = (0, _stringify.default)(body);\n }\n return options;\n};\nvar extractVersionMetadata = exports.extractVersionMetadata = function extractVersionMetadata(version) {\n // extract major and minor version\n var _version$split = version.split('.'),\n _version$split2 = (0, _slicedToArray2.default)(_version$split, 2),\n majorVersion = _version$split2[0],\n minorVersion = _version$split2[1];\n return {\n majorVersion: (0, _parseInt2.default)(majorVersion, 10),\n minorVersion: (0, _parseInt2.default)(minorVersion, 10)\n };\n};\n\n/**\n * Generates client error codes for specific ice failures\n * that happen when trying to add media in a meeting.\n */\nvar generateClientErrorCodeForIceFailure = exports.generateClientErrorCodeForIceFailure = function generateClientErrorCodeForIceFailure(_ref2) {\n var signalingState = _ref2.signalingState,\n iceConnected = _ref2.iceConnected,\n turnServerUsed = _ref2.turnServerUsed,\n unreachable = _ref2.unreachable;\n var errorCode = _config.ICE_FAILURE_CLIENT_CODE; // default;\n\n if (signalingState === 'have-local-offer') {\n errorCode = _config.MISSING_ROAP_ANSWER_CLIENT_CODE;\n }\n if (signalingState === 'stable' && iceConnected) {\n errorCode = _config.DTLS_HANDSHAKE_FAILED_CLIENT_CODE;\n }\n if (signalingState !== 'have-local-offer' && !iceConnected) {\n if (turnServerUsed) {\n if (unreachable) {\n errorCode = _config.ICE_AND_REACHABILITY_FAILED_CLIENT_CODE;\n } else {\n errorCode = _config.ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE;\n }\n } else {\n errorCode = _config.ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE;\n }\n }\n return errorCode;\n};\n//# sourceMappingURL=call-diagnostic-metrics.util.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.WEBEX_SUB_SERVICE_TYPES = exports.WBX_APP_API_URL = exports.UNKNOWN_ERROR = exports.SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP = exports.SDP_OFFER_CREATION_ERROR_MAP = exports.NEW_LOCUS_ERROR_CLIENT_CODE = exports.NETWORK_ERROR = exports.MISSING_ROAP_ANSWER_CLIENT_CODE = exports.MEETING_INFO_LOOKUP_ERROR_CLIENT_CODE = exports.ICE_FAILURE_CLIENT_CODE = exports.ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE = exports.ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE = exports.ICE_AND_REACHABILITY_FAILED_CLIENT_CODE = exports.ERROR_DESCRIPTIONS = exports.DTLS_HANDSHAKE_FAILED_CLIENT_CODE = exports.CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD = exports.CALL_DIAGNOSTIC_LOG_IDENTIFIER = exports.CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = exports.BROWSER_MEDIA_ERROR_NAME_TO_CLIENT_ERROR_CODES_MAP = exports.AUTHENTICATION_FAILED_CODE = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _CLIENT_ERROR_CODE_TO;\n/* eslint-disable import/prefer-default-export */\n// Most client error codes are mapped based on\n// https://sqbu-github.cisco.com/WebExSquared/event-dictionary/wiki/Error-codes-for-metric-events\n\nvar CALL_DIAGNOSTIC_LOG_IDENTIFIER = exports.CALL_DIAGNOSTIC_LOG_IDENTIFIER = 'call-diagnostic-events -> ';\nvar AUTHENTICATION_FAILED_CODE = exports.AUTHENTICATION_FAILED_CODE = 1010;\nvar NETWORK_ERROR = exports.NETWORK_ERROR = 1026;\nvar NEW_LOCUS_ERROR_CLIENT_CODE = exports.NEW_LOCUS_ERROR_CLIENT_CODE = 4008;\nvar MEETING_INFO_LOOKUP_ERROR_CLIENT_CODE = exports.MEETING_INFO_LOOKUP_ERROR_CLIENT_CODE = 4100;\nvar UNKNOWN_ERROR = exports.UNKNOWN_ERROR = 9999; // Unexpected error that is not a meetingInfo error, locus error or browser media error.\nvar ICE_FAILURE_CLIENT_CODE = exports.ICE_FAILURE_CLIENT_CODE = 2004;\nvar MISSING_ROAP_ANSWER_CLIENT_CODE = exports.MISSING_ROAP_ANSWER_CLIENT_CODE = 2007;\nvar DTLS_HANDSHAKE_FAILED_CLIENT_CODE = exports.DTLS_HANDSHAKE_FAILED_CLIENT_CODE = 2008;\nvar ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE = exports.ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE = 2010;\nvar ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE = exports.ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE = 2009;\nvar ICE_AND_REACHABILITY_FAILED_CLIENT_CODE = exports.ICE_AND_REACHABILITY_FAILED_CLIENT_CODE = 2011;\nvar WBX_APP_API_URL = exports.WBX_APP_API_URL = 'wbxappapi'; // MeetingInfo WebexAppApi response object normally contains a body.url that includes the string 'wbxappapi'\n\nvar WEBEX_SUB_SERVICE_TYPES = exports.WEBEX_SUB_SERVICE_TYPES = {\n PMR: 'PMR',\n SCHEDULED_MEETING: 'ScheduledMeeting',\n WEBINAR: 'Webinar'\n};\n\n// Found in https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\nvar BROWSER_MEDIA_ERROR_NAMES = {\n PERMISSION_DENIED_ERROR: 'PermissionDeniedError',\n NOT_ALLOWED_ERROR: 'NotAllowedError',\n NOT_READABLE_ERROR: 'NotReadableError',\n ABORT_ERROR: 'AbortError',\n NOT_FOUND_ERROR: 'NotFoundError',\n OVERCONSTRAINED_ERROR: 'OverconstrainedError',\n SECURITY_ERROR: 'SecurityError',\n TYPE_ERROR: 'TypeError'\n};\nvar BROWSER_MEDIA_ERROR_NAME_TO_CLIENT_ERROR_CODES_MAP = exports.BROWSER_MEDIA_ERROR_NAME_TO_CLIENT_ERROR_CODES_MAP = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, BROWSER_MEDIA_ERROR_NAMES.PERMISSION_DENIED_ERROR, 4032), BROWSER_MEDIA_ERROR_NAMES.NOT_ALLOWED_ERROR, 4032), BROWSER_MEDIA_ERROR_NAMES.NOT_READABLE_ERROR, 2729), BROWSER_MEDIA_ERROR_NAMES.ABORT_ERROR, 2729), BROWSER_MEDIA_ERROR_NAMES.NOT_FOUND_ERROR, 2729), BROWSER_MEDIA_ERROR_NAMES.OVERCONSTRAINED_ERROR, 2729), BROWSER_MEDIA_ERROR_NAMES.SECURITY_ERROR, 2729), BROWSER_MEDIA_ERROR_NAMES.TYPE_ERROR, 2729);\nvar SDP_OFFER_CREATION_ERROR_MAP = exports.SDP_OFFER_CREATION_ERROR_MAP = {\n GENERAL: 2050,\n SDP_MUNGE_MISSING_CODECS: 2051\n};\nvar ERROR_DESCRIPTIONS = exports.ERROR_DESCRIPTIONS = {\n UNKNOWN_CALL_FAILURE: 'UnknownCallFailure',\n LOCUS_RATE_LIMITED_INCOMING: 'LocusRateLimitedIncoming',\n LOCUS_RATE_LIMITED_OUTGOING: 'LocusRateLimitedOutgoing',\n LOCUS_UNAVAILABLE: 'LocusUnavailable',\n LOCUS_CONFLICT: 'LocusConflict',\n TIMEOUT: 'Timeout',\n LOCUS_INVALID_SEQUENCE_HASH: 'LocusInvalidSequenceHash',\n AUTHENTICATION_FAILED: 'AuthenticationFailed',\n NETWORK_ERROR: 'NetworkError',\n UPDATE_MEDIA_FAILED: 'UpdateMediaFailed',\n FAILED_TO_CONNECT_MEDIA: 'FailedToConnectMedia',\n MEDIA_ENGINE_LOST: 'MediaEngineLost',\n MEDIA_CONNECTION_LOST: 'MediaConnectionLost',\n ICE_FAILURE: 'IceFailure',\n MEDIA_ENGINE_HANG: 'MediaEngineHang',\n ICE_SERVER_REJECTED: 'IceServerRejected',\n CALL_FULL: 'CallFull',\n ROOM_TOO_LARGE: 'RoomTooLarge',\n GUEST_ALREADY_ADDED: 'GuestAlreadyAdded',\n LOCUS_USER_NOT_AUTHORISED: 'LocusUserNotAuthorised',\n CLOUDBERRY_UNAVAILABLE: 'CloudberryUnavailable',\n ROOM_TOO_LARGE_FREE_ACCOUNT: 'RoomTooLarge_FreeAccount',\n MEETING_INACTIVE: 'MeetingInactive',\n MEETING_LOCKED: 'MeetingLocked',\n MEETING_TERMINATING: 'MeetingTerminating',\n MODERATOR_PIN_OR_GUEST_REQUIRED: 'Moderator_Pin_Or_Guest_Required',\n MODERATOR_PIN_OR_GUEST_PIN_REQUIRED: 'Moderator_Pin_Or_Guest_PIN_Required',\n MODERATOR_REQUIRED: 'Moderator_Required',\n USER_NOT_MEMBER_OF_ROOM: 'UserNotMemberOfRoom',\n NEW_LOCUS_ERROR: 'NewLocusError',\n NETWORK_UNAVAILABLE: 'NetworkUnavailable',\n MEETING_UNAVAILABLE: 'MeetingUnavailable',\n MEETING_ID_INVALID: 'MeetingIDInvalid',\n MEETING_SITE_INVALID: 'MeetingSiteInvalid',\n LOCUS_INVALID_JOINTIME: 'LocusInvalidJoinTime',\n LOBBY_EXPIRED: 'LobbyExpired',\n MEDIA_CONNECTION_LOST_PAIRED: 'MediaConnectionLostPaired',\n PHONE_NUMBER_NOT_A_NUMBER: 'PhoneNumberNotANumber',\n PHONE_NUMBER_TOO_LONG: 'PhoneNumberTooLong',\n INVALID_DIALABLE_KEY: 'InvalidDialableKey',\n ONE_ON_ONE_TO_SELF_NOT_ALLOWED: 'OneOnOneToSelfNotAllowed',\n REMOVED_PARTICIPANT: 'RemovedParticipant',\n MEETING_LINK_NOT_FOUND: 'MeetingLinkNotFound',\n PHONE_NUMBER_TOO_SHORT_AFTER_IDD: 'PhoneNumberTooShortAfterIdd',\n INVALID_INVITEE_ADDRESS: 'InvalidInviteeAddress',\n PMR_USER_ACCOUNT_LOCKED_OUT: 'PMRUserAccountLockedOut',\n GUEST_FORBIDDEN: 'GuestForbidden',\n PMR_ACCOUNT_SUSPENDED: 'PMRAccountSuspended',\n EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE: 'EmptyPhoneNumberOrCountryCode',\n CONVERSATION_NOT_FOUND: 'ConversationNotFound',\n SIP_CALLEE_BUSY: 'SIPCalleeBusy',\n SIP_CALLEE_NOT_FOUND: 'SIPCalleeNotFound',\n START_RECORDING_FAILED: 'StartRecordingFailed',\n RECORDING_IN_PROGRESS_FAILED: 'RecordingInProgressFailed',\n MEETING_INFO_LOOKUP_ERROR: 'MeetingInfoLookupError',\n CALL_FULL_ADD_GUEST: 'CallFullAddGuest',\n REQUIRE_WEBEX_LOGIN: 'RequireWebexLogin',\n USER_NOT_ALLOWED_ACCESS_MEETING: 'UserNotAllowedAccessMeeting',\n USER_NEEDS_ACTIVATION: 'UserNeedsActivation',\n SIGN_UP_INVALID_EMAIL: 'SignUpInvalidEmail',\n UNKNOWN_ERROR: 'UnknownError',\n NO_MEDIA_FOUND: 'NoMediaFound',\n STREAM_ERROR_NO_MEDIA: 'StreamErrorNoMedia',\n CAMERA_PERMISSION_DENIED: 'CameraPermissionDenied',\n FRAUD_DETECTION: 'FraudDetection',\n E2EE_NOT_SUPPORTED: 'E2EENotSupported',\n LOCUS_LOBBY_FULL_CMR: 'LocusLobbyFullCMR',\n USER_NOT_INVITED_TO_JOIN: 'UserNotInvitedToJoin',\n MISSING_ROAP_ANSWER: 'MissingRoapAnswer',\n DTLS_HANDSHAKE_FAILED: 'DTLSHandshakeFailed',\n ICE_FAILED_WITHOUT_TURN_TLS: 'ICEFailedWithoutTURN_TLS',\n ICE_FAILED_WITH_TURN_TLS: 'ICEFailedWithTURN_TLS',\n ICE_AND_REACHABILITY_FAILED: 'ICEAndReachabilityFailed',\n SDP_OFFER_CREATION_ERROR: 'SdpOfferCreationError',\n SDP_OFFER_CREATION_ERROR_MISSING_CODEC: 'SdpOfferCreationErrorMissingCodec',\n WDM_RESTRICTED_REGION: 'WdmRestrictedRegion'\n};\nvar SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP = exports.SERVICE_ERROR_CODES_TO_CLIENT_ERROR_CODES_MAP = {\n // ---- Webex API ----\n // Taken from https://wiki.cisco.com/display/HFWEB/MeetingInfo+API and https://sqbu-github.cisco.com/WebExSquared/spark-client-framework/blob/master/spark-client-framework/Services/WebexMeetingService/WebexMeetingModel.h\n // Site not support the URL's domain\n 58400: 4100,\n 99002: 4100,\n // Cannot find the data. Unkown meeting.\n 99009: 4100,\n // Meeting is not allow to cross env\n 58500: 4100,\n // Input parameters contain invalit item\n 400001: 4100,\n // Empty password or token. Meeting is not allow to access since require password\n 403004: 4005,\n // Wrong password. Meeting is not allow to access since password error\n 403028: 4005,\n // Wrong or expired permission. Meeting is not allow to access since permissionToken error or expire\n 403032: 4005,\n // Meeting is required login for current user\n 403034: 4036,\n // Meeting is not allow to access since require password or hostKey\n // Empty password or host key\n 403036: 4005,\n // Meeting is not allow to access since password or hostKey error\n // Wrong password or host key\n 403038: 4005,\n // CMR Meeting Not Supported (meeting exists, but not CMR meeting)\n 403040: 4100,\n // Requires Moderator Pin or Guest Pin\n 403041: 4005,\n // Email blocked\n 403047: 4101,\n // Device not authenticated for your organization\n 403408: 4101,\n // Invalid panelist Pin\n 403043: 4005,\n // Device not registered in org. Device not authenticated.\n 403048: 4101,\n // Not allowed to join external meetings. Violate meeting join policy. Your organization settings don't allow you to join this meeting.\n 403049: 4101,\n // Invalid email. Requires sign in meeting's current site.\n 403100: 4101,\n // Enforce sign in: need login before access when policy enforce sign in. GuestForceUserSignInPolicy\n 403101: 4036,\n // Enforce sign in: sign in with your email address that is approved by your organization\n 403102: 4036,\n // Join internal Meeting: need login before access when policy enforce sign in. Guest force user sign in internal meeting policy.\n 403103: 4036,\n // Join internal Meeting: The host's organization policy doesn't allow your account to join this meeting. Try switching to another account\n 403104: 4101,\n 404001: 4101,\n // Site data not found. Unkonwn meeting. Site data not found(or null).\n 404006: 4100,\n // Invalid input with too many requests. Too many requests access, please input captcha code\n 423001: 4005,\n // Wrong password with too many requests. PasswordError too many time, please input captcha code\n 423005: 4005,\n // Wrong password or host key with too many requests\n 423006: 4005,\n // PasswordError with right captcha, please input captcha code\n 423010: 4005,\n // PasswordOrHostKeyError with right captcha, please input captcha code\n 423012: 4005,\n // Unverified or invalid input. Force show captcha. Please input captcha code\"\n 423013: 4005,\n // Too many requests access\n 429005: 4100,\n // ---- Locus ------\n // FREE_USER_MAX_PARTICIPANTS_EXCEEDED\n 2403001: 3007,\n // PAID_USER_MAX_PARTICIPANTS_EXCEEDED\n 2403002: 3002,\n // SERVICE_MAX_PARTICIPANTS_EXCEEDED\n 2403003: 3002,\n // LOCUS_INACTIVE\n 2403004: 4001,\n // LOCUS_FREE_USER_MAX_PARTICIPANTS_JOINED_EXCEEDED\n 2403018: 3001,\n // LOCUS_PAID_USER_MAX_PARTICIPANTS_JOINED_EXCEEDED\n 2403019: 3001,\n // LOCUS_LOCKED\n 2423003: 4002,\n // LOCUS_TERMINATING\n 2423004: 4003,\n // LOCUS_REQUIRES_MODERATOR_PIN_OR_GUEST\n 2423005: 4005,\n 2423006: 4005,\n 2423016: 4005,\n 2423017: 4005,\n 2423018: 4005,\n // LOCUS_OWNER_CONCURRENT_ACTIVE_MEETING_LIMIT_EXCEEDED\n 2423012: 12000,\n // LOCUS_LOBBY_FULL_CMR\n 2423021: 12001,\n // LOCUS_REQUIRES_MODERATOR_ROLE\n 2423007: 4006,\n // LOCUS_JOIN_RESTRICTED_USER_NOT_IN_ROOM\n 2403010: 4007,\n // LOCUS_MEETING_NOT_FOUND\n 2403014: 4011,\n // LOCUS_NOT_WEBEX_SITE\n 2403015: 4012,\n // LOCUS_INVALID_JOIN_TIME\n 2423010: 4013,\n // LOCUS_PHONE_NUMBER_NOT_A_NUMBER\n 2400008: 4016,\n // LOCUS_PHONE_NUMBER_TOO_LONG\n 2400011: 4017,\n // LOCUS_INVALID_DIALABLE_KEY\n 2400012: 4018,\n // LOCUS_ONE_ON_ONE_TO_SELF_NOT_ALLOWED\n 2403007: 4019,\n // LOCUS_REMOVED_PARTICIPANT\n 2401002: 4020,\n // LOCUS_MEETING_LINK_NOT_FOUND\n 2404002: 4021,\n // LOCUS_PHONE_NUMBER_TOO_SHORT_AFTER_IDD\n 2400009: 4022,\n // LOCUS_INVALID_INVITEE_ADDRESS\n 2400025: 4023,\n // LOCUS_PMR_USER_ACCOUNT_LOCKEDOUT\n 2423009: 4024,\n // LOCUS_RESOURCE_GUEST_FORBIDDEN\n 2403022: 4025,\n // LOCUS_PMR_SUSPENDED\n 2423008: 4026,\n // LOCUS_EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE\n 2400006: 4027,\n // LOCUS_INVALID_SINCE_OR_SEQUENCE_HASH_IN_REQUEST\n 2400014: 1006,\n // LOCUS_CONVERSATION_NOT_FOUND\n 2404001: 4028,\n // LOCUS_RECORDING_CONTROL_NOT_SUPPORTED\n 2403025: 4029,\n // LOCUS_RECORDING_NOT_STARTED\n 2405001: 4029,\n // LOCUS_RECORDING_NOT_ENABLED\n 2409005: 4029,\n // E2EE_NOT_SUPPORTED\n 2409062: 12002,\n // LOCUS: ONLY_INVITED_USERS_CAN_ATTEND_THIS_MEETING\n 2423025: 12003,\n // ---- U2C Sign in catalog ------\n // The user exists, but hasn't completed activation. Needs to visit Atlas for more processing.\n 100002: 4102,\n // The user exists, had completed activation earlier, but requires re-activation because of change in login strategy.\n // Common example is: user signed up using an OAuth provider, but that OAuth provider was removed by org's admin. Now the user needs to re-activate using alternate login strategies: password-pin, new OAuth provider, SSO, etc.\n 100007: 4102,\n // The user does not exist\n 100001: 4103,\n // The user wasn't found, and the organization used for search is a domain-claimed organization.\n 100006: 4103,\n 100005: 4103,\n // Depracated because of an issue in the UCF Clients\n // If both email-hash and domain-hash are null or undefined.\n 100004: 4103,\n // ---- WDM ----\n // WDM_BLOCKED_ACCESS_BY_COUNTRY_CODE_BANNED_COUNTRY_ERROR_CODE\n 4404002: 13000,\n // WDM_BLOCKED_ACCESS_BY_COUNTRY_CODE_RESTRICTED_COUNTRY_ERROR_CODE\n 4404003: 13000\n};\nvar CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD = exports.CLIENT_ERROR_CODE_TO_ERROR_PAYLOAD = (_CLIENT_ERROR_CODE_TO = {\n 1000: {\n errorDescription: ERROR_DESCRIPTIONS.UNKNOWN_CALL_FAILURE,\n category: 'signaling',\n fatal: true,\n name: 'locus.response'\n },\n 1001: {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_RATE_LIMITED_INCOMING,\n category: 'signaling',\n fatal: true,\n name: 'locus.response'\n },\n 1002: {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_RATE_LIMITED_OUTGOING,\n category: 'signaling',\n fatal: true,\n name: 'locus.response'\n },\n 1003: {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_UNAVAILABLE,\n category: 'signaling',\n fatal: true,\n name: 'locus.response'\n },\n 1004: {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_CONFLICT,\n category: 'signaling',\n fatal: true,\n name: 'locus.response'\n },\n 1005: {\n errorDescription: ERROR_DESCRIPTIONS.TIMEOUT,\n category: 'signaling',\n fatal: true,\n name: 'locus.response'\n },\n 1006: {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_INVALID_SEQUENCE_HASH,\n category: 'signaling',\n fatal: true\n },\n 1007: {\n errorDescription: ERROR_DESCRIPTIONS.UPDATE_MEDIA_FAILED,\n category: 'signaling',\n fatal: true\n }\n}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_CLIENT_ERROR_CODE_TO, AUTHENTICATION_FAILED_CODE, {\n errorDescription: ERROR_DESCRIPTIONS.AUTHENTICATION_FAILED,\n category: 'network',\n fatal: true\n}), 1026, {\n errorDescription: ERROR_DESCRIPTIONS.NETWORK_ERROR,\n category: 'network',\n fatal: true\n}), 2001, {\n errorDescription: ERROR_DESCRIPTIONS.FAILED_TO_CONNECT_MEDIA,\n category: 'signaling',\n fatal: true\n}), 2002, {\n errorDescription: ERROR_DESCRIPTIONS.MEDIA_ENGINE_LOST,\n category: 'signaling',\n fatal: true\n}), 2003, {\n errorDescription: ERROR_DESCRIPTIONS.MEDIA_CONNECTION_LOST,\n category: 'signaling',\n fatal: true\n}), ICE_FAILURE_CLIENT_CODE, {\n errorDescription: ERROR_DESCRIPTIONS.ICE_FAILURE,\n category: 'media',\n fatal: true\n}), 2005, {\n errorDescription: ERROR_DESCRIPTIONS.MEDIA_ENGINE_HANG,\n category: 'signaling',\n fatal: true\n}), 2006, {\n errorDescription: ERROR_DESCRIPTIONS.ICE_SERVER_REJECTED,\n category: 'signaling',\n fatal: true\n}), MISSING_ROAP_ANSWER_CLIENT_CODE, {\n errorDescription: ERROR_DESCRIPTIONS.MISSING_ROAP_ANSWER,\n category: 'media',\n fatal: true\n}), DTLS_HANDSHAKE_FAILED_CLIENT_CODE, {\n errorDescription: ERROR_DESCRIPTIONS.DTLS_HANDSHAKE_FAILED,\n category: 'media',\n fatal: true\n}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_CLIENT_ERROR_CODE_TO, ICE_FAILED_WITHOUT_TURN_TLS_CLIENT_CODE, {\n errorDescription: ERROR_DESCRIPTIONS.ICE_FAILED_WITHOUT_TURN_TLS,\n category: 'media',\n fatal: true\n}), ICE_FAILED_WITH_TURN_TLS_CLIENT_CODE, {\n errorDescription: ERROR_DESCRIPTIONS.ICE_FAILED_WITH_TURN_TLS,\n category: 'media',\n fatal: true\n}), ICE_AND_REACHABILITY_FAILED_CLIENT_CODE, {\n errorDescription: ERROR_DESCRIPTIONS.ICE_AND_REACHABILITY_FAILED,\n category: 'expected',\n fatal: true\n}), 2050, {\n errorDescription: ERROR_DESCRIPTIONS.SDP_OFFER_CREATION_ERROR,\n category: 'media',\n fatal: true,\n shownToUser: true\n}), 2051, {\n errorDescription: ERROR_DESCRIPTIONS.SDP_OFFER_CREATION_ERROR_MISSING_CODEC,\n category: 'expected',\n fatal: true,\n shownToUser: true\n}), 3001, {\n errorDescription: ERROR_DESCRIPTIONS.CALL_FULL,\n category: 'expected',\n fatal: true\n}), 3002, {\n errorDescription: ERROR_DESCRIPTIONS.ROOM_TOO_LARGE,\n category: 'expected',\n fatal: true\n}), 3004, {\n errorDescription: ERROR_DESCRIPTIONS.GUEST_ALREADY_ADDED,\n category: 'expected',\n fatal: false\n}), 3005, {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_USER_NOT_AUTHORISED,\n category: 'expected',\n fatal: true\n}), 3006, {\n errorDescription: ERROR_DESCRIPTIONS.CLOUDBERRY_UNAVAILABLE,\n category: 'expected',\n fatal: true\n}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_CLIENT_ERROR_CODE_TO, 3007, {\n errorDescription: ERROR_DESCRIPTIONS.STREAM_ERROR_NO_MEDIA,\n category: 'expected',\n fatal: true\n}), 3013, {\n errorDescription: ERROR_DESCRIPTIONS.ROOM_TOO_LARGE_FREE_ACCOUNT,\n category: 'expected',\n fatal: false\n}), 4001, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_INACTIVE,\n category: 'expected',\n fatal: true\n}), 4002, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_LOCKED,\n category: 'expected',\n fatal: true,\n name: 'locus.response'\n}), 4003, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_TERMINATING,\n category: 'expected',\n fatal: true,\n name: 'locus.leave'\n}), 4004, {\n errorDescription: ERROR_DESCRIPTIONS.MODERATOR_PIN_OR_GUEST_REQUIRED,\n category: 'expected',\n fatal: false\n}), 4005, {\n errorDescription: ERROR_DESCRIPTIONS.MODERATOR_PIN_OR_GUEST_PIN_REQUIRED,\n category: 'expected',\n fatal: false\n}), 4006, {\n errorDescription: ERROR_DESCRIPTIONS.MODERATOR_REQUIRED,\n category: 'expected',\n fatal: false\n}), 4007, {\n errorDescription: ERROR_DESCRIPTIONS.USER_NOT_MEMBER_OF_ROOM,\n category: 'expected',\n fatal: true\n}), 4008, {\n errorDescription: ERROR_DESCRIPTIONS.NEW_LOCUS_ERROR,\n category: 'signaling',\n fatal: true\n}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_CLIENT_ERROR_CODE_TO, 4009, {\n errorDescription: ERROR_DESCRIPTIONS.NETWORK_UNAVAILABLE,\n category: 'network',\n fatal: true\n}), 4010, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_UNAVAILABLE,\n category: 'expected',\n fatal: true\n}), 4011, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_ID_INVALID,\n category: 'expected',\n fatal: true\n}), 4012, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_SITE_INVALID,\n category: 'expected',\n fatal: true\n}), 4013, {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_INVALID_JOINTIME,\n category: 'expected',\n fatal: true\n}), 4014, {\n errorDescription: ERROR_DESCRIPTIONS.LOBBY_EXPIRED,\n category: 'expected',\n fatal: true\n}), 4015, {\n errorDescription: ERROR_DESCRIPTIONS.MEDIA_CONNECTION_LOST_PAIRED,\n category: 'expected',\n fatal: false\n}), 4016, {\n errorDescription: ERROR_DESCRIPTIONS.PHONE_NUMBER_NOT_A_NUMBER,\n category: 'expected',\n fatal: true,\n name: 'locus.response'\n}), 4017, {\n errorDescription: ERROR_DESCRIPTIONS.PHONE_NUMBER_TOO_LONG,\n category: 'expected',\n fatal: true,\n name: 'locus.response'\n}), 4018, {\n errorDescription: ERROR_DESCRIPTIONS.INVALID_DIALABLE_KEY,\n category: 'expected',\n fatal: true,\n name: 'locus.response'\n}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_CLIENT_ERROR_CODE_TO, 4019, {\n errorDescription: ERROR_DESCRIPTIONS.ONE_ON_ONE_TO_SELF_NOT_ALLOWED,\n category: 'expected',\n fatal: true\n}), 4020, {\n errorDescription: ERROR_DESCRIPTIONS.REMOVED_PARTICIPANT,\n category: 'expected',\n fatal: true\n}), 4021, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_LINK_NOT_FOUND,\n category: 'expected',\n fatal: true\n}), 4022, {\n errorDescription: ERROR_DESCRIPTIONS.PHONE_NUMBER_TOO_SHORT_AFTER_IDD,\n category: 'expected',\n fatal: true\n}), 4023, {\n errorDescription: ERROR_DESCRIPTIONS.INVALID_INVITEE_ADDRESS,\n category: 'expected',\n fatal: true\n}), 4024, {\n errorDescription: ERROR_DESCRIPTIONS.PMR_USER_ACCOUNT_LOCKED_OUT,\n category: 'expected',\n fatal: true\n}), 4025, {\n errorDescription: ERROR_DESCRIPTIONS.GUEST_FORBIDDEN,\n category: 'expected',\n fatal: true\n}), 4026, {\n errorDescription: ERROR_DESCRIPTIONS.PMR_ACCOUNT_SUSPENDED,\n category: 'expected',\n fatal: true\n}), 4027, {\n errorDescription: ERROR_DESCRIPTIONS.EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE,\n category: 'expected',\n fatal: true\n}), 4028, {\n errorDescription: ERROR_DESCRIPTIONS.CONVERSATION_NOT_FOUND,\n category: 'expected',\n fatal: true\n}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_CLIENT_ERROR_CODE_TO, 4029, {\n errorDescription: ERROR_DESCRIPTIONS.START_RECORDING_FAILED,\n category: 'expected',\n fatal: true\n}), 4030, {\n errorDescription: ERROR_DESCRIPTIONS.RECORDING_IN_PROGRESS_FAILED,\n category: 'expected',\n fatal: true\n}), 4032, {\n errorDescription: ERROR_DESCRIPTIONS.CAMERA_PERMISSION_DENIED,\n category: 'expected',\n fatal: true\n}), 4036, {\n errorDescription: ERROR_DESCRIPTIONS.REQUIRE_WEBEX_LOGIN,\n category: 'expected',\n fatal: true\n}), 5000, {\n errorDescription: ERROR_DESCRIPTIONS.SIP_CALLEE_BUSY,\n category: 'expected',\n fatal: true\n}), 5001, {\n errorDescription: ERROR_DESCRIPTIONS.SIP_CALLEE_NOT_FOUND,\n category: 'expected',\n fatal: true\n}), 4100, {\n errorDescription: ERROR_DESCRIPTIONS.MEETING_INFO_LOOKUP_ERROR,\n category: 'signaling',\n fatal: true\n}), 3003, {\n errorDescription: ERROR_DESCRIPTIONS.CALL_FULL_ADD_GUEST,\n category: 'expected',\n fatal: false\n}), 4101, {\n errorDescription: ERROR_DESCRIPTIONS.USER_NOT_ALLOWED_ACCESS_MEETING,\n category: 'expected',\n fatal: true\n}), 4102, {\n errorDescription: ERROR_DESCRIPTIONS.USER_NEEDS_ACTIVATION,\n category: 'expected',\n fatal: true\n}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_CLIENT_ERROR_CODE_TO, 4103, {\n errorDescription: ERROR_DESCRIPTIONS.SIGN_UP_INVALID_EMAIL,\n category: 'expected',\n fatal: true\n}), 2729, {\n errorDescription: ERROR_DESCRIPTIONS.NO_MEDIA_FOUND,\n category: 'expected',\n fatal: false\n}), 9999, {\n errorDescription: ERROR_DESCRIPTIONS.UNKNOWN_ERROR,\n category: 'other',\n fatal: true\n}), 12000, {\n errorDescription: ERROR_DESCRIPTIONS.FRAUD_DETECTION,\n category: 'expected',\n fatal: true,\n name: 'locus.response',\n shownToUser: true\n}), 12001, {\n errorDescription: ERROR_DESCRIPTIONS.LOCUS_LOBBY_FULL_CMR,\n category: 'expected',\n fatal: true,\n name: 'locus.response',\n shownToUser: true\n}), 12002, {\n errorDescription: ERROR_DESCRIPTIONS.E2EE_NOT_SUPPORTED,\n category: 'expected',\n fatal: true,\n name: 'locus.response',\n shownToUser: true\n}), 12003, {\n errorDescription: ERROR_DESCRIPTIONS.USER_NOT_INVITED_TO_JOIN,\n category: 'expected',\n fatal: true\n}), 13000, {\n errorDescription: ERROR_DESCRIPTIONS.WDM_RESTRICTED_REGION,\n category: 'expected',\n fatal: true\n}));\nvar CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = exports.CALL_DIAGNOSTIC_EVENT_FAILED_TO_SEND = 'js_sdk_call_diagnostic_event_failed_to_send';\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _batcher = _interopRequireDefault(require(\"./batcher\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar ClientMetricsBatcher = _batcher.default.extend({\n namespace: 'Metrics',\n prepareItem: function prepareItem(item) {\n // Add more defaults to payload when the clientmetrics endpoint evolves to support richer payloads\n return _promise.default.resolve(item);\n },\n prepareRequest: function prepareRequest(queue) {\n return _promise.default.resolve(queue);\n },\n submitHttpRequest: function submitHttpRequest(payload) {\n return this.webex.request({\n method: 'POST',\n service: 'metrics',\n resource: 'clientmetrics',\n body: {\n metrics: payload\n },\n waitForServiceTimeout: this.webex.config.metrics.waitForServiceTimeout\n });\n }\n});\nvar _default = exports.default = ClientMetricsBatcher;\n//# sourceMappingURL=client-metrics-batcher.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _preloginMetricsBatcher = _interopRequireDefault(require(\"./prelogin-metrics-batcher\"));\nvar ClientMetricsPreloginBatcher = _preloginMetricsBatcher.default.extend({\n namespace: 'Metrics',\n /**\n * Prepare item\n * @param {any} item\n * @returns {Promise}\n */\n prepareItem: function prepareItem(item) {\n // Add more defaults to payload when the clientmetrics endpoint evolves to support richer payloads\n return _promise.default.resolve(item);\n },\n /**\n * Prepare request, add time sensitive date etc.\n * @param {any[]} queue\n * @returns {Promise}\n */\n prepareRequest: function prepareRequest(queue) {\n return _promise.default.resolve(queue);\n }\n});\nvar _default = exports.default = ClientMetricsPreloginBatcher;\n//# sourceMappingURL=client-metrics-prelogin-batcher.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.OS_NAME = exports.OSMap = exports.CLIENT_NAME = void 0;\nvar _common = require(\"@webex/common\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar CLIENT_NAME = exports.CLIENT_NAME = 'webex-js-sdk';\nvar _default = exports.default = {\n device: {\n preDiscoveryServices: {\n metricsServiceUrl: process.env.METRICS_SERVICE_URL || 'https://metrics-a.wbx2.com/metrics/api/v1',\n metrics: process.env.METRICS_SERVICE_URL || 'https://metrics-a.wbx2.com/metrics/api/v1'\n }\n },\n metrics: {\n appType: _common.inBrowser ? 'browser' : 'nodejs',\n batcherWait: 500,\n batcherMaxCalls: 50,\n batcherMaxWait: 1500,\n batcherRetryPlateau: 32000,\n waitForServiceTimeout: 30\n }\n};\nvar OS_NAME = exports.OS_NAME = {\n WINDOWS: 'windows',\n MAC: 'mac',\n IOS: 'ios',\n ANDROID: 'android',\n CHROME: 'chrome',\n LINUX: 'linux',\n OTHERS: 'other'\n};\nvar OSMap = exports.OSMap = {\n 'Chrome OS': OS_NAME.CHROME,\n macOS: OS_NAME.MAC,\n Windows: OS_NAME.WINDOWS,\n iOS: OS_NAME.IOS,\n Android: OS_NAME.ANDROID,\n Linux: OS_NAME.LINUX\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _webexCore = require(\"@webex/webex-core\");\nvar _common = require(\"@webex/common\");\nvar _lodash = require(\"lodash\");\nvar _clientMetricsBatcher = _interopRequireDefault(require(\"./client-metrics-batcher\"));\nvar _metrics = require(\"./metrics\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar _BrowserDetection = (0, _common.BrowserDetection)(),\n getOSVersion = _BrowserDetection.getOSVersion,\n getBrowserName = _BrowserDetection.getBrowserName,\n getBrowserVersion = _BrowserDetection.getBrowserVersion;\n\n/**\n * @description top-level abstract class to handle Metrics and common routines.\n * @export\n * @class GenericMetrics\n */\nvar GenericMetrics = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {\n (0, _inherits2.default)(GenericMetrics, _StatelessWebexPlugin);\n var _super = _createSuper(GenericMetrics);\n /**\n * Constructor\n * @param {any[]} args\n */\n function GenericMetrics() {\n var _this;\n (0, _classCallCheck2.default)(this, GenericMetrics);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n // @ts-ignore\n // @ts-ignore\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"clientMetricsBatcher\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"logger\", void 0);\n // to avoid adding @ts-ignore everywhere\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"device\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"version\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"deviceId\", '');\n _this.logger = _this.webex.logger;\n // @ts-ignore\n _this.clientMetricsBatcher = new _clientMetricsBatcher.default({}, {\n parent: _this.webex\n });\n // @ts-ignore\n _this.device = _this.webex.internal.device;\n // @ts-ignore\n _this.version = _this.webex.version;\n return _this;\n }\n\n /**\n * Submit a buisness metric to our metrics endpoint.\n * @param {string} kind of metric for logging\n * @param {string} name of the metric\n * @param {object} event\n * @returns {Promise}\n */\n (0, _createClass2.default)(GenericMetrics, [{\n key: \"submitEvent\",\n value: function submitEvent(_ref) {\n var kind = _ref.kind,\n name = _ref.name,\n event = _ref.event;\n this.logger.log(kind, \"@submitEvent. Submit event: \".concat(name));\n return this.clientMetricsBatcher.request(event);\n }\n\n /**\n * Returns the deviceId from our registration with WDM.\n * @returns {string} deviceId or empty string\n */\n }, {\n key: \"getDeviceId\",\n value: function getDeviceId() {\n if (this.deviceId === '') {\n var url = this.device.url;\n if (url && url.length !== 0) {\n var n = url.lastIndexOf('/');\n if (n !== -1) {\n this.deviceId = url.substring(n + 1);\n }\n }\n }\n return this.deviceId;\n }\n\n /**\n * Returns the context object to be submitted with all metrics.\n * @returns {DeviceContext}\n */\n }, {\n key: \"getContext\",\n value: function getContext() {\n return {\n app: {\n version: this.version\n },\n device: {\n id: this.getDeviceId()\n },\n locale: window.navigator.language,\n os: {\n name: (0, _metrics.getOSNameInternal)(),\n version: getOSVersion()\n }\n };\n }\n\n /**\n * Returns the browser details to be included with all metrics.\n * @returns {object}\n */\n }, {\n key: \"getBrowserDetails\",\n value: function getBrowserDetails() {\n return {\n browser: getBrowserName(),\n browserHeight: window.innerHeight,\n browserVersion: getBrowserVersion(),\n browserWidth: window.innerWidth,\n domain: window.location.hostname,\n inIframe: window.self !== window.top,\n locale: window.navigator.language,\n os: (0, _metrics.getOSNameInternal)()\n };\n }\n\n /**\n * Returns true once we have the deviceId we need to submit behavioral/operational/buisness events\n * @returns {boolean}\n */\n }, {\n key: \"isReadyToSubmitEvents\",\n value: function isReadyToSubmitEvents() {\n var deviceId = this.getDeviceId();\n return deviceId && deviceId.length !== 0;\n }\n\n /**\n * Creates the object to send to our metrics endpoint for a tagged event (i.e. behavoral or operational)\n * @param {[MetricType]} list of event type (i.e. ['behavioral'], ['operational', 'behavioral'])\n * @param {string} metric name\n * @param {EventPayload} user payload\n * @returns {EventPayload}\n */\n }, {\n key: \"createTaggedEventObject\",\n value: function createTaggedEventObject(_ref2) {\n var type = _ref2.type,\n name = _ref2.name,\n payload = _ref2.payload;\n var allTags = payload;\n allTags = (0, _lodash.merge)(allTags, this.getBrowserDetails());\n var event = {\n context: this.getContext(),\n metricName: name,\n tags: allTags,\n timestamp: (0, _now.default)(),\n type: type\n };\n return event;\n }\n }]);\n return GenericMetrics;\n}(_webexCore.StatelessWebexPlugin);\n//# sourceMappingURL=generic-metrics.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"BehavioralMetrics\", {\n enumerable: true,\n get: function get() {\n return _behavioralMetrics.default;\n }\n});\n_Object$defineProperty(exports, \"BusinessMetrics\", {\n enumerable: true,\n get: function get() {\n return _businessMetrics.default;\n }\n});\nexports.CALL_DIAGNOSTIC_CONFIG = void 0;\n_Object$defineProperty(exports, \"CallDiagnosticLatencies\", {\n enumerable: true,\n get: function get() {\n return _callDiagnosticMetricsLatencies.default;\n }\n});\n_Object$defineProperty(exports, \"CallDiagnosticMetrics\", {\n enumerable: true,\n get: function get() {\n return _callDiagnosticMetrics2.default;\n }\n});\nexports.CallDiagnosticUtils = void 0;\n_Object$defineProperty(exports, \"NewMetrics\", {\n enumerable: true,\n get: function get() {\n return _newMetrics.default;\n }\n});\n_Object$defineProperty(exports, \"OperationalMetrics\", {\n enumerable: true,\n get: function get() {\n return _operationalMetrics.default;\n }\n});\n_Object$defineProperty(exports, \"RtcMetrics\", {\n enumerable: true,\n get: function get() {\n return _rtcMetrics.default;\n }\n});\nexports.Utils = void 0;\n_Object$defineProperty(exports, \"config\", {\n enumerable: true,\n get: function get() {\n return _config.default;\n }\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _metrics.default;\n }\n});\n_Object$defineProperty(exports, \"getOSNameInternal\", {\n enumerable: true,\n get: function get() {\n return _metrics.getOSNameInternal;\n }\n});\nvar _webexCore = require(\"@webex/webex-core\");\nvar _metrics = _interopRequireWildcard(require(\"./metrics\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\nvar _newMetrics = _interopRequireDefault(require(\"./new-metrics\"));\nvar Utils = _interopRequireWildcard(require(\"./utils\"));\nexports.Utils = Utils;\nvar CALL_DIAGNOSTIC_CONFIG = _interopRequireWildcard(require(\"./call-diagnostic/config\"));\nexports.CALL_DIAGNOSTIC_CONFIG = CALL_DIAGNOSTIC_CONFIG;\nvar CallDiagnosticUtils = _interopRequireWildcard(require(\"./call-diagnostic/call-diagnostic-metrics.util\"));\nexports.CallDiagnosticUtils = CallDiagnosticUtils;\nvar _callDiagnosticMetrics2 = _interopRequireDefault(require(\"./call-diagnostic/call-diagnostic-metrics\"));\nvar _callDiagnosticMetricsLatencies = _interopRequireDefault(require(\"./call-diagnostic/call-diagnostic-metrics-latencies\"));\nvar _behavioralMetrics = _interopRequireDefault(require(\"./behavioral-metrics\"));\nvar _operationalMetrics = _interopRequireDefault(require(\"./operational-metrics\"));\nvar _businessMetrics = _interopRequireDefault(require(\"./business-metrics\"));\nvar _rtcMetrics = _interopRequireDefault(require(\"./rtcMetrics\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n(0, _webexCore.registerInternalPlugin)('metrics', _metrics.default, {\n config: _config.default\n});\n(0, _webexCore.registerInternalPlugin)('newMetrics', _newMetrics.default, {\n config: _config.default\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.getOSNameInternal = getOSNameInternal;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _webexCore = require(\"@webex/webex-core\");\nvar _common = require(\"@webex/common\");\nvar _config = require(\"./config\");\nvar _batcher = _interopRequireDefault(require(\"./batcher\"));\nvar _clientMetricsBatcher = _interopRequireDefault(require(\"./client-metrics-batcher\"));\nvar _clientMetricsPreloginBatcher = _interopRequireDefault(require(\"./client-metrics-prelogin-batcher\"));\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable default-param-last */ /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar _BrowserDetection = (0, _common.BrowserDetection)(),\n getOSName = _BrowserDetection.getOSName,\n getOSVersion = _BrowserDetection.getOSVersion,\n getBrowserName = _BrowserDetection.getBrowserName,\n getBrowserVersion = _BrowserDetection.getBrowserVersion;\nfunction getOSNameInternal() {\n var _OSMap$getOSName;\n return (_OSMap$getOSName = _config.OSMap[getOSName()]) !== null && _OSMap$getOSName !== void 0 ? _OSMap$getOSName : _config.OS_NAME.OTHERS;\n}\nfunction getSparkUserAgent(webex) {\n var _webex$config;\n var _ref = (_webex$config = webex === null || webex === void 0 ? void 0 : webex.config) !== null && _webex$config !== void 0 ? _webex$config : {},\n appName = _ref.appName,\n appVersion = _ref.appVersion,\n appPlatform = _ref.appPlatform;\n var sparkUserAgent = _config.CLIENT_NAME;\n if (appName) {\n sparkUserAgent += \" \".concat(appName, \"/\").concat(appVersion !== null && appVersion !== void 0 ? appVersion : '0.0');\n }\n if (appPlatform) {\n sparkUserAgent += \" \".concat(appPlatform);\n }\n return sparkUserAgent;\n}\nvar Metrics = _webexCore.WebexPlugin.extend({\n children: {\n batcher: _batcher.default,\n clientMetricsBatcher: _clientMetricsBatcher.default,\n clientMetricsPreloginBatcher: _clientMetricsPreloginBatcher.default\n },\n namespace: 'Metrics',\n submit: function submit(key, value) {\n return this.batcher.request(_objectSpread({\n key: key\n }, value));\n },\n /**\n * Returns the payload for submitting client metrics.\n * @param {string} eventName\n * @param {any} props\n * @returns {any} - the payload\n */\n getClientMetricsPayload: function getClientMetricsPayload(eventName, props) {\n var _this$webex$meetings, _this$webex$meetings$, _this$webex$meetings$2;\n if (!eventName) {\n throw Error('Missing behavioral metric name. Please provide one');\n }\n var payload = {\n metricName: eventName\n };\n // @ts-ignore\n var providedClientVersion = (_this$webex$meetings = this.webex.meetings) === null || _this$webex$meetings === void 0 ? void 0 : (_this$webex$meetings$ = _this$webex$meetings.config) === null || _this$webex$meetings$ === void 0 ? void 0 : (_this$webex$meetings$2 = _this$webex$meetings$.metrics) === null || _this$webex$meetings$2 === void 0 ? void 0 : _this$webex$meetings$2.clientVersion;\n payload.tags = _objectSpread(_objectSpread({}, props.tags), {}, {\n browser: getBrowserName(),\n os: getOSNameInternal(),\n appVersion: providedClientVersion,\n // Node does not like this so we need to check if it exists or not\n // eslint-disable-next-line no-undef\n domain: typeof window !== 'undefined' ? window.location.hostname || 'non-browser' : 'non-browser' // Check what else we could measure\n });\n\n payload.fields = _objectSpread(_objectSpread({}, props.fields), {}, {\n browser_version: getBrowserVersion(),\n os_version: getOSVersion(),\n sdk_version: this.webex.version,\n platform: 'Web',\n spark_user_agent: getSparkUserAgent(this.webex),\n client_id: this.webex.credentials.config.client_id\n });\n payload.type = props.type || this.webex.config.metrics.type;\n payload.context = _objectSpread(_objectSpread({}, props.context), {}, {\n app: {\n version: this.webex.version\n },\n locale: 'en-US',\n os: {\n name: getOSNameInternal(),\n version: getOSVersion()\n }\n });\n if (props.eventPayload) {\n payload.eventPayload = props.eventPayload;\n }\n\n // Mocking the time in tests when running in node\n // is impossible so unable to use Date.now()\n payload.timestamp = new Date().valueOf();\n return payload;\n },\n /**\n * This corresponds to #sendSemiStructured() in the deprecated metrics handler\n * @param {string} eventName\n * @param {Object} props\n * @param {string} preLoginId\n * @returns {Object} HttpResponse object\n */\n submitClientMetrics: function submitClientMetrics(eventName) {\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var preLoginId = arguments.length > 2 ? arguments[2] : undefined;\n var payload = this.getClientMetricsPayload(eventName, props);\n if (preLoginId) {\n this.clientMetricsPreloginBatcher.savePreLoginId(preLoginId);\n return this.clientMetricsPreloginBatcher.request(payload);\n }\n return this.clientMetricsBatcher.request(payload);\n },\n /**\n * Issue request to alias a user's pre-login ID with their CI UUID\n * @param {string} preLoginId\n * @returns {Object} HttpResponse object\n */\n aliasUser: function aliasUser(preLoginId) {\n return this.request({\n method: 'POST',\n api: 'metrics',\n resource: 'clientmetrics',\n headers: {\n 'x-prelogin-userid': preLoginId\n },\n body: {},\n qs: {\n alias: true\n }\n });\n },\n version: \"3.7.0\"\n});\nvar _default = exports.default = Metrics;\n//# sourceMappingURL=metrics.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _webexCore = require(\"@webex/webex-core\");\nvar _callDiagnosticMetrics = _interopRequireDefault(require(\"./call-diagnostic/call-diagnostic-metrics\"));\nvar _behavioralMetrics = _interopRequireDefault(require(\"./behavioral-metrics\"));\nvar _operationalMetrics = _interopRequireDefault(require(\"./operational-metrics\"));\nvar _businessMetrics = _interopRequireDefault(require(\"./business-metrics\"));\nvar _callDiagnosticMetricsLatencies = _interopRequireDefault(require(\"./call-diagnostic/call-diagnostic-metrics-latencies\"));\nvar _callDiagnosticMetrics2 = require(\"./call-diagnostic/call-diagnostic-metrics.util\");\nvar _utils = require(\"./utils\");\nvar _class;\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable class-methods-use-this */\n/* eslint-disable valid-jsdoc */\n// @ts-ignore\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * Metrics plugin to centralize all types of metrics.\n * https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?pageId=231011379\n * @class\n */\nvar Metrics = /*#__PURE__*/function (_WebexPlugin) {\n (0, _inherits2.default)(Metrics, _WebexPlugin);\n var _super = _createSuper(Metrics);\n /**\n * Constructor\n * @param args\n * @constructor\n * @private\n * @returns\n */\n function Metrics() {\n var _this;\n (0, _classCallCheck2.default)(this, Metrics);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n\n // @ts-ignore\n // Call Diagnostic latencies\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"callDiagnosticLatencies\", void 0);\n // Helper classes to handle the different types of metrics\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"callDiagnosticMetrics\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"behavioralMetrics\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"operationalMetrics\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"businessMetrics\", void 0);\n (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), \"isReady\", false);\n _this.callDiagnosticLatencies = new _callDiagnosticMetricsLatencies.default({}, {\n parent: _this.webex\n });\n _this.onReady();\n return _this;\n }\n\n /**\n * On Ready\n */\n (0, _createClass2.default)(Metrics, [{\n key: \"onReady\",\n value: function onReady() {\n var _this2 = this;\n // @ts-ignore\n this.webex.once('ready', function () {\n // @ts-ignore\n _this2.callDiagnosticMetrics = new _callDiagnosticMetrics.default({}, {\n parent: _this2.webex\n });\n _this2.isReady = true;\n });\n }\n\n /**\n * Used for internal purposes only\n * @param args\n */\n }, {\n key: \"submitInternalEvent\",\n value: function submitInternalEvent(_ref) {\n var name = _ref.name,\n payload = _ref.payload,\n options = _ref.options;\n if (name === 'internal.reset.join.latencies') {\n this.callDiagnosticLatencies.clearTimestamps();\n } else {\n this.callDiagnosticLatencies.saveTimestamp({\n key: name\n });\n }\n }\n\n /**\n * if webex metrics is ready, build behavioral metric backend if not already done.\n */\n }, {\n key: \"lazyBuildBehavioralMetrics\",\n value: function lazyBuildBehavioralMetrics() {\n if (this.isReady && !this.behavioralMetrics) {\n // @ts-ignore\n this.behavioralMetrics = new _behavioralMetrics.default({}, {\n parent: this.webex\n });\n }\n }\n\n /**\n * if webex metrics is ready, build operational metric backend if not already done.\n */\n }, {\n key: \"lazyBuildOperationalMetrics\",\n value: function lazyBuildOperationalMetrics() {\n if (this.isReady && !this.operationalMetrics) {\n // @ts-ignore\n this.operationalMetrics = new _operationalMetrics.default({}, {\n parent: this.webex\n });\n }\n }\n\n /**\n * if webex metrics is ready, build business metric backend if not already done.\n */\n }, {\n key: \"lazyBuildBusinessMetrics\",\n value: function lazyBuildBusinessMetrics() {\n if (this.isReady && !this.businessMetrics) {\n // @ts-ignore\n this.businessMetrics = new _businessMetrics.default({}, {\n parent: this.webex\n });\n }\n }\n\n /**\n * @returns true once we have the deviceId we need to submit behavioral events to Amplitude\n */\n }, {\n key: \"isReadyToSubmitBehavioralEvents\",\n value: function isReadyToSubmitBehavioralEvents() {\n var _this$behavioralMetri, _this$behavioralMetri2;\n this.lazyBuildBehavioralMetrics();\n return (_this$behavioralMetri = (_this$behavioralMetri2 = this.behavioralMetrics) === null || _this$behavioralMetri2 === void 0 ? void 0 : _this$behavioralMetri2.isReadyToSubmitEvents()) !== null && _this$behavioralMetri !== void 0 ? _this$behavioralMetri : false;\n }\n\n /**\n * @returns true once we have the deviceId we need to submit operational events\n */\n }, {\n key: \"isReadyToSubmitOperationalEvents\",\n value: function isReadyToSubmitOperationalEvents() {\n var _this$operationalMetr, _this$operationalMetr2;\n this.lazyBuildOperationalMetrics();\n return (_this$operationalMetr = (_this$operationalMetr2 = this.operationalMetrics) === null || _this$operationalMetr2 === void 0 ? void 0 : _this$operationalMetr2.isReadyToSubmitEvents()) !== null && _this$operationalMetr !== void 0 ? _this$operationalMetr : false;\n }\n\n /**\n * @returns true once we have the deviceId we need to submit buisness events\n */\n }, {\n key: \"isReadyToSubmitBusinessEvents\",\n value: function isReadyToSubmitBusinessEvents() {\n var _this$businessMetrics, _this$businessMetrics2;\n this.lazyBuildBusinessMetrics();\n return (_this$businessMetrics = (_this$businessMetrics2 = this.businessMetrics) === null || _this$businessMetrics2 === void 0 ? void 0 : _this$businessMetrics2.isReadyToSubmitEvents()) !== null && _this$businessMetrics !== void 0 ? _this$businessMetrics : false;\n }\n\n /**\n * Behavioral event\n * @param args\n */\n }, {\n key: \"submitBehavioralEvent\",\n value: function submitBehavioralEvent(_ref2) {\n var product = _ref2.product,\n agent = _ref2.agent,\n target = _ref2.target,\n verb = _ref2.verb,\n payload = _ref2.payload;\n if (!this.isReady) {\n // @ts-ignore\n this.webex.logger.log(\"NewMetrics: @submitBehavioralEvent. Attempted to submit before webex.ready: \".concat(product, \".\").concat(agent, \".\").concat(target, \".\").concat(verb));\n return _promise.default.resolve();\n }\n this.lazyBuildBehavioralMetrics();\n return this.behavioralMetrics.submitBehavioralEvent({\n product: product,\n agent: agent,\n target: target,\n verb: verb,\n payload: payload\n });\n }\n\n /**\n * Operational event\n * @param args\n */\n }, {\n key: \"submitOperationalEvent\",\n value: function submitOperationalEvent(_ref3) {\n var name = _ref3.name,\n payload = _ref3.payload;\n if (!this.isReady) {\n // @ts-ignore\n this.webex.logger.log(\"NewMetrics: @submitOperationalEvent. Attempted to submit before webex.ready: \".concat(name));\n return _promise.default.resolve();\n }\n this.lazyBuildOperationalMetrics();\n return this.operationalMetrics.submitOperationalEvent({\n name: name,\n payload: payload\n });\n }\n\n /**\n * Buisness event\n * @param args\n */\n }, {\n key: \"submitBusinessEvent\",\n value: function submitBusinessEvent(_ref4) {\n var name = _ref4.name,\n payload = _ref4.payload,\n table = _ref4.table;\n if (!this.isReady) {\n // @ts-ignore\n this.webex.logger.log(\"NewMetrics: @submitBusinessEvent. Attempted to submit before webex.ready: \".concat(name));\n return _promise.default.resolve();\n }\n this.lazyBuildBusinessMetrics();\n return this.businessMetrics.submitBusinessEvent({\n name: name,\n payload: payload,\n table: table\n });\n }\n\n /**\n * Call Analyzer: Media Quality Event\n * @param args\n */\n }, {\n key: \"submitMQE\",\n value: function submitMQE(_ref5) {\n var name = _ref5.name,\n payload = _ref5.payload,\n options = _ref5.options;\n this.callDiagnosticLatencies.saveTimestamp({\n key: name\n });\n this.callDiagnosticMetrics.submitMQE({\n name: name,\n payload: payload,\n options: options\n });\n }\n\n /**\n * Call Analyzer: Feature Usage Event\n * @param args\n */\n }, {\n key: \"submitFeatureEvent\",\n value: function submitFeatureEvent(_ref6) {\n var name = _ref6.name,\n payload = _ref6.payload,\n options = _ref6.options;\n throw new Error('Not implemented.');\n }\n\n /**\n * Call Analyzer: Client Event\n * @public\n * @param args\n */\n }, {\n key: \"submitClientEvent\",\n value: function submitClientEvent(_ref7) {\n var name = _ref7.name,\n payload = _ref7.payload,\n options = _ref7.options;\n if (!this.callDiagnosticLatencies || !this.callDiagnosticMetrics) {\n // @ts-ignore\n this.webex.logger.log(\"NewMetrics: @submitClientEvent. Attempted to submit before webex.ready. Event name: \".concat(name));\n return _promise.default.resolve();\n }\n this.callDiagnosticLatencies.saveTimestamp({\n key: name,\n options: {\n meetingId: options === null || options === void 0 ? void 0 : options.meetingId\n }\n });\n return this.callDiagnosticMetrics.submitClientEvent({\n name: name,\n payload: payload,\n options: options\n });\n }\n\n /**\n * Issue request to alias a user's pre-login ID with their CI UUID\n * @param {string} preLoginId\n * @returns {Object} HttpResponse object\n */\n }, {\n key: \"clientMetricsAliasUser\",\n value: function clientMetricsAliasUser(preLoginId) {\n var _this3 = this;\n // @ts-ignore\n return this.webex.request({\n method: 'POST',\n api: 'metrics',\n resource: 'clientmetrics',\n headers: {\n 'x-prelogin-userid': preLoginId\n },\n body: {},\n qs: {\n alias: true\n }\n }).then(function (res) {\n // @ts-ignore\n _this3.webex.logger.log(\"NewMetrics: @clientMetricsAliasUser. Request successful.\");\n return res;\n }).catch(function (err) {\n // @ts-ignore\n _this3.logger.error(\"NewMetrics: @clientMetricsAliasUser. Request failed:\", \"err: \".concat((0, _utils.generateCommonErrorMetadata)(err)));\n return _promise.default.reject(err);\n });\n }\n\n /**\n * Returns a promise that will resolve to fetch options for submitting a metric.\n *\n * This is to support quickly submitting metrics when the browser/tab is closing.\n * Calling submitClientEvent will not work because there some async steps that will\n * not complete before the browser is closed. Instead, we pre-gather all the\n * information/options needed for the request(s), and then simply and quickly\n * fire the fetch(es) when beforeUnload is triggered.\n *\n * We must use fetch instead of request because fetch has a keepalive option that\n * allows the request it to outlive the page.\n *\n * Note: the timings values will be wrong, but setMetricTimingsAndFetch() will\n * properly adjust them before submitting.\n *\n * @public\n * @param {Object} arg\n * @param {String} arg.name - event name\n * @param {Object} arg.payload - event payload\n * @param {Object} arg.options - other options\n * @returns {Promise} promise that resolves to options to be used with fetch\n */\n }, {\n key: \"buildClientEventFetchRequestOptions\",\n value: (function () {\n var _buildClientEventFetchRequestOptions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref8) {\n var name, payload, options;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n name = _ref8.name, payload = _ref8.payload, options = _ref8.options;\n return _context.abrupt(\"return\", this.callDiagnosticMetrics.buildClientEventFetchRequestOptions({\n name: name,\n payload: payload,\n options: options\n }));\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n function buildClientEventFetchRequestOptions(_x) {\n return _buildClientEventFetchRequestOptions.apply(this, arguments);\n }\n return buildClientEventFetchRequestOptions;\n }()\n /**\n * Submits a metric from pre-built request options via the fetch API. Updates\n * the \"$timings\" and \"originTime\" values to Date.now() since the existing times\n * were set when the options were built (not submitted).\n * @param {any} options - the pre-built request options for submitting a metric\n * @returns {Promise} promise that resolves to the response object\n */\n )\n }, {\n key: \"setMetricTimingsAndFetch\",\n value: function setMetricTimingsAndFetch(options) {\n // @ts-ignore\n return this.webex.setTimingsAndFetch((0, _callDiagnosticMetrics2.setMetricTimings)(options));\n }\n\n /**\n * Returns true if the specified serviceErrorCode maps to an expected error.\n * @param {number} serviceErrorCode the service error code\n * @returns {boolean}\n */\n }, {\n key: \"isServiceErrorExpected\",\n value: function isServiceErrorExpected(serviceErrorCode) {\n return this.callDiagnosticMetrics.isServiceErrorExpected(serviceErrorCode);\n }\n }]);\n return Metrics;\n}(_webexCore.WebexPlugin);\n_class = Metrics;\n// eslint-disable-next-line no-use-before-define\n(0, _defineProperty2.default)(Metrics, \"instance\", void 0);\nvar _default = exports.default = Metrics;\n//# sourceMappingURL=new-metrics.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _genericMetrics = _interopRequireDefault(require(\"./generic-metrics\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n/**\n * @description Util class to handle Operational Metrics\n * @export\n * @class OperationalMetrics\n */\nvar OperationalMetrics = exports.default = /*#__PURE__*/function (_GenericMetrics) {\n (0, _inherits2.default)(OperationalMetrics, _GenericMetrics);\n var _super = _createSuper(OperationalMetrics);\n function OperationalMetrics() {\n (0, _classCallCheck2.default)(this, OperationalMetrics);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(OperationalMetrics, [{\n key: \"submitOperationalEvent\",\n value:\n /**\n * Submit an operational metric to our metrics endpoint.\n * @param {string} name of the metric\n * @param {EventPayload} user payload of the metric\n * @returns {Promise}\n */\n function submitOperationalEvent(_ref) {\n var name = _ref.name,\n payload = _ref.payload;\n var event = this.createTaggedEventObject({\n type: ['operational'],\n name: name,\n payload: payload\n });\n this.submitEvent({\n kind: 'operational-events -> ',\n name: name,\n event: event\n });\n }\n }]);\n return OperationalMetrics;\n}(_genericMetrics.default);\n//# sourceMappingURL=operational-metrics.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _lodash = require(\"lodash\");\nvar _batcher = _interopRequireDefault(require(\"./batcher\"));\nvar _callDiagnosticMetrics = require(\"./call-diagnostic/call-diagnostic-metrics.util\");\nvar _utils = require(\"./utils\");\nvar PRE_LOGIN_METRICS_IDENTIFIER = 'Pre Login Metrics -->';\nvar PreLoginMetricsBatcher = _batcher.default.extend({\n namespace: 'Metrics',\n preLoginId: undefined,\n /**\n * Save the pre-login ID.\n * @param {string} preLoginId The pre-login ID to be saved.\n * @returns {void}\n */\n savePreLoginId: function savePreLoginId(preLoginId) {\n this.preLoginId = preLoginId;\n },\n /**\n * Prepare item\n * @param {any} item\n * @returns {Promise}\n */\n prepareItem: function prepareItem(item) {\n return _promise.default.resolve((0, _callDiagnosticMetrics.prepareDiagnosticMetricItem)(this.webex, item));\n },\n /**\n * Prepare request, add time sensitive date etc.\n * @param {any[]} queue\n * @returns {Promise}\n */\n prepareRequest: function prepareRequest(queue) {\n // Add sent timestamp\n queue.forEach(function (item) {\n item.eventPayload.originTime = item.eventPayload.originTime || {};\n item.eventPayload.originTime.sent = new Date().toISOString();\n });\n return _promise.default.resolve(queue);\n },\n /**\n *\n * @param {any} payload\n * @returns {Promise}\n */\n submitHttpRequest: function submitHttpRequest(payload) {\n var _this = this;\n var batchId = (0, _lodash.uniqueId)('prelogin-batch-');\n if (this.preLoginId === undefined) {\n this.webex.logger.error(PRE_LOGIN_METRICS_IDENTIFIER, \"PreLoginMetricsBatcher: @submitHttpRequest#\".concat(batchId, \". PreLoginId is not set.\"));\n return _promise.default.reject(new Error('PreLoginId is not set.'));\n }\n return this.webex.request({\n method: 'POST',\n service: 'metrics',\n resource: 'clientmetrics-prelogin',\n headers: {\n authorization: false,\n 'x-prelogin-userid': this.preLoginId\n },\n body: {\n metrics: payload\n },\n waitForServiceTimeout: this.webex.config.metrics.waitForServiceTimeout\n }).then(function (res) {\n _this.webex.logger.log(PRE_LOGIN_METRICS_IDENTIFIER, \"PreLoginMetricsBatcher: @submitHttpRequest#\".concat(batchId, \". Request successful.\"));\n return res;\n }).catch(function (err) {\n _this.webex.logger.error(PRE_LOGIN_METRICS_IDENTIFIER, \"PreLoginMetricsBatcher: @submitHttpRequest#\".concat(batchId, \". Request failed:\"), \"error: \".concat((0, _utils.generateCommonErrorMetadata)(err)));\n return _promise.default.reject(err);\n });\n }\n});\nvar _default = exports.default = PreLoginMetricsBatcher;\n//# sourceMappingURL=prelogin-metrics-batcher.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar RTC_METRICS = exports.default = {\n APP_ID: 'FFB51ED5-4319-4C55-8303-B1F2FCCDE231'\n};\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _uuid = _interopRequireDefault(require(\"uuid\"));\nvar CallDiagnosticUtils = _interopRequireWildcard(require(\"../call-diagnostic/call-diagnostic-metrics.util\"));\nvar _constants = _interopRequireDefault(require(\"./constants\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/* eslint-disable class-methods-use-this */\n\nvar parseJsonPayload = function parseJsonPayload(payload) {\n try {\n if (payload && payload[0]) {\n return JSON.parse(payload[0]);\n }\n return null;\n } catch (_) {\n return null;\n }\n};\n\n/**\n * Rtc Metrics\n */\nvar RtcMetrics = exports.default = /*#__PURE__*/function () {\n /**\n * Initialize the interval.\n *\n * @param {object} webex - The main `webex` object.\n * @param {IdType} Ids - Meeting or Calling id.\n * @param {string} correlationId - The correlation id.\n */\n function RtcMetrics(webex, _ref, correlationId) {\n var meetingId = _ref.meetingId,\n callId = _ref.callId;\n (0, _classCallCheck2.default)(this, RtcMetrics);\n /**\n * Array of MetricData items to be sent to the metrics service.\n */\n (0, _defineProperty2.default)(this, \"metricsQueue\", []);\n (0, _defineProperty2.default)(this, \"intervalId\", void 0);\n (0, _defineProperty2.default)(this, \"webex\", void 0);\n (0, _defineProperty2.default)(this, \"meetingId\", void 0);\n (0, _defineProperty2.default)(this, \"callId\", void 0);\n (0, _defineProperty2.default)(this, \"correlationId\", void 0);\n (0, _defineProperty2.default)(this, \"connectionId\", void 0);\n (0, _defineProperty2.default)(this, \"shouldSendMetricsOnNextStatsReport\", void 0);\n // `window` is used to prevent typescript from returning a NodeJS.Timer.\n this.intervalId = window.setInterval(this.sendMetricsInQueue.bind(this), 30 * 1000);\n this.meetingId = meetingId;\n this.callId = callId;\n this.webex = webex;\n this.correlationId = correlationId;\n this.resetConnection();\n }\n\n /**\n * Updates the call identifier with the provided value.\n *\n * @param {string} callId - The new call identifier to set.\n * @returns {void}\n */\n (0, _createClass2.default)(RtcMetrics, [{\n key: \"updateCallId\",\n value: function updateCallId(callId) {\n this.callId = callId;\n }\n\n /**\n * Check to see if the metrics queue has any items.\n *\n * @returns {void}\n */\n }, {\n key: \"sendMetricsInQueue\",\n value: function sendMetricsInQueue() {\n if (this.metricsQueue.length) {\n this.sendMetrics();\n this.metricsQueue = [];\n }\n }\n\n /**\n * Forces sending metrics when we get the next stats-report\n *\n * This is useful for cases when something important happens that affects the media connection,\n * for example when we move from lobby into the meeting.\n *\n * @returns {void}\n */\n }, {\n key: \"sendNextMetrics\",\n value: function sendNextMetrics() {\n this.shouldSendMetricsOnNextStatsReport = true;\n }\n\n /**\n * Add metrics items to the metrics queue.\n *\n * @param {object} data - An object with a payload array of metrics items.\n *\n * @returns {void}\n */\n }, {\n key: \"addMetrics\",\n value: function addMetrics(data) {\n if (data.payload.length) {\n if (data.name === 'stats-report') {\n data.payload = data.payload.map(this.anonymizeIp);\n }\n this.metricsQueue.push(data);\n if (this.shouldSendMetricsOnNextStatsReport && data.name === 'stats-report') {\n // this is the first useful set of data (WCME gives it to us after 5s), send it out immediately\n // in case the user is unhappy and closes the browser early\n this.sendMetricsInQueue();\n this.shouldSendMetricsOnNextStatsReport = false;\n }\n try {\n // If a connection fails, send the rest of the metrics in queue and get a new connection id.\n var parsedPayload = parseJsonPayload(data.payload);\n if (data.name === 'onconnectionstatechange' && parsedPayload && parsedPayload.value === 'failed') {\n this.sendMetricsInQueue();\n this.resetConnection();\n }\n } catch (e) {\n console.error(e);\n }\n }\n }\n\n /**\n * Clear the metrics interval.\n *\n * @returns {void}\n */\n }, {\n key: \"closeMetrics\",\n value: function closeMetrics() {\n this.sendMetricsInQueue();\n clearInterval(this.intervalId);\n }\n\n /**\n * Anonymize IP addresses.\n *\n * @param {array} stats - An RTCStatsReport organized into an array of strings.\n * @returns {string}\n */\n }, {\n key: \"anonymizeIp\",\n value: function anonymizeIp(stats) {\n var data = JSON.parse(stats);\n // on local and remote candidates, anonymize the last 4 bits.\n if (data.type === 'local-candidate' || data.type === 'remote-candidate') {\n data.ip = CallDiagnosticUtils.anonymizeIPAddress(data.ip) || undefined;\n data.address = CallDiagnosticUtils.anonymizeIPAddress(data.address) || undefined;\n data.relatedAddress = CallDiagnosticUtils.anonymizeIPAddress(data.relatedAddress) || undefined;\n }\n return (0, _stringify.default)(data);\n }\n\n /**\n * Set a new connection id.\n *\n * @returns {void}\n */\n }, {\n key: \"resetConnection\",\n value: function resetConnection() {\n this.connectionId = _uuid.default.v4();\n this.shouldSendMetricsOnNextStatsReport = true;\n }\n\n /**\n * Send metrics to the metrics service.\n *\n * @returns {void}\n */\n }, {\n key: \"sendMetrics\",\n value: function sendMetrics() {\n var metricsAttributes = {\n type: 'webrtc',\n version: '1.1.0',\n userId: this.webex.internal.device.userId,\n correlationId: this.correlationId,\n connectionId: this.connectionId,\n data: this.metricsQueue\n };\n if (this.meetingId) {\n metricsAttributes.meetingId = this.meetingId;\n } else if (this.callId) {\n metricsAttributes.callId = this.callId;\n }\n this.webex.request({\n method: 'POST',\n service: 'unifiedTelemetry',\n resource: 'metric/v2',\n headers: {\n type: 'webrtcMedia',\n appId: _constants.default.APP_ID\n },\n body: {\n metrics: [metricsAttributes]\n }\n });\n }\n }]);\n return RtcMetrics;\n}();\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generateCommonErrorMetadata = void 0;\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\n/* eslint-disable import/prefer-default-export */\n/**\n * Generates common metadata for errors\n * @param {any} error\n * @returns {object}\n */\nvar generateCommonErrorMetadata = exports.generateCommonErrorMetadata = function generateCommonErrorMetadata(error) {\n if (error instanceof Error) {\n return (0, _stringify.default)({\n message: error === null || error === void 0 ? void 0 : error.message,\n name: error === null || error === void 0 ? void 0 : error.name,\n stack: error === null || error === void 0 ? void 0 : error.stack\n });\n }\n return error;\n};\n//# sourceMappingURL=utils.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _storage = require(\"./lib/storage\");\nvar _credentialsConfig = _interopRequireDefault(require(\"./credentials-config\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/* eslint camelcase: [0] */\nvar _default = exports.default = {\n maxAppLevelRedirects: 10,\n maxLocusRedirects: 5,\n maxAuthenticationReplays: 1,\n maxReconnectAttempts: 1,\n onBeforeLogout: [],\n trackingIdPrefix: 'webex-js-sdk',\n trackingIdSuffix: '',\n AlternateLogger: undefined,\n credentials: new _credentialsConfig.default(),\n fedramp: process.env.ENABLE_FEDRAMP || false,\n services: {\n /**\n * A list of services that are available prior to catalog collection.\n *\n * @type {Object}\n */\n discovery: {\n /**\n * The hydra discovery url.\n *\n * @type {string}\n */\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n /**\n * The u2c discovery url\n *\n * @type {string}\n */\n u2c: process.env.U2C_SERVICE_URL || 'https://u2c.wbx2.com/u2c/api/v1'\n },\n /**\n * When true, considers all urls in `allowedDomains` as safe for auth tokens\n *\n * @type {boolean}\n */\n validateDomains: true,\n /**\n * services that don't need auth validation\n */\n\n servicesNotNeedValidation: ['webex-appapi-service'],\n /**\n * Contains a list of allowed domain host addresses.\n *\n * @type {Array}\n */\n allowedDomains: []\n },\n device: {\n preDiscoveryServices: {\n hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1',\n hydraServiceUrl: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1'\n },\n validateDomains: true\n },\n metrics: {\n type: ['behavioral', 'operational']\n },\n payloadTransformer: {\n predicates: [],\n transforms: []\n },\n storage: {\n boundedAdapter: _storage.MemoryStoreAdapter,\n unboundedAdapter: _storage.MemoryStoreAdapter\n }\n};\n//# sourceMappingURL=config.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\n// The credentials config which includes the CI server info and derived\n// URL properties from them for the various CI services. The URL's\n// will be updated when the CI changes.\nvar CredentialsConfig = _ampersandState.default.extend({\n // we need to allow extra props for dynamic props like jwtRefreshCallback\n extraProperties: 'allow',\n props: {\n /**\n * The idbroker base host name\n * @returns {object}\n */\n idbroker: ['object', false, function () {\n return {\n url: process.env.IDBROKER_BASE_URL || 'https://idbroker.webex.com'\n };\n }],\n /**\n * The identity base host name\n * @returns {object}\n */\n identity: ['object', false, function () {\n return {\n url: process.env.IDENTITY_BASE_URL || 'https://identity.webex.com'\n };\n }],\n /**\n * This is the authorization url displayed on the\n * {@link developer portal|https://developer.webex.com}\n * @type {string}\n */\n authorizationString: ['string', false, process.env.WEBEX_AUTHORIZATION_STRING || process.env.AUTHORIZATION_STRING],\n /**\n * Authorization URL which prompts for user's password. Inferred from\n * {@link config.credentials.authorizationString}. This config value will\n * be automatically set if `authorizationString` config value is specified.\n *\n * @type {string}\n */\n authorizeUrl: ['string', false, process.env.WEBEX_AUTHORIZE_URL || \"\".concat(process.env.IDBROKER_BASE_URL || 'https://idbroker.webex.com', \"/idb/oauth2/v1/authorize\")],\n /**\n * {@see https://tools.ietf.org/html/rfc6749#section-4.1.4}\n * @type {string}\n */\n client_id: ['string', false, process.env.WEBEX_CLIENT_ID || process.env.COMMON_IDENTITY_CLIENT_ID || process.env.CLIENT_ID],\n /**\n * {@see https://tools.ietf.org/html/rfc6749#section-4.1.4}\n * @type {string}\n */\n client_secret: ['string', false, process.env.WEBEX_CLIENT_SECRET || process.env.COMMON_IDENTITY_CLIENT_SECRET || process.env.CLIENT_SECRET],\n /**\n * {@see https://tools.ietf.org/html/rfc6749#section-4.1.4}\n * @type {string}\n */\n redirect_uri: ['string', false, process.env.WEBEX_REDIRECT_URI || process.env.COMMON_IDENTITY_REDIRECT_URI || process.env.REDIRECT_URI],\n /**\n * {@see https://tools.ietf.org/html/rfc6749#section-4.1.4}\n * @type {string}\n */\n scope: ['string', false, process.env.WEBEX_SCOPE || process.env.WEBEX_SCOPES || process.env.COMMON_IDENTITY_SCOPE || process.env.SCOPE],\n /**\n * Controls the UI of the CI login page.\n * @private\n * @type {string}\n */\n cisService: ['string', false, 'webex']\n },\n derived: {\n /**\n * User activation URL\n * {@link config.credentials.activationUrl}\n * @type {string}\n */\n activationUrl: {\n deps: ['idbroker.url'],\n fn: function fn() {\n return \"\".concat(this.idbroker.url || 'https://idbroker.webex.com', \"/idb/token/v1/actions/UserActivation/invoke\");\n },\n cache: false\n },\n /**\n * Generate OTP URL\n * {@link config.credentials.generateOtpUrl}\n * @type {string}\n */\n generateOtpUrl: {\n deps: ['idbroker.url'],\n fn: function fn() {\n return \"\".concat(this.idbroker.url || 'https://idbroker.webex.com', \"/idb/token/v1/actions/UserOTP/Generate/invoke\");\n },\n cache: false\n },\n /**\n * Validate OTP URL\n * {@link config.credentials.validateOtpUrl}\n * @type {string}\n */\n validateOtpUrl: {\n deps: ['idbroker.url'],\n fn: function fn() {\n return \"\".concat(this.idbroker.url || 'https://idbroker.webex.com', \"/idb/token/v1/actions/UserOTP/Validate/invoke\");\n },\n cache: false\n },\n // TODO does hydra also have an access_token endpoint?\n /**\n * Token URL used for token refresh and auth code exchange\n * @type {string}\n */\n tokenUrl: {\n deps: ['idbroker.url'],\n fn: function fn() {\n return process.env.TOKEN_URL || \"\".concat(this.idbroker.url, \"/idb/oauth2/v1/access_token\");\n },\n cache: false\n },\n /**\n * URL to revoke token\n * @type {string}\n */\n revokeUrl: {\n deps: ['idbroker.url'],\n fn: function fn() {\n return process.env.REVOKE_URL || \"\".concat(this.idbroker.url, \"/idb/oauth2/v1/revoke\");\n },\n cache: false\n },\n /**\n * URL to load when the app logs out\n * @type {string}\n */\n logoutUrl: {\n deps: ['idbroker.url'],\n fn: function fn() {\n return \"\".concat(this.idbroker.url, \"/idb/oauth2/v1/logout\");\n },\n cache: false\n },\n /**\n * Set password URL\n * @type {string}\n */\n setPasswordUrl: {\n deps: ['identity.url'],\n fn: function fn() {\n return \"\".concat(this.identity.url || 'https://identity.webex.com', \"/identity/scim/v1/Users\");\n },\n cache: false\n }\n }\n});\nvar _default = exports.default = CredentialsConfig;\n//# sourceMappingURL=credentials-config.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"AuthInterceptor\", {\n enumerable: true,\n get: function get() {\n return _auth.default;\n }\n});\n_Object$defineProperty(exports, \"Batcher\", {\n enumerable: true,\n get: function get() {\n return _batcher.default;\n }\n});\n_Object$defineProperty(exports, \"Credentials\", {\n enumerable: true,\n get: function get() {\n return _credentials.Credentials;\n }\n});\n_Object$defineProperty(exports, \"DefaultOptionsInterceptor\", {\n enumerable: true,\n get: function get() {\n return _defaultOptions.default;\n }\n});\n_Object$defineProperty(exports, \"EmbargoInterceptor\", {\n enumerable: true,\n get: function get() {\n return _embargo.default;\n }\n});\n_Object$defineProperty(exports, \"HostMapInterceptor\", {\n enumerable: true,\n get: function get() {\n return _services.HostMapInterceptor;\n }\n});\n_Object$defineProperty(exports, \"MemoryStoreAdapter\", {\n enumerable: true,\n get: function get() {\n return _storage.MemoryStoreAdapter;\n }\n});\n_Object$defineProperty(exports, \"NetworkTimingInterceptor\", {\n enumerable: true,\n get: function get() {\n return _networkTiming.default;\n }\n});\n_Object$defineProperty(exports, \"NotFoundError\", {\n enumerable: true,\n get: function get() {\n return _storage.NotFoundError;\n }\n});\n_Object$defineProperty(exports, \"Page\", {\n enumerable: true,\n get: function get() {\n return _page.default;\n }\n});\n_Object$defineProperty(exports, \"PayloadTransformerInterceptor\", {\n enumerable: true,\n get: function get() {\n return _payloadTransformer.default;\n }\n});\n_Object$defineProperty(exports, \"RateLimitInterceptor\", {\n enumerable: true,\n get: function get() {\n return _rateLimit.default;\n }\n});\n_Object$defineProperty(exports, \"RedirectInterceptor\", {\n enumerable: true,\n get: function get() {\n return _redirect.default;\n }\n});\n_Object$defineProperty(exports, \"RequestEventInterceptor\", {\n enumerable: true,\n get: function get() {\n return _requestEvent.default;\n }\n});\n_Object$defineProperty(exports, \"RequestLoggerInterceptor\", {\n enumerable: true,\n get: function get() {\n return _requestLogger.default;\n }\n});\n_Object$defineProperty(exports, \"RequestTimingInterceptor\", {\n enumerable: true,\n get: function get() {\n return _requestTiming.default;\n }\n});\n_Object$defineProperty(exports, \"ResponseLoggerInterceptor\", {\n enumerable: true,\n get: function get() {\n return _responseLogger.default;\n }\n});\n_Object$defineProperty(exports, \"ServerErrorInterceptor\", {\n enumerable: true,\n get: function get() {\n return _services.ServerErrorInterceptor;\n }\n});\n_Object$defineProperty(exports, \"ServiceCatalog\", {\n enumerable: true,\n get: function get() {\n return _services.ServiceCatalog;\n }\n});\n_Object$defineProperty(exports, \"ServiceHost\", {\n enumerable: true,\n get: function get() {\n return _services.ServiceHost;\n }\n});\n_Object$defineProperty(exports, \"ServiceInterceptor\", {\n enumerable: true,\n get: function get() {\n return _services.ServiceInterceptor;\n }\n});\n_Object$defineProperty(exports, \"ServiceRegistry\", {\n enumerable: true,\n get: function get() {\n return _services.ServiceRegistry;\n }\n});\n_Object$defineProperty(exports, \"ServiceState\", {\n enumerable: true,\n get: function get() {\n return _services.ServiceState;\n }\n});\n_Object$defineProperty(exports, \"ServiceUrl\", {\n enumerable: true,\n get: function get() {\n return _services.ServiceUrl;\n }\n});\n_Object$defineProperty(exports, \"Services\", {\n enumerable: true,\n get: function get() {\n return _services.Services;\n }\n});\n_Object$defineProperty(exports, \"StatelessWebexPlugin\", {\n enumerable: true,\n get: function get() {\n return _statelessWebexPlugin.default;\n }\n});\n_Object$defineProperty(exports, \"StorageError\", {\n enumerable: true,\n get: function get() {\n return _storage.StorageError;\n }\n});\n_Object$defineProperty(exports, \"Token\", {\n enumerable: true,\n get: function get() {\n return _credentials.Token;\n }\n});\n_Object$defineProperty(exports, \"UserAgentInterceptor\", {\n enumerable: true,\n get: function get() {\n return _userAgent.default;\n }\n});\n_Object$defineProperty(exports, \"WebexHttpError\", {\n enumerable: true,\n get: function get() {\n return _webexHttpError.default;\n }\n});\n_Object$defineProperty(exports, \"WebexPlugin\", {\n enumerable: true,\n get: function get() {\n return _webexPlugin.default;\n }\n});\n_Object$defineProperty(exports, \"WebexTrackingIdInterceptor\", {\n enumerable: true,\n get: function get() {\n return _webexTrackingId.default;\n }\n});\n_Object$defineProperty(exports, \"WebexUserAgentInterceptor\", {\n enumerable: true,\n get: function get() {\n return _webexUserAgent.default;\n }\n});\n_Object$defineProperty(exports, \"config\", {\n enumerable: true,\n get: function get() {\n return _config.default;\n }\n});\n_Object$defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _webexCore.default;\n }\n});\n_Object$defineProperty(exports, \"filterScope\", {\n enumerable: true,\n get: function get() {\n return _credentials.filterScope;\n }\n});\n_Object$defineProperty(exports, \"grantErrors\", {\n enumerable: true,\n get: function get() {\n return _credentials.grantErrors;\n }\n});\n_Object$defineProperty(exports, \"makeWebexPluginStore\", {\n enumerable: true,\n get: function get() {\n return _storage.makeWebexPluginStore;\n }\n});\n_Object$defineProperty(exports, \"makeWebexStore\", {\n enumerable: true,\n get: function get() {\n return _storage.makeWebexStore;\n }\n});\n_Object$defineProperty(exports, \"persist\", {\n enumerable: true,\n get: function get() {\n return _storage.persist;\n }\n});\n_Object$defineProperty(exports, \"registerInternalPlugin\", {\n enumerable: true,\n get: function get() {\n return _webexCore.registerInternalPlugin;\n }\n});\n_Object$defineProperty(exports, \"registerPlugin\", {\n enumerable: true,\n get: function get() {\n return _webexCore.registerPlugin;\n }\n});\n_Object$defineProperty(exports, \"serviceConstants\", {\n enumerable: true,\n get: function get() {\n return _services.constants;\n }\n});\n_Object$defineProperty(exports, \"sortScope\", {\n enumerable: true,\n get: function get() {\n return _credentials.sortScope;\n }\n});\n_Object$defineProperty(exports, \"waitForValue\", {\n enumerable: true,\n get: function get() {\n return _storage.waitForValue;\n }\n});\n_Object$defineProperty(exports, \"webexTrackingIdSequenceNumbers\", {\n enumerable: true,\n get: function get() {\n return _webexTrackingId.sequenceNumbers;\n }\n});\nrequire(\"./plugins/logger\");\nvar _credentials = require(\"./lib/credentials\");\nvar _services = require(\"./lib/services\");\nvar _storage = require(\"./lib/storage\");\nvar _webexCore = _interopRequireWildcard(require(\"./webex-core\"));\nvar _webexHttpError = _interopRequireDefault(require(\"./lib/webex-http-error\"));\nvar _statelessWebexPlugin = _interopRequireDefault(require(\"./lib/stateless-webex-plugin\"));\nvar _webexPlugin = _interopRequireDefault(require(\"./lib/webex-plugin\"));\nvar _auth = _interopRequireDefault(require(\"./interceptors/auth\"));\nvar _networkTiming = _interopRequireDefault(require(\"./interceptors/network-timing\"));\nvar _payloadTransformer = _interopRequireDefault(require(\"./interceptors/payload-transformer\"));\nvar _redirect = _interopRequireDefault(require(\"./interceptors/redirect\"));\nvar _responseLogger = _interopRequireDefault(require(\"./interceptors/response-logger\"));\nvar _requestEvent = _interopRequireDefault(require(\"./interceptors/request-event\"));\nvar _requestLogger = _interopRequireDefault(require(\"./interceptors/request-logger\"));\nvar _requestTiming = _interopRequireDefault(require(\"./interceptors/request-timing\"));\nvar _userAgent = _interopRequireDefault(require(\"./interceptors/user-agent\"));\nvar _webexTrackingId = _interopRequireWildcard(require(\"./interceptors/webex-tracking-id\"));\nvar _webexUserAgent = _interopRequireDefault(require(\"./interceptors/webex-user-agent\"));\nvar _rateLimit = _interopRequireDefault(require(\"./interceptors/rate-limit\"));\nvar _embargo = _interopRequireDefault(require(\"./interceptors/embargo\"));\nvar _defaultOptions = _interopRequireDefault(require(\"./interceptors/default-options\"));\nvar _batcher = _interopRequireDefault(require(\"./lib/batcher\"));\nvar _page = _interopRequireDefault(require(\"./lib/page\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar AuthInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(AuthInterceptor, _Interceptor);\n var _super = _createSuper(AuthInterceptor);\n function AuthInterceptor() {\n (0, _classCallCheck2.default)(this, AuthInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(AuthInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see {@link Interceptor#onRequest}\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n var _this = this;\n options.headers = options.headers || {};\n\n // If Authorizations is already set, don't overwrite it\n if ('authorization' in options.headers || 'auth' in options) {\n // If Authorization is set to null, false, or undefined, delete it to\n // prevent a CORS preflight.\n if (!options.headers.authorization) {\n (0, _deleteProperty.default)(options.headers, 'authorization');\n }\n return _promise.default.resolve(options);\n }\n return this.requiresCredentials(options).then(function (requires) {\n if (!requires) {\n return options;\n }\n return _this.webex.credentials.getUserToken().then(function (token) {\n options.headers.authorization = token.toString();\n return options;\n });\n });\n }\n\n /**\n * Determines if the provided options object needs an authorization header.\n *\n * @param {Object} options\n * @returns {Promise}\n */\n }, {\n key: \"requiresCredentials\",\n value: function requiresCredentials(options) {\n var _this2 = this;\n // Validate that authorization is necessary.\n if (options.addAuthHeader === false) {\n return _promise.default.resolve(false);\n }\n\n // Validate that the services plugin has been loaded before proceeding.\n if (!this.webex.internal.services) {\n return _promise.default.resolve(false);\n }\n\n // Destructure webex instance to isolate services plugin.\n var services = this.webex.internal.services;\n\n // Store the current service details if available and destructure details.\n var details = services.getServiceFromUrl(options.uri || '');\n var _ref = details || {},\n name = _ref.name;\n var resource = options.resource,\n uri = options.uri;\n var service = options.service || options.api;\n\n // Unique validation for the u2c service.\n if (service && service === 'u2c' || name && name === 'u2c') {\n if (resource && resource.includes('limited') || uri && uri.includes('limited')) {\n return _promise.default.resolve(false);\n }\n return _promise.default.resolve(true);\n }\n\n // Validate that the allowed domains can be utilized.\n if (services.validateDomains && services.hasAllowedDomains() && uri && services.isAllowedDomainUrl(uri)) {\n return _promise.default.resolve(true);\n }\n\n // Perform an additional validation in case the service does not exist yet.\n return services.waitForService({\n name: service,\n url: uri\n }).then(function (detectedUrl) {\n // Validate that the url exists in the catalog.\n if (services.getServiceFromUrl(detectedUrl)) {\n return true;\n }\n\n // Return false to indicate authentication is not required.\n return false;\n }).catch(function (error) {\n _this2.webex.logger.warn('auth-interceptor: failed to validate service exists in catalog', error);\n return false;\n });\n }\n\n /**\n * @see {@link Interceptor#onResponseError}\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n var _this3 = this;\n return this.shouldAttemptReauth(reason, options).then(function (shouldAttemptReauth) {\n if (shouldAttemptReauth) {\n _this3.webex.logger.info('auth: received 401, attempting to reauthenticate');\n if (reason.options.headers) {\n (0, _deleteProperty.default)(reason.options.headers, 'authorization');\n }\n if (_this3.webex.credentials.canRefresh) {\n return _this3.webex.credentials.refresh().then(function () {\n return _this3.replay(options);\n });\n }\n }\n return _promise.default.reject(reason);\n });\n }\n\n /**\n * Replays the request\n * @param {Object} options\n * @returns {Object}\n */\n }, {\n key: \"replay\",\n value: function replay(options) {\n if (options.replayCount) {\n options.replayCount += 1;\n } else {\n options.replayCount = 1;\n }\n if (options.replayCount > this.webex.config.maxAuthenticationReplays) {\n this.webex.logger.error(\"auth: failed after \".concat(this.webex.config.maxAuthenticationReplays, \" replay attempts\"));\n return _promise.default.reject(new Error(\"Failed after \".concat(this.webex.config.maxAuthenticationReplays, \" replay attempts\")));\n }\n this.webex.logger.info(\"auth: replaying request \".concat(options.replayCount, \" time\"));\n return this.webex.request(options);\n }\n\n /**\n * Indicates whether or not the current request should refresh its access\n * token in event of a 401\n * @param {Error} reason\n * @param {Object} options\n * @returns {Promise}\n */\n }, {\n key: \"shouldAttemptReauth\",\n value: function shouldAttemptReauth(reason, options) {\n if (options && options.shouldRefreshAccessToken === false) {\n return _promise.default.resolve(false);\n }\n if (reason.statusCode === 401) {\n return _promise.default.resolve(true);\n }\n return _promise.default.resolve(false);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {AuthInterceptor}\n */\n function create() {\n return new AuthInterceptor({\n webex: this\n });\n }\n }]);\n return AuthInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=auth.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Allows the user of the SDK to set default options that apply every http request made by the SDK\n * For example a default timeout could be set for all requests like this :\n *\n * webex = WebexSdk.init({\n * credentials: {\n * supertoken: superToken\n * },\n * config: {\n * credentials: {\n * client_id,\n * client_secret\n * },\n * defaultRequestOptions: {\n * timeout: 15000\n * }\n * }\n * });\n */\nvar DefaultOptionsInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(DefaultOptionsInterceptor, _Interceptor);\n var _super = _createSuper(DefaultOptionsInterceptor);\n function DefaultOptionsInterceptor() {\n (0, _classCallCheck2.default)(this, DefaultOptionsInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(DefaultOptionsInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n var defaultOptions = this.webex.config.defaultRequestOptions;\n if (!defaultOptions) {\n return options;\n }\n (0, _keys.default)(defaultOptions).forEach(function (key) {\n // don't override any existing option properties\n if (!(0, _keys.default)(options).includes(key)) {\n options[key] = defaultOptions[key];\n }\n });\n return options;\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {DefaultOptionsInterceptor}\n */\n function create() {\n return new DefaultOptionsInterceptor({\n webex: this\n });\n }\n }]);\n return DefaultOptionsInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=default-options.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar EmbargoInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(EmbargoInterceptor, _Interceptor);\n var _super = _createSuper(EmbargoInterceptor);\n function EmbargoInterceptor() {\n (0, _classCallCheck2.default)(this, EmbargoInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(EmbargoInterceptor, [{\n key: \"onResponseError\",\n value:\n /**\n * @see Interceptor#onResponseError\n * @param {Object} options\n * @param {Error} reason\n * @returns {Promise}\n */\n function onResponseError(options, reason) {\n if (reason.statusCode === 451) {\n var device = this.webex.internal.device;\n var loggerMessage = ['Received `HTTP 451 Unavailable For Legal Reasons`, ', 'discarding credentials and device registration'].join('');\n if (device) {\n this.webex.internal.device.clear();\n }\n this.webex.credentials.clear();\n this.webex.logger.info(loggerMessage);\n }\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {EmbargoInterceptor}\n */\n function create() {\n /* eslint no-invalid-this: [0] */\n return new EmbargoInterceptor({\n webex: this\n });\n }\n }]);\n return EmbargoInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=embargo.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar NetworkTimingInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(NetworkTimingInterceptor, _Interceptor);\n var _super = _createSuper(NetworkTimingInterceptor);\n function NetworkTimingInterceptor() {\n (0, _classCallCheck2.default)(this, NetworkTimingInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(NetworkTimingInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n options.$timings = options.$timings || {};\n options.$timings.networkStart = (0, _now.default)();\n return options;\n }\n\n /**\n * @see Interceptor#onResponse\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n }, {\n key: \"onResponse\",\n value: function onResponse(options, response) {\n options.$timings.networkEnd = (0, _now.default)();\n return response;\n }\n\n /**\n * @see Interceptor#onResponseError\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n options.$timings.networkEnd = (0, _now.default)();\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @param {Object} options\n * @returns {NetworkTimingInterceptor}\n */\n function create(options) {\n return new NetworkTimingInterceptor(this, options);\n }\n }]);\n return NetworkTimingInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=network-timing.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar PayloadTransformerInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(PayloadTransformerInterceptor, _Interceptor);\n var _super = _createSuper(PayloadTransformerInterceptor);\n function PayloadTransformerInterceptor() {\n (0, _classCallCheck2.default)(this, PayloadTransformerInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(PayloadTransformerInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n if (options.noTransform) {\n return options;\n }\n return this.webex.transform('outbound', options);\n }\n\n /**\n * @see Interceptor#onResponse\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n }, {\n key: \"onResponse\",\n value: function onResponse(options, response) {\n if (options.disableTransform) {\n return response;\n }\n return this.webex.transform('inbound', response);\n }\n\n /**\n * @see Interceptor#onResponseError\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n return this.webex.transform('inbound', reason).then(function (r) {\n return _promise.default.reject(r || reason);\n });\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @param {Object} options\n * @returns {PayloadTransformerInterceptor}\n */\n function create() {\n return new PayloadTransformerInterceptor({\n webex: this\n });\n }\n }]);\n return PayloadTransformerInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=payload-transformer.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n// contains the system time in milliseconds at which the retry after associated with a 429 expires\n// mapped by the API name, e.g.: idbroker.webex.com/doStuff would be mapped as 'doStuff'\nvar rateLimitExpiryTime = new _weakMap.default();\n\n// extracts the common identity API being called\nvar idBrokerRegex = /.*(idbroker|identity)(bts)?.ciscospark.com\\/([^/]+)/;\n\n/**\n * @class\n */\nvar RateLimitInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(RateLimitInterceptor, _Interceptor);\n var _super = _createSuper(RateLimitInterceptor);\n /**\n * constructor\n * @param {mixed} args\n * @returns {Exception}\n */\n function RateLimitInterceptor() {\n var _this;\n (0, _classCallCheck2.default)(this, RateLimitInterceptor);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n rateLimitExpiryTime.set((0, _assertThisInitialized2.default)(_this), new _map.default());\n return _this;\n }\n\n /**\n * @see {@link Interceptor#onRequest}\n * @param {Object} options\n * @returns {Object}\n */\n (0, _createClass2.default)(RateLimitInterceptor, [{\n key: \"onRequest\",\n value: function onRequest(options) {\n if (this.isRateLimited(options.uri)) {\n return _promise.default.reject(new Error(\"API rate limited \".concat(options.uri)));\n }\n return _promise.default.resolve(options);\n }\n\n /**\n * @see {@link Interceptor#onResponseError}\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n if (reason.statusCode === 429 && (options.uri.includes('idbroker') || options.uri.includes('identity'))) {\n // set the retry after in the map, setting to milliseconds\n this.setRateLimitExpiry(options.uri, this.extractRetryAfterTime(options));\n }\n return _promise.default.reject(reason);\n }\n\n /**\n * @param {object} options associated with the request\n * @returns {number} retry after time in milliseconds\n */\n }, {\n key: \"extractRetryAfterTime\",\n value: function extractRetryAfterTime(options) {\n // 1S * 1K === 1MS\n var milliMultiplier = 1000;\n var retryAfter = options.headers['retry-after'] || null;\n\n // set 60 retry if no usable time defined\n if (retryAfter === null || retryAfter <= 0) {\n return 60 * milliMultiplier;\n }\n // set max to 3600 S (1 hour) if greater than 1 hour\n if (retryAfter > 3600) {\n return 3600 * milliMultiplier;\n }\n return retryAfter * milliMultiplier;\n }\n\n /**\n * Set the system time at which the rate limiting\n * will expire in the rateLimitExpiryTime map.\n * Assumes retryAfter is in milliseconds\n * @param {string} uri API issuing the rate limiting\n * @param {number} retryAfter milliseconds until rate limiting expires\n * @returns {bool} true is value was successfully set\n */\n }, {\n key: \"setRateLimitExpiry\",\n value: function setRateLimitExpiry(uri, retryAfter) {\n var apiName = this.getApiName(uri);\n if (!apiName) {\n return false;\n }\n var currTimeMilli = new Date().getTime();\n var expiry = currTimeMilli + retryAfter;\n var dict = rateLimitExpiryTime.get(this);\n return dict.set(apiName, expiry);\n }\n\n /**\n * returns true if the API is currently rate limited\n * @param {string} uri\n * @returns {Boolean} indicates whether or not the API is rate currently rate limited\n */\n }, {\n key: \"getRateLimitStatus\",\n value: function getRateLimitStatus(uri) {\n var apiName = this.getApiName(uri);\n if (!apiName) {\n return false;\n }\n var currTimeMilli = new Date().getTime();\n var dict = rateLimitExpiryTime.get(this);\n var expiryTime = dict.get(apiName);\n\n // if no rate limit expiry has been registered in the map, return false.\n if (expiryTime === undefined) {\n return false;\n }\n\n // return true, indicating rate limiting, if the system time is less than the expiry time\n return currTimeMilli < dict.get(apiName);\n }\n\n /**\n * split the URI and returns the API name of idBroker\n * @param {string} uri\n * @returns {string}\n */\n }, {\n key: \"getApiName\",\n value: function getApiName(uri) {\n if (!uri) {\n return null;\n }\n var results = uri.match(idBrokerRegex);\n if (!results) {\n return null;\n }\n\n // group 0 = full match of URL, group 1 = identity or idbroker base\n // group 2 = api name\n return results[2];\n }\n\n /**\n * check URI against list of currently rate limited\n * URIs, and determines if retry-after\n * @param {String} uri pattern to check\n * @returns {bool}\n */\n }, {\n key: \"isRateLimited\",\n value: function isRateLimited(uri) {\n // determine if the URI is associated with a common identity API\n if (uri && (uri.includes('idbroker') || uri.includes('identity'))) {\n return this.getRateLimitStatus(uri);\n }\n return false;\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {RateLimitInterceptor}\n */\n function create() {\n return new RateLimitInterceptor({\n webex: this\n });\n }\n }]);\n return RateLimitInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=rate-limit.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _lodash = require(\"lodash\");\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable prefer-destructuring */ /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar requestHeaderName = 'cisco-no-http-redirect';\nvar responseHeaderName = 'cisco-location';\nvar LOCUS_REDIRECT_ERROR = 2000002;\n\n/**\n * @class\n */\nvar RedirectInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(RedirectInterceptor, _Interceptor);\n var _super = _createSuper(RedirectInterceptor);\n function RedirectInterceptor() {\n (0, _classCallCheck2.default)(this, RedirectInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(RedirectInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n if (options && options.uri && typeof options.uri === 'string') {\n if (options.uri.includes('https://idbroker') || options.uri.includes(this.webex.config.credentials.samlUrl) || options.uri.includes(this.webex.config.credentials.tokenUrl) || options.uri.includes(this.webex.config.credentials.authorizeUrl)) {\n return options;\n }\n }\n\n // If cisco-no-http-redirect is already set, don't overwrite it\n if (requestHeaderName in options.headers) {\n // If cisco-no-http-redirect is set to null, false, or undefined, delete\n // it to prevent a CORS preflight.\n if (!options.headers[requestHeaderName]) {\n (0, _deleteProperty.default)(options.headers, requestHeaderName);\n }\n return options;\n }\n options.headers[requestHeaderName] = true;\n options.$redirectCount = options.$redirectCount || 0;\n return options;\n }\n\n /**\n * @see Interceptor#onResponse\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n }, {\n key: \"onResponse\",\n value: function onResponse(options, response) {\n /* eslint-disable no-else-return */\n if (response.headers && response.headers[responseHeaderName]) {\n options = (0, _lodash.clone)(options);\n options.uri = response.headers[responseHeaderName];\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxAppLevelRedirects) {\n return _promise.default.reject(new Error('Maximum redirects exceeded'));\n }\n return this.webex.request(options);\n } else if (response.headers && response.body && response.body.errorCode === LOCUS_REDIRECT_ERROR && response.body.location) {\n options = (0, _lodash.clone)(options);\n this.webex.logger.warn('redirect: url redirects needed from', options.uri);\n if (response.options && response.options.qs) {\n // for POST requests\n var newUrl = response.body.location.split('?');\n options.uri = newUrl[0]; // params are already present in the qs\n } else {\n // for GET requests\n options.uri = response.body.location;\n }\n this.webex.logger.warn('redirect: url redirects needed to', options.uri);\n options.$redirectCount += 1;\n if (options.$redirectCount > this.webex.config.maxLocusRedirects) {\n return _promise.default.reject(new Error('Maximum redirects exceeded'));\n }\n return this.webex.request(options);\n }\n /* eslint-enable no-else-return */\n\n return response;\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {RedirectInterceptor}\n */\n function create() {\n return new RedirectInterceptor({\n webex: this\n });\n }\n }]);\n return RedirectInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=redirect.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _lodash = require(\"lodash\");\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar RequestEventInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(RequestEventInterceptor, _Interceptor);\n var _super = _createSuper(RequestEventInterceptor);\n function RequestEventInterceptor() {\n (0, _classCallCheck2.default)(this, RequestEventInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(RequestEventInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n try {\n this.webex.trigger('request:start', options);\n } catch (error) {\n logger.warn('event handler for request:start failed ', error);\n }\n return _promise.default.resolve(options);\n }\n\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onRequestError\",\n value: function onRequestError(options, reason) {\n // We need to do the normal onRequest logging, but then log how the request\n // failed since the response logger won't be called.\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n try {\n this.webex.trigger('request:end', options, reason);\n this.webex.trigger('request:failure', options, reason);\n } catch (error) {\n logger.warn('event handler for request:end failed ', error);\n }\n return _promise.default.reject(reason);\n }\n\n /**\n * @see Interceptor#onResponse\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n }, {\n key: \"onResponse\",\n value: function onResponse(options, response) {\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n try {\n this.webex.trigger('request:success', response.options, response);\n } catch (error) {\n logger.warn('event handler for request:success failed ', error);\n }\n return _promise.default.resolve(response);\n }\n\n /**\n * @see Interceptor#onResponseError\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n try {\n this.webex.trigger('request:end', options, reason);\n this.webex.trigger('request:failure', options, reason);\n } catch (error) {\n logger.warn('event handler for request:failure failed ', error);\n }\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {RequestEventInterceptor}\n */\n function create() {\n return new RequestEventInterceptor({\n webex: this\n });\n }\n }]);\n return RequestEventInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=request-event.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _util = _interopRequireDefault(require(\"util\"));\nvar _lodash = require(\"lodash\");\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar RequestLoggerInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(RequestLoggerInterceptor, _Interceptor);\n var _super = _createSuper(RequestLoggerInterceptor);\n function RequestLoggerInterceptor() {\n (0, _classCallCheck2.default)(this, RequestLoggerInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(RequestLoggerInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n logger.info('/**********************************************************************\\\\ ');\n logger.info('Request:', options.method || 'GET', options.uri);\n logger.info('WEBEX_TRACKINGID: ', (0, _lodash.get)(options, 'headers.trackingid'));\n /* istanbul ignore next */\n if ((0, _lodash.has)(options, 'headers.x-trans-id')) {\n logger.info('X-Trans-ID: ', (0, _lodash.get)(options, 'headers.x-trans-id'));\n }\n var now = new Date();\n if (process.env.ENABLE_VERBOSE_NETWORK_LOGGING) {\n logger.info('timestamp (start): ', now.getTime(), now.toISOString());\n try {\n // Determine if body is a buffer without relying on Buffer to avoid\n // node/browser conflicts.\n if (options.body && options.body.length && !(0, _lodash.isArray)(options.body) && !(0, _lodash.isString)(options.body)) {\n logger.info('Request Options:', _util.default.inspect((0, _lodash.omit)(options, 'body'), {\n depth: null\n }));\n } else {\n logger.info('Request Options:', _util.default.inspect(options, {\n depth: null\n }));\n }\n } catch (e) {\n logger.warn('Could not stringify request options:', e);\n }\n }\n return _promise.default.resolve(options);\n }\n\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onRequestError\",\n value: function onRequestError(options, reason) {\n // We need to do the normal onRequest logging, but then log how the request\n // failed since the response logger won't be called.\n this.onRequest(options);\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n logger.error('Request Failed: ', reason.stack);\n logger.info('\\\\**********************************************************************/');\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {RequestLoggerInterceptor}\n */\n function create() {\n return new RequestLoggerInterceptor({\n webex: this\n });\n }\n }]);\n return RequestLoggerInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=request-logger.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar RequestTimingInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(RequestTimingInterceptor, _Interceptor);\n var _super = _createSuper(RequestTimingInterceptor);\n function RequestTimingInterceptor() {\n (0, _classCallCheck2.default)(this, RequestTimingInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(RequestTimingInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n options.$timings = options.$timings || {};\n options.$timings.requestStart = (0, _now.default)();\n return options;\n }\n\n /**\n * @see Interceptor#onRequestError\n * @param {Object} options\n * @returns {Object}\n */\n }, {\n key: \"onRequestError\",\n value: function onRequestError(options) {\n options.$timings.requestEnd = options.$timings.requestFail = (0, _now.default)();\n return _promise.default.reject(options);\n }\n\n /**\n * @see Interceptor#onResponse\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n }, {\n key: \"onResponse\",\n value: function onResponse(options, response) {\n options.$timings.requestEnd = (0, _now.default)();\n return _promise.default.resolve(response);\n }\n\n /**\n * @see Interceptor#onResponseError\n * @param {Object} options\n * @param {Error} reason\n * @returns {Object}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n options.$timings.requestEnd = options.$timings.requestFail = (0, _now.default)();\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @param {Object} options\n * @returns {RequestTimingInterceptor}\n */\n function create(options) {\n return new RequestTimingInterceptor(this, options);\n }\n }]);\n return RequestTimingInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=request-timing.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _util = _interopRequireDefault(require(\"util\"));\nvar _lodash = require(\"lodash\");\nvar _httpCore = require(\"@webex/http-core\");\nvar _common = require(\"@webex/common\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * @class\n */\nvar ResponseLoggerInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(ResponseLoggerInterceptor, _Interceptor);\n var _super = _createSuper(ResponseLoggerInterceptor);\n function ResponseLoggerInterceptor() {\n (0, _classCallCheck2.default)(this, ResponseLoggerInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(ResponseLoggerInterceptor, [{\n key: \"onResponse\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Object}\n */\n function onResponse(options, response) {\n var now = new Date();\n this.printResponseHeader(options, response);\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n if (process.env.ENABLE_VERBOSE_NETWORK_LOGGING) {\n logger.info('timestamp (end): ', now.getTime(), now.toISOString());\n if (typeof response.body === 'string' || (0, _common.isBuffer)(response.body)) {\n logger.info('Response: ', 'Not printed, it`s probably a file');\n } else if ((0, _typeof2.default)(response.body) === 'object') {\n try {\n logger.info('Response: ', _util.default.inspect((0, _lodash.omit)(response.body, 'features'), {\n depth: null\n }));\n } catch (err) {\n logger.info('Response: ', '[Not Serializable]', err);\n }\n }\n }\n logger.info('\\\\**********************************************************************/');\n return response;\n }\n\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @param {Object} reason\n * @returns {Object}\n */\n }, {\n key: \"onResponseError\",\n value: function onResponseError(options, reason) {\n var now = new Date();\n this.printResponseHeader(options, reason);\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n if (process.env.ENABLE_VERBOSE_NETWORK_LOGGING) {\n logger.info('timestamp (end): ', now.getTime(), now.toISOString());\n try {\n logger.error('Response: ', _util.default.inspect(reason.body, {\n depth: null\n }));\n } catch (err) {\n logger.error('Response: ', reason.body);\n }\n }\n logger.info('\\\\**********************************************************************/');\n return _promise.default.reject(reason);\n }\n\n /**\n * Prints the basic header\n * @param {Object} options\n * @param {HttpResponse|WebexHttpError} response\n * @returns {undefined}\n */\n }, {\n key: \"printResponseHeader\",\n value: function printResponseHeader(options, response) {\n var logger = (0, _lodash.get)(this, 'webex.logger', console);\n logger.info('Status Code:', response.statusCode);\n logger.info('WEBEX_TRACKINGID:', (0, _lodash.get)(options, 'headers.trackingid') || (0, _lodash.get)(response, 'headers.trackingid'));\n logger.info('Network duration:', options.$timings.networkEnd - options.$timings.networkStart);\n logger.info('Processing duration:', options.$timings.requestEnd - options.$timings.requestStart);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {ResponseLoggerInterceptor}\n */\n function create() {\n return new ResponseLoggerInterceptor({\n webex: this\n });\n }\n }]);\n return ResponseLoggerInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=response-logger.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _common = require(\"@webex/common\");\nvar _httpCore = require(\"@webex/http-core\");\nvar _lodash = require(\"lodash\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar strings = new _weakMap.default();\n\n/**\n * Sets a 'user-agent' header on all requests if one is not present.\n * Defaults to '@webex/http-core' though a custom user-agent can be set\n * using the appName and appVersion configuration. e.g.\n *\n * webex = WebexSdk.init({\n * credentials: {\n * supertoken: superToken\n * },\n * config: {\n * credentials: {\n * client_id,\n * client_secret\n * },\n * appName: 'custom-user-agent',\n * appVersion: '1.0',\n * }\n * });\n */\nvar UserAgentInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(UserAgentInterceptor, _Interceptor);\n var _super = _createSuper(UserAgentInterceptor);\n /**\n * @param {Object} [options={}]\n * @param {WebexCore} [options.webex]\n * @private\n * @returns {UserAgentInterceptor}\n */\n function UserAgentInterceptor() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n (0, _classCallCheck2.default)(this, UserAgentInterceptor);\n var appName = (0, _lodash.get)(options, 'webex.config.appName');\n var appVersion = (0, _lodash.get)(options, 'webex.config.appVersion') || '0.0';\n _this = _super.call(this, options);\n if (appName) {\n strings.set((0, _assertThisInitialized2.default)(_this), \"\".concat(appName, \"/\").concat(appVersion));\n } else {\n strings.set((0, _assertThisInitialized2.default)(_this), '@webex/http-core'); // Using the traditional default from http-core\n }\n return _this;\n }\n\n /**\n * @returns {UserAgentInterceptor}\n */\n (0, _createClass2.default)(UserAgentInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n // Do not set a custom user-agent for browsers\n if (_common.inBrowser) {\n return options;\n }\n options.headers = options.headers || {};\n if ('user-agent' in options.headers && options.headers['spark-user-agent']) {\n return options;\n }\n options.headers['user-agent'] = strings.get(this);\n return options;\n }\n }], [{\n key: \"create\",\n value: function create() {\n return new UserAgentInterceptor({\n webex: this\n });\n }\n }]);\n return UserAgentInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=user-agent.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sequenceNumbers = exports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar sequenceNumbers = exports.sequenceNumbers = new _map.default();\n\n/**\n * @class\n */\nvar WebexTrackingIdInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(WebexTrackingIdInterceptor, _Interceptor);\n var _super = _createSuper(WebexTrackingIdInterceptor);\n function WebexTrackingIdInterceptor() {\n (0, _classCallCheck2.default)(this, WebexTrackingIdInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(WebexTrackingIdInterceptor, [{\n key: \"sequence\",\n get:\n /**\n * Sequence number; increments on access\n * @type {Number}\n */\n function get() {\n var sq = sequenceNumbers.get(this) || 0;\n sq += 1;\n sequenceNumbers.set(this, sq);\n return sq;\n }\n\n /**\n * @returns {WebexTrackingIdInterceptor}\n */\n }, {\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n options.headers = options.headers || {};\n // If trackingid is already set, don't overwrite it\n if ('trackingid' in options.headers) {\n // If trackingid is set to null, false, or undefined, delete it to\n // prevent a CORS preflight.\n if (!options.headers.trackingid) {\n (0, _deleteProperty.default)(options.headers, 'trackingid');\n }\n return options;\n }\n if (this.requiresTrackingId(options)) {\n options.headers.trackingid = \"\".concat(this.webex.sessionId, \"_\").concat(this.sequence);\n }\n if (options.headers.trackingid && options.replayCount) {\n var tid = options.headers.trackingid.split('+');\n tid[1] = options.replayCount;\n options.headers.trackingid = tid.join('+');\n }\n return options;\n }\n\n /**\n * Determines whether or not include a tracking id\n * @param {Object} options\n * @returns {boolean}\n */\n }, {\n key: \"requiresTrackingId\",\n value: function requiresTrackingId(options) {\n return !options.headers.trackingid;\n }\n }], [{\n key: \"create\",\n value: function create() {\n return new WebexTrackingIdInterceptor({\n webex: this\n });\n }\n }]);\n return WebexTrackingIdInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=webex-tracking-id.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/assertThisInitialized\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _common = require(\"@webex/common\");\nvar _httpCore = require(\"@webex/http-core\");\nvar _lodash = require(\"lodash\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar strings = new _weakMap.default();\n\n/**\n * @class\n */\nvar WebexUserAgentInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(WebexUserAgentInterceptor, _Interceptor);\n var _super = _createSuper(WebexUserAgentInterceptor);\n /**\n * @param {Object} [options={}]\n * @param {WebexCore} [options.webex]\n * @private\n * @returns {WebexUserAgentInterceptor}\n */\n function WebexUserAgentInterceptor() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n (0, _classCallCheck2.default)(this, WebexUserAgentInterceptor);\n var libName = (0, _lodash.get)(options, 'webex.webex', false) ? 'webex' : 'webex-js-sdk';\n var libVersion = (0, _lodash.get)(options, 'webex.version', 'development');\n _this = _super.call(this, options);\n strings.set((0, _assertThisInitialized2.default)(_this), \"\".concat(libName, \"/\").concat(libVersion, \" (\").concat(_common.inBrowser ? 'web' : 'node', \")\"));\n return _this;\n }\n\n /**\n * @returns {WebexUserAgentInterceptor}\n */\n (0, _createClass2.default)(WebexUserAgentInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n var _this$webex$config, _this$webex;\n options.headers = options.headers || {};\n var _ref = (_this$webex$config = (_this$webex = this.webex) === null || _this$webex === void 0 ? void 0 : _this$webex.config) !== null && _this$webex$config !== void 0 ? _this$webex$config : {},\n appName = _ref.appName,\n appVersion = _ref.appVersion,\n appPlatform = _ref.appPlatform;\n var sparkUserAgent = \"\".concat(strings.get(this));\n if (appName) {\n sparkUserAgent += \" \".concat(appName, \"/\").concat(appVersion !== null && appVersion !== void 0 ? appVersion : '0.0');\n }\n if (appPlatform) {\n sparkUserAgent += \" \".concat(appPlatform);\n }\n if (options.uri && options.uri.includes('https://idbroker')) {\n return options;\n }\n if (options.uri && (options.uri.includes(this.webex.config.credentials.samlUrl) || options.uri.includes(this.webex.config.credentials.tokenUrl) || options.uri.includes(this.webex.config.credentials.authorizeUrl))) {\n return options;\n }\n if ('spark-user-agent' in options.headers) {\n if (!options.headers['spark-user-agent']) {\n (0, _deleteProperty.default)(options.headers, 'spark-user-agent');\n }\n return options;\n }\n options.headers['spark-user-agent'] = sparkUserAgent;\n return options;\n }\n }], [{\n key: \"create\",\n value: function create() {\n return new WebexUserAgentInterceptor({\n webex: this\n });\n }\n }]);\n return WebexUserAgentInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=webex-user-agent.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _lodash = require(\"lodash\");\nvar _common = require(\"@webex/common\");\nvar _webexPlugin = _interopRequireDefault(require(\"./webex-plugin\"));\nvar _webexHttpError = _interopRequireDefault(require(\"./webex-http-error\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Base class for coalescing requests to batched APIs\n * @class Batcher\n */\nvar Batcher = _webexPlugin.default.extend({\n session: {\n deferreds: {\n type: 'object',\n default: function _default() {\n return new _map.default();\n }\n },\n queue: {\n type: 'array',\n default: function _default() {\n return [];\n }\n }\n },\n derived: {\n bounce: {\n fn: function fn() {\n var _this = this;\n return (0, _common.cappedDebounce)(function () {\n return _this.executeQueue.apply(_this, arguments);\n }, this.config.batcherWait, {\n maxCalls: this.config.batcherMaxCalls,\n maxWait: this.config.batcherMaxWait\n });\n }\n }\n },\n /**\n * Requests an item from a batched API\n * @param {Object} item\n * @returns {Promise}\n */\n request: function request(item) {\n var _this2 = this;\n // So far, I can't find a way to avoid three layers of nesting here.\n /* eslint max-nested-callbacks: [0] */\n var defer = new _common.Defer();\n this.fingerprintRequest(item).then(function (idx) {\n if (_this2.deferreds.has(idx)) {\n defer.resolve(_this2.deferreds.get(idx).promise);\n return;\n }\n _this2.deferreds.set(idx, defer);\n _this2.prepareItem(item).then(function (req) {\n defer.promise = defer.promise.then((0, _common.tap)(function () {\n return _this2.deferreds.delete(idx);\n })).catch(function (reason) {\n _this2.deferreds.delete(idx);\n return _promise.default.reject(reason);\n });\n _this2.enqueue(req).then(function () {\n return _this2.bounce();\n }).catch(function (reason) {\n return defer.reject(reason);\n });\n }).catch(function (reason) {\n return defer.reject(reason);\n });\n }).catch(function (reason) {\n return defer.reject(reason);\n });\n return defer.promise;\n },\n /**\n * Adds an item to the queue.\n * Intended to be overridden\n * @param {mixed} req\n * @returns {Promise}\n */\n enqueue: function enqueue(req) {\n this.queue.push(req);\n return _promise.default.resolve();\n },\n /**\n * Transform the item before adding it to the queue\n * Intended to be overridden\n * @param {mixed} item\n * @returns {Promise}\n */\n prepareItem: function prepareItem(item) {\n return _promise.default.resolve(item);\n },\n /**\n * Detaches the current queue, does any appropriate transforms, and submits it\n * to the API.\n * @returns {Promise}\n */\n executeQueue: function executeQueue() {\n var _this3 = this;\n var queue = this.queue.splice(0, this.config.batcherMaxCalls);\n return new _promise.default(function (resolve) {\n resolve(_this3.prepareRequest(queue).then(function (payload) {\n return _this3.submitHttpRequest(payload).then(function (res) {\n return _this3.handleHttpSuccess(res);\n });\n }).catch(function (reason) {\n if (reason instanceof _webexHttpError.default) {\n return _this3.handleHttpError(reason);\n }\n return _promise.default.all(queue.map(function (item) {\n return _this3.getDeferredForRequest(item).then(function (defer) {\n defer.reject(reason);\n });\n }));\n }));\n }).catch(function (reason) {\n _this3.logger.error(process.env.NODE_ENV === 'production' ? reason : reason.stack);\n return _promise.default.reject(reason);\n });\n },\n /**\n * Performs any final transforms on the queue before submitting it to the API\n * Intended to be overridden\n * @param {Object|Array} queue\n * @returns {Promise}\n */\n prepareRequest: function prepareRequest(queue) {\n return _promise.default.resolve(queue);\n },\n /**\n * Submits the prepared request body to the API.\n * This method *must* be overridden\n * @param {Object} payload\n * @returns {Promise}\n */\n // eslint-disable-next-line no-unused-vars\n submitHttpRequest: function submitHttpRequest(payload) {\n throw new Error('request() must be implemented');\n },\n /**\n * Actions taken when the http request returns a success\n * Intended to be overridden\n * @param {Promise} res\n * @returns {Promise}\n */\n handleHttpSuccess: function handleHttpSuccess(res) {\n var _this4 = this;\n return _promise.default.all((res.body && res.body.items || res.body).map(function (item) {\n return _this4.acceptItem(item);\n }));\n },\n /**\n * Actions taken when the http request returns a failure. Typically, this\n * means failing the entire queue, but could be overridden in some\n * implementations to e.g. reenqueue.\n * Intended to be overridden\n * @param {WebexHttpError} reason\n * @returns {Promise}\n */\n handleHttpError: function handleHttpError(reason) {\n var _this5 = this;\n if (reason instanceof _webexHttpError.default) {\n if ((0, _lodash.has)(reason, 'options.body.map')) {\n return _promise.default.all(reason.options.body.map(function (item) {\n return _this5.getDeferredForRequest(item).then(function (defer) {\n defer.reject(reason);\n });\n }));\n }\n }\n this.logger.error('http error handler called without a WebexHttpError object', reason);\n return _promise.default.reject(reason);\n },\n /**\n * Determines if the item succeeded or failed and delegates accordingly\n * @param {Object} item\n * @returns {Promise}\n */\n acceptItem: function acceptItem(item) {\n var _this6 = this;\n return this.didItemFail(item).then(function (didFail) {\n if (didFail) {\n return _this6.handleItemFailure(item);\n }\n return _this6.handleItemSuccess(item);\n });\n },\n /**\n * Indicates if the specified response item implies a success or a failure\n * Intended to be overridden\n * @param {Object} item\n * @returns {Promise}\n */\n // eslint-disable-next-line no-unused-vars\n didItemFail: function didItemFail(item) {\n return _promise.default.resolve(false);\n },\n /**\n * Finds the Defer for the specified item and rejects its promise\n * Intended to be overridden\n * @param {Object} item\n * @returns {Promise}\n */\n handleItemFailure: function handleItemFailure(item) {\n return this.getDeferredForResponse(item).then(function (defer) {\n defer.reject(item);\n });\n },\n /**\n * Finds the Defer for the specified item and resolves its promise\n * Intended to be overridden\n * @param {Object} item\n * @returns {Promise}\n */\n handleItemSuccess: function handleItemSuccess(item) {\n return this.getDeferredForResponse(item).then(function (defer) {\n defer.resolve(item);\n });\n },\n /**\n * Returns the Deferred for the specified request item\n * @param {Object} item\n * @returns {Promise}\n */\n getDeferredForRequest: function getDeferredForRequest(item) {\n var _this7 = this;\n return this.fingerprintRequest(item).then(function (idx) {\n var defer = _this7.deferreds.get(idx);\n\n /* istanbul ignore if */\n if (!defer) {\n throw new Error('Could not find pending request for received response');\n }\n return defer;\n });\n },\n /**\n * Returns the Deferred for the specified response item\n * @param {Object} item\n * @returns {Promise}\n */\n getDeferredForResponse: function getDeferredForResponse(item) {\n var _this8 = this;\n return this.fingerprintResponse(item).then(function (idx) {\n var defer = _this8.deferreds.get(idx);\n\n /* istanbul ignore if */\n if (!defer) {\n throw new Error('Could not find pending request for received response');\n }\n return defer;\n });\n },\n /**\n * Generates a unique identifier for the item in a request payload\n * Intended to be overridden\n * Note that overrides must return a primitive.\n * @param {Object} item\n * @returns {Promise}\n */\n // eslint-disable-next-line no-unused-vars\n fingerprintRequest: function fingerprintRequest(item) {\n throw new Error('fingerprintRequest() must be implemented');\n },\n /**\n * Generates a unique identifier for the item in a response payload\n * Intended to be overridden\n * Note that overrides must return a primitive.\n * @param {Object} item\n * @returns {Promise}\n */\n // eslint-disable-next-line no-unused-vars\n fingerprintResponse: function fingerprintResponse(item) {\n throw new Error('fingerprintResponse() must be implemented');\n },\n version: \"3.7.0\"\n});\nvar _default2 = exports.default = Batcher;\n//# sourceMappingURL=batcher.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.METRICS = void 0;\n// Metric to do with WDM registration\nvar METRICS = exports.METRICS = {\n JS_SDK_CREDENTIALS_DOWNSCOPE_FAILED: 'JS_SDK_CREDENTIALS_DOWNSCOPE_FAILED',\n JS_SDK_CREDENTIALS_TOKEN_REFRESH_SCOPE_MISMATCH: 'JS_SDK_CREDENTIALS_TOKEN_REFRESH_SCOPE_MISMATCH'\n};\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _Object$keys2 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor2 = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _querystring = _interopRequireDefault(require(\"querystring\"));\nvar _url = _interopRequireDefault(require(\"url\"));\nvar _jsonwebtoken = _interopRequireDefault(require(\"jsonwebtoken\"));\nvar _common = require(\"@webex/common\");\nvar _commonTimers = require(\"@webex/common-timers\");\nvar _lodash = require(\"lodash\");\nvar _webexPlugin = _interopRequireDefault(require(\"../webex-plugin\"));\nvar _decorators = require(\"../storage/decorators\");\nvar _grantErrors = _interopRequireWildcard(require(\"./grant-errors\"));\nvar _scope = require(\"./scope\");\nvar _token = _interopRequireDefault(require(\"./token\"));\nvar _tokenCollection = _interopRequireDefault(require(\"./token-collection\"));\nvar _constants = require(\"../constants\");\nvar _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _obj;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor2; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor2(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor2(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor2(t, r)); }); } return e; }\n/**\n * @class\n */\nvar Credentials = _webexPlugin.default.extend((_dec = (0, _common.oneFlight)({\n keyFactory: function keyFactory(scope) {\n return scope;\n }\n}), _dec2 = (0, _decorators.waitForValue)('@'), _dec3 = (0, _decorators.persist)('@'), _dec4 = (0, _decorators.waitForValue)('@'), _dec5 = (0, _common.whileInFlight)('isRefreshing'), _dec6 = (0, _decorators.waitForValue)('@'), (_obj = {\n collections: {\n userTokens: _tokenCollection.default\n },\n dataTypes: {\n token: (0, _common.makeStateDataType)(_token.default, 'token').dataType\n },\n derived: {\n canAuthorize: {\n deps: ['supertoken', 'supertoken.canAuthorize', 'canRefresh'],\n fn: function fn() {\n return Boolean(this.supertoken && this.supertoken.canAuthorize || this.canRefresh);\n }\n },\n canRefresh: {\n deps: ['supertoken', 'supertoken.canRefresh'],\n fn: function fn() {\n // If we're operating in JWT mode, we have to delegate to the consumer\n if (this.config.jwtRefreshCallback) {\n return true;\n }\n return Boolean(this.supertoken && this.supertoken.canRefresh);\n }\n },\n isUnverifiedGuest: {\n deps: ['supertoken'],\n /**\n * Returns true if the user is an unverified guest\n * @returns {boolean}\n */\n fn: function fn() {\n var isGuest = false;\n try {\n isGuest = JSON.parse(_common.base64.decode(this.supertoken.access_token.split('.')[1])).user_type === 'guest';\n } catch (_unused) {\n /* the non-guest token is formatted differently so catch is expected */\n }\n return isGuest;\n }\n }\n },\n props: {\n supertoken: (0, _common.makeStateDataType)(_token.default, 'token').prop\n },\n namespace: 'Credentials',\n session: {\n isRefreshing: {\n default: false,\n type: 'boolean'\n },\n /**\n * Becomes `true` once the {@link loaded} event fires.\n * @see {@link WebexPlugin#ready}\n * @instance\n * @memberof Credentials\n * @type {boolean}\n */\n ready: {\n default: false,\n type: 'boolean'\n },\n refreshTimer: {\n default: undefined,\n type: 'any'\n }\n },\n /**\n * Generates an OAuth Login URL. Prefers the api.ciscospark.com proxy if the\n * instance is initialize with an authorizatUrl, but fallsback to idbroker\n * as the base otherwise.\n * @instance\n * @memberof Credentials\n * @param {Object} [options={}]\n * @returns {string}\n */\n buildLoginUrl: function buildLoginUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n clientType: 'public'\n };\n /* eslint-disable camelcase */\n if (options.state && !(0, _lodash.isObject)(options.state)) {\n throw new Error('if specified, `options.state` must be an object');\n }\n options.client_id = this.config.client_id;\n options.redirect_uri = this.config.redirect_uri;\n options.scope = this.config.scope;\n options = (0, _lodash.cloneDeep)(options);\n if (!options.response_type) {\n options.response_type = options.clientType === 'public' ? 'token' : 'code';\n }\n (0, _deleteProperty.default)(options, 'clientType');\n if (options.state) {\n if (!(0, _lodash.isEmpty)(options.state)) {\n options.state = _common.base64.toBase64Url((0, _stringify.default)(options.state));\n } else {\n delete options.state;\n }\n }\n return \"\".concat(this.config.authorizeUrl, \"?\").concat(_querystring.default.stringify(options));\n /* eslint-enable camelcase */\n },\n /**\n * Get the determined OrgId.\n *\n * @throws {Error} - If the OrgId could not be determined.\n * @returns {string} - The OrgId.\n */\n getOrgId: function getOrgId() {\n this.logger.info('credentials: attempting to retrieve the OrgId from token');\n try {\n // Attempt to extract a client-authenticated token's OrgId.\n this.logger.info('credentials: trying to extract OrgId from JWT');\n return this.extractOrgIdFromJWT(this.supertoken.access_token);\n } catch (e) {\n // Attempt to extract a user token's OrgId.\n this.logger.info('credentials: could not extract OrgId from JWT');\n this.logger.info('credentials: attempting to extract OrgId from user token');\n try {\n var _this$supertoken;\n return this.extractOrgIdFromUserToken((_this$supertoken = this.supertoken) === null || _this$supertoken === void 0 ? void 0 : _this$supertoken.access_token);\n } catch (f) {\n this.logger.info('credentials: could not extract OrgId from user token');\n throw f;\n }\n }\n },\n /**\n * Extract the OrgId [realm] from a provided JWT.\n *\n * @private\n * @param {string} token - The JWT to extract the OrgId from.\n * @throws {Error} - If the token does not pass JWT general/realm validation.\n * @returns {string} - The OrgId.\n */\n extractOrgIdFromJWT: function extractOrgIdFromJWT() {\n var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n // Decoded the provided token.\n var decodedJWT = _jsonwebtoken.default.decode(token);\n\n // Validate that the provided token is a JWT.\n if (!decodedJWT) {\n throw new Error('unable to extract the OrgId from the provided JWT');\n }\n if (!decodedJWT.realm) {\n throw new Error('the provided JWT does not contain an OrgId');\n }\n\n // Return the OrgId [realm].\n return decodedJWT.realm;\n },\n /**\n * Extract the OrgId [realm] from a provided user token.\n *\n * @private\n * @param {string} token - The user token to extract the OrgId from.\n * @throws {Error} - Will throw an error if the provided token is invalid.\n * @returns {string} - The OrgId.\n */\n extractOrgIdFromUserToken: function extractOrgIdFromUserToken() {\n var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n // Split the provided token into subsections.\n var fields = token.split('_');\n\n // Validate that the provided token has the proper amount of sections.\n if (fields.length !== 3) {\n throw new Error(\"the provided token is not a valid format, token has \".concat(fields.length, \" sections\"));\n }\n\n // Return the token section that contains the OrgId.\n return fields[2];\n },\n /**\n * Generates a Logout URL\n * @instance\n * @memberof Credentials\n * @param {Object} [options={}]\n * @returns {[type]}\n */\n buildLogoutUrl: function buildLogoutUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return \"\".concat(this.config.logoutUrl, \"?\").concat(_querystring.default.stringify(_objectSpread({\n cisService: this.config.service,\n goto: this.config.redirect_uri\n }, options)));\n },\n /**\n * Generates a number between 60% - 90% of expired value\n * @instance\n * @memberof Credentials\n * @param {number} expiration\n * @private\n * @returns {number}\n */\n calcRefreshTimeout: function calcRefreshTimeout(expiration) {\n return Math.floor((Math.floor(Math.random() * 4) + 6) / 10 * expiration);\n },\n constructor: function constructor() {\n var _this = this;\n // HACK to deal with the fact that AmpersandState#dataTypes#set is a pure\n // function.\n this._dataTypes = (0, _lodash.cloneDeep)(this._dataTypes);\n (0, _keys.default)(this._dataTypes).forEach(function (key) {\n if (_this._dataTypes[key].set) {\n _this._dataTypes[key].set = _this._dataTypes[key].set.bind(_this);\n }\n });\n // END HACK\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (0, _apply.default)(_webexPlugin.default, this, args);\n },\n /**\n * Downscopes a token\n * @instance\n * @memberof Credentials\n * @param {string} scope\n * @private\n * @returns {Promise}\n */\n downscope: function downscope(scope) {\n var _this2 = this;\n return this.supertoken.downscope(scope).catch(function (reason) {\n var _reason$body;\n var failReason = (_reason$body = reason === null || reason === void 0 ? void 0 : reason.body) !== null && _reason$body !== void 0 ? _reason$body : reason;\n _this2.logger.warn(\"credentials: failed to downscope supertoken to \\\"\".concat(scope, \"\\\"\"), failReason);\n _this2.logger.trace(\"credentials: falling back to supertoken for \".concat(scope));\n _this2.webex.internal.metrics.submitClientMetrics(_constants.METRICS.JS_SDK_CREDENTIALS_DOWNSCOPE_FAILED, {\n fields: {\n requestedScope: scope,\n failReason: failReason\n }\n });\n return _promise.default.resolve(new _token.default(_objectSpread({\n scope: scope\n }, _this2.supertoken.serialize())), {\n parent: _this2\n });\n });\n },\n /**\n * Requests a client credentials grant and returns the token. Given the\n * limited use for such tokens as this time, this method does not cache its\n * token.\n * @instance\n * @memberof Credentials\n * @param {Object} options\n * @returns {Promise}\n */\n getClientToken: function getClientToken() {\n var _this3 = this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger.info('credentials: requesting client credentials grant');\n return this.webex.request({\n /* eslint-disable camelcase */\n method: 'POST',\n uri: options.uri || this.config.tokenUrl,\n form: {\n grant_type: 'client_credentials',\n scope: options.scope || 'webexsquare:admin',\n self_contained_token: true\n },\n auth: {\n user: this.config.client_id,\n pass: this.config.client_secret,\n sendImmediately: true\n },\n shouldRefreshAccessToken: false\n /* eslint-enable camelcase */\n }).then(function (res) {\n return new _token.default(res.body, {\n parent: _this3\n });\n }).catch(function (res) {\n if (res.statusCode !== 400) {\n return _promise.default.reject(res);\n }\n var ErrorConstructor = _grantErrors.default.select(res.body.error);\n return _promise.default.reject(new ErrorConstructor(res._res || res));\n });\n },\n /**\n * Resolves with a token with the specified scopes. If no scope is specified,\n * defaults to omit(webex.credentials.scope, 'spark:kms'). If no such token is\n * available, downscopes the supertoken to that scope.\n * @instance\n * @memberof Credentials\n * @param {string} scope\n * @returns {Promise}\n */\n getUserToken: function getUserToken(scope) {\n var _this4 = this;\n return _promise.default.resolve(!this.isRefreshing || new _promise.default(function (resolve) {\n _this4.logger.info('credentials: token refresh inflight; delaying getUserToken until refresh completes');\n _this4.once('change:isRefreshing', function () {\n _this4.logger.info('credentials: token refresh complete; reinvoking getUserToken');\n resolve();\n });\n })).then(function () {\n if (!_this4.canAuthorize) {\n _this4.logger.info('credentials: cannot produce an access token from current state');\n return _promise.default.reject(new Error('Current state cannot produce an access token'));\n }\n if (!scope) {\n scope = (0, _scope.filterScope)('spark:kms', _this4.supertoken.scope);\n }\n scope = (0, _scope.sortScope)(scope);\n if (scope === (0, _scope.sortScope)(_this4.supertoken.scope)) {\n return _promise.default.resolve(_this4.supertoken);\n }\n var token = _this4.userTokens.get(scope);\n\n // we should also check for the token.access_token since token object does\n // not get cleared on unsetting while logging out.\n if (!token || !token.access_token) {\n return _this4.downscope(scope).then((0, _common.tap)(function (t) {\n return _this4.userTokens.add(t);\n }));\n }\n return _promise.default.resolve(token);\n });\n },\n /**\n * Initializer\n * @instance\n * @memberof Credentials\n * @param {Object} attrs\n * @param {Object} options\n * @private\n * @returns {Credentials}\n */\n initialize: function initialize(attrs, options) {\n var _this5 = this;\n if (attrs) {\n if (typeof attrs === 'string') {\n this.supertoken = attrs;\n }\n if (attrs.access_token) {\n this.supertoken = attrs;\n }\n if (attrs.authorization) {\n if (attrs.authorization.supertoken) {\n this.supertoken = attrs.authorization.supertoken;\n } else {\n this.supertoken = attrs.authorization;\n }\n }\n\n // schedule refresh\n if (this.supertoken && this.supertoken.expires) {\n this.scheduleRefresh(this.supertoken.expires);\n }\n }\n (0, _apply.default)(_webexPlugin.default.prototype.initialize, this, [attrs, options]);\n this.listenToOnce(this.parent, 'change:config', function () {\n if (_this5.config.authorizationString) {\n var parsed = _url.default.parse(_this5.config.authorizationString, true);\n\n /* eslint-disable camelcase */\n _this5.config.client_id = parsed.query.client_id;\n _this5.config.redirect_uri = parsed.query.redirect_uri;\n _this5.config.scope = parsed.query.scope;\n _this5.config.authorizeUrl = parsed.href.substr(0, parsed.href.indexOf('?'));\n /* eslint-enable camelcase */\n }\n });\n\n this.webex.once('loaded', function () {\n _this5.ready = true;\n });\n },\n /**\n * Clears all tokens from store them from the stores.\n *\n * This is no longer quite the right name for this method, but all of the\n * alternatives I'm coming up with are already taken.\n * @instance\n * @memberof Credentials\n * @returns {Promise}\n */\n invalidate: function invalidate() {\n this.logger.info('credentials: invalidating tokens');\n\n // clear refresh timer\n if (this.refreshTimer) {\n clearTimeout(this.refreshTimer);\n this.unset('refreshTimer');\n }\n try {\n this.unset('supertoken');\n } catch (err) {\n this.logger.warn('credentials: failed to clear supertoken', err);\n }\n while (this.userTokens.models.length) {\n try {\n this.userTokens.remove(this.userTokens.models[0]);\n } catch (err) {\n this.logger.warn('credentials: failed to remove user token', err);\n }\n }\n this.logger.info('credentials: finished removing tokens');\n\n // Return a promise to give the storage layer a tick or two to clear\n // localStorage\n return _promise.default.resolve();\n },\n /**\n * Removes the supertoken and child tokens, then refreshes the supertoken;\n * subsequent calls to {@link Credentials#getUserToken()} will re-downscope\n * child tokens. Enqueus revocation of previous previousTokens. Yes, that's\n * the correct number of \"previous\"es.\n * @instance\n * @memberof Credentials\n * @returns {Promise}\n */\n refresh: function refresh() {\n var _this6 = this;\n this.logger.info('credentials: refresh requested');\n var supertoken = this.supertoken;\n var tokens = (0, _lodash.clone)(this.userTokens.models);\n\n // This is kind of a leaky abstraction, since it relies on the authorization\n // plugin, but the only alternatives I see are\n // 1. put all JWT support in core\n // 2. have separate jwt and non-jwt auth plugins\n // while I like #2 from a code simplicity standpoint, the third-party DX\n // isn't great\n if (this.config.jwtRefreshCallback) {\n return this.config.jwtRefreshCallback(this.webex)\n // eslint-disable-next-line no-shadow\n .then(function (jwt) {\n return _this6.webex.authorization.requestAccessTokenFromJwt({\n jwt: jwt\n });\n });\n }\n if (this.webex.internal.services) {\n this.webex.internal.services.updateCredentialsConfig();\n }\n return supertoken.refresh().catch(function (error) {\n if (error instanceof _grantErrors.OAuthError) {\n // Error: super token refresh failed with 400 status code.\n // Hence emit an event to the client, an opportunity to logout.\n _this6.unset('supertoken');\n while (_this6.userTokens.models.length) {\n try {\n _this6.userTokens.remove(_this6.userTokens.models[0]);\n } catch (err) {\n _this6.logger.warn('credentials: failed to remove user token', err);\n }\n }\n _this6.webex.trigger('client:InvalidRequestError');\n }\n return _promise.default.reject(error);\n }).then(function (st) {\n // clear refresh timer\n if (_this6.refreshTimer) {\n clearTimeout(_this6.refreshTimer);\n _this6.unset('refreshTimer');\n }\n _this6.supertoken = st;\n var invalidScopes = (0, _scope.diffScopes)(_this6.config.scope, st.scope);\n if (invalidScopes !== '') {\n _this6.logger.warn(\"credentials: \\\"\".concat(invalidScopes, \"\\\" scope(s) are invalid because not listed in the supertoken, they will be excluded from user token requests.\"));\n _this6.webex.internal.metrics.submitClientMetrics(_constants.METRICS.JS_SDK_CREDENTIALS_TOKEN_REFRESH_SCOPE_MISMATCH, {\n fields: {\n invalidScopes: invalidScopes\n }\n });\n }\n return _promise.default.all(tokens.map(function (token) {\n var tokenScope = (0, _scope.filterScope)((0, _scope.diffScopes)(token.scope, st.scope), token.scope);\n return _this6.downscope(tokenScope)\n // eslint-disable-next-line max-nested-callbacks\n .then(function (t) {\n _this6.logger.info(\"credentials: revoking token for \".concat(token.scope));\n return token.revoke().catch(function (err) {\n _this6.logger.warn('credentials: failed to revoke user token', err);\n }).then(function () {\n _this6.userTokens.remove(token.scope);\n _this6.userTokens.add(t);\n });\n });\n }));\n }).then(function () {\n _this6.scheduleRefresh(_this6.supertoken.expires);\n });\n },\n /**\n * Schedules a token refresh or refreshes the token if token has expired\n * @instance\n * @memberof Credentials\n * @param {number} expires\n * @private\n * @returns {undefined}\n */\n scheduleRefresh: function scheduleRefresh(expires) {\n var _this7 = this;\n var expiresIn = expires - (0, _now.default)();\n if (expiresIn > 0) {\n var timeoutLength = this.calcRefreshTimeout(expiresIn);\n this.refreshTimer = (0, _commonTimers.safeSetTimeout)(function () {\n return _this7.refresh();\n }, timeoutLength);\n } else {\n this.refresh();\n }\n },\n version: \"3.7.0\"\n}, ((0, _applyDecoratedDescriptor2.default)(_obj, \"getUserToken\", [_dec, _dec2], (0, _getOwnPropertyDescriptor.default)(_obj, \"getUserToken\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"initialize\", [_dec3], (0, _getOwnPropertyDescriptor.default)(_obj, \"initialize\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"invalidate\", [_common.oneFlight, _dec4], (0, _getOwnPropertyDescriptor.default)(_obj, \"invalidate\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"refresh\", [_common.oneFlight, _dec5, _dec6], (0, _getOwnPropertyDescriptor.default)(_obj, \"refresh\"), _obj)), _obj)));\nvar _default = exports.default = Credentials;\n//# sourceMappingURL=credentials.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.OAuthError = void 0;\nvar _defineProperties = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/define-properties\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _common = require(\"@webex/common\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */ /* eslint camelcase: [0] */\n/**\n * Error thrown during oauth flow\n */\nvar OAuthError = exports.OAuthError = /*#__PURE__*/function (_Exception) {\n (0, _inherits2.default)(OAuthError, _Exception);\n var _super = _createSuper(OAuthError);\n function OAuthError() {\n (0, _classCallCheck2.default)(this, OAuthError);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(OAuthError, [{\n key: \"parse\",\n value:\n /**\n * @param {HttpResponse} res\n * @returns {string}\n */\n function parse(res) {\n // This error may be returned in an HTTPResponse or as part of a querystring\n var body = res.body || res;\n (0, _defineProperties.default)(this, {\n error: {\n enumerable: true,\n value: body.error\n },\n errorDescription: {\n enumerable: true,\n value: body.error_description\n },\n errorUri: {\n enumerable: true,\n value: body.error_uri\n },\n res: {\n enumerable: false,\n value: res\n }\n });\n return this.errorDescription;\n }\n }]);\n return OAuthError;\n}(_common.Exception);\n/**\n * InvalidRequestError\n */\nvar InvalidRequestError = /*#__PURE__*/function (_OAuthError) {\n (0, _inherits2.default)(InvalidRequestError, _OAuthError);\n var _super2 = _createSuper(InvalidRequestError);\n function InvalidRequestError() {\n (0, _classCallCheck2.default)(this, InvalidRequestError);\n return _super2.apply(this, arguments);\n }\n return (0, _createClass2.default)(InvalidRequestError);\n}(OAuthError);\n/**\n * InvalidClientError\n */\nvar InvalidClientError = /*#__PURE__*/function (_OAuthError2) {\n (0, _inherits2.default)(InvalidClientError, _OAuthError2);\n var _super3 = _createSuper(InvalidClientError);\n function InvalidClientError() {\n (0, _classCallCheck2.default)(this, InvalidClientError);\n return _super3.apply(this, arguments);\n }\n return (0, _createClass2.default)(InvalidClientError);\n}(OAuthError);\n/**\n * InvalidGrantError\n */\nvar InvalidGrantError = /*#__PURE__*/function (_OAuthError3) {\n (0, _inherits2.default)(InvalidGrantError, _OAuthError3);\n var _super4 = _createSuper(InvalidGrantError);\n function InvalidGrantError() {\n (0, _classCallCheck2.default)(this, InvalidGrantError);\n return _super4.apply(this, arguments);\n }\n return (0, _createClass2.default)(InvalidGrantError);\n}(OAuthError);\n/**\n * UnauthorizedClientError\n */\nvar UnauthorizedClientError = /*#__PURE__*/function (_OAuthError4) {\n (0, _inherits2.default)(UnauthorizedClientError, _OAuthError4);\n var _super5 = _createSuper(UnauthorizedClientError);\n function UnauthorizedClientError() {\n (0, _classCallCheck2.default)(this, UnauthorizedClientError);\n return _super5.apply(this, arguments);\n }\n return (0, _createClass2.default)(UnauthorizedClientError);\n}(OAuthError);\n/**\n * UnsupportGrantTypeError\n */\nvar UnsupportGrantTypeError = /*#__PURE__*/function (_OAuthError5) {\n (0, _inherits2.default)(UnsupportGrantTypeError, _OAuthError5);\n var _super6 = _createSuper(UnsupportGrantTypeError);\n function UnsupportGrantTypeError() {\n (0, _classCallCheck2.default)(this, UnsupportGrantTypeError);\n return _super6.apply(this, arguments);\n }\n return (0, _createClass2.default)(UnsupportGrantTypeError);\n}(OAuthError);\n/**\n * InvalidScopeError\n */\nvar InvalidScopeError = /*#__PURE__*/function (_OAuthError6) {\n (0, _inherits2.default)(InvalidScopeError, _OAuthError6);\n var _super7 = _createSuper(InvalidScopeError);\n function InvalidScopeError() {\n (0, _classCallCheck2.default)(this, InvalidScopeError);\n return _super7.apply(this, arguments);\n }\n return (0, _createClass2.default)(InvalidScopeError);\n}(OAuthError);\nvar errors = {\n OAuthError: OAuthError,\n InvalidRequestError: InvalidRequestError,\n InvalidClientError: InvalidClientError,\n InvalidGrantError: InvalidGrantError,\n UnauthorizedClientError: UnauthorizedClientError,\n UnsupportGrantTypeError: UnsupportGrantTypeError,\n InvalidScopeError: InvalidScopeError,\n invalid_request: InvalidRequestError,\n invalid_client: InvalidClientError,\n invalid_grant: InvalidGrantError,\n unauthorized_client: UnauthorizedClientError,\n unsupported_grant_type: UnsupportGrantTypeError,\n invalid_scope: InvalidScopeError,\n select: function select(errorString) {\n return errors[errorString] || OAuthError;\n }\n};\nvar _default = exports.default = errors;\n//# sourceMappingURL=grant-errors.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"Credentials\", {\n enumerable: true,\n get: function get() {\n return _credentials.default;\n }\n});\n_Object$defineProperty(exports, \"Token\", {\n enumerable: true,\n get: function get() {\n return _token.default;\n }\n});\n_Object$defineProperty(exports, \"filterScope\", {\n enumerable: true,\n get: function get() {\n return _scope.filterScope;\n }\n});\n_Object$defineProperty(exports, \"grantErrors\", {\n enumerable: true,\n get: function get() {\n return _grantErrors.default;\n }\n});\n_Object$defineProperty(exports, \"sortScope\", {\n enumerable: true,\n get: function get() {\n return _scope.sortScope;\n }\n});\nvar _webexCore = require(\"../../webex-core\");\nvar _credentials = _interopRequireDefault(require(\"./credentials\"));\nvar _scope = require(\"./scope\");\nvar _token = _interopRequireDefault(require(\"./token\"));\nvar _grantErrors = _interopRequireDefault(require(\"./grant-errors\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n(0, _webexCore.registerPlugin)('credentials', _credentials.default, {\n proxies: ['canAuthorize', 'canRefresh']\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.diffScopes = diffScopes;\nexports.filterScope = filterScope;\nexports.sortScope = sortScope;\nvar _isArray = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/is-array\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar SCOPE_SEPARATOR = ' ';\n\n/**\n * sorts a list of scopes\n * @param {string} scope\n * @returns {string}\n */\nfunction sortScope(scope) {\n if (!scope) {\n return '';\n }\n return scope.split(SCOPE_SEPARATOR).sort().join(SCOPE_SEPARATOR);\n}\n\n/**\n * sorts a list of scopes and filters the specified scope\n * @param {string|string[]} toFilter\n * @param {string} scope\n * @returns {string}\n */\nfunction filterScope(toFilter, scope) {\n if (!scope) {\n return '';\n }\n var toFilterArr = (0, _isArray.default)(toFilter) ? toFilter : [toFilter];\n return scope.split(SCOPE_SEPARATOR).filter(function (item) {\n return !toFilterArr.includes(item);\n }).sort().join(SCOPE_SEPARATOR);\n}\n\n/**\n * Returns a string containing all items in scopeA that are not in scopeB, or an empty string if there are none.\n *\n * @param {string} scopeA\n * @param {string} scopeB\n * @returns {string}\n */\nfunction diffScopes(scopeA, scopeB) {\n var _scopeA$split, _scopeB$split;\n var a = (_scopeA$split = scopeA === null || scopeA === void 0 ? void 0 : scopeA.split(SCOPE_SEPARATOR)) !== null && _scopeA$split !== void 0 ? _scopeA$split : [];\n var b = (_scopeB$split = scopeB === null || scopeB === void 0 ? void 0 : scopeB.split(SCOPE_SEPARATOR)) !== null && _scopeB$split !== void 0 ? _scopeB$split : [];\n return (0, _lodash.difference)(a, b).sort().join(SCOPE_SEPARATOR);\n}\n//# sourceMappingURL=scope.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ampersandCollection = _interopRequireDefault(require(\"ampersand-collection\"));\nvar _token = _interopRequireDefault(require(\"./token\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar TokenCollection = _ampersandCollection.default.extend({\n mainIndex: 'scope',\n model: _token.default,\n namespace: 'Credentials'\n});\nvar _default = exports.default = TokenCollection;\n//# sourceMappingURL=token-collection.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _Object$keys = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor2 = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _now = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/date/now\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _lodash = require(\"lodash\");\nvar _common = require(\"@webex/common\");\nvar _commonTimers = require(\"@webex/common-timers\");\nvar _webexHttpError = _interopRequireDefault(require(\"../webex-http-error\"));\nvar _webexPlugin = _interopRequireDefault(require(\"../webex-plugin\"));\nvar _scope = require(\"./scope\");\nvar _grantErrors = _interopRequireWildcard(require(\"./grant-errors\"));\nvar _dec, _obj;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor2; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor2(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor2(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor2(t, r)); }); } return e; }\n/* eslint-disable camelcase */\n/**\n * Parse response from CI and converts to structured error when appropriate\n * @param {WebexHttpError} res\n * @private\n * @returns {GrantError}\n */\nfunction processGrantError(res) {\n if (res.statusCode !== 400) {\n return _promise.default.reject(res);\n }\n var ErrorConstructor = _grantErrors.default.select(res.body.error);\n if (ErrorConstructor === _grantErrors.OAuthError && res instanceof _webexHttpError.default) {\n return _promise.default.reject(res);\n }\n if (!ErrorConstructor) {\n return _promise.default.reject(res);\n }\n return _promise.default.reject(new ErrorConstructor(res._res || res));\n}\n\n/**\n * @class\n */\nvar Token = _webexPlugin.default.extend((_dec = (0, _common.oneFlight)({\n keyFactory: function keyFactory(scope) {\n return scope;\n }\n}), (_obj = {\n derived: {\n /**\n * Indicates if this token can be used in an auth header. `true` iff\n * {@link Token#access_token} is defined and {@link Token#isExpired} is\n * false.\n * @instance\n * @memberof Token\n * @readonly\n * @type {boolean}\n */\n canAuthorize: {\n deps: ['access_token', 'isExpired'],\n fn: function fn() {\n return !!this.access_token && !this.isExpired;\n }\n },\n /**\n * Indicates that this token can be downscoped. `true` iff\n * {@link config.credentials.client_id} is defined and if\n * {@link Token#canAuthorize} is true\n *\n * Note: since {@link config} is not evented, we can't listen for changes to\n * {@link config.credentials.client_id}. As such,\n * {@link config.credentials.client_id} must always be set before\n * instantiating a {@link Token}\n * @instance\n * @memberof Token\n * @readonly\n * @type {boolean}\n */\n canDownscope: {\n deps: ['canAuthorize'],\n fn: function fn() {\n return this.canAuthorize && !!this.config.client_id;\n }\n },\n /**\n * Indicates if this token can be refreshed. `true` iff\n * {@link Token@refresh_token} is defined and\n * {@link config.credentials.refreshCallback()} is defined\n *\n * Note: since {@link config} is not evented, we can't listen for changes to\n * {@link config.credentials.refreshCallback()}. As such,\n * {@link config.credentials.refreshCallback()} must always be set before\n * instantiating a {@link Token}\n * @instance\n * @memberof Token\n * @readonly\n * @type {boolean}\n */\n canRefresh: {\n deps: ['refresh_token'],\n fn: function fn() {\n if (_common.inBrowser) {\n return !!this.refresh_token && !!this.config.refreshCallback;\n }\n return !!this.refresh_token && !!this.config.client_secret;\n }\n },\n /**\n * Indicates if this `Token` is expired. `true` iff {@link Token#expires} is\n * defined and is less than {@link Date.now()}.\n * @instance\n * @memberof Token\n * @readonly\n * @type {boolean}\n */\n isExpired: {\n deps: ['expires', '_isExpired'],\n fn: function fn() {\n // in order to avoid setting `cache:false`, we'll use a private property\n // and a timer rather than comparing to `Date.now()`;\n return !!this.expires && this._isExpired;\n }\n },\n /**\n * Cache for toString()\n * @instance\n * @memberof Token\n * @private\n * @readonly\n * @type {string}\n */\n _string: {\n deps: ['access_token', 'token_type'],\n fn: function fn() {\n if (!this.access_token || !this.token_type) {\n return '';\n }\n return \"\".concat(this.token_type, \" \").concat(this.access_token);\n }\n }\n },\n namespace: 'Credentials',\n props: {\n /**\n * Used for indexing in the credentials userTokens collection\n * @instance\n * @memberof Token\n * @private\n * @type {string}\n */\n scope: 'string',\n /**\n * @instance\n * @memberof Token\n * @type {string}\n */\n access_token: 'string',\n /**\n * @instance\n * @memberof Token\n * @type {number}\n */\n expires: 'number',\n /**\n * @instance\n * @memberof Token\n * @type {number}\n */\n expires_in: 'number',\n /**\n * @instance\n * @memberof Token\n * @type {string}\n */\n refresh_token: 'string',\n /**\n * @instance\n * @memberof Token\n * @type {number}\n */\n refresh_token_expires: 'number',\n /**\n * @instance\n * @memberof Token\n * @type {number}\n */\n refresh_token_expires_in: 'number',\n /**\n * @default \"Bearer\"\n * @instance\n * @memberof Token\n * @type {string}\n */\n token_type: {\n default: 'Bearer',\n type: 'string'\n }\n },\n session: {\n /**\n * Used by {@link Token#isExpired} to avoid doing a Date comparison.\n * @instance\n * @memberof Token\n * @private\n * @type {boolean}\n */\n _isExpired: {\n default: false,\n type: 'boolean'\n },\n /**\n * Handle to the previous token that we'll revoke when we refresh this\n * token. The idea is to keep allow two valid tokens when a refresh occurs;\n * we don't want revoke a token that's in the middle of being used, so when\n * we do a token refresh, we won't revoke the token being refreshed, but\n * we'll revoke the previous one.\n * @instance\n * @memberof Token\n * @private\n * @type {Object}\n */\n previousToken: {\n type: 'state'\n }\n },\n /**\n * Uses this token to request a new Token with a subset of this Token's scopes\n * @instance\n * @memberof Token\n * @param {string} scope\n * @returns {Promise}\n */\n downscope: function downscope(scope) {\n var _this = this;\n this.logger.info(\"token: downscoping token to \".concat(scope));\n if (this.isExpired) {\n this.logger.info('token: request received to downscope expired access_token');\n return _promise.default.reject(new Error('cannot downscope expired access token'));\n }\n if (!this.canDownscope) {\n if (this.config.client_id) {\n this.logger.info('token: request received to downscope invalid access_token');\n } else {\n this.logger.trace('token: cannot downscope without client_id');\n }\n return _promise.default.reject(new Error('cannot downscope access token'));\n }\n if ((0, _scope.diffScopes)(scope, this.config.scope) !== '') {\n return _promise.default.reject(new Error(\"new scope (\".concat(scope, \") is not subset of the available scopes (\").concat(this.config.scope, \")\")));\n }\n\n // Since we're going to use scope as the index in our token collection, it's\n // important scopes are always deterministically specified.\n if (scope) {\n scope = (0, _scope.sortScope)(scope);\n }\n\n // Ideally, we could depend on the service to communicate this error, but\n // all we get is \"invalid scope\", which, to the lay person, implies\n // something wrong with *one* of the scopes, not the whole thing.\n if (scope === (0, _scope.sortScope)(this.config.scope)) {\n return _promise.default.reject(new Error('token: scope reduction requires a reduced scope'));\n }\n return this.webex.request({\n method: 'POST',\n uri: this.config.tokenUrl,\n addAuthHeader: false,\n form: {\n grant_type: 'urn:cisco:oauth:grant-type:scope-reduction',\n token: this.access_token,\n scope: scope,\n client_id: this.config.client_id,\n self_contained_token: true\n }\n }).then(function (res) {\n _this.logger.info(\"token: downscoped token to \".concat(scope));\n return new Token((0, _assign.default)(res.body, {\n scope: scope\n }), {\n parent: _this.parent\n });\n });\n },\n /**\n * Initializer\n * @instance\n * @memberof Token\n * @param {Object} [attrs={}]\n * @param {Object} [options={}]\n * @see {@link WebexPlugin#initialize()}\n * @returns {Token}\n */\n initialize: function initialize() {\n var _this2 = this;\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _apply.default)(_webexPlugin.default.prototype.initialize, this, [attrs, options]);\n if (typeof attrs === 'string') {\n this.access_token = attrs;\n }\n if (!this.access_token) {\n throw new Error('`access_token` is required');\n }\n\n // We don't want the derived property `isExpired` to need {cache:false}, so\n // we'll set up a timer the runs when this token should expire.\n if (this.expires) {\n if (this.expires < (0, _now.default)()) {\n this._isExpired = true;\n } else {\n (0, _commonTimers.safeSetTimeout)(function () {\n _this2._isExpired = true;\n }, this.expires - (0, _now.default)());\n }\n }\n },\n /**\n * Refreshes this Token. Relies on\n * {@link config.credentials.refreshCallback()}\n * @instance\n * @memberof Token\n * @returns {Promise}\n */\n refresh: function refresh() {\n var _this3 = this;\n if (!this.canRefresh) {\n throw new Error('Not enough information available to refresh this access token');\n }\n var promise;\n if (_common.inBrowser) {\n if (!this.config.refreshCallback) {\n throw new Error('Cannot refresh access token without refreshCallback');\n }\n promise = _promise.default.resolve(this.config.refreshCallback(this.webex, this));\n }\n return (promise || this.webex.request({\n method: 'POST',\n uri: this.config.tokenUrl,\n form: {\n grant_type: 'refresh_token',\n redirect_uri: this.config.redirect_uri,\n refresh_token: this.refresh_token\n },\n auth: {\n user: this.config.client_id,\n pass: this.config.client_secret,\n sendImmediately: true\n },\n shouldRefreshAccessToken: false\n }).then(function (res) {\n return res.body;\n })).then(function (obj) {\n if (!obj) {\n throw new Error('token: refreshCallback() did not produce an object');\n }\n // If the authentication server did not send back a refresh token, copy\n // the current refresh token and related values to the response (note:\n // at time of implementation, CI never sends a new refresh token)\n if (!obj.refresh_token) {\n (0, _assign.default)(obj, (0, _lodash.pick)(_this3, 'refresh_token', 'refresh_token_expires', 'refresh_token_expires_in'));\n }\n\n // If the new token is the same as the previous token, then we may have\n // found a bug in CI; log the details and reject the Promise\n if (_this3.access_token === obj.access_token) {\n _this3.logger.error('token: new token matches current token');\n // log the tokens if it is not production\n if (process.env.NODE_ENV !== 'production') {\n _this3.logger.error('token: current token:', _this3.access_token);\n _this3.logger.error('token: new token:', obj.access_token);\n }\n return _promise.default.reject(new Error('new token matches current token'));\n }\n if (_this3.previousToken) {\n _this3.previousToken.revoke();\n _this3.unset('previousToken');\n }\n obj.previousToken = _this3;\n obj.scope = _this3.scope;\n return new Token(obj, {\n parent: _this3.parent\n });\n }).catch(processGrantError);\n },\n /**\n * Revokes this token and unsets its local properties\n * @instance\n * @memberof Token\n * @returns {Promise}\n */\n revoke: function revoke() {\n var _this4 = this;\n if (this.isExpired) {\n this.logger.info('token: already expired, not making making revocation request');\n return _promise.default.resolve();\n }\n if (!this.canAuthorize) {\n this.logger.info('token: no longer valid, not making revocation request');\n return _promise.default.resolve();\n }\n\n // FIXME we need to use the user token revocation endpoint to revoke a token\n // without a client_secret, but it doesn't current support using a token to\n // revoke itself\n // Note: I'm not making a canRevoke property because there should be changes\n // coming to the user token revocation endpoint that allow us to do this\n // correctly.\n if (!this.config.client_secret) {\n this.logger.info('token: no client secret available, not making revocation request');\n return _promise.default.resolve();\n }\n this.logger.info('token: revoking access token');\n return this.webex.request({\n method: 'POST',\n uri: this.config.revokeUrl,\n form: {\n token: this.access_token,\n token_type_hint: 'access_token'\n },\n auth: {\n user: this.config.client_id,\n pass: this.config.client_secret,\n sendImmediately: true\n },\n shouldRefreshAccessToken: false\n }).then(function () {\n _this4.unset(['access_token', 'expires', 'expires_in', 'token_type']);\n _this4.logger.info('token: access token revoked');\n }).catch(processGrantError);\n },\n set: function set() {\n // eslint-disable-next-line prefer-const\n var _this$_filterSetParam = this._filterSetParameters.apply(this, arguments),\n _this$_filterSetParam2 = (0, _slicedToArray2.default)(_this$_filterSetParam, 2),\n attrs = _this$_filterSetParam2[0],\n options = _this$_filterSetParam2[1];\n if (!attrs.token_type && attrs.access_token && attrs.access_token.includes(' ')) {\n var _attrs$access_token$s = attrs.access_token.split(' '),\n _attrs$access_token$s2 = (0, _slicedToArray2.default)(_attrs$access_token$s, 2),\n token_type = _attrs$access_token$s2[0],\n access_token = _attrs$access_token$s2[1];\n attrs = _objectSpread(_objectSpread({}, attrs), {}, {\n access_token: access_token,\n token_type: token_type\n });\n }\n var now = (0, _now.default)();\n if (!attrs.expires && attrs.expires_in) {\n attrs.expires = now + attrs.expires_in * 1000;\n }\n if (!attrs.refresh_token_expires && attrs.refresh_token_expires_in) {\n attrs.refresh_token_expires = now + attrs.refresh_token_expires_in * 1000;\n }\n if (attrs.scope) {\n attrs.scope = (0, _scope.sortScope)(attrs.scope);\n }\n return (0, _apply.default)(_webexPlugin.default.prototype.set, this, [attrs, options]);\n },\n /**\n * Renders the token object as an HTTP Header Value\n * @instance\n * @memberof Token\n * @returns {string}\n * @see {@link Object#toString()}\n */\n toString: function toString() {\n if (!this._string) {\n throw new Error('cannot stringify Token');\n }\n return this._string;\n },\n /**\n * Uses a non-producation api to return information about this token. This\n * method is primarily for tests and will throw if NODE_ENV === production\n * @instance\n * @memberof Token\n * @private\n * @returns {Promise}\n */\n validate: function validate() {\n var _this5 = this;\n if (process.env.NODE_ENV === 'production') {\n throw new Error('Token#validate() must not be used in production');\n }\n return this.webex.request({\n method: 'POST',\n service: 'conversation',\n resource: 'users/validateAuthToken',\n body: {\n token: this.access_token\n }\n }).catch(function (reason) {\n if ('statusCode' in reason) {\n return _promise.default.reject(reason);\n }\n _this5.logger.info(\"REMINDER: If you're investigating a network error here, it's normal\");\n\n // If we got an error that isn't a WebexHttpError, assume the problem is\n // that we don't have the wdm plugin loaded and service/resource isn't\n // a valid means of identifying a request.\n var convApi = process.env.CONVERSATION_SERVICE || process.env.CONVERSATION_SERVICE_URL || 'https://conv-a.wbx2.com/conversation/api/v1';\n return _this5.webex.request({\n method: 'POST',\n uri: \"\".concat(convApi, \"/users/validateAuthToken\"),\n body: {\n token: _this5.access_token\n },\n headers: {\n authorization: \"Bearer \".concat(_this5.access_token)\n }\n });\n }).then(function (res) {\n return res.body;\n });\n },\n version: \"3.7.0\"\n}, ((0, _applyDecoratedDescriptor2.default)(_obj, \"downscope\", [_dec], (0, _getOwnPropertyDescriptor.default)(_obj, \"downscope\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"refresh\", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, \"refresh\"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, \"revoke\", [_common.oneFlight], (0, _getOwnPropertyDescriptor.default)(_obj, \"revoke\"), _obj)), _obj)));\nvar _default = exports.default = Token;\n//# sourceMappingURL=token.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _isArray = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/is-array\"));\nvar _iterator = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/symbol/iterator\"));\n/* eslint-disable no-constructor-return */\n\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar itemsMap = new _weakMap.default();\nvar linksMap = new _weakMap.default();\nvar webexsMap = new _weakMap.default();\n\n/**\n * @class Page\n */\nvar Page = exports.default = /*#__PURE__*/function (_Symbol$iterator) {\n /**\n * @constructs {Page}\n * @param {HttpResponse} res\n * @param {ProxyWebex} webex\n * @returns {Page}\n */\n function Page(res, webex) {\n (0, _classCallCheck2.default)(this, Page);\n itemsMap.set(this, res.body.items);\n linksMap.set(this, Page.parseLinkHeaders(res.headers.link));\n webexsMap.set(this, webex);\n return this;\n }\n\n /**\n * Separate a single link header string into an actionable object\n * @param {string} linkHeaders\n * @private\n * @returns {Object}\n */\n (0, _createClass2.default)(Page, [{\n key: \"items\",\n get:\n /**\n * @type {Array}\n */\n function get() {\n return itemsMap.get(this);\n }\n\n /**\n * @type {number}\n */\n }, {\n key: \"length\",\n get: function get() {\n return this.items.length;\n }\n\n /**\n * @private\n * @type {Object}\n */\n }, {\n key: \"links\",\n get: function get() {\n return linksMap.get(this);\n }\n\n /**\n * @private\n * @type {ProxyWebex}\n */\n }, {\n key: \"webex\",\n get: function get() {\n return webexsMap.get(this);\n }\n }, {\n key: \"next\",\n value:\n /**\n * Get next page\n * @returns {Function}\n */\n function next() {\n return this.getLink('next');\n }\n\n /**\n * Indicates if there's another page\n * @returns {Boolean}\n */\n }, {\n key: \"hasNext\",\n value: function hasNext() {\n return this.hasLink('next');\n }\n\n /**\n * Get previous page\n * @returns {Page}\n */\n }, {\n key: \"previous\",\n value: function previous() {\n return this.getLink('previous');\n }\n\n /**\n * Indicates if there is a previous Page\n * @returns {Boolean}\n */\n }, {\n key: \"hasPrevious\",\n value: function hasPrevious() {\n return this.hasLink('previous');\n }\n\n /**\n * Retrieves the `Page` at url specified by `link`\n * @param {string} link Specifies which link header to return\n * @private\n * @returns {Promise}\n */\n }, {\n key: \"getLink\",\n value: function getLink(link) {\n var _this = this;\n return this.webex.request({\n uri: this.links[link]\n }).then(function (res) {\n return new Page(res, _this.webex);\n });\n }\n\n /**\n * Indicates if the specified link is in the link header\n * @param {string} link\n * @private\n * @returns {Boolean}\n */\n }, {\n key: \"hasLink\",\n value: function hasLink(link) {\n return Boolean(this.links[link]);\n }\n\n /**\n * Iterator\n * @returns {Object}\n */\n }, {\n key: _Symbol$iterator,\n value: function value() {\n var _this2 = this;\n var i = -1;\n return {\n next: function next() {\n i += 1;\n if (i < _this2.length) {\n return {\n value: _this2.items[i]\n };\n }\n return {\n done: true\n };\n }\n };\n }\n }], [{\n key: \"parseLinkHeaders\",\n value: function parseLinkHeaders(linkHeaders) {\n if (!linkHeaders) {\n return {};\n }\n linkHeaders = (0, _isArray.default)(linkHeaders) ? linkHeaders : [linkHeaders];\n return linkHeaders.reduce(function (links, linkHeader) {\n linkHeader = linkHeader.split(';');\n var link = linkHeader[0].replace('<', '').replace('>', '');\n var rel = linkHeader[1].split('=')[1].replace(/\"/g, '');\n links[rel] = link;\n return links;\n }, {});\n }\n }]);\n return Page;\n}(_iterator.default);\n//# sourceMappingURL=page.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SERVICE_CATALOGS_ENUM_TYPES = exports.SERVICE_CATALOGS = exports.NAMESPACE = exports.COMMERCIAL_ALLOWED_DOMAINS = void 0;\nvar NAMESPACE = exports.NAMESPACE = 'services';\nvar SERVICE_CATALOGS = exports.SERVICE_CATALOGS = ['discovery', 'limited', 'signin', 'postauth', 'custom'];\nvar SERVICE_CATALOGS_ENUM_TYPES = exports.SERVICE_CATALOGS_ENUM_TYPES = {\n STRING: 'SERVICE_CATALOGS_ENUM_TYPES_STRING',\n NUMBER: 'SERVICE_CATALOGS_ENUM_TYPES_NUMBER'\n};\n\n// The default allowed domains that SDK can make requests to outside of service catalog\nvar COMMERCIAL_ALLOWED_DOMAINS = exports.COMMERCIAL_ALLOWED_DOMAINS = ['wbx2.com', 'ciscospark.com', 'webex.com', 'webexapis.com', 'broadcloudpbx.com', 'broadcloud.eu', 'broadcloud.com.au', 'broadcloudpbx.net'];\n//# sourceMappingURL=constants.js.map\n","\"use strict\";\n\nvar _typeof = require(\"@babel/runtime-corejs2/helpers/typeof\");\nvar _WeakMap = require(\"@babel/runtime-corejs2/core-js/weak-map\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"HostMapInterceptor\", {\n enumerable: true,\n get: function get() {\n return _hostmap.default;\n }\n});\n_Object$defineProperty(exports, \"ServerErrorInterceptor\", {\n enumerable: true,\n get: function get() {\n return _serverError.default;\n }\n});\n_Object$defineProperty(exports, \"ServiceCatalog\", {\n enumerable: true,\n get: function get() {\n return _serviceCatalog.default;\n }\n});\n_Object$defineProperty(exports, \"ServiceHost\", {\n enumerable: true,\n get: function get() {\n return _serviceHost.default;\n }\n});\n_Object$defineProperty(exports, \"ServiceInterceptor\", {\n enumerable: true,\n get: function get() {\n return _service.default;\n }\n});\n_Object$defineProperty(exports, \"ServiceRegistry\", {\n enumerable: true,\n get: function get() {\n return _serviceRegistry.default;\n }\n});\n_Object$defineProperty(exports, \"ServiceState\", {\n enumerable: true,\n get: function get() {\n return _serviceState.default;\n }\n});\n_Object$defineProperty(exports, \"ServiceUrl\", {\n enumerable: true,\n get: function get() {\n return _serviceUrl.default;\n }\n});\n_Object$defineProperty(exports, \"Services\", {\n enumerable: true,\n get: function get() {\n return _services.default;\n }\n});\nexports.constants = void 0;\nvar _webexCore = require(\"../../webex-core\");\nvar constants = _interopRequireWildcard(require(\"./constants\"));\nexports.constants = constants;\nvar _services = _interopRequireDefault(require(\"./services\"));\nvar _serverError = _interopRequireDefault(require(\"./interceptors/server-error\"));\nvar _service = _interopRequireDefault(require(\"./interceptors/service\"));\nvar _hostmap = _interopRequireDefault(require(\"./interceptors/hostmap\"));\nvar _serviceCatalog = _interopRequireDefault(require(\"./service-catalog\"));\nvar _serviceRegistry = _interopRequireDefault(require(\"./service-registry\"));\nvar _serviceState = _interopRequireDefault(require(\"./service-state\"));\nvar _serviceHost = _interopRequireDefault(require(\"./service-host\"));\nvar _serviceUrl = _interopRequireDefault(require(\"./service-url\"));\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n(0, _webexCore.registerInternalPlugin)('services', _services.default, {\n interceptors: {\n ServiceInterceptor: _service.default.create,\n ServerErrorInterceptor: _serverError.default.create\n }\n});\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2024 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * This interceptor replaces the host in the request uri with the host from the hostmap\n * It will attempt to do this for every request, but not all URIs will be in the hostmap\n * URIs with hosts that are not in the hostmap will be left unchanged\n */\nvar HostMapInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(HostMapInterceptor, _Interceptor);\n var _super = _createSuper(HostMapInterceptor);\n function HostMapInterceptor() {\n (0, _classCallCheck2.default)(this, HostMapInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(HostMapInterceptor, [{\n key: \"onRequest\",\n value:\n /**\n * @see Interceptor#onRequest\n * @param {Object} options\n * @returns {Object}\n */\n function onRequest(options) {\n if (options.uri) {\n try {\n options.uri = this.webex.internal.services.replaceHostFromHostmap(options.uri);\n } catch (error) {\n /* empty */\n }\n }\n return options;\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {HostMapInterceptor}\n */\n function create() {\n return new HostMapInterceptor({\n webex: this\n });\n }\n }]);\n return HostMapInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=hostmap.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nvar _webexHttpError = _interopRequireDefault(require(\"../../webex-http-error\"));\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Changes server url when it fails\n */\nvar ServerErrorInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(ServerErrorInterceptor, _Interceptor);\n var _super = _createSuper(ServerErrorInterceptor);\n function ServerErrorInterceptor() {\n (0, _classCallCheck2.default)(this, ServerErrorInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(ServerErrorInterceptor, [{\n key: \"onResponseError\",\n value:\n /**\n * @see Interceptor#onResponseError\n * @param {Object} options\n * @param {Object} reason\n * @returns {Object}\n */\n function onResponseError(options, reason) {\n if ((reason instanceof _webexHttpError.default.InternalServerError || reason instanceof _webexHttpError.default.BadGateway || reason instanceof _webexHttpError.default.ServiceUnavailable) && options.uri) {\n var feature = this.webex.internal.device.features.developer.get('web-high-availability');\n if (feature && feature.value) {\n this.webex.internal.metrics.submitClientMetrics('web-ha', {\n fields: {\n success: false\n },\n tags: {\n action: 'failed',\n error: reason.message,\n url: options.uri\n }\n });\n return _promise.default.resolve(this.webex.internal.services.markFailedUrl(options.uri)).then(function () {\n return _promise.default.reject(reason);\n });\n }\n }\n return _promise.default.reject(reason);\n }\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {HAMessagingInterceptor}\n */\n function create() {\n // eslint-disable-next-line no-invalid-this\n return new ServerErrorInterceptor({\n webex: this\n });\n }\n }]);\n return ServerErrorInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=server-error.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nvar trailingSlashes = /(?:^\\/)|(?:\\/$)/;\n\n/**\n * @class\n */\nvar ServiceInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {\n (0, _inherits2.default)(ServiceInterceptor, _Interceptor);\n var _super = _createSuper(ServiceInterceptor);\n function ServiceInterceptor() {\n (0, _classCallCheck2.default)(this, ServiceInterceptor);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(ServiceInterceptor, [{\n key: \"onRequest\",\n value: /* eslint-disable no-param-reassign */\n /**\n * @see Interceptor#onRequest\n * @param {Object} options - The request PTO.\n * @returns {Object} - The mutated request PTO.\n */\n function onRequest(options) {\n var _this = this;\n // Validate that the PTO includes a uri property.\n if (options.uri) {\n return options;\n }\n\n // Normalize and validate the PTO.\n this.normalizeOptions(options);\n this.validateOptions(options);\n\n // Destructure commonly referenced namespaces.\n var services = this.webex.internal.services;\n var service = options.service,\n resource = options.resource,\n waitForServiceTimeout = options.waitForServiceTimeout;\n\n // Attempt to collect the service url.\n return services.waitForService({\n name: service,\n timeout: waitForServiceTimeout\n }).then(function (serviceUrl) {\n // Generate the combined service url and resource.\n options.uri = _this.generateUri(serviceUrl, resource);\n return options;\n }).catch(function () {\n return _promise.default.reject(new Error(\"service-interceptor: '\".concat(service, \"' is not a known service\")));\n });\n }\n\n /* eslint-disable class-methods-use-this */\n /**\n * Generate a usable request uri string from a service url and a resouce.\n *\n * @param {string} serviceUrl - The service url.\n * @param {string} [resource] - The resouce to be appended to the service url.\n * @returns {string} - The combined service url and resource.\n */\n }, {\n key: \"generateUri\",\n value: function generateUri(serviceUrl) {\n var resource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var formattedService = serviceUrl.replace(trailingSlashes, '');\n var formattedResource = resource.replace(trailingSlashes, '');\n return \"\".concat(formattedService, \"/\").concat(formattedResource);\n }\n\n /**\n * Normalizes request options relative to service identification.\n *\n * @param {Object} options - The request PTO.\n * @returns {Object} - The mutated request PTO.\n */\n }, {\n key: \"normalizeOptions\",\n value: function normalizeOptions(options) {\n // Validate if the api property is used.\n if (options.api) {\n // Assign the service property the value of the api property if necessary.\n options.service = options.service || options.api;\n delete options.api;\n }\n }\n\n /**\n * Validates that the appropriate options for this interceptor are present.\n *\n * @param {Object} options - The request PTO.\n * @returns {Object} - The mutated request PTO.\n */\n }, {\n key: \"validateOptions\",\n value: function validateOptions(options) {\n if (!options.resource) {\n throw new Error('a `resource` parameter is required');\n }\n if (!options.service) {\n throw new Error(\"a valid 'service' parameter is required\");\n }\n }\n /* eslint-enable class-methods-use-this, no-param-reassign */\n }], [{\n key: \"create\",\n value:\n /**\n * @returns {ServiceInterceptor}\n */\n function create() {\n /* eslint no-invalid-this: [0] */\n return new ServiceInterceptor({\n webex: this\n });\n }\n }]);\n return ServiceInterceptor;\n}(_httpCore.Interceptor);\n//# sourceMappingURL=service.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// Metrics for service catalog\nvar _default = exports.default = {\n JS_SDK_SERVICE_NOT_FOUND: 'JS_SDK_SERVICE_NOT_FOUND'\n};\n//# sourceMappingURL=metrics.js.map\n","\"use strict\";\n\nvar _Array$from = require(\"@babel/runtime-corejs2/core-js/array/from\");\nvar _Symbol = require(\"@babel/runtime-corejs2/core-js/symbol\");\nvar _Symbol$iterator = require(\"@babel/runtime-corejs2/core-js/symbol/iterator\");\nvar _Array$isArray = require(\"@babel/runtime-corejs2/core-js/array/is-array\");\nvar _Object$keys3 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/toConsumableArray\"));\nvar _url = _interopRequireDefault(require(\"url\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\nvar _lodash = require(\"lodash\");\nvar _serviceUrl = _interopRequireDefault(require(\"./service-url\"));\nfunction ownKeys(e, r) { var t = _Object$keys3(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== \"undefined\" && o[_Symbol$iterator] || o[\"@@iterator\"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _Array$from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/* eslint-disable no-underscore-dangle */\n/**\n * @class\n */\nvar ServiceCatalog = _ampersandState.default.extend({\n namespace: 'ServiceCatalog',\n props: {\n serviceGroups: ['object', true, function () {\n return {\n discovery: [],\n override: [],\n preauth: [],\n postauth: [],\n signin: []\n };\n }],\n status: ['object', true, function () {\n return {\n discovery: {\n ready: false,\n collecting: false\n },\n override: {\n ready: false,\n collecting: false\n },\n preauth: {\n ready: false,\n collecting: false\n },\n postauth: {\n ready: false,\n collecting: false\n },\n signin: {\n ready: false,\n collecting: false\n }\n };\n }],\n isReady: ['boolean', false, false],\n allowedDomains: ['array', false, function () {\n return [];\n }]\n },\n /**\n * @private\n * Search the service url array to locate a `ServiceUrl`\n * class object based on its name.\n * @param {string} name\n * @param {string} [serviceGroup]\n * @returns {ServiceUrl}\n */\n _getUrl: function _getUrl(name, serviceGroup) {\n var serviceUrls = typeof serviceGroup === 'string' ? this.serviceGroups[serviceGroup] || [] : [].concat((0, _toConsumableArray2.default)(this.serviceGroups.override), (0, _toConsumableArray2.default)(this.serviceGroups.postauth), (0, _toConsumableArray2.default)(this.serviceGroups.signin), (0, _toConsumableArray2.default)(this.serviceGroups.preauth), (0, _toConsumableArray2.default)(this.serviceGroups.discovery));\n return serviceUrls.find(function (serviceUrl) {\n return serviceUrl.name === name;\n });\n },\n /**\n * @private\n * Generate an array of `ServiceUrl`s that is organized from highest auth\n * level to lowest auth level.\n * @returns {Array} - array of `ServiceUrl`s\n */\n _listServiceUrls: function _listServiceUrls() {\n return [].concat((0, _toConsumableArray2.default)(this.serviceGroups.override), (0, _toConsumableArray2.default)(this.serviceGroups.postauth), (0, _toConsumableArray2.default)(this.serviceGroups.signin), (0, _toConsumableArray2.default)(this.serviceGroups.preauth), (0, _toConsumableArray2.default)(this.serviceGroups.discovery));\n },\n /**\n * @private\n * Safely load one or more `ServiceUrl`s into this `Services` instance.\n * @param {string} serviceGroup\n * @param {Array} services\n * @returns {Services}\n */\n _loadServiceUrls: function _loadServiceUrls(serviceGroup, services) {\n var _this = this;\n // declare namespaces outside of loop\n var existingService;\n services.forEach(function (service) {\n existingService = _this._getUrl(service.name, serviceGroup);\n if (!existingService) {\n _this.serviceGroups[serviceGroup].push(service);\n }\n });\n return this;\n },\n /**\n * @private\n * Safely unload one or more `ServiceUrl`s into this `Services` instance\n * @param {string} serviceGroup\n * @param {Array} services\n * @returns {Services}\n */\n _unloadServiceUrls: function _unloadServiceUrls(serviceGroup, services) {\n var _this2 = this;\n // declare namespaces outside of loop\n var existingService;\n services.forEach(function (service) {\n existingService = _this2._getUrl(service.name, serviceGroup);\n if (existingService) {\n _this2.serviceGroups[serviceGroup].splice(_this2.serviceGroups[serviceGroup].indexOf(existingService), 1);\n }\n });\n return this;\n },\n /**\n * Clear all collected catalog data and reset catalog status.\n *\n * @returns {void}\n */\n clean: function clean() {\n this.serviceGroups.preauth.length = 0;\n this.serviceGroups.signin.length = 0;\n this.serviceGroups.postauth.length = 0;\n this.status.preauth = {\n ready: false\n };\n this.status.signin = {\n ready: false\n };\n this.status.postauth = {\n ready: false\n };\n },\n /**\n * Search over all service groups to find a cluster id based\n * on a given url.\n * @param {string} url - Must be parsable by `Url`\n * @returns {string} - ClusterId of a given url\n */\n findClusterId: function findClusterId(url) {\n var incomingUrlObj = _url.default.parse(url);\n var serviceUrlObj;\n for (var _i = 0, _Object$keys = (0, _keys.default)(this.serviceGroups); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n var _iterator = _createForOfIteratorHelper(this.serviceGroups[key]),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var service = _step.value;\n serviceUrlObj = _url.default.parse(service.defaultUrl);\n var _iterator2 = _createForOfIteratorHelper(service.hosts),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _host = _step2.value;\n if (incomingUrlObj.hostname === _host.host && _host.id) {\n return _host.id;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n if (serviceUrlObj.hostname === incomingUrlObj.hostname && service.hosts.length > 0) {\n // no exact match, so try to grab the first home cluster\n var _iterator3 = _createForOfIteratorHelper(service.hosts),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var host = _step3.value;\n if (host.homeCluster) {\n return host.id;\n }\n }\n\n // no match found still, so return the first entry\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n return service.hosts[0].id;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n return undefined;\n },\n /**\n * Search over all service groups and return a service value from a provided\n * clusterId. Currently, this method will return either a service name, or a\n * service url depending on the `value` parameter. If the `value` parameter\n * is set to `name`, it will return a service name to be utilized within the\n * Services plugin methods.\n * @param {object} params\n * @param {string} params.clusterId - clusterId of found service\n * @param {boolean} [params.priorityHost = true] - returns priority host url if true\n * @param {string} [params.serviceGroup] - specify service group\n * @returns {object} service\n * @returns {string} service.name\n * @returns {string} service.url\n */\n findServiceFromClusterId: function findServiceFromClusterId() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n clusterId = _ref.clusterId,\n _ref$priorityHost = _ref.priorityHost,\n priorityHost = _ref$priorityHost === void 0 ? true : _ref$priorityHost,\n serviceGroup = _ref.serviceGroup;\n var serviceUrls = typeof serviceGroup === 'string' ? this.serviceGroups[serviceGroup] || [] : [].concat((0, _toConsumableArray2.default)(this.serviceGroups.override), (0, _toConsumableArray2.default)(this.serviceGroups.postauth), (0, _toConsumableArray2.default)(this.serviceGroups.signin), (0, _toConsumableArray2.default)(this.serviceGroups.preauth), (0, _toConsumableArray2.default)(this.serviceGroups.discovery));\n var identifiedServiceUrl = serviceUrls.find(function (serviceUrl) {\n return serviceUrl.hosts.find(function (host) {\n return host.id === clusterId;\n });\n });\n if (identifiedServiceUrl) {\n return {\n name: identifiedServiceUrl.name,\n url: identifiedServiceUrl.get(priorityHost, clusterId)\n };\n }\n return undefined;\n },\n /**\n * Find a service based on the provided url.\n * @param {string} url - Must be parsable by `Url`\n * @returns {serviceUrl} - ServiceUrl assocated with provided url\n */\n findServiceUrlFromUrl: function findServiceUrlFromUrl(url) {\n var serviceUrls = [].concat((0, _toConsumableArray2.default)(this.serviceGroups.discovery), (0, _toConsumableArray2.default)(this.serviceGroups.preauth), (0, _toConsumableArray2.default)(this.serviceGroups.signin), (0, _toConsumableArray2.default)(this.serviceGroups.postauth), (0, _toConsumableArray2.default)(this.serviceGroups.override));\n return serviceUrls.find(function (serviceUrl) {\n // Check to see if the URL we are checking starts with the default URL\n if (url.startsWith(serviceUrl.defaultUrl)) {\n return true;\n }\n\n // If not, we check to see if the alternate URLs match\n // These are made by swapping the host of the default URL\n // with that of an alternate host\n var _iterator4 = _createForOfIteratorHelper(serviceUrl.hosts),\n _step4;\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var host = _step4.value;\n var alternateUrl = new URL(serviceUrl.defaultUrl);\n alternateUrl.host = host.host;\n if (url.startsWith(alternateUrl.toString())) {\n return true;\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n return false;\n });\n },\n /**\n * Finds an allowed domain that matches a specific url.\n *\n * @param {string} url - The url to match the allowed domains against.\n * @returns {string} - The matching allowed domain.\n */\n findAllowedDomain: function findAllowedDomain(url) {\n var urlObj = _url.default.parse(url);\n if (!urlObj.host) {\n return undefined;\n }\n return this.allowedDomains.find(function (allowedDomain) {\n return urlObj.host.includes(allowedDomain);\n });\n },\n /**\n * Get a service url from the current services list by name.\n * @param {string} name\n * @param {boolean} priorityHost\n * @param {string} serviceGroup\n * @returns {string}\n */\n get: function get(name, priorityHost, serviceGroup) {\n var serviceUrl = this._getUrl(name, serviceGroup);\n return serviceUrl ? serviceUrl.get(priorityHost) : undefined;\n },\n /**\n * Get the current allowed domains list.\n *\n * @returns {Array} - the current allowed domains list.\n */\n getAllowedDomains: function getAllowedDomains() {\n return (0, _toConsumableArray2.default)(this.allowedDomains);\n },\n /**\n * Creates an object where the keys are the service names\n * and the values are the service urls.\n * @param {boolean} priorityHost - use the highest priority if set to `true`\n * @param {string} [serviceGroup]\n * @returns {Record}\n */\n list: function list(priorityHost, serviceGroup) {\n var output = {};\n var serviceUrls = typeof serviceGroup === 'string' ? this.serviceGroups[serviceGroup] || [] : [].concat((0, _toConsumableArray2.default)(this.serviceGroups.discovery), (0, _toConsumableArray2.default)(this.serviceGroups.preauth), (0, _toConsumableArray2.default)(this.serviceGroups.signin), (0, _toConsumableArray2.default)(this.serviceGroups.postauth), (0, _toConsumableArray2.default)(this.serviceGroups.override));\n if (serviceUrls) {\n serviceUrls.forEach(function (serviceUrl) {\n output[serviceUrl.name] = serviceUrl.get(priorityHost);\n });\n }\n return output;\n },\n /**\n * Mark a priority host service url as failed.\n * This will mark the host associated with the\n * `ServiceUrl` to be removed from the its\n * respective host array, and then return the next\n * viable host from the `ServiceUrls` host array,\n * or the `ServiceUrls` default url if no other priority\n * hosts are available, or if `noPriorityHosts` is set to\n * `true`.\n * @param {string} url\n * @param {boolean} noPriorityHosts\n * @returns {string}\n */\n markFailedUrl: function markFailedUrl(url, noPriorityHosts) {\n var _this3 = this;\n var serviceUrl = this._getUrl((0, _keys.default)(this.list()).find(function (key) {\n return _this3._getUrl(key).failHost(url);\n }));\n if (!serviceUrl) {\n return undefined;\n }\n return noPriorityHosts ? serviceUrl.get(false) : serviceUrl.get(true);\n },\n /**\n * Set the allowed domains for the catalog.\n *\n * @param {Array} allowedDomains - allowed domains to be assigned.\n * @returns {void}\n */\n setAllowedDomains: function setAllowedDomains(allowedDomains) {\n this.allowedDomains = (0, _toConsumableArray2.default)(allowedDomains);\n },\n /**\n *\n * @param {Array} newAllowedDomains - new allowed domains to add to existing set of allowed domains\n * @returns {void}\n */\n addAllowedDomains: function addAllowedDomains(newAllowedDomains) {\n this.allowedDomains = (0, _lodash.union)(this.allowedDomains, newAllowedDomains);\n },\n /**\n * Update the current list of `ServiceUrl`s against a provided\n * service hostmap.\n * @emits ServiceCatalog#preauthorized\n * @emits ServiceCatalog#postauthorized\n * @param {string} serviceGroup\n * @param {object} serviceHostmap\n * @returns {Services}\n */\n updateServiceUrls: function updateServiceUrls(serviceGroup, serviceHostmap) {\n var _this4 = this;\n var currentServiceUrls = this.serviceGroups[serviceGroup];\n var unusedUrls = currentServiceUrls.filter(function (serviceUrl) {\n return serviceHostmap.every(function (item) {\n return item.name !== serviceUrl.name;\n });\n });\n this._unloadServiceUrls(serviceGroup, unusedUrls);\n serviceHostmap.forEach(function (serviceObj) {\n var service = _this4._getUrl(serviceObj.name, serviceGroup);\n if (service) {\n service.defaultUrl = serviceObj.defaultUrl;\n service.hosts = serviceObj.hosts || [];\n } else {\n _this4._loadServiceUrls(serviceGroup, [new _serviceUrl.default(_objectSpread({}, serviceObj))]);\n }\n });\n this.status[serviceGroup].ready = true;\n this.trigger(serviceGroup);\n return this;\n },\n /**\n * Wait until the service catalog is available,\n * or reject after a timeout of 60 seconds.\n * @param {string} serviceGroup\n * @param {number} [timeout] - in seconds\n * @returns {Promise}\n */\n waitForCatalog: function waitForCatalog(serviceGroup, timeout) {\n var _this5 = this;\n return new _promise.default(function (resolve, reject) {\n if (_this5.status[serviceGroup].ready) {\n resolve();\n }\n var validatedTimeout = typeof timeout === 'number' && timeout >= 0 ? timeout : 60;\n var timeoutTimer = setTimeout(function () {\n return reject(new Error(\"services: timeout occured while waiting for '\".concat(serviceGroup, \"' catalog to populate\")));\n }, validatedTimeout * 1000);\n _this5.once(serviceGroup, function () {\n clearTimeout(timeoutTimer);\n resolve();\n });\n });\n }\n});\n/* eslint-enable no-underscore-dangle */\nvar _default = exports.default = ServiceCatalog;\n//# sourceMappingURL=service-catalog.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = exports.default = {\n hydra: 'https://api-usgov.webex.com/v1',\n u2c: 'https://u2c.gov.ciscospark.com/u2c/api/v1'\n};\n//# sourceMappingURL=service-fed-ramp.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _url = _interopRequireDefault(require(\"url\"));\nvar _constants = require(\"./constants\");\n/**\n * The parameter transfer object for {@link ServiceHost#constructor}.\n *\n * @typedef {Object} ServiceHostConstructorPTO\n * @property {string} ServiceHostConstructorPTO.catalog - The host's catalog.\n * @property {string} ServiceHostConstructorPTO.defaultUri - The host's default.\n * @property {string} ServiceHostConstructorPTO.hostGroup - The host's group.\n * @property {string} ServiceHostConstructorPTO.id - The host's clusterId.\n * @property {number} ServiceHostConstructorPTO.priority - The host's priority.\n * @property {string} ServiceHostConstructorPTO.uri - The host's uri.\n */\n/**\n * The parameter transfer object for {@link ServiceHost#polyGenerate}.\n *\n * @typedef {Object} ServiceHostPolyGeneratePTO\n * @property {string} ServiceHostPolyGeneratePTO.catalog - The target catalog.\n * @property {string} ServiceHostPolyGeneratePTO.name - The service name.\n * @property {string} ServiceHostPolyGeneratePTO.url - The service url.\n */\n/**\n * @class\n * @classdesc - Manages a single service host and its associated data.\n */\nvar ServiceHost = exports.default = /*#__PURE__*/function () {\n /**\n * Generate a new {@link ServiceHost}.\n *\n * @public\n * @constructor\n * @memberof ServiceHost\n * @param {ServiceHostConstructorPTO} pto\n */\n function ServiceHost(pto) {\n (0, _classCallCheck2.default)(this, ServiceHost);\n // Validate the parameter transfer object.\n ServiceHost.validate(pto);\n\n // Map the parameter transfer object to the class object.\n /**\n * The catalog name that the {@link ServiceHost} is associated with.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.catalog = pto.catalog;\n\n /**\n * The default URI for the {@link ServiceHost}.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.default = pto.defaultUri;\n\n /**\n * The host group that the {@link ServiceHost} is associated with.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.hostGroup = pto.hostGroup;\n\n /**\n * The cluster ID of the {@link ServiceHost}.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.id = pto.id;\n\n /**\n * The priority value of the {@link ServiceHost}. The lower the number, the\n * higher the priority.\n *\n * @instance\n * @type {number}\n * @public\n * @memberof ServiceHost\n */\n this.priority = pto.priority;\n\n /**\n * The host uri of the {@link ServiceHost}.\n *\n * @instance\n * @type {string}\n * @public\n * @memberof ServiceHost\n */\n this.uri = pto.uri;\n\n // Generate flags.\n /**\n * If the {@link ServiceHost} is marked as failed.\n *\n * @instance\n * @type {boolean}\n * @protected\n * @memberof ServiceHost\n */\n this.failed = false;\n\n /**\n * If the {@link ServiceHost} is marked as replaced.\n *\n * @instance\n * @type {boolean}\n * @protected\n * @memberof ServiceHost\n */\n this.replaced = false;\n }\n\n /**\n * If the {@link ServiceHost} is in an active state.\n *\n * @public\n * @memberof ServiceHost\n * @type {boolean} - `true` if the service is active and usable.\n */\n (0, _createClass2.default)(ServiceHost, [{\n key: \"active\",\n get: function get() {\n // Validate that the `ServiceHost` was not marked as failed or replaced.\n return !this.failed && !this.replaced;\n }\n\n /**\n * If the host is local to the user's cluster.\n *\n * @public\n * @memberof ServiceHost\n * @type {boolean} - If the host is local.\n */\n }, {\n key: \"local\",\n get: function get() {\n return this.default.includes(this.hostGroup);\n }\n\n /**\n * The service value.\n *\n * @public\n * @memberof ServiceHost\n * @type {string} - The service value.\n */\n }, {\n key: \"service\",\n get: function get() {\n return this.id.split(':')[3];\n }\n\n /**\n * The formatted url for the host.\n *\n * @public\n * @memberof ServiceHost\n * @type {string} - The service url.\n */\n }, {\n key: \"url\",\n get: function get() {\n // Generate a url object from the default url.\n var urlObj = _url.default.parse(this.default);\n\n // Format the host of the generated url object.\n urlObj.host = \"\".concat(this.uri).concat(urlObj.port ? \":\".concat(urlObj.port) : '');\n\n // Assign the formatted url to this.\n return _url.default.format(urlObj);\n }\n\n /**\n * Set one or more of the status properties of the class object.\n *\n * @public\n * @memberof ServiceHost\n * @param {Object} pto - The parameter transfer object.\n * @property {boolean} [pto.failed] - The failed status to set.\n * @property {boolean} [pto.replaced] - the replaced status to set.\n * @returns {this}\n */\n }, {\n key: \"setStatus\",\n value: function setStatus(_ref) {\n var failed = _ref.failed,\n replaced = _ref.replaced;\n if (failed !== undefined) {\n this.failed = failed;\n }\n if (replaced !== undefined) {\n this.replaced = replaced;\n }\n return this;\n }\n\n /**\n * Generate a service host using only a catalog, name, and URL.\n *\n * @public\n * @static\n * @memberof ServiceHost\n * @param {ServiceHostPolyGeneratePTO} pto\n * @returns {ServiceHost} - The generated service host.\n */\n }], [{\n key: \"polyGenerate\",\n value: function polyGenerate(_ref2) {\n var catalog = _ref2.catalog,\n name = _ref2.name,\n url = _ref2.url;\n return new ServiceHost({\n catalog: catalog,\n defaultUri: url,\n hostGroup: _url.default.parse(url).host,\n id: name ? \"poly-head:poly-group:poly-cluster:\".concat(name) : undefined,\n priority: 1,\n uri: _url.default.parse(url).host\n });\n }\n\n /**\n * Validate that a constructor parameter transfer object is valid.\n *\n * @public\n * @static\n * @memberof ServiceHost\n * @param {ServiceHostConstructorPTO} pto\n * @throws - If the parameter transfer object is not valid.\n * @returns {undefined}\n */\n }, {\n key: \"validate\",\n value: function validate(_ref3) {\n var catalog = _ref3.catalog,\n defaultUri = _ref3.defaultUri,\n hostGroup = _ref3.hostGroup,\n id = _ref3.id,\n priority = _ref3.priority,\n uri = _ref3.uri;\n // Generate error-throwing method.\n var throwError = function throwError(msg) {\n throw new Error(\"service-host: invalid constructor parameters, \".concat(msg));\n };\n\n // Validate the catalog property.\n if (!_constants.SERVICE_CATALOGS.includes(catalog)) {\n throwError(\"'catalog' must be a string\");\n }\n\n // Validate the `defaultUri` property.\n if (typeof defaultUri !== 'string') {\n throwError(\"'defaultUri' must be a string\");\n }\n\n // Validate the `hostGroup` property.\n if (typeof hostGroup !== 'string') {\n throwError(\"'hostGroup' must be a string\");\n }\n\n // Validate the `id` property.\n if (typeof id !== 'string' || id.split(':').length !== 4) {\n throwError(\"'id' must be a string that contains 3 ':' characters\");\n }\n\n // Validate the `priority` property.\n if (typeof priority !== 'number') {\n throwError(\"'priority' must be a number\");\n }\n\n // Validate the `uri` property.\n if (typeof uri !== 'string') {\n throwError(\"'uri' must be a string\");\n }\n }\n }]);\n return ServiceHost;\n}();\n//# sourceMappingURL=service-host.js.map\n","\"use strict\";\n\nvar _Object$keys2 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _isArray = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/array/is-array\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/toConsumableArray\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _constants = require(\"./constants\");\nvar _serviceHost = _interopRequireDefault(require(\"./service-host\"));\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\n/**\n * The parameter transfer object for {@link ServiceRegistry#mapRemoteCatalog}.\n * This object is shaped to match the object returned from the **U2C** service.\n *\n * @typedef {Record} RSL\n * @typedef {Record>>} RHC\n *\n * @typedef {Object} MapRemoteCatalogPTO\n * @property {string} MapRemoteCatalogPTO.catalog - Service catalog name.\n * @property {RSL} MapRemoteCatalogPTO.serviceLinks - Service links.\n * @property {RHC} MapRemoteCatalogPTO.hostCatalog - Service host catalog.\n */\n/**\n * Service manipulation filter object for retrieving services within the\n * {@link ServiceRegistry} class.\n *\n * @typedef {Object} HostFilter\n * @property {boolean} [HostFilter.active] - Active state to filter.\n * @property {Array | string} [HostFilter.catalog] - Catalogs to filter.\n * @property {Array | string} [HostFilter.cluster] - Clusters to filter.\n * @property {boolean} [HostFilter.local] - Filter to the user's home cluster.\n * @property {boolean} [HostFilter.priority] - Filter for the highest priority.\n * @property {Array | string} [HostFilter.service] - Services to filter.\n * @property {Array | string} [HostFilter.url] - URL to filter.\n */\n/**\n * @class\n * @classdesc - Manages a collection of {@link ServiceHost} class objects.\n */\nvar ServiceRegistry = exports.default = /*#__PURE__*/function () {\n /**\n * Generate a new {@link ServiceHost}.\n *\n * @public\n * @constructor\n * @memberof ServiceHost\n */\n function ServiceRegistry() {\n (0, _classCallCheck2.default)(this, ServiceRegistry);\n /**\n * The collection of managed {@link ServiceHost}s.\n *\n * @instance\n * @type {Array}\n * @private\n * @memberof ServiceRegistry\n */\n this.hosts = [];\n }\n\n /**\n * An active, local, and priority mapped record of the current\n * {@link ServiceCatalog#hosts}.\n *\n * @public\n * @memberof ServiceCatalog\n * @type {Record}\n */\n (0, _createClass2.default)(ServiceRegistry, [{\n key: \"map\",\n get: function get() {\n // Get a list of active, local, and priority-mapped hosts.\n return this.find({\n active: true,\n local: true,\n priority: true\n }).reduce(function (map, host) {\n // Generate a new object to assign the existing map.\n var hostReference = {};\n\n // Assign the key:value pair for the service and url.\n hostReference[host.service] = host.url;\n\n // Assign the reference to the map and return.\n return _objectSpread(_objectSpread({}, map), hostReference);\n }, {});\n }\n\n /**\n * Removes a collection of {@link ServiceHost} class objects from the\n * {@link ServiceRegistry#hosts} array based on the provided\n * {@link HostFilter}.\n *\n * @public\n * @memberof ServiceRegistry\n * @param {HostFilter} filter - The inclusive filter for hosts to remove.\n * @returns {Array} - The removed {@link ServiceHost}s.\n */\n }, {\n key: \"clear\",\n value: function clear(filter) {\n // Collect a list of hosts to remove based on the provided filter.\n var removing = this.find(filter);\n\n // Remove the hosts from the array.\n this.hosts = this.hosts.filter(function (host) {\n return !removing.includes(host);\n });\n\n // Return the removed hosts.\n return removing;\n }\n\n /**\n * Mark a collection of {@link ServiceHost} class objects from the\n * {@link ServiceRegistry#hosts} array as failed based on the provided\n * {@link HostFilter}.\n *\n * @public\n * @memberof ServiceRegistry\n * @param {HostFilter} filter - The inclusive filter for hosts to mark failed.\n * @returns {Array} - The {@link ServiceHost}s marked failed.\n */\n }, {\n key: \"failed\",\n value: function failed(filter) {\n // Collect a list of hosts to mark as failed based on the provided filter.\n var failing = this.find(filter);\n\n // Mark the hosts from the array as failed.\n failing.forEach(function (host) {\n host.setStatus({\n failed: true\n });\n });\n\n // Return the marked hosts.\n return failing;\n }\n\n /**\n * Filter the {@link ServiceRegistry#hosts} array against their active states.\n *\n * @private\n * @memberof ServiceRegistry\n * @param {boolean} [active] - Filter for the host state.\n * @returns {Array} - The filtered host array.\n */\n }, {\n key: \"filterActive\",\n value: function filterActive(active) {\n // Filter the host array if the active requirement is true.\n return typeof active === 'boolean' ? this.hosts.filter(function (host) {\n return host.active === active;\n }) : (0, _toConsumableArray2.default)(this.hosts);\n }\n\n /**\n * Filter the {@link ServiceRegistry#hosts} array against their assigned\n * catalog values.\n *\n * @private\n * @memberof ServiceRegistry\n * @param {Array | string} [catalog] - Catalogs to filter.\n * @returns {Array} - The filtered host array.\n */\n }, {\n key: \"filterCatalog\",\n value: function filterCatalog() {\n var catalog = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // Generate a catalog names array based on the provided catalog param.\n var catalogs = ((0, _isArray.default)(catalog) ? catalog : [catalog]).map(function (catalogId) {\n return ServiceRegistry.mapCatalogName({\n id: catalogId,\n type: _constants.SERVICE_CATALOGS_ENUM_TYPES.STRING\n }) || catalogId;\n });\n\n // Filter the host array against the catalog names array.\n return catalogs.length > 0 ? this.hosts.filter(function (host) {\n return catalogs.includes(host.catalog);\n }) : (0, _toConsumableArray2.default)(this.hosts);\n }\n\n /**\n * Filter the {@link ServiceRegistry#hosts} array against their assigned\n * cluster values.\n *\n * @private\n * @memberof ServiceRegistry\n * @param {Array | string} [cluster] - Clusters to filter for.\n * @returns {Array} - The filtered host array.\n */\n }, {\n key: \"filterCluster\",\n value: function filterCluster() {\n var cluster = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // Generate an array of clusters regardless of parameter type.\n var clusters = (0, _isArray.default)(cluster) ? cluster : [cluster];\n\n // Filter the host array against the provided clusters.\n return clusters.length > 0 ? this.hosts.filter(function (host) {\n return clusters.includes(host.id);\n }) : (0, _toConsumableArray2.default)(this.hosts);\n }\n\n /**\n * Filter the {@link ServiceRegistry#hosts} array against their location in\n * reference to the authenticated user.\n *\n * @private\n * @memberof ServiceRegistry\n * @param {boolean} [local] - Filter for the host location.\n * @returns {Array} - The filtered host array.\n */\n }, {\n key: \"filterLocal\",\n value: function filterLocal(local) {\n return typeof local === 'boolean' ? this.hosts.filter(function (host) {\n return host.local === local;\n }) : (0, _toConsumableArray2.default)(this.hosts);\n }\n\n /**\n * Filter the {@link ServiceRegistry#hosts} array for the highest priority\n * hosts for each specific service.\n *\n * @private\n * @memberof ServiceRegistry\n * @param {boolean} [priority] - Filter for the highest priority\n * @returns {Array} - The filtered host array.\n */\n }, {\n key: \"filterPriority\",\n value: function filterPriority(priority) {\n return priority ? this.hosts.reduce(function (filteredHosts, currentHost) {\n // Validate that the current host is not active.\n if (!currentHost.active) {\n return filteredHosts;\n }\n\n // Determine if the filtered hosts array contains a host from the same\n // host group.\n var foundHost = filteredHosts.find(function (host) {\n return host.hostGroup === currentHost.hostGroup;\n });\n\n // Validate if a host was found.\n if (!foundHost) {\n filteredHosts.push(currentHost);\n return filteredHosts;\n }\n\n // Map the found host's catalog to its priority value.\n var foundHostCatalogPriority = ServiceRegistry.mapCatalogName({\n id: foundHost.catalog,\n type: _constants.SERVICE_CATALOGS_ENUM_TYPES.NUMBER\n });\n\n // Map the current host's catalog to its priority value.\n var currentHostCatalogPriority = ServiceRegistry.mapCatalogName({\n id: currentHost.catalog,\n type: _constants.SERVICE_CATALOGS_ENUM_TYPES.NUMBER\n });\n\n // Validate if the found host has a lower priority than the current\n // host.\n if (foundHostCatalogPriority < currentHostCatalogPriority || foundHost.priority < currentHost.priority) {\n filteredHosts.splice(filteredHosts.indexOf(foundHost, 1));\n filteredHosts.push(currentHost);\n }\n return filteredHosts;\n }, []) : (0, _toConsumableArray2.default)(this.hosts);\n }\n\n /**\n * Filter the {@link ServiceRegistry#hosts} array for hosts with a specified\n * set of service names.\n *\n * @private\n * @memberof ServiceRegistry\n * @param {Array | string} [service] - Services to filter.\n * @returns {Array} - The filtered host array.\n */\n }, {\n key: \"filterService\",\n value: function filterService() {\n var service = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // Generate an array of services regardless of parameter type.\n var services = (0, _isArray.default)(service) ? service : [service];\n\n // Filter the host array against the provided services.\n return services.length > 0 ? this.hosts.filter(function (host) {\n return services.includes(host.service);\n }) : (0, _toConsumableArray2.default)(this.hosts);\n }\n\n /**\n * Filter the {@link ServiceRegistry#hosts} array for hosts with a specified\n * set of URLs.\n *\n * @private\n * @memberof ServiceRegistry\n * @param {Array | string} [url] - URL to filter.\n * @returns {Array} - The filter host array.\n */\n }, {\n key: \"filterUrl\",\n value: function filterUrl() {\n var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // Generate an array of URLs regardless of the parameter type.\n var urls = (0, _isArray.default)(url) ? url : [url];\n\n // Filter the host array against the provided URLs.\n return urls.length > 0 ? this.hosts.filter(function (host) {\n return urls.includes(host.url);\n }) : (0, _toConsumableArray2.default)(this.hosts);\n }\n\n /**\n * Get an array of {@link ServiceHost}s based on a provided\n * {@link HostFilter} from the {@link ServiceRegistry#hosts} array.\n *\n * @public\n * @memberof ServiceRegistry\n * @param {HostFilter} [filter] - The inclusive filter for hosts to find.\n * @returns {Array} - The filtered hosts.\n */\n }, {\n key: \"find\",\n value: function find() {\n var _this = this;\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n active = _ref.active,\n catalog = _ref.catalog,\n cluster = _ref.cluster,\n local = _ref.local,\n priority = _ref.priority,\n service = _ref.service,\n url = _ref.url;\n return this.hosts.filter(function (host) {\n return _this.filterActive(active).includes(host) && _this.filterCatalog(catalog).includes(host) && _this.filterCluster(cluster).includes(host) && _this.filterLocal(local).includes(host) && _this.filterPriority(priority).includes(host) && _this.filterService(service).includes(host) && _this.filterUrl(url).includes(host);\n });\n }\n\n /**\n * Load a formatted array of {@link ServiceHost} constructor parameter\n * transfer objects as instances of {@link ServiceHost} class objects to the\n * {@link ServiceRegistry#hosts} array.\n *\n * @public\n * @memberof ServiceRegistry\n * @param {Array} hosts\n * @returns {this}\n */\n }, {\n key: \"load\",\n value: function load() {\n var _this$hosts;\n var hosts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // Validate that the provided hosts are eligible to be loaded.\n var validHosts = hosts.filter(function (host) {\n return !!ServiceRegistry.mapCatalogName({\n id: host.catalog,\n type: _constants.SERVICE_CATALOGS_ENUM_TYPES.STRING\n });\n });\n\n // Load the eligible hosts.\n (_this$hosts = this.hosts).push.apply(_this$hosts, (0, _toConsumableArray2.default)(validHosts.map(function (loadableHost) {\n return new _serviceHost.default(loadableHost);\n })));\n return this;\n }\n\n /**\n * Mark a collection of {@link ServiceHost} class objects from the\n * {@link ServiceRegistry#hosts} array as replaced based on the provided\n * {@link HostFilter}.\n *\n * @public\n * @memberof ServiceRegistry\n * @param {HostFilter} filter - The inclusive filter to mark replaced.\n * @returns {Array} - The {@link ServiceHost}s marked replaced.\n */\n }, {\n key: \"replaced\",\n value: function replaced(filter) {\n // Collect a list of hosts to mark as replaced based on the provided filter.\n var replacing = this.find(filter);\n\n // Mark the hosts from the array as replaced.\n replacing.forEach(function (host) {\n host.setStatus({\n replaced: true\n });\n });\n\n // Return the marked hosts.\n return replacing;\n }\n\n /**\n * Reset the failed status of a collection of {@link ServiceHost} class\n * objects from the {@link ServiceRegistry#hosts} array based on the provided\n * {@link HostFilter}.\n *\n * @public\n * @memberof ServiceRegistry\n * @param {HostFilter} filter - The inclusive filter of hosts to reset.\n * @returns {Array} - The {@link ServiceHost}s that reset.\n */\n }, {\n key: \"reset\",\n value: function reset(filter) {\n // Collect a list of hosts to mark as replaced based on the provided filter.\n var resetting = this.find(filter);\n\n // Mark the hosts from the array as replaced.\n resetting.forEach(function (host) {\n host.setStatus({\n failed: false\n });\n });\n\n // Return the marked hosts.\n return resetting;\n }\n\n /**\n * Convert a {@link SERVICE_CATALOGS} identifier or value to its associated\n * idenfier or value.\n *\n * @public\n * @static\n * @memberof ServiceRegistry\n * @param {Object} pto - The parameter transfer object.\n * @property {string | number} pto.id - The identifier to convert in the enum.\n * @property {SERVICE_CATALOGS_ENUM_TYPES} pto.type - The desired output.\n * @returns {string|number} - The matching enum value or index.\n */\n }], [{\n key: \"mapCatalogName\",\n value: function mapCatalogName(_ref2) {\n var id = _ref2.id,\n type = _ref2.type;\n // Validate that the id is a number.\n if (typeof id === 'number') {\n // Validate that the desired type is a number.\n if (type === _constants.SERVICE_CATALOGS_ENUM_TYPES.NUMBER) {\n return _constants.SERVICE_CATALOGS[id] !== undefined ? id : undefined;\n }\n\n // Validate that the desired type is a string.\n if (type === _constants.SERVICE_CATALOGS_ENUM_TYPES.STRING) {\n return _constants.SERVICE_CATALOGS[id];\n }\n }\n\n // Validate that the id is a string.\n if (typeof id === 'string') {\n // Validate that the desired type is a string.\n if (type === _constants.SERVICE_CATALOGS_ENUM_TYPES.STRING) {\n return _constants.SERVICE_CATALOGS.includes(id) ? id : undefined;\n }\n\n // Validate that the desired type is a number.\n if (type === _constants.SERVICE_CATALOGS_ENUM_TYPES.NUMBER) {\n return _constants.SERVICE_CATALOGS.includes(id) ? _constants.SERVICE_CATALOGS.indexOf(id) : undefined;\n }\n }\n return undefined;\n }\n\n /**\n * Generate a formatted array based on the object received from the **U2C**\n * service for usage in the {@link ServiceRegistry#load} method.\n *\n * @public\n * @static\n * @memberof ServiceRegistry\n * @param {MapRemoteCatalogPTO} pto - The parameter transfer object.\n * @throws - If the target catalog does not exist.\n * @returns {Array}\n */\n }, {\n key: \"mapRemoteCatalog\",\n value: function mapRemoteCatalog(_ref3) {\n var catalog = _ref3.catalog,\n hostCatalog = _ref3.hostCatalog,\n serviceLinks = _ref3.serviceLinks;\n // Collect the service catalog name if needed.\n var catalogIndex = ServiceRegistry.mapCatalogName({\n id: catalog,\n type: _constants.SERVICE_CATALOGS_ENUM_TYPES.STRING\n });\n\n // Validate that the target catalog exists.\n if (!_constants.SERVICE_CATALOGS.includes(catalogIndex)) {\n throw new Error(\"service-catalogs: '\".concat(catalog, \"' is not a valid catalog\"));\n }\n\n // Map the remote catalog to a mountable host array.\n return (0, _keys.default)(hostCatalog).reduce(function (output, key) {\n output.push.apply(output, (0, _toConsumableArray2.default)(hostCatalog[key].map(function (host) {\n return {\n catalog: catalogIndex,\n defaultUri: serviceLinks[host.id.split(':')[3]],\n hostGroup: key,\n id: host.id,\n priority: host.priority,\n uri: host.host\n };\n })));\n return output;\n }, []);\n }\n }]);\n return ServiceRegistry;\n}();\n//# sourceMappingURL=service-registry.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _constants = require(\"./constants\");\n/**\n * The state of a specific catalog to be used by {@link ServiceState}.\n *\n * @typedef {Record} CatalogState\n * @property {boolean} CatalogState.collecting - If the catalog is collecting.\n * @property {boolean} CatalogState.ready - If the catalog is ready.\n */\n/**\n * @class\n * @classdesc - Manages the state of the service catalogs for a webex instance.\n */\nvar ServiceState = exports.default = /*#__PURE__*/function () {\n /**\n * Generate a new {@link ServiceState}.\n *\n * @public\n * @constructor\n * @memberof ServiceState\n */\n function ServiceState() {\n var _this = this;\n (0, _classCallCheck2.default)(this, ServiceState);\n // Iterate over the possible catalog names and generate their states.\n _constants.SERVICE_CATALOGS.forEach(function (catalog) {\n _this[catalog] = ServiceState.generateCatalogState();\n });\n }\n\n /**\n * Set a catalog to be collecting or not.\n *\n * @public\n * @memberof ServiceState\n * @param {string} catalog - Catalog to target.\n * @param {boolean} collecting - If the target is collecting or not.\n * @returns {undefined}\n */\n (0, _createClass2.default)(ServiceState, [{\n key: \"setCollecting\",\n value: function setCollecting(catalog, collecting) {\n // Validate that the catalog state exists.\n if (this[catalog]) {\n // Set the 'collecting' status of the catalog state.\n this[catalog].collecting = collecting;\n }\n }\n\n /**\n * Set a catalog to be ready or not.\n *\n * @public\n * @memberof ServiceState\n * @param {string} catalog - Catalog to target.\n * @param {boolean} ready - If the target is ready or not.\n * @returns {undefined}\n */\n }, {\n key: \"setReady\",\n value: function setReady(catalog, ready) {\n // Validate that the catalog state exists.\n if (this[catalog]) {\n // Set the 'ready' status of the catalog state.\n this[catalog].ready = ready;\n }\n }\n\n /**\n * Generate a {@link CatalogState}.\n *\n * @public\n * @static\n * @memberof ServiceState\n * @returns {CatalogState} - The generated {@link CatalogState}.\n */\n }], [{\n key: \"generateCatalogState\",\n value: function generateCatalogState() {\n return {\n collecting: false,\n ready: false\n };\n }\n }]);\n return ServiceState;\n}();\n//# sourceMappingURL=service-state.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _url = _interopRequireDefault(require(\"url\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\n/* eslint-disable no-underscore-dangle */\n/**\n * @class\n */\nvar ServiceUrl = _ampersandState.default.extend({\n namespace: 'ServiceUrl',\n props: {\n defaultUrl: ['string', true, undefined],\n hosts: ['array', false, function () {\n return [];\n }],\n name: ['string', true, undefined]\n },\n /**\n * Generate a host url based on the host\n * uri provided.\n * @param {string} hostUri\n * @returns {string}\n */\n _generateHostUrl: function _generateHostUrl(hostUri) {\n var url = _url.default.parse(this.defaultUrl);\n\n // setting url.hostname will not apply during Url.format(), set host via\n // a string literal instead.\n url.host = \"\".concat(hostUri).concat(url.port ? \":\".concat(url.port) : '');\n return _url.default.format(url);\n },\n /**\n * Generate a list of urls based on this\n * `ServiceUrl`'s known hosts.\n * @returns {string[]}\n */\n _getHostUrls: function _getHostUrls() {\n var _this = this;\n return this.hosts.map(function (host) {\n return {\n url: _this._generateHostUrl(host.host),\n priority: host.priority\n };\n });\n },\n /**\n * Get the current host url with the highest priority. If a clusterId is not\n * provided, this will only return a URL with a filtered host that has the\n * `homeCluster` value set to `true`.\n *\n * @param {string} [clusterId] - The clusterId to filter for a priority host.\n * @returns {string} - The priority host url.\n */\n _getPriorityHostUrl: function _getPriorityHostUrl(clusterId) {\n if (this.hosts.length === 0) {\n return this.defaultUrl;\n }\n var filteredHosts = clusterId ? this.hosts.filter(function (host) {\n return host.id === clusterId;\n }) : this.hosts.filter(function (host) {\n return host.homeCluster;\n });\n var aliveHosts = filteredHosts.filter(function (host) {\n return !host.failed;\n });\n filteredHosts = aliveHosts.length === 0 ? filteredHosts.map(function (host) {\n /* eslint-disable-next-line no-param-reassign */\n host.failed = false;\n return host;\n }) : aliveHosts;\n return this._generateHostUrl(filteredHosts.reduce(function (previous, current) {\n return previous.priority > current.priority || !previous.homeCluster ? current : previous;\n }, {}).host);\n },\n /**\n * Attempt to mark a host from this `ServiceUrl` as failed and return true\n * if the provided url has a host that could be successfully marked as failed.\n *\n * @param {string} url\n * @returns {boolean}\n */\n failHost: function failHost(url) {\n if (url === this.defaultUrl) {\n return true;\n }\n var _Url$parse = _url.default.parse(url),\n hostname = _Url$parse.hostname;\n var foundHost = this.hosts.find(function (hostObj) {\n return hostObj.host === hostname;\n });\n if (foundHost) {\n foundHost.failed = true;\n }\n return foundHost !== undefined;\n },\n /**\n * Get the current `defaultUrl` or generate a url using the host with the\n * highest priority via host rendering.\n *\n * @param {boolean} [priorityHost] - Retrieve the priority host.\n * @param {string} [clusterId] - Cluster to match a host against.\n * @returns {string} - The full service url.\n */\n get: function get(priorityHost, clusterId) {\n if (!priorityHost) {\n return this.defaultUrl;\n }\n return this._getPriorityHostUrl(clusterId);\n }\n});\n/* eslint-enable no-underscore-dangle */\nvar _default = exports.default = ServiceUrl;\n//# sourceMappingURL=service-url.js.map\n","\"use strict\";\n\nvar _Object$keys2 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.DEFAULT_CLUSTER_SERVICE = exports.DEFAULT_CLUSTER = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/slicedToArray\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _sha = _interopRequireDefault(require(\"crypto-js/sha256\"));\nvar _lodash = require(\"lodash\");\nvar _webexPlugin = _interopRequireDefault(require(\"../webex-plugin\"));\nvar _metrics = _interopRequireDefault(require(\"./metrics\"));\nvar _serviceCatalog = _interopRequireDefault(require(\"./service-catalog\"));\nvar _serviceRegistry = _interopRequireDefault(require(\"./service-registry\"));\nvar _serviceState = _interopRequireDefault(require(\"./service-state\"));\nvar _serviceFedRamp = _interopRequireDefault(require(\"./service-fed-ramp\"));\nvar _constants = require(\"./constants\");\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar trailingSlashes = /(?:^\\/)|(?:\\/$)/;\n\n// The default cluster when one is not provided (usually as 'US' from hydra)\nvar DEFAULT_CLUSTER = exports.DEFAULT_CLUSTER = 'urn:TEAM:us-east-2_a';\n// The default service name for convo (currently identityLookup due to some weird CSB issue)\nvar DEFAULT_CLUSTER_SERVICE = exports.DEFAULT_CLUSTER_SERVICE = 'identityLookup';\nvar CLUSTER_SERVICE = process.env.WEBEX_CONVERSATION_CLUSTER_SERVICE || DEFAULT_CLUSTER_SERVICE;\nvar DEFAULT_CLUSTER_IDENTIFIER = process.env.WEBEX_CONVERSATION_DEFAULT_CLUSTER || \"\".concat(DEFAULT_CLUSTER, \":\").concat(CLUSTER_SERVICE);\n\n/* eslint-disable no-underscore-dangle */\n/**\n * @class\n */\nvar Services = _webexPlugin.default.extend({\n namespace: 'Services',\n /**\n * The {@link WeakMap} of {@link ServiceRegistry} class instances that are\n * keyed with WebexCore instances.\n *\n * @instance\n * @type {WeakMap}\n * @private\n * @memberof Services\n */\n registries: new _weakMap.default(),\n /**\n * The {@link WeakMap} of {@link ServiceState} class instances that are\n * keyed with WebexCore instances.\n *\n * @instance\n * @type {WeakMap}\n * @private\n * @memberof Services\n */\n states: new _weakMap.default(),\n props: {\n validateDomains: ['boolean', false, true],\n initFailed: ['boolean', false, false]\n },\n _catalogs: new _weakMap.default(),\n _serviceUrls: null,\n _hostCatalog: null,\n /**\n * Get the registry associated with this webex instance.\n *\n * @private\n * @memberof Services\n * @returns {ServiceRegistry} - The associated {@link ServiceRegistry}.\n */\n getRegistry: function getRegistry() {\n return this.registries.get(this.webex);\n },\n /**\n * Get the state associated with this webex instance.\n *\n * @private\n * @memberof Services\n * @returns {ServiceState} - The associated {@link ServiceState}.\n */\n getState: function getState() {\n return this.states.get(this.webex);\n },\n /**\n * @private\n * Get the current catalog based on the assocaited\n * webex instance.\n * @returns {ServiceCatalog}\n */\n _getCatalog: function _getCatalog() {\n return this._catalogs.get(this.webex);\n },\n /**\n * Get a service url from the current services list by name\n * from the associated instance catalog.\n * @param {string} name\n * @param {boolean} [priorityHost]\n * @param {string} [serviceGroup]\n * @returns {string|undefined}\n */\n get: function get(name, priorityHost, serviceGroup) {\n var catalog = this._getCatalog();\n return catalog.get(name, priorityHost, serviceGroup);\n },\n /**\n * Determine if the catalog contains a specific service\n *\n * @param {string} serviceName - The service name to validate.\n * @returns {boolean} - True if the service exists.\n */\n hasService: function hasService(serviceName) {\n return !!this.get(serviceName);\n },\n /**\n * Determine if a whilelist exists in the service catalog.\n *\n * @returns {boolean} - True if a allowed domains list exists.\n */\n hasAllowedDomains: function hasAllowedDomains() {\n var catalog = this._getCatalog();\n return catalog.getAllowedDomains().length > 0;\n },\n /**\n * Generate a service catalog as an object from\n * the associated instance catalog.\n * @param {boolean} [priorityHost] - use highest priority host if set to `true`\n * @param {string} [serviceGroup]\n * @returns {Record}\n */\n list: function list(priorityHost, serviceGroup) {\n var catalog = this._getCatalog();\n return catalog.list(priorityHost, serviceGroup);\n },\n /**\n * Mark a priority host service url as failed.\n * This will mark the host associated with the\n * `ServiceUrl` to be removed from the its\n * respective host array, and then return the next\n * viable host from the `ServiceUrls` host array,\n * or the `ServiceUrls` default url if no other priority\n * hosts are available, or if `noPriorityHosts` is set to\n * `true`.\n * @param {string} url\n * @param {boolean} noPriorityHosts\n * @returns {string}\n */\n markFailedUrl: function markFailedUrl(url, noPriorityHosts) {\n var catalog = this._getCatalog();\n return catalog.markFailedUrl(url, noPriorityHosts);\n },\n /**\n * saves all the services from the pre and post catalog service\n * @param {Object} serviceUrls\n * @returns {void}\n */\n _updateServiceUrls: function _updateServiceUrls(serviceUrls) {\n this._serviceUrls = _objectSpread(_objectSpread({}, this._serviceUrls), serviceUrls);\n },\n /**\n * saves the hostCatalog object\n * @param {Object} hostCatalog\n * @returns {void}\n */\n _updateHostCatalog: function _updateHostCatalog(hostCatalog) {\n this._hostCatalog = _objectSpread(_objectSpread({}, this._hostCatalog), hostCatalog);\n },\n /**\n * Update a list of `serviceUrls` to the most current\n * catalog via the defined `discoveryUrl` then returns the current\n * list of services.\n * @param {object} [param]\n * @param {string} [param.from] - This accepts `limited` or `signin`\n * @param {object} [param.query] - This accepts `email`, `orgId` or `userId` key values\n * @param {string} [param.query.email] - must be a standard-format email\n * @param {string} [param.query.orgId] - must be an organization id\n * @param {string} [param.query.userId] - must be a user id\n * @param {string} [param.token] - used for signin catalog\n * @returns {Promise}\n */\n updateServices: function updateServices() {\n var _this = this;\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n from = _ref.from,\n query = _ref.query,\n token = _ref.token,\n forceRefresh = _ref.forceRefresh;\n var catalog = this._getCatalog();\n var formattedQuery;\n var serviceGroup;\n\n // map catalog name to service group name.\n switch (from) {\n case 'limited':\n serviceGroup = 'preauth';\n break;\n case 'signin':\n serviceGroup = 'signin';\n break;\n default:\n serviceGroup = 'postauth';\n break;\n }\n\n // confirm catalog update for group is not in progress.\n if (catalog.status[serviceGroup].collecting) {\n return this.waitForCatalog(serviceGroup);\n }\n catalog.status[serviceGroup].collecting = true;\n if (serviceGroup === 'preauth') {\n var queryKey = query && (0, _keys.default)(query)[0];\n if (!['email', 'emailhash', 'userId', 'orgId', 'mode'].includes(queryKey)) {\n return _promise.default.reject(new Error('a query param of email, emailhash, userId, orgId, or mode is required'));\n }\n }\n // encode email when query key is email\n if (serviceGroup === 'preauth' || serviceGroup === 'signin') {\n var _queryKey = (0, _keys.default)(query)[0];\n formattedQuery = {};\n if (_queryKey === 'email' && query.email) {\n formattedQuery.emailhash = (0, _sha.default)(query.email.toLowerCase()).toString();\n } else {\n formattedQuery[_queryKey] = query[_queryKey];\n }\n }\n return this._fetchNewServiceHostmap({\n from: from,\n token: token,\n query: formattedQuery,\n forceRefresh: forceRefresh\n }).then(function (serviceHostMap) {\n catalog.updateServiceUrls(serviceGroup, serviceHostMap);\n _this.updateCredentialsConfig();\n catalog.status[serviceGroup].collecting = false;\n }).catch(function (error) {\n catalog.status[serviceGroup].collecting = false;\n return _promise.default.reject(error);\n });\n },\n /**\n * User validation parameter transfer object for {@link validateUser}.\n * @param {object} ValidateUserPTO\n * @property {string} ValidateUserPTO.email - The email of the user.\n * @property {string} [ValidateUserPTO.reqId] - The activation requester.\n * @property {object} [ValidateUserPTO.activationOptions] - Extra options to pass when sending the activation\n * @property {object} [ValidateUserPTO.preloginUserId] - The prelogin user id to set when sending the activation.\n */\n /**\n * User validation return transfer object for {@link validateUser}.\n * @param {object} ValidateUserRTO\n * @property {boolean} ValidateUserRTO.activated - If the user is activated.\n * @property {boolean} ValidateUserRTO.exists - If the user exists.\n * @property {string} ValidateUserRTO.details - A descriptive status message.\n * @property {object} ValidateUserRTO.user - **License** service user object.\n */\n /**\n * Validate if a user is activated and update the service catalogs as needed\n * based on the user's activation status.\n *\n * @param {ValidateUserPTO} - The parameter transfer object.\n * @returns {ValidateUserRTO} - The return transfer object.\n */\n validateUser: function validateUser(_ref2) {\n var _this2 = this;\n var email = _ref2.email,\n _ref2$reqId = _ref2.reqId,\n reqId = _ref2$reqId === void 0 ? 'WEBCLIENT' : _ref2$reqId,\n _ref2$forceRefresh = _ref2.forceRefresh,\n forceRefresh = _ref2$forceRefresh === void 0 ? false : _ref2$forceRefresh,\n _ref2$activationOptio = _ref2.activationOptions,\n activationOptions = _ref2$activationOptio === void 0 ? {} : _ref2$activationOptio,\n preloginUserId = _ref2.preloginUserId;\n this.logger.info('services: validating a user');\n\n // Validate that an email parameter key was provided.\n if (!email) {\n return _promise.default.reject(new Error('`email` is required'));\n }\n\n // Destructure the credentials object.\n var canAuthorize = this.webex.credentials.canAuthorize;\n\n // Validate that the user is already authorized.\n if (canAuthorize) {\n return this.updateServices({\n forceRefresh: forceRefresh\n }).then(function () {\n return _this2.webex.credentials.getUserToken();\n }).then(function (token) {\n return _this2.sendUserActivation({\n email: email,\n reqId: reqId,\n token: token.toString(),\n activationOptions: activationOptions,\n preloginUserId: preloginUserId\n });\n }).then(function (userObj) {\n return {\n activated: true,\n exists: true,\n details: 'user is authorized via a user token',\n user: userObj\n };\n });\n }\n\n // Destructure the client authorization details.\n /* eslint-disable camelcase */\n var _this$webex$credentia = this.webex.credentials.config,\n client_id = _this$webex$credentia.client_id,\n client_secret = _this$webex$credentia.client_secret;\n\n // Validate that client authentication details exist.\n if (!client_id || !client_secret) {\n return _promise.default.reject(new Error('client authentication details are not available'));\n }\n /* eslint-enable camelcase */\n\n // Declare a class-memeber-scoped token for usage within the promise chain.\n var token;\n\n // Begin client authentication user validation.\n return this.collectPreauthCatalog({\n email: email\n }).then(function () {\n // Retrieve the service url from the updated catalog. This is required\n // since `WebexCore` is usually not fully initialized at the time this\n // request completes.\n var idbrokerService = _this2.get('idbroker', true);\n\n // Collect the client auth token.\n return _this2.webex.credentials.getClientToken({\n uri: \"\".concat(idbrokerService, \"idb/oauth2/v1/access_token\"),\n scope: 'webexsquare:admin webexsquare:get_conversation Identity:SCIM'\n });\n }).then(function (tokenObj) {\n // Generate the token string.\n token = tokenObj.toString();\n\n // Collect the signin catalog using the client auth information.\n return _this2.collectSigninCatalog({\n email: email,\n token: token,\n forceRefresh: forceRefresh\n });\n })\n // Validate if collecting the signin catalog failed and populate the RTO\n // with the appropriate content.\n .catch(function (error) {\n return {\n exists: error.name !== 'NotFound',\n activated: false,\n details: error.name !== 'NotFound' ? 'user exists but is not activated' : 'user does not exist and is not activated'\n };\n })\n // Validate if the previous promise resolved with an RTO and populate the\n // new RTO accordingly.\n .then(function (rto) {\n return _promise.default.all([rto || {\n activated: true,\n exists: true,\n details: 'user exists and is activated'\n }, _this2.sendUserActivation({\n email: email,\n reqId: reqId,\n token: token,\n activationOptions: activationOptions,\n preloginUserId: preloginUserId\n })]);\n }).then(function (_ref3) {\n var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),\n rto = _ref4[0],\n user = _ref4[1];\n return _objectSpread(_objectSpread({}, rto), {}, {\n user: user\n });\n }).catch(function (error) {\n var response = {\n statusCode: error.statusCode,\n responseText: error.body && error.body.message,\n body: error.body\n };\n return _promise.default.reject(response);\n });\n },\n /**\n * Get user meeting preferences (preferred webex site).\n *\n * @returns {object} - User Information including user preferrences .\n */\n getMeetingPreferences: function getMeetingPreferences() {\n var _this3 = this;\n return this.request({\n method: 'GET',\n service: 'hydra',\n resource: 'meetingPreferences'\n }).then(function (res) {\n _this3.logger.info('services: received user region info');\n return res.body;\n }).catch(function (err) {\n _this3.logger.info('services: was not able to fetch user login information', err);\n // resolve successfully even if request failed\n });\n },\n /**\n * Fetches client region info such as countryCode and timezone.\n *\n * @returns {object} - The region info object.\n */\n fetchClientRegionInfo: function fetchClientRegionInfo() {\n var _this4 = this;\n return this.request({\n uri: 'https://ds.ciscospark.com/v1/region',\n addAuthHeader: false,\n headers: {\n 'spark-user-agent': null\n },\n timeout: 5000\n }).then(function (res) {\n _this4.logger.info('services: received user region info');\n return res.body;\n }).catch(function (err) {\n _this4.logger.info('services: was not able to get user region info', err);\n // resolve successfully even if request failed\n });\n },\n /**\n * User activation parameter transfer object for {@link sendUserActivation}.\n * @typedef {object} SendUserActivationPTO\n * @property {string} SendUserActivationPTO.email - The email of the user.\n * @property {string} SendUserActivationPTO.reqId - The activation requester.\n * @property {string} SendUserActivationPTO.token - The client auth token.\n * @property {object} SendUserActivationPTO.activationOptions - Extra options to pass when sending the activation.\n * @property {object} SendUserActivationPTO.preloginUserId - The prelogin user id to set when sending the activation.\n */\n /**\n * Send a request to activate a user using a client token.\n *\n * @param {SendUserActivationPTO} - The Parameter transfer object.\n * @returns {LicenseDTO} - The DTO returned from the **License** service.\n */\n sendUserActivation: function sendUserActivation(_ref5) {\n var _this5 = this;\n var email = _ref5.email,\n reqId = _ref5.reqId,\n token = _ref5.token,\n activationOptions = _ref5.activationOptions,\n preloginUserId = _ref5.preloginUserId;\n this.logger.info('services: sending user activation request');\n var countryCode;\n var timezone;\n\n // try to fetch client region info first\n return this.fetchClientRegionInfo().then(function (clientRegionInfo) {\n if (clientRegionInfo) {\n countryCode = clientRegionInfo.countryCode;\n timezone = clientRegionInfo.timezone;\n }\n\n // Send the user activation request to the **License** service.\n return _this5.request({\n service: 'license',\n resource: 'users/activations',\n method: 'POST',\n headers: {\n accept: 'application/json',\n authorization: token,\n 'x-prelogin-userid': preloginUserId\n },\n body: _objectSpread({\n email: email,\n reqId: reqId,\n countryCode: countryCode,\n timeZone: timezone\n }, activationOptions),\n shouldRefreshAccessToken: false\n });\n })\n // On success, return the **License** user object.\n .then(function (_ref6) {\n var body = _ref6.body;\n return body;\n })\n // On failure, reject with error from **License**.\n .catch(function (error) {\n return _promise.default.reject(error);\n });\n },\n /**\n * simplified method to update the preauth catalog via email\n *\n * @param {object} query\n * @param {string} query.email - A standard format email.\n * @param {string} query.orgId - The user's OrgId.\n * @param {boolean} forceRefresh - Boolean to bypass u2c cache control header\n * @returns {Promise}\n */\n collectPreauthCatalog: function collectPreauthCatalog(query) {\n var forceRefresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!query) {\n return this.updateServices({\n from: 'limited',\n query: {\n mode: 'DEFAULT_BY_PROXIMITY'\n },\n forceRefresh: forceRefresh\n });\n }\n return this.updateServices({\n from: 'limited',\n query: query,\n forceRefresh: forceRefresh\n });\n },\n /**\n * simplified method to update the signin catalog via email and token\n * @param {object} param\n * @param {string} param.email - must be a standard-format email\n * @param {string} param.token - must be a client token\n * @returns {Promise}\n */\n collectSigninCatalog: function collectSigninCatalog() {\n var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n email = _ref7.email,\n token = _ref7.token,\n forceRefresh = _ref7.forceRefresh;\n if (!email) {\n return _promise.default.reject(new Error('`email` is required'));\n }\n if (!token) {\n return _promise.default.reject(new Error('`token` is required'));\n }\n return this.updateServices({\n from: 'signin',\n query: {\n email: email\n },\n token: token,\n forceRefresh: forceRefresh\n });\n },\n /**\n * Updates credentials config to utilize u2c catalog\n * urls.\n * @returns {void}\n */\n updateCredentialsConfig: function updateCredentialsConfig() {\n var _this$list = this.list(true),\n idbroker = _this$list.idbroker,\n identity = _this$list.identity;\n if (idbroker && identity) {\n var _this$webex$config$cr = this.webex.config.credentials,\n authorizationString = _this$webex$config$cr.authorizationString,\n authorizeUrl = _this$webex$config$cr.authorizeUrl;\n\n // This must be set outside of the setConfig method used to assign the\n // idbroker and identity url values.\n this.webex.config.credentials.authorizeUrl = authorizationString ? authorizeUrl : \"\".concat(idbroker.replace(trailingSlashes, ''), \"/idb/oauth2/v1/authorize\");\n this.webex.setConfig({\n credentials: {\n idbroker: {\n url: idbroker.replace(trailingSlashes, '') // remove trailing slash\n },\n\n identity: {\n url: identity.replace(trailingSlashes, '') // remove trailing slash\n }\n }\n });\n }\n },\n /**\n * Wait until the service catalog is available,\n * or reject afte ra timeout of 60 seconds.\n * @param {string} serviceGroup\n * @param {number} [timeout] - in seconds\n * @returns {Promise}\n */\n waitForCatalog: function waitForCatalog(serviceGroup, timeout) {\n var catalog = this._getCatalog();\n var supertoken = this.webex.credentials.supertoken;\n if (serviceGroup === 'postauth' && supertoken && supertoken.access_token && !catalog.status.postauth.collecting && !catalog.status.postauth.ready) {\n if (!catalog.status.preauth.ready) {\n return this.initServiceCatalogs();\n }\n return this.updateServices();\n }\n return catalog.waitForCatalog(serviceGroup, timeout);\n },\n /**\n * Service waiting parameter transfer object for {@link waitForService}.\n *\n * @typedef {object} WaitForServicePTO\n * @property {string} [WaitForServicePTO.name] - The service name.\n * @property {string} [WaitForServicePTO.url] - The service url.\n * @property {string} [WaitForServicePTO.timeout] - wait duration in seconds.\n */\n /**\n * Wait until the service has been ammended to any service catalog. This\n * method prioritizes the service name over the service url when searching.\n *\n * @param {WaitForServicePTO} - The parameter transfer object.\n * @returns {Promise} - Resolves to the priority host of a service.\n */\n waitForService: function waitForService(_ref8) {\n var _this6 = this;\n var name = _ref8.name,\n _ref8$timeout = _ref8.timeout,\n timeout = _ref8$timeout === void 0 ? 5 : _ref8$timeout,\n url = _ref8.url;\n var services = this.webex.config.services;\n\n // Save memory by grabbing the catalog after there isn't a priortyURL\n var catalog = this._getCatalog();\n var fetchFromServiceUrl = services.servicesNotNeedValidation.find(function (service) {\n return service === name;\n });\n if (fetchFromServiceUrl) {\n return _promise.default.resolve(this._serviceUrls[name]);\n }\n var priorityUrl = this.get(name, true);\n var priorityUrlObj = this.getServiceFromUrl(url);\n if (priorityUrl || priorityUrlObj) {\n return _promise.default.resolve(priorityUrl || priorityUrlObj.priorityUrl);\n }\n if (catalog.isReady) {\n if (url) {\n return _promise.default.resolve(url);\n }\n this.webex.internal.metrics.submitClientMetrics(_metrics.default.JS_SDK_SERVICE_NOT_FOUND, {\n fields: {\n service_name: name\n }\n });\n return _promise.default.reject(new Error(\"services: service '\".concat(name, \"' was not found in any of the catalogs\")));\n }\n return new _promise.default(function (resolve, reject) {\n var groupsToCheck = ['preauth', 'signin', 'postauth'];\n var checkCatalog = function checkCatalog(catalogGroup) {\n return catalog.waitForCatalog(catalogGroup, timeout).then(function () {\n var scopedPriorityUrl = _this6.get(name, true);\n var scopedPrioriryUrlObj = _this6.getServiceFromUrl(url);\n if (scopedPriorityUrl || scopedPrioriryUrlObj) {\n resolve(scopedPriorityUrl || scopedPrioriryUrlObj.priorityUrl);\n }\n }).catch(function () {\n return undefined;\n });\n };\n _promise.default.all(groupsToCheck.map(function (group) {\n return checkCatalog(group);\n })).then(function () {\n _this6.webex.internal.metrics.submitClientMetrics(_metrics.default.JS_SDK_SERVICE_NOT_FOUND, {\n fields: {\n service_name: name\n }\n });\n reject(new Error(\"services: service '\".concat(name, \"' was not found after waiting\")));\n });\n });\n },\n /**\n * Looks up the hostname in the host catalog\n * and replaces it with the first host if it finds it\n * @param {string} uri\n * @returns {string} uri with the host replaced\n */\n replaceHostFromHostmap: function replaceHostFromHostmap(uri) {\n var url = new URL(uri);\n var hostCatalog = this._hostCatalog;\n if (!hostCatalog) {\n return uri;\n }\n var host = hostCatalog[url.host];\n if (host && host[0]) {\n var newHost = host[0].host;\n url.host = newHost;\n return url.toString();\n }\n return uri;\n },\n /**\n * @private\n * Organize a received hostmap from a service\n * catalog endpoint.\n * @param {object} serviceHostmap\n * @returns {object}\n */\n _formatReceivedHostmap: function _formatReceivedHostmap(serviceHostmap) {\n this._updateHostCatalog(serviceHostmap.hostCatalog);\n var extractId = function extractId(entry) {\n return entry.id.split(':')[3];\n };\n var formattedHostmap = [];\n\n // for each of the services in the serviceLinks, find the matching host in the catalog\n (0, _keys.default)(serviceHostmap.serviceLinks).forEach(function (serviceName) {\n var _formattedHost$hosts;\n var serviceUrl = serviceHostmap.serviceLinks[serviceName];\n var host;\n try {\n host = new URL(serviceUrl).host;\n } catch (e) {\n return;\n }\n var matchingCatalogEntry = serviceHostmap.hostCatalog[host];\n var formattedHost = {\n name: serviceName,\n defaultUrl: serviceUrl,\n defaultHost: host,\n hosts: []\n };\n formattedHostmap.push(formattedHost);\n\n // If the catalog does not have any hosts we will be unable to find the service ID\n // so can't search for other hosts\n if (!matchingCatalogEntry || !matchingCatalogEntry[0]) {\n return;\n }\n var serviceId = extractId(matchingCatalogEntry[0]);\n (0, _lodash.forEach)(matchingCatalogEntry, function (entry) {\n // The ids for all hosts within a hostCatalog entry should be the same\n // but for safety, only add host entries that have the same id as the first one\n if (extractId(entry) === serviceId) {\n formattedHost.hosts.push(_objectSpread(_objectSpread({}, entry), {}, {\n homeCluster: true\n }));\n }\n });\n var otherHosts = [];\n\n // find the services in the host catalog that have the same id\n // and add them to the otherHosts\n (0, _lodash.forEach)(serviceHostmap.hostCatalog, function (entry) {\n // exclude the matching catalog entry as we have already added that\n if (entry === matchingCatalogEntry) {\n return;\n }\n (0, _lodash.forEach)(entry, function (entryHost) {\n // only add hosts that have the correct id\n if (extractId(entryHost) === serviceId) {\n otherHosts.push(_objectSpread(_objectSpread({}, entryHost), {}, {\n homeCluster: false\n }));\n }\n });\n });\n (_formattedHost$hosts = formattedHost.hosts).push.apply(_formattedHost$hosts, otherHosts);\n });\n\n // update all the service urls in the host catalog\n\n this._updateServiceUrls(serviceHostmap.serviceLinks);\n this._updateHostCatalog(serviceHostmap.hostCatalog);\n return formattedHostmap;\n },\n /**\n * Get the clusterId associated with a URL string.\n * @param {string} url\n * @returns {string} - Cluster ID of url provided\n */\n getClusterId: function getClusterId(url) {\n var catalog = this._getCatalog();\n return catalog.findClusterId(url);\n },\n /**\n * Get a service value from a provided clusterId. This method will\n * return an object containing both the name and url of a found service.\n * @param {object} params\n * @param {string} params.clusterId - clusterId of found service\n * @param {boolean} [params.priorityHost] - returns priority host url if true\n * @param {string} [params.serviceGroup] - specify service group\n * @returns {object} service\n * @returns {string} service.name\n * @returns {string} service.url\n */\n getServiceFromClusterId: function getServiceFromClusterId(params) {\n var catalog = this._getCatalog();\n return catalog.findServiceFromClusterId(params);\n },\n /**\n * @param {String} cluster the cluster containing the id\n * @param {UUID} [id] the id of the conversation.\n * If empty, just return the base URL.\n * @returns {String} url of the service\n */\n getServiceUrlFromClusterId: function getServiceUrlFromClusterId() {\n var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref9$cluster = _ref9.cluster,\n cluster = _ref9$cluster === void 0 ? 'us' : _ref9$cluster;\n var clusterId = cluster === 'us' ? DEFAULT_CLUSTER_IDENTIFIER : cluster;\n\n // Determine if cluster has service name (non-US clusters from hydra do not)\n if (clusterId.split(':').length < 4) {\n // Add Service to cluster identifier\n clusterId = \"\".concat(cluster, \":\").concat(CLUSTER_SERVICE);\n }\n var _ref10 = this.getServiceFromClusterId({\n clusterId: clusterId\n }) || {},\n url = _ref10.url;\n if (!url) {\n throw Error(\"Could not find service for cluster [\".concat(cluster, \"]\"));\n }\n return url;\n },\n /**\n * Get a service object from a service url if the service url exists in the\n * catalog.\n *\n * @param {string} url - The url to be validated.\n * @returns {object} - Service object.\n * @returns {object.name} - The name of the service found.\n * @returns {object.priorityUrl} - The priority url of the found service.\n * @returns {object.defaultUrl} - The default url of the found service.\n */\n getServiceFromUrl: function getServiceFromUrl() {\n var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var service = this._getCatalog().findServiceUrlFromUrl(url);\n if (!service) {\n return undefined;\n }\n return {\n name: service.name,\n priorityUrl: service.get(true),\n defaultUrl: service.get()\n };\n },\n /**\n * Verify that a provided url exists in the service\n * catalog.\n * @param {string} url\n * @returns {boolean} - true if exists, false otherwise\n */\n isServiceUrl: function isServiceUrl(url) {\n var catalog = this._getCatalog();\n return !!catalog.findServiceUrlFromUrl(url);\n },\n /**\n * Determine if a provided url is in the catalog's allowed domains.\n *\n * @param {string} url - The url to match allowed domains against.\n * @returns {boolean} - True if the url provided is allowed.\n */\n isAllowedDomainUrl: function isAllowedDomainUrl(url) {\n var catalog = this._getCatalog();\n return !!catalog.findAllowedDomain(url);\n },\n /**\n * Converts the host portion of the url from default host\n * to a priority host\n *\n * @param {string} url a service url that contains a default host\n * @returns {string} a service url that contains the top priority host.\n * @throws if url isn't a service url\n */\n convertUrlToPriorityHostUrl: function convertUrlToPriorityHostUrl() {\n var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var data = this.getServiceFromUrl(url);\n if (!data) {\n throw Error(\"No service associated with url: [\".concat(url, \"]\"));\n }\n return url.replace(data.defaultUrl, data.priorityUrl);\n },\n /**\n * @private\n * Simplified method wrapper for sending a request to get\n * an updated service hostmap.\n * @param {object} [param]\n * @param {string} [param.from] - This accepts `limited` or `signin`\n * @param {object} [param.query] - This accepts `email`, `orgId` or `userId` key values\n * @param {string} [param.query.email] - must be a standard-format email\n * @param {string} [param.query.orgId] - must be an organization id\n * @param {string} [param.query.userId] - must be a user id\n * @param {string} [param.token] - used for signin catalog\n * @returns {Promise}\n */\n _fetchNewServiceHostmap: function _fetchNewServiceHostmap() {\n var _this7 = this;\n var _ref11 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n from = _ref11.from,\n query = _ref11.query,\n token = _ref11.token,\n forceRefresh = _ref11.forceRefresh;\n var service = 'u2c';\n var resource = from ? \"/\".concat(from, \"/catalog\") : '/catalog';\n var qs = _objectSpread(_objectSpread({}, query), {}, {\n format: 'hostmap'\n });\n if (forceRefresh) {\n qs.timestamp = new Date().getTime();\n }\n var requestObject = {\n method: 'GET',\n service: service,\n resource: resource,\n qs: qs\n };\n if (token) {\n requestObject.headers = {\n authorization: token\n };\n }\n return this.webex.internal.newMetrics.callDiagnosticLatencies.measureLatency(function () {\n return _this7.request(requestObject);\n }, 'internal.get.u2c.time').then(function (_ref12) {\n var body = _ref12.body;\n return _this7._formatReceivedHostmap(body);\n });\n },\n /**\n * Initialize the discovery services and the whitelisted services.\n *\n * @returns {void}\n */\n initConfig: function initConfig() {\n // Get the catalog and destructure the services config.\n var catalog = this._getCatalog();\n var _this$webex$config = this.webex.config,\n services = _this$webex$config.services,\n fedramp = _this$webex$config.fedramp;\n\n // Validate that the services configuration exists.\n if (services) {\n if (fedramp) {\n services.discovery = _serviceFedRamp.default;\n }\n // Check for discovery services.\n if (services.discovery) {\n // Format the discovery configuration into an injectable array.\n var formattedDiscoveryServices = (0, _keys.default)(services.discovery).map(function (key) {\n return {\n name: key,\n defaultUrl: services.discovery[key]\n };\n });\n\n // Inject formatted discovery services into services catalog.\n catalog.updateServiceUrls('discovery', formattedDiscoveryServices);\n }\n if (services.override) {\n // Format the override configuration into an injectable array.\n var formattedOverrideServices = (0, _keys.default)(services.override).map(function (key) {\n return {\n name: key,\n defaultUrl: services.override[key]\n };\n });\n\n // Inject formatted override services into services catalog.\n catalog.updateServiceUrls('override', formattedOverrideServices);\n }\n\n // if not fedramp, append on the commercialAllowedDomains\n if (!fedramp) {\n services.allowedDomains = (0, _lodash.union)(services.allowedDomains, _constants.COMMERCIAL_ALLOWED_DOMAINS);\n }\n\n // Check for allowed host domains.\n if (services.allowedDomains) {\n // Store the allowed domains as a property of the catalog.\n catalog.setAllowedDomains(services.allowedDomains);\n }\n\n // Set `validateDomains` property to match configuration\n this.validateDomains = services.validateDomains;\n }\n },\n /**\n * Make the initial requests to collect the root catalogs.\n *\n * @returns {Promise} - Errors if the token is unavailable.\n */\n initServiceCatalogs: function initServiceCatalogs() {\n var _this8 = this;\n this.logger.info('services: initializing initial service catalogs');\n\n // Destructure the credentials plugin.\n var credentials = this.webex.credentials;\n\n // Init a promise chain. Must be done as a Promise.resolve() to allow\n // credentials#getOrgId() to properly throw.\n return _promise.default.resolve()\n // Get the user's OrgId.\n .then(function () {\n return credentials.getOrgId();\n })\n // Begin collecting the preauth/limited catalog.\n .then(function (orgId) {\n return _this8.collectPreauthCatalog({\n orgId: orgId\n });\n }).then(function () {\n // Validate if the token is authorized.\n if (credentials.canAuthorize) {\n // Attempt to collect the postauth catalog.\n return _this8.updateServices().catch(function () {\n _this8.initFailed = true;\n _this8.logger.warn('services: cannot retrieve postauth catalog');\n });\n }\n\n // Return a resolved promise for consistent return value.\n return _promise.default.resolve();\n });\n },\n /**\n * Initializer\n *\n * @instance\n * @memberof Services\n * @returns {Services}\n */\n initialize: function initialize() {\n var _this9 = this;\n var catalog = new _serviceCatalog.default();\n var registry = new _serviceRegistry.default();\n var state = new _serviceState.default();\n this._catalogs.set(this.webex, catalog);\n this.registries.set(this.webex, registry);\n this.states.set(this.webex, state);\n\n // Listen for configuration changes once.\n this.listenToOnce(this.webex, 'change:config', function () {\n _this9.initConfig();\n });\n\n // wait for webex instance to be ready before attempting\n // to update the service catalogs\n this.listenToOnce(this.webex, 'ready', function () {\n var supertoken = _this9.webex.credentials.supertoken;\n // Validate if the supertoken exists.\n if (supertoken && supertoken.access_token) {\n _this9.initServiceCatalogs().then(function () {\n catalog.isReady = true;\n }).catch(function (error) {\n _this9.initFailed = true;\n _this9.logger.error(\"services: failed to init initial services when credentials available, \".concat(error === null || error === void 0 ? void 0 : error.message));\n });\n } else {\n var email = _this9.webex.config.email;\n _this9.collectPreauthCatalog(email ? {\n email: email\n } : undefined).catch(function (error) {\n _this9.initFailed = true;\n _this9.logger.error(\"services: failed to init initial services when no credentials available, \".concat(error === null || error === void 0 ? void 0 : error.message));\n });\n }\n });\n },\n version: \"3.7.0\"\n});\n/* eslint-enable no-underscore-dangle */\nvar _default = exports.default = Services;\n//# sourceMappingURL=services.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _initializerDefineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/initializerDefineProperty\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _initializerWarningHelper2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/initializerWarningHelper\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _coreDecorators = require(\"core-decorators\");\nvar _ampersandEvents = _interopRequireDefault(require(\"ampersand-events\"));\nvar _class, _descriptor;\n// hold onto weak references to parent' Webexs to help avoid retain cycles\nvar webexs = new _weakMap.default();\n\n/**\n * Base plugin class. Doesn't depend on Ampersand State\n */\nvar StatelessWebexPlugin = exports.default = (_class = /*#__PURE__*/function () {\n /**\n * Constructor. One of attrs.webex or options.parent is required\n * @param {Object} attrs\n * @param {WebexCore} [attrs.webex]\n * @param {Object} options\n * @param {WebexCore} [options.parent]\n */\n function StatelessWebexPlugin() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n (0, _classCallCheck2.default)(this, StatelessWebexPlugin);\n (0, _initializerDefineProperty2.default)(this, \"ready\", _descriptor, this);\n var webex = attrs.webex || options.parent;\n if (!webex) {\n throw new Error('One of `attrs.webex` or `options.parent` must be supplied when initializing a StatelessWebexPlugin');\n }\n while (webex.parent || webex.collection) {\n webex = webex.parent || webex.collection;\n }\n webexs.set(this, webex);\n }\n\n /**\n * Proxies to {@link WebexPlugin#webex}'s `request()` method.\n * @see WebexCore#request\n * @param {Array} args\n * @returns {Promise}\n */\n (0, _createClass2.default)(StatelessWebexPlugin, [{\n key: \"config\",\n get:\n /**\n * The config for this plugin's namespace. If no namespace has been set\n * returns all of webex's config.\n * @type {Object}\n */\n function get() {\n var namespace = this.getNamespace ? this.getNamespace() : this.namespace;\n if (namespace) {\n namespace = namespace.toLowerCase();\n return this.webex.config[namespace];\n }\n return this.webex.config;\n }\n\n /**\n * A reference to the webex logger.\n * @type {Logger}\n */\n }, {\n key: \"logger\",\n get: function get() {\n return this.webex.logger;\n }\n\n /**\n * A reference to the main sdk instance\n * @type {WebexCore}\n */\n }, {\n key: \"webex\",\n get: function get() {\n return webexs.get(this);\n }\n }, {\n key: \"request\",\n value: function request() {\n var _this$webex;\n return (_this$webex = this.webex).request.apply(_this$webex, arguments);\n }\n\n /**\n * Proxies to {@link WebexPlugin#webex}'s `upload()` method.\n * @see WebexCore#upload\n * @param {Array} args\n * @returns {Promise}\n */\n }, {\n key: \"upload\",\n value: function upload() {\n var _this$webex2;\n return (_this$webex2 = this.webex).upload.apply(_this$webex2, arguments);\n }\n }]);\n return StatelessWebexPlugin;\n}(), (_descriptor = (0, _applyDecoratedDescriptor2.default)(_class.prototype, \"ready\", [_coreDecorators.readonly], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: function initializer() {\n return true;\n }\n})), _class);\n(0, _assign.default)(StatelessWebexPlugin.prototype, _ampersandEvents.default);\n//# sourceMappingURL=stateless-webex-plugin.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.persist = persist;\nexports.waitForValue = waitForValue;\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/typeof\"));\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/toConsumableArray\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _set = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/set\"));\nvar _lodash = require(\"lodash\");\nvar _common = require(\"@webex/common\");\nvar _errors = require(\"./errors\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/* eslint no-invalid-this: [0] */\n\n/**\n * Stores the result of fn before returning it\n * @param {string} key\n * @private\n * @returns {Promise} resolves with the result of fn\n */\nfunction persist() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (args.length === 3) {\n return persist('@').apply(void 0, args);\n }\n var key = args[0],\n decider = args[1];\n return function persistDecorator(target, prop, descriptor) {\n if (prop !== 'initialize') {\n // Once we have class-based alternative to AmpersandState, it should be\n // detected here.\n throw new TypeError('@persist can only currently be applied to AmpersandState objects or their derivatives and must be applied to the initialize method');\n }\n descriptor.value = (0, _lodash.wrap)(descriptor.value, function persistExecutor(fn) {\n var _this = this;\n for (var _len2 = arguments.length, initializeArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n initializeArgs[_key2 - 1] = arguments[_key2];\n }\n var ret = (0, _apply.default)(fn, this, initializeArgs);\n var changeEvent = key === '@' ? 'change' : \"change:\".concat(key);\n\n // Some scenarios will lead to lots of change events on a single tick; we\n // really only care about writing once things have stopped changing. with\n // a debounce of zero, we're effectively coalescing all the changes\n // triggered by a single call to set() and commiting them on the next tick\n // eslint-disable-next-line no-invalid-this\n this.on(changeEvent, (0, _lodash.debounce)(function () {\n var shouldPersist = !decider || _apply.default.apply(Reflect, [decider, _this].concat(initializeArgs));\n if (!shouldPersist) {\n return _promise.default.resolve();\n }\n if (key === '@') {\n // eslint-disable-next-line no-invalid-this\n return _this.boundedStorage.put(key, _this);\n }\n\n // eslint-disable-next-line no-invalid-this\n return _this.boundedStorage.put(key, _this[key]);\n }, 0));\n return ret;\n });\n prepareInitialize(target, prop);\n };\n}\nvar M = _map.default;\nvar S = _set.default;\nvar BlockingKeyMap = (0, _common.make)(M, M, S);\nvar blockingKeys = new BlockingKeyMap();\n\n/**\n * Prevents fn from executing until key has been (attempted to be) loaded\n * @param {string} key\n * @param {Function} fn\n * @private\n * @returns {Promise} result of fn\n */\nfunction waitForValue(key) {\n if (!key) {\n throw new Error('`key` is required');\n }\n return function waitForValueDecorator(target, prop, descriptor) {\n blockingKeys.add(target, prop, key);\n descriptor.value = (0, _lodash.wrap)(descriptor.value, function waitForValueExecutor(fn) {\n var _this2 = this;\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n var keys = blockingKeys.get(target, prop);\n return _promise.default.all((0, _toConsumableArray2.default)(keys).map(function (k) {\n return _this2.boundedStorage.waitFor(k);\n })).then(function () {\n return (0, _apply.default)(fn, _this2, args);\n });\n });\n\n // This *should* make decorators compatible with AmpersandState class\n // definitions\n if ((0, _typeof2.default)(target) === 'object' && !target.prototype) {\n target[prop] = descriptor.value;\n }\n prepareInitialize(target, prop);\n return descriptor;\n };\n}\nvar inited = new _set.default();\n\n/**\n * finds a means of identitying the `target` param passed to\n * `prepareInitialize()`. When possible, avoids duplicate `init()` calls if\n * namespaces collide\n *\n * @param {Object|Constructor} target\n * @private\n * @returns {String|Constructor}\n */\nfunction identifyTarget(target) {\n if (target.namespace) {\n return target.namespace;\n }\n return target;\n}\nvar stack = new _set.default();\n\n/**\n * @param {Function} target\n * @param {string} prop\n * @private\n * @returns {undefined}\n */\nfunction prepareInitialize(target, prop) {\n var id = identifyTarget(target);\n if (!inited.has(id)) {\n inited.add(id);\n if (target.initialize) {\n target.initialize = (0, _lodash.wrap)(target.initialize, function applyInit(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n var ret = (0, _apply.default)(fn, this, args);\n (0, _apply.default)(init, this, args);\n return ret;\n });\n return;\n }\n target.initialize = init;\n }\n\n /**\n * @private\n * @returns {undefined}\n */\n function init() {\n var self = this;\n var namespace = this.getNamespace();\n this.webex.initialize = (0, _lodash.wrap)(this.webex.initialize || _lodash.identity, function applyInit(fn) {\n var _this3 = this;\n // Call webex's initalize method first\n // Reminder: in order for MockWebex to accept initial storage data, the\n // wrapped initialize() must be invoked before attempting to load data.\n // Reminder: context here is `webex`, not `self`.\n stack.add(namespace);\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n (0, _apply.default)(fn, this, args);\n\n // Then prepare a function for setting values retrieved from storage\n var set = (0, _lodash.curry)(function (key, value) {\n _this3.logger.debug(\"storage:(\".concat(namespace, \"): got `\").concat(key, \"` for first time\"));\n if (key === '@') {\n self.parent.set((0, _defineProperty2.default)({}, namespace.toLowerCase(), value));\n } else if ((0, _lodash.result)(self[key], 'isState')) {\n self[key].set(value);\n } else {\n self.set(key, value);\n }\n _this3.logger.debug(\"storage:(\".concat(namespace, \"): set `\").concat(key, \"` for first time\"));\n });\n\n // And prepare an error handler for when those keys can't be found\n var handle = (0, _lodash.curry)(function (key, reason) {\n if (reason instanceof _errors.NotFoundError || process.env.NODE_ENV !== 'production' && reason.toString().includes('MockNotFoundError')) {\n _this3.logger.debug(\"storage(\".concat(namespace, \"): no data for `\").concat(key, \"`, continuing\"));\n return _promise.default.resolve();\n }\n _this3.logger.error(\"storage(\".concat(namespace, \"): failed to init `\").concat(key, \"`\"), reason);\n return _promise.default.reject(reason);\n });\n\n // Iterate over the list of keys marked as blocking via `@waitForValue`\n var keys = blockingKeys.get(target, prop);\n var promises = [];\n keys.forEach(function (key) {\n promises.push(_this3.boundedStorage.get(namespace, key).then(set(key)).catch(handle(key)));\n });\n _promise.default.all(promises).then(function () {\n stack.delete(namespace);\n if (stack.size === 0) {\n _this3.loaded = true;\n }\n });\n });\n }\n}\n//# sourceMappingURL=decorators.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.StorageError = exports.NotFoundError = void 0;\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _common = require(\"@webex/common\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * General storage layer error\n */\nvar StorageError = exports.StorageError = /*#__PURE__*/function (_Exception) {\n (0, _inherits2.default)(StorageError, _Exception);\n var _super = _createSuper(StorageError);\n function StorageError() {\n (0, _classCallCheck2.default)(this, StorageError);\n return _super.apply(this, arguments);\n }\n return (0, _createClass2.default)(StorageError);\n}(_common.Exception);\n/**\n * StorageError thrown when the storage layer does not contain the request key\n */\nvar NotFoundError = exports.NotFoundError = /*#__PURE__*/function (_StorageError) {\n (0, _inherits2.default)(NotFoundError, _StorageError);\n var _super2 = _createSuper(NotFoundError);\n function NotFoundError() {\n (0, _classCallCheck2.default)(this, NotFoundError);\n return _super2.apply(this, arguments);\n }\n return (0, _createClass2.default)(NotFoundError);\n}(StorageError);\n//# sourceMappingURL=errors.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n_Object$defineProperty(exports, \"MemoryStoreAdapter\", {\n enumerable: true,\n get: function get() {\n return _memoryStoreAdapter.default;\n }\n});\n_Object$defineProperty(exports, \"NotFoundError\", {\n enumerable: true,\n get: function get() {\n return _errors.NotFoundError;\n }\n});\n_Object$defineProperty(exports, \"StorageError\", {\n enumerable: true,\n get: function get() {\n return _errors.StorageError;\n }\n});\n_Object$defineProperty(exports, \"makeWebexPluginStore\", {\n enumerable: true,\n get: function get() {\n return _makeWebexPluginStore.default;\n }\n});\n_Object$defineProperty(exports, \"makeWebexStore\", {\n enumerable: true,\n get: function get() {\n return _makeWebexStore.default;\n }\n});\n_Object$defineProperty(exports, \"persist\", {\n enumerable: true,\n get: function get() {\n return _decorators.persist;\n }\n});\n_Object$defineProperty(exports, \"waitForValue\", {\n enumerable: true,\n get: function get() {\n return _decorators.waitForValue;\n }\n});\nvar _decorators = require(\"./decorators\");\nvar _makeWebexStore = _interopRequireDefault(require(\"./make-webex-store\"));\nvar _makeWebexPluginStore = _interopRequireDefault(require(\"./make-webex-plugin-store\"));\nvar _memoryStoreAdapter = _interopRequireDefault(require(\"./memory-store-adapter\"));\nvar _errors = require(\"./errors\");\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = makeWebexPluginStorage;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _common = require(\"@webex/common\");\nvar _lodash = require(\"lodash\");\nvar _errors = require(\"./errors\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar defers = new _weakMap.default();\n\n/**\n * Walks an object before writing it to the store and omits empty arrays\n * @private\n * @param {Object} value\n * @returns {Object}\n */\nfunction serialize(value) {\n if (!(0, _lodash.isObject)(value)) {\n return value;\n }\n var serialized = value.serialize ? value.serialize() : value;\n (0, _keys.default)(serialized).forEach(function (key) {\n var val = serialized[key];\n if ((0, _lodash.isArray)(val)) {\n if (val.length === 0) {\n serialized[key] = undefined;\n } else {\n serialized[key] = val.map(serialize);\n }\n } else if ((0, _lodash.isObject)(val)) {\n (0, _keys.default)(val).forEach(function (k) {\n val[k] = serialize(val[k]);\n });\n }\n });\n var empty = (0, _keys.default)(serialized).reduce(function (acc, key) {\n return acc && !serialized[key];\n }, true);\n if (empty) {\n return undefined;\n }\n return serialized;\n}\n\n/**\n * [makeWebexPluginStorage description]\n * @param {[type]} type\n * @param {[type]} context\n * @private\n * @returns {[type]}\n */\nfunction makeWebexPluginStorage(type, context) {\n var _dec, _class;\n /**\n * Interface between WebexPlugin and Webex#boundeStorage or\n * Webex#unboundedStorage\n */\n var WebexPluginStorage = (_dec = (0, _common.oneFlight)({\n keyFactory: function keyFactory(key) {\n return \"initValue-\".concat(key);\n }\n }), (_class = /*#__PURE__*/function () {\n /**\n * @param {Object} attrs\n * @param {Object} options\n * @returns {WebexPluginStorage}\n */\n function WebexPluginStorage() {\n (0, _classCallCheck2.default)(this, WebexPluginStorage);\n defers.set(this, new _map.default());\n }\n\n /**\n * Clears an entire namespace\n * @returns {Promise}\n */\n (0, _createClass2.default)(WebexPluginStorage, [{\n key: \"clear\",\n value: function clear() {\n return context.webex[\"\".concat(type, \"Storage\")].del(context.getNamespace());\n }\n\n /**\n * Deletes the specified key from the store\n * @param {string} key\n * @returns {[type]}\n */\n }, {\n key: \"del\",\n value: function del() {\n var _context$webex;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_context$webex = context.webex[\"\".concat(type, \"Storage\")]).del.apply(_context$webex, [context.getNamespace()].concat(args));\n }\n\n /**\n * Retrieves the value specified by key from the store. Rejects with\n * NotFoundError if no value can be found\n * @param {string} key\n * @returns {Promise}\n */\n }, {\n key: \"get\",\n value: function get(key) {\n var defer = defers.get(this).get(key);\n if (!defer) {\n defer = new _common.Defer();\n defers.get(this).set(key, defer);\n }\n return context.webex[\"\".concat(type, \"Storage\")].get(context.getNamespace(), key).then(function (res) {\n defer.resolve();\n return res;\n });\n }\n\n /**\n * Writes a value to the store\n * @param {string} key\n * @param {any} value\n * @returns {Promise}\n */\n }, {\n key: \"put\",\n value: function put(key, value) {\n return context.webex[\"\".concat(type, \"Storage\")].put(context.getNamespace(), key, serialize(value));\n }\n\n /**\n * Returns a Promise that won't resolve until the value specified by key has\n * been attempted to be loaded from the store. This allows us to lazily\n * prevent certain method from executing until the specified keys have been\n * retrieved from the store.\n * @param {string} key\n * @returns {Promise}\n */\n }, {\n key: \"waitFor\",\n value: function waitFor(key) {\n context.logger.debug(\"plugin-storage(\".concat(context.getNamespace(), \"): waiting to init key `\").concat(key, \"`\"));\n var defer = defers.get(this).get(key);\n if (defer) {\n context.logger.debug(\"plugin-storage(\".concat(context.getNamespace(), \"): already inited `\").concat(key, \"`\"));\n return defer.promise;\n }\n context.logger.debug(\"plugin-storage(\".concat(context.getNamespace(), \"): initing `\").concat(key, \"`\"));\n return this.initValue(key);\n }\n }, {\n key: \"initValue\",\n value: function initValue(key) {\n var defer = new _common.Defer();\n defers.get(this).set(key, defer);\n\n // Intentionally bypasses this.get so we don't resolve the promise until\n // after the parent value is set.\n context.webex[\"\".concat(type, \"Storage\")].get(context.getNamespace(), key).then(function (value) {\n context.logger.debug(\"plugin-storage(\".concat(context.getNamespace(), \"): got `\").concat(key, \"` for first time\"));\n if (key === '@') {\n context.parent.set(value);\n } else if ((0, _lodash.result)(context[key], 'isState')) {\n context[key].set(value);\n } else {\n context.set(key, value);\n }\n context.logger.debug(\"plugin-storage(\".concat(context.getNamespace(), \"): set `\").concat(key, \"` for first time\"));\n defer.resolve();\n context.logger.debug(\"plugin-storage(\".concat(context.getNamespace(), \"): inited `\").concat(key, \"`\"));\n }).catch(function (reason) {\n // The next conditional is a bit of an unfortunate solution to deal\n // with circular dependencies in unit tests. It should not effect\n // integration tests or production code.\n if (reason instanceof _errors.NotFoundError || process.env.NODE_ENV !== 'production' && reason.toString().includes('MockNotFoundError')) {\n context.logger.debug(\"plugin-storage(\".concat(context.getNamespace(), \"): no data for `\").concat(key, \"`, continuing\"));\n return defer.resolve();\n }\n context.logger.warn(\"plugin-storage(\".concat(context.getNamespace(), \"): failed to init `\").concat(key, \"`\"), reason);\n return defer.reject(reason);\n });\n return defer.promise;\n }\n }]);\n return WebexPluginStorage;\n }(), ((0, _applyDecoratedDescriptor2.default)(_class.prototype, \"initValue\", [_dec], (0, _getOwnPropertyDescriptor.default)(_class.prototype, \"initValue\"), _class.prototype)), _class));\n return new WebexPluginStorage();\n}\n//# sourceMappingURL=make-webex-plugin-store.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = makeWebexStore;\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _weakMap = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/weak-map\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _ampersandEvents = _interopRequireDefault(require(\"ampersand-events\"));\nvar _common = require(\"@webex/common\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar bindings = new _weakMap.default();\n\n/**\n * Makes a WebexStore for the specified type bound to the specified webex instance\n * @param {string} type\n * @param {ProxyWebex} webex\n * @private\n * @returns {WebexStore}\n */\nfunction makeWebexStore(type, webex) {\n var _dec, _class;\n /**\n * Lazy Key-Value Store Interface\n */\n var WebexStore = (_dec = (0, _common.oneFlight)({\n keyFactory: function keyFactory(namespace) {\n return namespace;\n }\n }), (_class = /*#__PURE__*/function () {\n /**\n * @param {Object} attrs\n * @param {Object} options\n * @returns {Store}\n */\n function WebexStore() {\n (0, _classCallCheck2.default)(this, WebexStore);\n webex.logger.debug(\"webex-store: constructing \".concat(type, \"Storage\"));\n bindings.set(this, new _map.default());\n }\n\n /**\n * Provides easy access to the storage adapter identified in config.\n * @returns {Object}\n */\n (0, _createClass2.default)(WebexStore, [{\n key: \"adapter\",\n get: function get() {\n return webex.config.storage[\"\".concat(type, \"Adapter\")];\n }\n\n /**\n * @returns {WeakMap}\n */\n }, {\n key: \"bindings\",\n get: function get() {\n return bindings.get(this);\n }\n\n /**\n * Clears the store\n * @returns {Promise}\n */\n }, {\n key: \"clear\",\n value: function clear() {\n var promises = [];\n this.bindings.forEach(function (binding) {\n promises.push(binding.clear());\n });\n return _promise.default.all(promises);\n }\n\n /**\n * Deletes the specified key from the store\n * @param {string} namespace\n * @param {string} key\n * @returns {[type]}\n */\n }, {\n key: \"del\",\n value: function del(namespace, key) {\n webex.logger.debug(\"webex-store: removing \".concat(namespace, \":\").concat(key));\n return this._getBinding(namespace).then(function (binding) {\n return binding.del(key);\n });\n }\n\n /**\n * Retrieves the value specified by key from the store. Rejects with\n * NotFoundError if no value can be found\n * @param {string} namespace\n * @param {string} key\n * @returns {Promise}\n */\n }, {\n key: \"get\",\n value: function get(namespace, key) {\n webex.logger.debug(\"webex-store: retrieving \".concat(namespace, \":\").concat(key));\n return this._getBinding(namespace).then(function (binding) {\n return binding.get(key);\n });\n }\n\n /**\n * Writes a value to the store. Deletes the specified key from the store\n * if passed `undefined`\n * @param {string} namespace\n * @param {string} key\n * @param {any} value\n * @returns {Promise} Resolves with value (to simplify write-through caching)\n */\n }, {\n key: \"put\",\n value: function put(namespace, key, value) {\n if (typeof value === 'undefined') {\n return this.del(namespace, key);\n }\n webex.logger.debug(\"webex-store: setting \".concat(namespace, \":\").concat(key));\n return this._getBinding(namespace).then(function (binding) {\n return binding.put(key, value.serialize ? value.serialize() : value);\n }).then(function () {\n return value;\n });\n }\n }, {\n key: \"_getBinding\",\n value: function _getBinding(namespace) {\n var _this = this;\n return new _promise.default(function (resolve) {\n webex.logger.debug(\"storage: getting binding for `\".concat(namespace, \"`\"));\n var binding = _this.bindings.get(namespace);\n if (binding) {\n webex.logger.debug(\"storage: found binding for `\".concat(namespace, \"`\"));\n return resolve(binding);\n }\n return resolve(_this.adapter.bind(namespace, {\n logger: webex.logger\n }).then(function (_binding) {\n webex.logger.debug(\"storage: made binding for `\".concat(namespace, \"`\"));\n _this.bindings.set(namespace, _binding);\n return _binding;\n }));\n });\n }\n }]);\n return WebexStore;\n }(), ((0, _applyDecoratedDescriptor2.default)(_class.prototype, \"_getBinding\", [_dec], (0, _getOwnPropertyDescriptor.default)(_class.prototype, \"_getBinding\"), _class.prototype)), _class));\n (0, _assign.default)(WebexStore.prototype, _ampersandEvents.default);\n return new WebexStore();\n}\n//# sourceMappingURL=make-webex-store.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/map\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _errors = require(\"./errors\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Binds a namespace\n * @param {string} namespace\n * @param {Object} options\n * @param {Object} options.data\n * @private\n * @returns {Promise}\n */\nfunction _bind(namespace) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n options = options || {};\n if (!namespace) {\n return _promise.default.reject(new Error('`namespace` is required'));\n }\n if (!options.logger) {\n return _promise.default.reject(new Error('`options.logger` is required'));\n }\n var _options = options,\n logger = _options.logger;\n var map = new _map.default([['@', {}]]);\n if (options.data) {\n (0, _keys.default)(options.data).forEach(function (key) {\n map.set(key, options.data[key]);\n });\n }\n logger.debug('memory-store-adapter: returning binding');\n return _promise.default.resolve({\n clear: function clear() {\n logger.debug('memory-store-adapter: clearing the binding');\n return _promise.default.resolve(map.clear());\n },\n del: function del(key) {\n logger.debug(\"memory-store-adapter: deleting `\".concat(key, \"`\"));\n return _promise.default.resolve(map.delete(key));\n },\n get: function get(key) {\n logger.debug(\"memory-store-adapter: reading `\".concat(key, \"`\"));\n var res = map.get(key);\n if (typeof res === 'undefined') {\n return _promise.default.reject(new _errors.NotFoundError());\n }\n return _promise.default.resolve(res);\n },\n put: function put(key, value) {\n logger.debug(\"memory-store-adapter: writing `\".concat(key, \"`\"));\n return _promise.default.resolve(map.set(key, value));\n }\n });\n}\nvar _default = exports.default = {\n bind: _bind,\n preload: function preload(data) {\n return {\n bind: function bind(namespace) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (data[namespace]) {\n options.data = data[namespace];\n }\n return _bind(namespace, options);\n }\n };\n }\n};\n//# sourceMappingURL=memory-store-adapter.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = mixinWebexCorePlugins;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Mixes a plugin system into an AmpState object (specifically, into WebexCore)\n * @param {AmpState} State\n * @param {Object} config\n * @param {Object} interceptors\n * @returns {AmpState}\n */\nfunction mixinWebexCorePlugins(State, config, interceptors) {\n // eslint-disable-next-line complexity\n State.registerPlugin = function registerPlugin(name, constructor) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (State.prototype._children[name] && !options.replace) {\n return;\n }\n State.prototype._children[name] = constructor;\n if (options.proxies) {\n options.proxies.forEach(function (key) {\n createDerivedProperty(State.prototype, key, {\n deps: [\"\".concat(name, \".\").concat(key)],\n fn: function fn() {\n return this[name][key];\n }\n });\n });\n }\n if (options.interceptors) {\n (0, _keys.default)(options.interceptors).forEach(function (key) {\n interceptors[key] = options.interceptors[key];\n });\n }\n if (options.config) {\n (0, _lodash.merge)(config, options.config);\n }\n if ((0, _lodash.has)(options, 'payloadTransformer.predicates')) {\n config.payloadTransformer.predicates = config.payloadTransformer.predicates.concat((0, _lodash.get)(options, 'payloadTransformer.predicates'));\n }\n if ((0, _lodash.has)(options, 'payloadTransformer.transforms')) {\n config.payloadTransformer.transforms = config.payloadTransformer.transforms.concat((0, _lodash.get)(options, 'payloadTransformer.transforms'));\n }\n if (options.onBeforeLogout) {\n config.onBeforeLogout = config.onBeforeLogout || [];\n var onBeforeLogout = (0, _lodash.isArray)(options.onBeforeLogout) ? options.onBeforeLogout : [options.onBeforeLogout];\n onBeforeLogout.forEach(function (fn) {\n return config.onBeforeLogout.push({\n plugin: name,\n fn: fn\n });\n });\n }\n\n // Only mess with the plugin's derived properties if it's an amp-state plugin\n if (constructor.prototype._definition && constructor.prototype._definition.ready) {\n var _State$prototype$_der = State.prototype._derived.ready,\n fn = _State$prototype$_der.fn,\n depList = _State$prototype$_der.depList;\n var def = {\n deps: depList.concat(\"\".concat(name, \".ready\")),\n fn: fn\n };\n createDerivedProperty(State.prototype, 'ready', def);\n }\n };\n return State;\n}\n\n/**\n * Extracted from ampersand-state\n * @param {Object} modelProto\n * @param {string} name\n * @param {Object} definition\n * @private\n * @returns {undefined}\n */\nfunction createDerivedProperty(modelProto, name, definition) {\n var def = modelProto._derived[name] = {\n fn: (0, _lodash.isFunction)(definition) ? definition : definition.fn,\n cache: definition.cache !== false,\n depList: definition.deps || []\n };\n\n // add to our shared dependency list\n def.depList.forEach(function (dep) {\n modelProto._deps[dep] = (0, _lodash.union)(modelProto._deps[dep] || [], [name]);\n });\n\n // defined a top-level getter for derived names\n (0, _defineProperty.default)(modelProto, name, {\n get: function get() {\n return this._getDerivedProperty(name);\n },\n set: function set() {\n throw new TypeError(\"`\".concat(name, \"` is a derived property, it can't be set directly.\"));\n }\n });\n}\n//# sourceMappingURL=webex-core-plugin-mixin.js.map\n","\"use strict\";\n\nvar _Reflect$construct = require(\"@babel/runtime-corejs2/core-js/reflect/construct\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/classCallCheck\"));\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/createClass\"));\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/inherits\"));\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/possibleConstructorReturn\"));\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/getPrototypeOf\"));\nvar _httpCore = require(\"@webex/http-core\");\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n/**\n * Webex-specific http error class\n */\nvar WebexHttpError = exports.default = /*#__PURE__*/function (_HttpError) {\n (0, _inherits2.default)(WebexHttpError, _HttpError);\n var _super = _createSuper(WebexHttpError);\n function WebexHttpError() {\n (0, _classCallCheck2.default)(this, WebexHttpError);\n return _super.apply(this, arguments);\n }\n (0, _createClass2.default)(WebexHttpError, [{\n key: \"parse\",\n value:\n /**\n * Very similar to {@link HttpError#parse()}, but additionally adds some\n * useful headers to the message string\n * @param {HttpResponse} res\n * @returns {string}\n */\n function parse(res) {\n var message = (0, _apply.default)(_httpCore.HttpError.prototype.parse, this, [res]);\n (0, _defineProperty.default)(this, 'options', {\n enumerable: false,\n value: res.options\n });\n if (this.options.url) {\n message += \"\\n\".concat(this.options.method, \" \").concat(this.options.url);\n } else if (this.options.uri) {\n message += \"\\n\".concat(this.options.method, \" \").concat(this.options.uri);\n } else {\n message += \"\\n\".concat(this.options.method, \" \").concat(this.options.service.toUpperCase(), \"/\").concat(this.options.resource);\n }\n message += \"\\nWEBEX_TRACKING_ID: \".concat(this.options.headers.trackingid);\n if (this.options.headers && this.options.headers['x-trans-id']) {\n message += \"\\nX-Trans-Id: \".concat(this.options.headers['x-trans-id']);\n }\n if (this.headers['retry-after']) {\n (0, _defineProperty.default)(this, 'retryAfter', {\n enumerable: true,\n value: this.headers['retry-after'],\n writeable: false\n });\n message += \"\\nRETRY-AFTER: \".concat(this.retryAfter);\n }\n message += '\\n';\n return message;\n }\n }]);\n return WebexHttpError;\n}(_httpCore.HttpError);\n_httpCore.HttpError.makeSubTypes(WebexHttpError);\n\n/**\n * TooManyRequests\n */\nvar TooManyRequests = /*#__PURE__*/function (_HttpError$BadRequest) {\n (0, _inherits2.default)(TooManyRequests, _HttpError$BadRequest);\n var _super2 = _createSuper(TooManyRequests);\n function TooManyRequests() {\n (0, _classCallCheck2.default)(this, TooManyRequests);\n return _super2.apply(this, arguments);\n }\n return (0, _createClass2.default)(TooManyRequests);\n}(_httpCore.HttpError.BadRequest);\n_httpCore.HttpError[429] = TooManyRequests;\n_httpCore.HttpError.TooManyRequests = TooManyRequests;\n//# sourceMappingURL=webex-http-error.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = mixinWebexInternalCorePlugins;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _defineProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/define-property\"));\nvar _lodash = require(\"lodash\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * Mixes a plugin system into an AmpState object (specifically, into WebexCore)\n * @param {AmpState} State\n * @param {Object} config\n * @param {Object} interceptors\n * @returns {AmpState}\n */\nfunction mixinWebexInternalCorePlugins(State, config, interceptors) {\n // eslint-disable-next-line complexity\n State.registerPlugin = function registerPlugin(name, constructor) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (State.prototype._children[name] && !options.replace) {\n return;\n }\n State.prototype._children[name] = constructor;\n if (options.proxies) {\n throw new Error('Proxies are not currently supported for private plugins');\n }\n if (options.interceptors) {\n (0, _keys.default)(options.interceptors).forEach(function (key) {\n interceptors[key] = options.interceptors[key];\n });\n }\n if (options.config) {\n (0, _lodash.merge)(config, options.config);\n }\n if ((0, _lodash.has)(options, 'payloadTransformer.predicates')) {\n config.payloadTransformer.predicates = config.payloadTransformer.predicates.concat((0, _lodash.get)(options, 'payloadTransformer.predicates'));\n }\n if ((0, _lodash.has)(options, 'payloadTransformer.transforms')) {\n config.payloadTransformer.transforms = config.payloadTransformer.transforms.concat((0, _lodash.get)(options, 'payloadTransformer.transforms'));\n }\n if (options.onBeforeLogout) {\n config.onBeforeLogout = config.onBeforeLogout || [];\n var onBeforeLogout = (0, _lodash.isArray)(options.onBeforeLogout) ? options.onBeforeLogout : [options.onBeforeLogout];\n onBeforeLogout.forEach(function (fn) {\n return config.onBeforeLogout.push({\n plugin: name,\n fn: fn\n });\n });\n }\n\n // Only mess with the plugin's derived properties if it's an amp-state plugin\n if (constructor.prototype._definition && constructor.prototype._definition.ready) {\n var _State$prototype$_der = State.prototype._derived.ready,\n fn = _State$prototype$_der.fn,\n depList = _State$prototype$_der.depList;\n var def = {\n deps: depList.concat(\"\".concat(name, \".ready\")),\n fn: fn\n };\n createDerivedProperty(State.prototype, 'ready', def);\n }\n };\n return State;\n}\n\n/**\n * Extracted from ampersand-state\n * @param {Object} modelProto\n * @param {string} name\n * @param {Object} definition\n * @private\n * @returns {undefined}\n */\nfunction createDerivedProperty(modelProto, name, definition) {\n var def = modelProto._derived[name] = {\n fn: (0, _lodash.isFunction)(definition) ? definition : definition.fn,\n cache: definition.cache !== false,\n depList: definition.deps || []\n };\n\n // add to our shared dependency list\n def.depList.forEach(function (dep) {\n modelProto._deps[dep] = (0, _lodash.union)(modelProto._deps[dep] || [], [name]);\n });\n\n // defined a top-level getter for derived names\n (0, _defineProperty.default)(modelProto, name, {\n get: function get() {\n return this._getDerivedProperty(name);\n },\n set: function set() {\n throw new TypeError(\"`\".concat(name, \"` is a derived property, it can't be set directly.\"));\n }\n });\n}\n//# sourceMappingURL=webex-internal-core-plugin-mixin.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _util = _interopRequireDefault(require(\"util\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\nvar _lodash = require(\"lodash\");\nvar _storage = require(\"./storage\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * @class\n */\nvar WebexPlugin = _ampersandState.default.extend({\n derived: {\n boundedStorage: {\n deps: [],\n fn: function fn() {\n return (0, _storage.makeWebexPluginStore)('bounded', this);\n }\n },\n unboundedStorage: {\n deps: [],\n fn: function fn() {\n return (0, _storage.makeWebexPluginStore)('unbounded', this);\n }\n },\n config: {\n // figure out why caching config breaks the refresh integration test\n // but not the refresh automation test.\n cache: false,\n deps: ['webex', 'webex.config'],\n fn: function fn() {\n if (this.webex && this.webex.config) {\n var namespace = this.getNamespace();\n if (namespace) {\n return this.webex.config[namespace.toLowerCase()];\n }\n return this.webex.config;\n }\n return {};\n }\n },\n logger: {\n deps: ['webex', 'webex.logger'],\n fn: function fn() {\n return this.webex.logger || console;\n }\n },\n webex: {\n deps: ['parent'],\n fn: function fn() {\n if (!this.parent && !this.collection) {\n throw new Error('Cannot determine `this.webex` without `this.parent` or `this.collection`. Please initialize `this` via `children` or `collection` or set `this.parent` manually');\n }\n\n /* eslint consistent-this: [0] */\n var parent = this;\n while (parent.parent || parent.collection) {\n parent = parent.parent || parent.collection;\n }\n return parent;\n }\n }\n },\n session: {\n parent: {\n type: 'any'\n },\n /**\n * Indicates this plugin is ready to be used. Defaults to true but can be\n * overridden by plugins as appropriate. Used by {@link WebexCore#read}\n * @instance\n * @memberof WebexPlugin\n * @type {boolean}\n */\n ready: {\n default: true,\n type: 'boolean'\n }\n },\n /**\n * Overrides AmpersandState#clear to make sure we never unset `parent` and\n * recursively visits children/collections.\n * @instance\n * @memberof WebexPlugin\n * @param {Object} options\n * @returns {WebexPlugin}\n */\n clear: function clear(options) {\n var _this = this;\n (0, _keys.default)(this.attributes).forEach(function (key) {\n if (key !== 'parent') {\n _this.unset(key, options);\n }\n });\n (0, _keys.default)(this._children).forEach(function (key) {\n _this[key].clear();\n });\n (0, _keys.default)(this._collections).forEach(function (key) {\n _this[key].reset();\n });\n return this;\n },\n /**\n * Initializer\n * @private\n * @param {Object} attrs\n * @param {Object} options\n * @returns {undefined}\n */\n initialize: function initialize() {\n var _this2 = this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (0, _apply.default)(_ampersandState.default.prototype.initialize, this, args);\n\n // HACK to deal with the fact that AmpersandState#dataTypes#set is a pure\n // function.\n this._dataTypes = (0, _lodash.cloneDeep)(this._dataTypes);\n (0, _keys.default)(this._dataTypes).forEach(function (key) {\n if (_this2._dataTypes[key].set) {\n _this2._dataTypes[key].set = _this2._dataTypes[key].set.bind(_this2);\n }\n });\n // END HACK\n\n // Propagate change:[attribute] events from children\n this.on('change', function (model, options) {\n if (_this2.parent) {\n _this2.parent.trigger(\"change:\".concat(_this2.getNamespace().toLowerCase()), _this2.parent, _this2, options);\n }\n });\n },\n /**\n * @instance\n * @memberof WebexPlugin\n * @param {number} depth\n * @private\n * @returns {Object}\n */\n inspect: function inspect(depth) {\n return _util.default.inspect((0, _lodash.omit)(this.serialize({\n props: true,\n session: true,\n derived: true\n }), 'boundedStorage', 'unboundedStorage', 'config', 'logger', 'webex', 'parent'), {\n depth: depth\n });\n },\n request: function request() {\n var _this$webex;\n return (_this$webex = this.webex).request.apply(_this$webex, arguments);\n },\n upload: function upload() {\n var _this$webex2;\n return (_this$webex2 = this.webex).upload.apply(_this$webex2, arguments);\n },\n when: function when(eventName) {\n var _this3 = this;\n for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n if (rest && rest.length > 0) {\n throw new Error('#when() does not accept a callback, you must attach to its promise');\n }\n return new _promise.default(function (resolve) {\n _this3.once(eventName, function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n return resolve(args);\n });\n });\n },\n /**\n * Helper function for dealing with both forms of {@link AmpersandState#set()}\n * @param {string} key\n * @param {mixed} value\n * @param {Object} options\n * @private\n * @returns {Array}\n */\n _filterSetParameters: function _filterSetParameters(key, value, options) {\n var attrs;\n if ((0, _lodash.isObject)(key) || key === null) {\n attrs = key;\n options = value;\n } else {\n attrs = {};\n attrs[key] = value;\n }\n options = options || {};\n return [attrs, options];\n }\n});\nvar _default = exports.default = WebexPlugin;\n//# sourceMappingURL=webex-plugin.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _webexPlugin = _interopRequireDefault(require(\"../lib/webex-plugin\"));\nvar _webexCore = require(\"../webex-core\");\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nvar precedence = {\n error: ['log'],\n warn: ['error', 'log'],\n info: ['log'],\n debug: ['info', 'log'],\n trace: ['debug', 'info', 'log']\n};\n\n/**\n * Assigns the specified console method to Logger; uses `precedence` to fallback\n * to other console methods if the current environment doesn't provide the\n * specified level.\n * @param {string} level\n * @returns {Function}\n */\nfunction wrapConsoleMethod(level) {\n /* eslint no-console: [0] */\n var impls = precedence[level];\n if (impls) {\n impls = impls.slice();\n while (!console[level]) {\n level = impls.pop();\n }\n }\n return function wrappedConsoleMethod() {\n var _console;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n /* eslint no-invalid-this: [0] */\n /* istanbul ignore if */\n if (process.env.NODE_ENV === 'test' && this.webex && this.webex.internal.device && this.webex.internal.device.url) {\n args.unshift(this.webex.internal.device.url.slice(-3));\n }\n (_console = console)[level].apply(_console, args);\n };\n}\nvar Logger = _webexPlugin.default.extend({\n namespace: 'Logger',\n error: wrapConsoleMethod('error'),\n warn: wrapConsoleMethod('warn'),\n log: wrapConsoleMethod('log'),\n info: wrapConsoleMethod('info'),\n debug: wrapConsoleMethod('debug'),\n trace: wrapConsoleMethod('trace'),\n version: \"3.7.0\"\n});\n(0, _webexCore.registerPlugin)('logger', Logger);\nvar _default = exports.default = Logger;\n//# sourceMappingURL=logger.js.map\n","\"use strict\";\n\nvar _Object$keys2 = require(\"@babel/runtime-corejs2/core-js/object/keys\");\nvar _Object$getOwnPropertySymbols = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-symbols\");\nvar _Object$getOwnPropertyDescriptor2 = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\");\nvar _Object$getOwnPropertyDescriptors = require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptors\");\nvar _Object$defineProperties = require(\"@babel/runtime-corejs2/core-js/object/define-properties\");\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.registerInternalPlugin = registerInternalPlugin;\nexports.registerPlugin = registerPlugin;\nvar _regenerator = _interopRequireDefault(require(\"@babel/runtime-corejs2/regenerator\"));\nvar _apply = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/apply\"));\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _promise = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/promise\"));\nvar _assign = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/assign\"));\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/json/stringify\"));\nvar _deleteProperty = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/reflect/delete-property\"));\nvar _getOwnPropertyDescriptor = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/get-own-property-descriptor\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/defineProperty\"));\nvar _asyncToGenerator2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/asyncToGenerator\"));\nvar _applyDecoratedDescriptor2 = _interopRequireDefault(require(\"@babel/runtime-corejs2/helpers/applyDecoratedDescriptor\"));\nvar _events = require(\"events\");\nvar _util = _interopRequireDefault(require(\"util\"));\nvar _common = require(\"@webex/common\");\nvar _httpCore = require(\"@webex/http-core\");\nvar _lodash = require(\"lodash\");\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\nvar _uuid = _interopRequireDefault(require(\"uuid\"));\nvar _auth = _interopRequireDefault(require(\"./interceptors/auth\"));\nvar _networkTiming = _interopRequireDefault(require(\"./interceptors/network-timing\"));\nvar _payloadTransformer = _interopRequireDefault(require(\"./interceptors/payload-transformer\"));\nvar _redirect = _interopRequireDefault(require(\"./interceptors/redirect\"));\nvar _requestEvent = _interopRequireDefault(require(\"./interceptors/request-event\"));\nvar _requestLogger = _interopRequireDefault(require(\"./interceptors/request-logger\"));\nvar _requestTiming = _interopRequireDefault(require(\"./interceptors/request-timing\"));\nvar _responseLogger = _interopRequireDefault(require(\"./interceptors/response-logger\"));\nvar _webexHttpError = _interopRequireDefault(require(\"./lib/webex-http-error\"));\nvar _userAgent = _interopRequireDefault(require(\"./interceptors/user-agent\"));\nvar _webexTrackingId = _interopRequireDefault(require(\"./interceptors/webex-tracking-id\"));\nvar _webexUserAgent = _interopRequireDefault(require(\"./interceptors/webex-user-agent\"));\nvar _rateLimit = _interopRequireDefault(require(\"./interceptors/rate-limit\"));\nvar _embargo = _interopRequireDefault(require(\"./interceptors/embargo\"));\nvar _defaultOptions = _interopRequireDefault(require(\"./interceptors/default-options\"));\nvar _hostmap = _interopRequireDefault(require(\"./lib/services/interceptors/hostmap\"));\nvar _config = _interopRequireDefault(require(\"./config\"));\nvar _storage = require(\"./lib/storage\");\nvar _webexCorePluginMixin = _interopRequireDefault(require(\"./lib/webex-core-plugin-mixin\"));\nvar _webexInternalCorePluginMixin = _interopRequireDefault(require(\"./lib/webex-internal-core-plugin-mixin\"));\nvar _webexInternalCore = _interopRequireDefault(require(\"./webex-internal-core\"));\nvar _obj;\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nfunction ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor2(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor2(t, r)); }); } return e; }\n// TODO replace the Interceptor.create with Reflect.construct (\n// Interceptor.create exists because new was really hard to call on an array of\n// constructors)\nvar interceptors = {\n WebexTrackingIdInterceptor: _webexTrackingId.default.create,\n RequestEventInterceptor: _requestEvent.default.create,\n RateLimitInterceptor: _rateLimit.default.create,\n /* eslint-disable no-extra-parens */\n RequestLoggerInterceptor: process.env.ENABLE_NETWORK_LOGGING || process.env.ENABLE_VERBOSE_NETWORK_LOGGING ? _requestLogger.default.create : undefined,\n ResponseLoggerInterceptor: process.env.ENABLE_NETWORK_LOGGING || process.env.ENABLE_VERBOSE_NETWORK_LOGGING ? _responseLogger.default.create : undefined,\n /* eslint-enable no-extra-parens */\n RequestTimingInterceptor: _requestTiming.default.create,\n ServiceInterceptor: undefined,\n UserAgentInterceptor: _userAgent.default.create,\n WebexUserAgentInterceptor: _webexUserAgent.default.create,\n AuthInterceptor: _auth.default.create,\n KmsDryErrorInterceptor: undefined,\n PayloadTransformerInterceptor: _payloadTransformer.default.create,\n ConversationInterceptor: undefined,\n RedirectInterceptor: _redirect.default.create,\n HttpStatusInterceptor: function HttpStatusInterceptor() {\n return _httpCore.HttpStatusInterceptor.create({\n error: _webexHttpError.default\n });\n },\n NetworkTimingInterceptor: _networkTiming.default.create,\n EmbargoInterceptor: _embargo.default.create,\n DefaultOptionsInterceptor: _defaultOptions.default.create,\n HostMapInterceptor: _hostmap.default.create\n};\nvar preInterceptors = ['ResponseLoggerInterceptor', 'RequestTimingInterceptor', 'RequestEventInterceptor', 'WebexTrackingIdInterceptor', 'RateLimitInterceptor'];\nvar postInterceptors = ['HttpStatusInterceptor', 'NetworkTimingInterceptor', 'EmbargoInterceptor', 'RequestLoggerInterceptor', 'RateLimitInterceptor'];\nvar MAX_FILE_SIZE_IN_MB = 2048;\n\n/**\n * @class\n */\nvar WebexCore = _ampersandState.default.extend((_obj = {\n version: \"3.7.0\",\n children: {\n internal: _webexInternalCore.default\n },\n constructor: function constructor() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 ? arguments[1] : undefined;\n if (typeof attrs === 'string') {\n attrs = {\n credentials: {\n supertoken: {\n // eslint-disable-next-line camelcase\n access_token: attrs\n }\n }\n };\n } else {\n // Reminder: order is important here\n ['credentials.authorization', 'authorization', 'credentials.supertoken.supertoken', 'supertoken', 'access_token', 'credentials.authorization.supertoken'].forEach(function (path) {\n var val = (0, _lodash.get)(attrs, path);\n if (val) {\n (0, _lodash.unset)(attrs, path);\n (0, _lodash.set)(attrs, 'credentials.supertoken', val);\n }\n });\n ['credentials', 'credentials.authorization'].forEach(function (path) {\n var val = (0, _lodash.get)(attrs, path);\n if (typeof val === 'string') {\n (0, _lodash.unset)(attrs, path);\n (0, _lodash.set)(attrs, 'credentials.supertoken', val);\n }\n });\n if (typeof (0, _lodash.get)(attrs, 'credentials.access_token') === 'string') {\n // Send access_token to get validated and corrected and then set it\n (0, _lodash.set)(attrs, 'credentials.access_token', this.bearerValidator((0, _lodash.get)(attrs, 'credentials.access_token').trim()));\n (0, _lodash.set)(attrs, 'credentials.supertoken', attrs.credentials);\n }\n }\n return (0, _apply.default)(_ampersandState.default, this, [attrs, options]);\n },\n derived: {\n boundedStorage: {\n deps: [],\n fn: function fn() {\n return (0, _storage.makeWebexStore)('bounded', this);\n }\n },\n unboundedStorage: {\n deps: [],\n fn: function fn() {\n return (0, _storage.makeWebexStore)('unbounded', this);\n }\n },\n ready: {\n deps: ['loaded', 'internal.ready'],\n fn: function fn() {\n var _this = this;\n return this.loaded && (0, _keys.default)(this._children).reduce(function (ready, name) {\n return ready && _this[name] && _this[name].ready !== false;\n }, true);\n }\n }\n },\n session: {\n config: {\n type: 'object'\n },\n /**\n * When true, indicates that the initial load from the storage layer is\n * complete\n * @instance\n * @memberof WebexCore\n * @type {boolean}\n */\n loaded: {\n default: false,\n type: 'boolean'\n },\n request: {\n setOnce: true,\n // It's supposed to be a function, but that's not a type defined in\n // Ampersand\n type: 'any'\n },\n sessionId: {\n type: 'string'\n }\n },\n /**\n * @instance\n * @memberof WebexCore\n * @param {[type]} args\n * @returns {[type]}\n */\n refresh: function refresh() {\n var _this$credentials;\n return (_this$credentials = this.credentials).refresh.apply(_this$credentials, arguments);\n },\n /**\n * Applies the directionally appropriate transforms to the specified object\n * @param {string} direction\n * @param {Object} object\n * @returns {Promise}\n */\n transform: function transform(direction, object) {\n var _this2 = this;\n var predicates = this.config.payloadTransformer.predicates.filter(function (p) {\n return !p.direction || p.direction === direction;\n });\n var ctx = {\n webex: this\n };\n return _promise.default.all(predicates.map(function (p) {\n return p.test(ctx, object).then(function (shouldTransform) {\n if (!shouldTransform) {\n return undefined;\n }\n return p.extract(object)\n // eslint-disable-next-line max-nested-callbacks\n .then(function (target) {\n return {\n name: p.name,\n target: target\n };\n });\n });\n })).then(function (data) {\n return data.filter(function (d) {\n return Boolean(d);\n })\n // eslint-disable-next-line max-nested-callbacks\n .reduce(function (promise, _ref) {\n var name = _ref.name,\n target = _ref.target,\n alias = _ref.alias;\n return promise.then(function () {\n if (alias) {\n return _this2.applyNamedTransform(direction, alias, target);\n }\n return _this2.applyNamedTransform(direction, name, target);\n });\n }, _promise.default.resolve());\n }).then(function () {\n return object;\n });\n },\n /**\n * Applies the directionally appropriate transform to the specified parameters\n * @param {string} direction\n * @param {Object} ctx\n * @param {string} name\n * @returns {Promise}\n */\n applyNamedTransform: function applyNamedTransform(direction, ctx, name) {\n var _this3 = this;\n for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n rest[_key - 3] = arguments[_key];\n }\n if ((0, _lodash.isString)(ctx)) {\n rest.unshift(name);\n name = ctx;\n ctx = {\n webex: this,\n transform: function transform() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return _this3.applyNamedTransform.apply(_this3, [direction, ctx].concat(args));\n }\n };\n }\n var transforms = ctx.webex.config.payloadTransformer.transforms.filter(function (tx) {\n return tx.name === name && (!tx.direction || tx.direction === direction);\n });\n\n // too many implicit returns on the same line is difficult to interpret\n // eslint-disable-next-line arrow-body-style\n return transforms.reduce(function (promise, tx) {\n return promise.then(function () {\n if (tx.alias) {\n var _ctx;\n return (_ctx = ctx).transform.apply(_ctx, [tx.alias].concat(rest));\n }\n return _promise.default.resolve(tx.fn.apply(tx, [ctx].concat(rest)));\n });\n }, _promise.default.resolve()).then(function () {\n return (0, _lodash.last)(rest);\n });\n },\n /**\n * @private\n * @returns {Window}\n */\n getWindow: function getWindow() {\n // eslint-disable-next-line\n return window;\n },\n /**\n * Initializer\n *\n * @emits WebexCore#loaded\n * @emits WebexCore#ready\n * @instance\n * @memberof WebexCore\n * @param {Object} attrs\n * @returns {WebexCore}\n */\n initialize: function initialize() {\n var _this4 = this;\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.config = (0, _lodash.merge)({}, _config.default, attrs.config);\n\n // There's some unfortunateness with the way {@link AmpersandState#children}\n // get initialized. We'll fire the change:config event so that\n // {@link WebexPlugin#initialize()} can use\n // `this.listenToOnce(parent, 'change:config', () => {});` to act on config\n // during initialization\n this.trigger('change:config');\n var onLoaded = function onLoaded() {\n if (_this4.loaded) {\n /**\n * Fires when all data has been loaded from the storage layer\n * @event loaded\n * @instance\n * @memberof WebexCore\n */\n _this4.trigger('loaded');\n _this4.stopListening(_this4, 'change:loaded', onLoaded);\n }\n };\n\n // This needs to run on nextTick or we'll never be able to wire up listeners\n process.nextTick(function () {\n _this4.listenToAndRun(_this4, 'change:loaded', onLoaded);\n });\n var onReady = function onReady() {\n if (_this4.ready) {\n /**\n * Fires when all plugins have fully initialized\n * @event ready\n * @instance\n * @memberof WebexCore\n */\n _this4.trigger('ready');\n _this4.stopListening(_this4, 'change:ready', onReady);\n }\n };\n\n // This needs to run on nextTick or we'll never be able to wire up listeners\n process.nextTick(function () {\n _this4.listenToAndRun(_this4, 'change:ready', onReady);\n });\n\n // Make nested events propagate in a consistent manner\n (0, _keys.default)(this.constructor.prototype._children).forEach(function (key) {\n _this4.listenTo(_this4[key], 'change', function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n args.unshift(\"change:\".concat(key));\n _this4.trigger.apply(_this4, args);\n });\n });\n var addInterceptor = function addInterceptor(ints, key) {\n var interceptorsObj = _this4.config.interceptors || interceptors;\n var interceptor = interceptorsObj[key];\n if (!(0, _lodash.isFunction)(interceptor)) {\n return ints;\n }\n ints.push((0, _apply.default)(interceptor, _this4, []));\n return ints;\n };\n var ints = [];\n if (this.config.interceptors) {\n (0, _keys.default)(this.config.interceptors).reduce(addInterceptor, ints);\n } else {\n ints = preInterceptors.reduce(addInterceptor, ints);\n ints = (0, _keys.default)(interceptors).filter(function (key) {\n return !(preInterceptors.includes(key) || postInterceptors.includes(key));\n }).reduce(addInterceptor, ints);\n ints = postInterceptors.reduce(addInterceptor, ints);\n }\n this.request = (0, _httpCore.defaults)({\n json: true,\n interceptors: ints\n });\n this.prepareFetchOptions = (0, _httpCore.protoprepareFetchOptions)({\n json: true,\n interceptors: ints\n });\n this.setTimingsAndFetch = _httpCore.setTimingsAndFetch;\n var sessionId = \"\".concat((0, _lodash.get)(this, 'config.trackingIdPrefix', 'webex-js-sdk'), \"_\").concat((0, _lodash.get)(this, 'config.trackingIdBase', _uuid.default.v4()));\n if ((0, _lodash.get)(this, 'config.trackingIdSuffix')) {\n sessionId += \"_\".concat((0, _lodash.get)(this, 'config.trackingIdSuffix'));\n }\n this.sessionId = sessionId;\n },\n /**\n * setConfig\n *\n * Allows updating config\n *\n * @instance\n * @memberof WebexCore\n * @param {Object} newConfig\n * @returns {null}\n */\n setConfig: function setConfig() {\n var newConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.config = (0, _lodash.merge)({}, this.config, newConfig);\n },\n /**\n *\n * Check if access token is correctly formated and correct if it's not\n * Warn user if token string has errors in it\n * @param {string} token\n * @returns {string}\n */\n bearerValidator: function bearerValidator(token) {\n if (token.includes('Bearer') && token.split(' ').length - 1 === 0) {\n console.warn(\"Your access token does not have a space between 'Bearer' and the token, please add a space to it or replace it with this already fixed version:\\n\\n\".concat(token.replace('Bearer', 'Bearer ').replace(/\\s+/g, ' ')));\n console.info(\"Tip: You don't need to add 'Bearer' to the access_token field. The token by itself is fine\");\n return token.replace('Bearer', 'Bearer ').replace(/\\s+/g, ' ');\n }\n // Allow elseIf return\n // eslint-disable-next-line no-else-return\n else if (token.split(' ').length - 1 > 1) {\n console.warn(\"Your access token has \".concat(token.split(' ').length - 2, \" too many spaces, please use this format:\\n\\n\").concat(token.replace(/\\s+/g, ' ')));\n console.info(\"Tip: You don't need to add 'Bearer' to the access_token field, the token by itself is fine\");\n return token.replace(/\\s+/g, ' ');\n }\n return token.replace(/\\s+/g, ' '); // Clean it anyway (just in case)\n },\n /**\n * @instance\n * @memberof WebexPlugin\n * @param {number} depth\n * @private\n * @returns {Object}\n */\n inspect: function inspect(depth) {\n return _util.default.inspect((0, _lodash.omit)(this.serialize({\n props: true,\n session: true,\n derived: true\n }), 'boundedStorage', 'unboundedStorage', 'request', 'config'), {\n depth: depth\n });\n },\n /**\n * Invokes all `onBeforeLogout` handlers in the scope of their plugin, clears\n * all stores, and revokes the access token\n * Note: If you're using the sdk in a server environment, you may be more\n * interested in {@link `webex.internal.mercury.disconnect()`| Mercury#disconnect()}\n * and {@link `webex.internal.device.unregister()`|Device#unregister()}\n * or {@link `webex.phone.unregister()`|Phone#unregister}\n * @instance\n * @memberof WebexCore\n * @param {Object} options Passed as the first argument to all\n * `onBeforeLogout` handlers\n * @returns {Promise}\n */\n logout: function logout(options) {\n var _this5 = this;\n for (var _len4 = arguments.length, rest = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n rest[_key4 - 1] = arguments[_key4];\n }\n // prefer the refresh token, but for clients that don't have one, fallback\n // to the access token\n var token = this.credentials.supertoken && (this.credentials.supertoken.refresh_token || this.credentials.supertoken.access_token);\n options = (0, _assign.default)({\n token: token\n }, options);\n\n // onBeforeLogout should be executed in the opposite order in which handlers\n // were registered. In that way, wdm unregister() will be above mercury\n // disconnect(), but disconnect() will execute first.\n // eslint-disable-next-line arrow-body-style\n return this.config.onBeforeLogout.reverse().reduce(function (promise, _ref2) {\n var plugin = _ref2.plugin,\n fn = _ref2.fn;\n return promise.then(function () {\n return _promise.default.resolve((0, _apply.default)(fn, _this5[plugin] || _this5.internal[plugin], [options].concat(rest)))\n // eslint-disable-next-line max-nested-callbacks\n .catch(function (err) {\n _this5.logger.warn(\"onBeforeLogout from plugin \".concat(plugin, \": failed\"), err);\n });\n });\n }, _promise.default.resolve()).then(function () {\n return _promise.default.all([_this5.boundedStorage.clear(), _this5.unboundedStorage.clear()]);\n }).then(function () {\n var _this5$credentials;\n return (_this5$credentials = _this5.credentials).invalidate.apply(_this5$credentials, rest);\n }).then(function () {\n var _this5$authorization;\n return _this5.authorization && _this5.authorization.logout && (_this5$authorization = _this5.authorization).logout.apply(_this5$authorization, [options].concat(rest));\n }).then(function () {\n return _this5.trigger('client:logout');\n });\n },\n /**\n * General purpose wrapper to submit metrics via the metrics plugin (if the\n * metrics plugin is installed)\n * @instance\n * @memberof WebexCore\n * @returns {Promise}\n */\n measure: function measure() {\n if (this.metrics) {\n var _this$metrics;\n return (_this$metrics = this.metrics).sendUnstructured.apply(_this$metrics, arguments);\n }\n return _promise.default.resolve();\n },\n upload: function upload(options) {\n var _this6 = this;\n return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {\n var shunt, promise;\n return _regenerator.default.wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (options.file) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\", _promise.default.reject(new Error('`options.file` is required')));\n case 2:\n options.phases = options.phases || {};\n options.phases.initialize = options.phases.initialize || {};\n options.phases.upload = options.phases.upload || {};\n options.phases.finalize = options.phases.finalize || {};\n (0, _lodash.defaultsDeep)(options.phases.initialize, {\n method: 'POST',\n body: {\n uploadProtocol: 'content-length'\n }\n }, (0, _lodash.omit)(options, 'file', 'phases'));\n (0, _lodash.defaultsDeep)(options.phases.upload, {\n method: 'PUT',\n json: false,\n withCredentials: false,\n body: options.file,\n headers: {\n 'x-trans-id': _uuid.default.v4(),\n authorization: undefined\n }\n });\n (0, _lodash.defaultsDeep)(options.phases.finalize, {\n method: 'POST'\n }, (0, _lodash.omit)(options, 'file', 'phases'));\n shunt = new _events.EventEmitter();\n promise = _this6._uploadPhaseInitialize(options).then(function () {\n var p = _this6._uploadPhaseUpload(options);\n (0, _common.transferEvents)('progress', p, shunt);\n return p;\n }).then(function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n return _this6._uploadPhaseFinalize.apply(_this6, [options].concat(args));\n }).then(function (res) {\n return _objectSpread(_objectSpread({}, res.body), res.headers);\n });\n (0, _common.proxyEvents)(shunt, promise);\n return _context.abrupt(\"return\", promise);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }))();\n },\n _uploadPhaseInitialize: function _uploadPhaseInitialize(options) {\n var _this7 = this;\n this.logger.debug('client: initiating upload session');\n return this.request(options.phases.initialize).then(function () {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n var fileUploadSizeLimitInBytes = (args[0].body.fileUploadSizeLimit || MAX_FILE_SIZE_IN_MB) * 1024 * 1024;\n var currentFileSizeInBytes = options.file.byteLength;\n if (fileUploadSizeLimitInBytes && fileUploadSizeLimitInBytes < currentFileSizeInBytes) {\n return _this7._uploadAbortSession.apply(_this7, [currentFileSizeInBytes].concat(args));\n }\n return _this7._uploadApplySession.apply(_this7, [options].concat(args));\n }).then(function (res) {\n _this7.logger.debug('client: initiated upload session');\n return res;\n });\n },\n _uploadAbortSession: function _uploadAbortSession(currentFileSizeInBytes, response) {\n var _this8 = this;\n this.logger.debug('client: deleting uploaded file');\n return this.request({\n method: 'DELETE',\n url: response.body.url,\n headers: response.options.headers\n }).then(function () {\n _this8.logger.debug('client: deleting uploaded file complete');\n var abortErrorDetails = {\n currentFileSizeInBytes: currentFileSizeInBytes,\n fileUploadSizeLimitInMB: response.body.fileUploadSizeLimit || MAX_FILE_SIZE_IN_MB,\n message: 'file-upload-size-limit-enabled'\n };\n return _promise.default.reject(new Error(\"\".concat((0, _stringify.default)(abortErrorDetails))));\n });\n },\n _uploadApplySession: function _uploadApplySession(options, res) {\n var session = res.body;\n ['upload', 'finalize'].reduce(function (opts, key) {\n opts[key] = (0, _keys.default)(opts[key]).reduce(function (phaseOptions, phaseKey) {\n if (phaseKey.startsWith('$')) {\n phaseOptions[phaseKey.substr(1)] = phaseOptions[phaseKey](session);\n (0, _deleteProperty.default)(phaseOptions, phaseKey);\n }\n return phaseOptions;\n }, opts[key]);\n return opts;\n }, options.phases);\n },\n _uploadPhaseUpload: function _uploadPhaseUpload(options) {\n var _this9 = this;\n this.logger.debug('client: uploading file');\n var promise = this.request(options.phases.upload).then(function (res) {\n _this9.logger.debug('client: uploaded file');\n return res;\n });\n (0, _common.proxyEvents)(options.phases.upload.upload, promise);\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV === 'test') {\n promise.on('progress', function (event) {\n _this9.logger.info('upload progress', event.loaded, event.total);\n });\n }\n return promise;\n },\n _uploadPhaseFinalize: function _uploadPhaseFinalize(options) {\n var _this10 = this;\n this.logger.debug('client: finalizing upload session');\n return this.request(options.phases.finalize).then(function (res) {\n _this10.logger.debug('client: finalized upload session');\n return res;\n });\n }\n}, ((0, _applyDecoratedDescriptor2.default)(_obj, \"_uploadPhaseUpload\", [_common.retry], (0, _getOwnPropertyDescriptor.default)(_obj, \"_uploadPhaseUpload\"), _obj)), _obj));\nWebexCore.version = \"3.7.0\";\n(0, _webexInternalCorePluginMixin.default)(_webexInternalCore.default, _config.default, interceptors);\n(0, _webexCorePluginMixin.default)(WebexCore, _config.default, interceptors);\nvar _default = exports.default = WebexCore;\n/**\n * @method registerPlugin\n * @param {string} name\n * @param {function} constructor\n * @param {Object} options\n * @param {Array} options.proxies\n * @param {Object} options.interceptors\n * @returns {null}\n */\nfunction registerPlugin(name, constructor) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n WebexCore.registerPlugin(name, constructor, options);\n}\n\n/**\n * Registers plugins used by internal products that do not talk to public APIs.\n * @method registerInternalPlugin\n * @param {string} name\n * @param {function} constructor\n * @param {Object} options\n * @param {Object} options.interceptors\n * @private\n * @returns {null}\n */\nfunction registerInternalPlugin(name, constructor, options) {\n _webexInternalCore.default.registerPlugin(name, constructor, options);\n}\n//# sourceMappingURL=webex-core.js.map\n","\"use strict\";\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs2/core-js/object/define-property\");\nvar _interopRequireDefault = require(\"@babel/runtime-corejs2/helpers/interopRequireDefault\");\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs2/core-js/object/keys\"));\nvar _util = _interopRequireDefault(require(\"util\"));\nvar _ampersandState = _interopRequireDefault(require(\"ampersand-state\"));\n/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\n/**\n * WebexInternalCore is an extra layer of nesting to make it blatantly clear that\n * private plugins are, in fact, private.\n * @class\n */\nvar WebexInternalCore = _ampersandState.default.extend({\n derived: {\n ready: {\n deps: [],\n fn: function fn() {\n var _this = this;\n return (0, _keys.default)(this._children).reduce(function (ready, name) {\n return ready && _this[name] && _this[name].ready !== false;\n }, true);\n }\n }\n },\n /**\n * @instance\n * @memberof WebexPlugin\n * @param {number} depth\n * @private\n * @returns {Object}\n */\n inspect: function inspect(depth) {\n return _util.default.inspect(this.serialize({\n props: true,\n session: true,\n derived: true\n }), {\n depth: depth\n });\n }\n});\nvar _default = exports.default = WebexInternalCore;\n//# sourceMappingURL=webex-internal-core.js.map\n"],"names":[],"sourceRoot":""}