{"version":3,"sources":["jsdelivr-header.js","/npm/@webex/internal-plugin-presence@3.11.0/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,kbCFA,QAAA,iCAEA,IAAA,WAAA,QAAA,qBACA,QAAA,QAAA,UAEA,UAAA,uBAAA,QAAA,eACA,QAAA,uBAAA,QAAA;;;;;;;CAEA,EAAA,mCAAuB,WAAY,kBAAU,CAC3C,mBAAoB,CAClB,WAAY,CACV,CACE,KAAM,gCACN,UAAW,UACX,KAAI,SAAC,EAAK,GAER,OAAO,SAAA,QAAQ,SAAQ,EAAA,aAAI,EAAU,oBAAqB,EAAA,aAAI,EAAU,gBAC1E,EACA,QAAO,SAAC,GACN,OAAO,SAAA,QAAQ,QAAQ,EACzB,IAGJ,WAAY,CACV,CACE,KAAM,gCACN,UAAW,UACX,GAAE,SAAC,EAAK,GACN,EAAS,KAAK,OAAS,EAAS,KAAK,SACvC,KAIN","file":"/npm/@webex/internal-plugin-presence@3.11.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@webex/internal-plugin-presence@3.11.0/dist/index.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 * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport '@webex/internal-plugin-device';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\nimport {has} from 'lodash';\n\nimport Presence from './presence';\nimport config from './config';\n\nregisterInternalPlugin('presence', Presence, {\n  payloadTransformer: {\n    predicates: [\n      {\n        name: 'normalizeSingleStatusResponse',\n        direction: 'inbound',\n        test(ctx, response) {\n          // POST to /apheleia/api/v1/events\n          return Promise.resolve(has(response, 'body.eventType') && has(response, 'body.subject'));\n        },\n        extract(response) {\n          return Promise.resolve(response);\n        },\n      },\n    ],\n    transforms: [\n      {\n        name: 'normalizeSingleStatusResponse',\n        direction: 'inbound',\n        fn(ctx, response) {\n          response.body.status = response.body.eventType;\n        },\n      },\n    ],\n  },\n  config,\n});\n\nexport {default} from './presence';\n"]}