{"version":3,"sources":["jsdelivr-header.js","/npm/twilio-client@1.13.1/lib/twilio.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,oECFA,IAAA,SAAA,QAAA,UACA,aAAA,QAAA,uBA6DS,QAAA,WA7DF,aAAA,QACP,IAAA,SAAA,QAAA,mBA4DqB,QAAA,OA5Dd,SAAA,QACP,IAAA,YAAA,QAAA,gCA2D6B,QAAA,cA3DpB,YAAA,cAET,IAEI,SAFE,QAAU,QAAQ,oBAwBxB,SAAS,gBACP,SAAW,IAAI,SAAA,QAEf,OAAO,oBAAoB,SAAA,QAAO,WAC/B,OAAO,OAAO,oBAAoB,SAAA,aAAa,YAC/C,QAAO,SAAC,GACP,MAAyC,mBAA3B,SAAA,QAAO,UAAU,EACjC,IACC,QAAO,SAAA,GAAQ,MAAS,YAAT,CAAA,IACf,SAAQ,SAAA,GACN,SAAA,QAAe,GAAS,SAAA,QAAO,UAAkB,GAAM,KAAK,SAC/D,GACJ,CAqB4C,QAAA,gBAtD5C,OAAO,eAAe,SAAA,QAAQ,WAAY,CACxC,IAAK,WAAM,OAAA,QAAA,EACX,IAAK,SAAC,GACc,OAAd,IACF,SAAW,KAEf,IAGD,SAAA,QAAe,QAAU,WACpB,UACF,SAAS,UAEX,eACF,EAqBA,gBAEA,OAAO,oBAAoB,UACxB,QAAO,SAAC,GAAuB,MAAkC,mBAA3B,SAAA,QAAO,UAAU,EAAxB,IAC/B,SAAQ,SAAC,GACR,OAAO,eAAe,SAAA,QAAQ,EAAM,CAClC,IAAK,WACH,GAAI,SACF,OAAO,SAAS,EAEpB,EACA,IAAK,SAAC,GACA,WACD,SAAiB,GAAQ,EAE9B,GAEJ","file":"/npm/twilio-client@1.13.1/es5/twilio.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/twilio-client@1.13.1/es5/twilio.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * @packageDocumentation\n * @internalapi\n */\nimport { EventEmitter } from 'events';\nimport Connection from './twilio/connection';\nimport Device from './twilio/device';\nimport { PreflightTest } from './twilio/preflight/preflight' ;\n\nconst PStream = require('./twilio/pstream');\n\nlet instance: Device | null | undefined;\nObject.defineProperty(Device, 'instance', {\n  get: () => instance,\n  set: (_instance) => {\n    if (_instance === null) {\n      instance = null;\n    }\n  },\n});\n\n(Device as any).destroy = function destroySingleton() {\n  if (instance) {\n    instance.destroy();\n  }\n  bindSingleton();\n};\n\n/**\n * Create a new Device instance and bind its functions to the Device static. This maintains\n * backwards compatibility for the Device singleton behavior and will be removed in the next\n * breaking release.\n */\nfunction bindSingleton() {\n  instance = new Device();\n\n  Object.getOwnPropertyNames(Device.prototype)\n    .concat(Object.getOwnPropertyNames(EventEmitter.prototype))\n    .filter((prop: keyof Device) => {\n      return typeof Device.prototype[prop] === 'function';\n    })\n    .filter(prop => prop !== 'destroy')\n    .forEach(prop => {\n      (Device as any)[prop] = (Device.prototype as any)[prop].bind(instance);\n    });\n}\n\nbindSingleton();\n\nObject.getOwnPropertyNames(instance)\n  .filter((prop: keyof Device) => typeof Device.prototype[prop] !== 'function')\n  .forEach((prop: keyof Device) => {\n    Object.defineProperty(Device, prop, {\n      get: () => {\n        if (instance) {\n          return instance[prop];\n        }\n      },\n      set: (_prop) => {\n        if (instance) {\n          (instance as any)[prop] = _prop;\n        }\n      },\n    });\n  });\n\nexport { Connection, Device, PreflightTest, PStream };\n"]}