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,KACZuH,SAASmC,iBAAiB,oBAAoB,WAC1CpF,EAAM+C,MACV,GACJ,EACOpB,CACX,CA/J0B,ICzU1B,sBAA6B0D,EAAAA,GACzBC,OAAAA,GASI,GARA3D,EAAMU,UAAU,uCAAwC,CACpDP,UAAU,EACVW,cAAc,IAElBd,EAAMmC,aAAY,GAClBnC,EAAM6C,eAAc,GACpB7C,EAAMmD,wBAAuB,GAEzB7E,OAAOsF,KAAKtJ,OAAOiG,MAAMsD,OAAS,EAAG,CACrC,IAAIC,EAAc,CACdC,YAAazJ,OAAOiG,KAAKyD,GACzBC,aAAc3J,OAAOiG,KAAK2D,YAAY5H,KACtC6H,gBAAiB7J,OAAOiG,KAAK2D,YAAYF,GACzCI,kBAAmB9J,OAAOiG,KAAK2D,YAAY/J,KAC3CkK,gBAAiB/J,OAAOiG,KAAK+D,mBAAqBhK,OAAOiG,KAAK+D,mBAAqB,QAGvFtE,EAAMyC,WAAWnI,OAAOiG,KAAKgE,OAC7BvE,EAAMO,KAAKzE,SAASxB,OAAOiG,KAAKxE,OAChCiE,EAAMO,KAAK3E,YAAYtB,OAAOiG,KAAKiE,UACnCxE,EAAMM,QAAQrC,YAAY,CAAC,cAAc,GACzC+B,EAAMM,QAAQlC,QAAQ0F,EAC1B,MACI9D,EAAMM,QAAQrC,YAAY,CAAC,eAAe,GAE9C+B,EAAMK,KAAKxF,MACf,CAEA4J,UAAAA,GACSzE,EAAMK,KAAKZ,iBACZO,EAAMM,QAAQxC,QACdkC,EAAMK,KAAKhB,OACXW,EAAMoD,iBAAgB,GAE9B,CAEA9D,IAAAA,GACIU,EAAMoD,iBAAgB,GAClBpD,EAAMK,KAAKZ,eACXO,EAAMK,KAAKd,QAEXS,EAAMK,KAAKf,MAEnB,E","sources":["webpack://@bang/www/./node_modules/crisp-sdk-web/dist/crisp.esm.js","webpack://@bang/www/./assets/controllers/support_controller.js"],"sourcesContent":["var CrispMessage = /** @class */ (function () {\n function CrispMessage(crisp) {\n this.parent = crisp;\n }\n CrispMessage.prototype.send = function (type, content) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"do\", \"message:send\", [type, content]]);\n };\n CrispMessage.prototype.sendText = function (content) {\n this.send(\"text\", content);\n };\n CrispMessage.prototype.sendFile = function (content) {\n this.send(\"file\", content);\n };\n CrispMessage.prototype.sendAnimation = function (content) {\n this.send(\"animation\", content);\n };\n CrispMessage.prototype.sendAudio = function (content) {\n this.send(\"audio\", content);\n };\n CrispMessage.prototype.show = function (type, content) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"do\", \"message:show\", [type, content]]);\n };\n CrispMessage.prototype.showText = function (content) {\n this.show(\"text\", content);\n };\n CrispMessage.prototype.showFile = function (content) {\n this.show(\"file\", content);\n };\n CrispMessage.prototype.showAnimation = function (content) {\n this.show(\"animation\", content);\n };\n CrispMessage.prototype.showAudio = function (content) {\n this.show(\"audio\", content);\n };\n CrispMessage.prototype.showPicker = function (content) {\n this.show(\"picker\", content);\n };\n CrispMessage.prototype.showField = function (content) {\n this.show(\"field\", content);\n };\n CrispMessage.prototype.showCarousel = function (content) {\n this.show(\"carousel\", content);\n };\n CrispMessage.prototype.markAsRead = function () {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"do\", \"message:read\"]);\n };\n CrispMessage.prototype.onMessageSent = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"message:sent\"]);\n window.$crisp.push([\"on\", \"message:sent\", callback]);\n };\n CrispMessage.prototype.onMessageReceived = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"message:received\"]);\n window.$crisp.push([\"on\", \"message:received\", callback]);\n };\n CrispMessage.prototype.onMessageComposeSent = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"message:compose:sent\"]);\n window.$crisp.push([\"on\", \"message:compose:sent\", callback]);\n };\n CrispMessage.prototype.onMessageComposeReceive = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"message:compose:received\"]);\n window.$crisp.push([\"on\", \"message:compose:received\", callback]);\n };\n return CrispMessage;\n}());\n\nvar CrispUser = /** @class */ (function () {\n function CrispUser(crisp) {\n this.parent = crisp;\n }\n CrispUser.prototype.setNickname = function (nickname) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"set\", \"user:nickname\", [nickname]]);\n };\n CrispUser.prototype.setEmail = function (email, hmac) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"set\", \"user:email\", [email, hmac]]);\n };\n CrispUser.prototype.setPhone = function (phone) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"set\", \"user:phone\", [phone]]);\n };\n CrispUser.prototype.setAvatar = function (avatar) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"set\", \"user:avatar\", [avatar]]);\n };\n CrispUser.prototype.setCompany = function (name, data) {\n var _payload = {};\n if (data && data.url) {\n _payload.url = data.url;\n }\n if (data && data.description) {\n _payload.description = data.description;\n }\n if (data && data.employment) {\n _payload.employment = [\n data.employment.title\n ];\n if (data.employment.role) {\n _payload.employment.push(data.employment.role);\n }\n }\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"set\", \"user:company\", [name, _payload]]);\n };\n CrispUser.prototype.getEmail = function () {\n if (!this.parent.isCrispInjected()) {\n return null;\n }\n return window.$crisp.get(\"user:email\");\n };\n CrispUser.prototype.getPhone = function () {\n if (!this.parent.isCrispInjected()) {\n return null;\n }\n return window.$crisp.get(\"user:phone\");\n };\n CrispUser.prototype.getNickname = function () {\n if (!this.parent.isCrispInjected()) {\n return null;\n }\n return window.$crisp.get(\"user:nickname\");\n };\n CrispUser.prototype.getAvatar = function () {\n if (!this.parent.isCrispInjected()) {\n return null;\n }\n return window.$crisp.get(\"user:avatar\");\n };\n CrispUser.prototype.getCompany = function () {\n if (!this.parent.isCrispInjected()) {\n return null;\n }\n return window.$crisp.get(\"user:company\");\n };\n CrispUser.prototype.onEmailChanged = function (callback) {\n if (this.parent.isCrispInjected()) {\n window.$crisp.push([\"off\", \"user:email:changed\"]);\n window.$crisp.push([\"on\", \"user:email:changed\", callback]);\n }\n };\n CrispUser.prototype.onPhoneChanged = function (callback) {\n if (this.parent.isCrispInjected()) {\n window.$crisp.push([\"off\", \"user:phone:changed\"]);\n window.$crisp.push([\"on\", \"user:phone:changed\", callback]);\n }\n };\n CrispUser.prototype.onNicknameChanged = function (callback) {\n if (this.parent.isCrispInjected()) {\n window.$crisp.push([\"off\", \"user:nickname:changed\"]);\n window.$crisp.push([\"on\", \"user:nickname:changed\", callback]);\n }\n };\n CrispUser.prototype.onAvatarChanged = function (callback) {\n if (this.parent.isCrispInjected()) {\n window.$crisp.push([\"off\", \"user:avatar:changed\"]);\n window.$crisp.push([\"on\", \"user:avatar:changed\", callback]);\n }\n };\n return CrispUser;\n}());\n\nvar CrispTrigger = /** @class */ (function () {\n function CrispTrigger(crisp) {\n this.parent = crisp;\n }\n CrispTrigger.prototype.run = function (name) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"do\", \"trigger:run\", [name]]);\n };\n return CrispTrigger;\n}());\n\nvar EventsColors;\n(function (EventsColors) {\n EventsColors[\"Red\"] = \"red\";\n EventsColors[\"Orange\"] = \"orange\";\n EventsColors[\"Yellow\"] = \"yellow\";\n EventsColors[\"Green\"] = \"green\";\n EventsColors[\"Blue\"] = \"blue\";\n EventsColors[\"Purple\"] = \"purple\";\n EventsColors[\"Pink\"] = \"pink\";\n EventsColors[\"Brown\"] = \"brown\";\n EventsColors[\"Grey\"] = \"grey\";\n EventsColors[\"Black\"] = \"black\";\n})(EventsColors || (EventsColors = {}));\nvar CrispSession = /** @class */ (function () {\n function CrispSession(crisp) {\n this.parent = crisp;\n }\n CrispSession.prototype.reset = function (reload) {\n if (reload === void 0) { reload = false; }\n if (this.parent.isCrispInjected()) {\n window.$crisp.do(\"session:reset\", [reload]);\n }\n };\n CrispSession.prototype.setSegments = function (segments, overwrite) {\n this.parent.createSingletonIfNecessary();\n $crisp.push([\"set\", \"session:segments\", [segments, overwrite]]);\n };\n CrispSession.prototype.setData = function (data) {\n var _this = this;\n var _payload = [];\n Object.entries(data).forEach(function (item) {\n if (_this.isValidDataValue(item[0])) {\n _payload.push([item[0], item[1]]);\n }\n });\n this.parent.createSingletonIfNecessary();\n $crisp.push([\"set\", \"session:data\", [_payload]]);\n };\n CrispSession.prototype.pushEvent = function (name, data, color) {\n if (data === void 0) { data = {}; }\n if (color === void 0) { color = EventsColors.Blue; }\n if (this.parent.isCrispInjected()) {\n window.$crisp.push([\"set\", \"session:event\", [[[name, data, color]]]]);\n }\n };\n CrispSession.prototype.getData = function (key) {\n if (!this.parent.isCrispInjected()) {\n return undefined;\n }\n return window.$crisp.get(\"session:data\", key);\n };\n CrispSession.prototype.getIdentifier = function () {\n if (!this.parent.isCrispInjected()) {\n return null;\n }\n return window.$crisp.get(\"session:identifier\");\n };\n CrispSession.prototype.onLoaded = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"session:loaded\"]);\n window.$crisp.push([\"on\", \"session:loaded\", callback]);\n };\n CrispSession.prototype.isValidDataValue = function (value) {\n return (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\");\n };\n return CrispSession;\n}());\n\nvar CrispChat = /** @class */ (function () {\n function CrispChat(crisp) {\n this.parent = crisp;\n }\n CrispChat.prototype.show = function () {\n this.parent.autoInjectIfNecessasy();\n window.$crisp.push([\"do\", \"chat:show\"]);\n };\n CrispChat.prototype.hide = function () {\n this.parent.autoInjectIfNecessasy();\n window.$crisp.push([\"do\", \"chat:hide\"]);\n };\n CrispChat.prototype.open = function () {\n this.parent.autoInjectIfNecessasy();\n window.$crisp.push([\"do\", \"chat:open\"]);\n };\n CrispChat.prototype.close = function () {\n if (this.parent.isCrispInjected()) {\n window.$crisp.push([\"do\", \"chat:close\"]);\n }\n };\n CrispChat.prototype.unreadCount = function () {\n if (!this.parent.isCrispInjected()) {\n return 0;\n }\n return window.$crisp.get(\"chat:unread:count\");\n };\n CrispChat.prototype.isChatOpened = function () {\n if (!this.parent.isCrispInjected()) {\n return false;\n }\n return window.$crisp.is(\"chat:opened\");\n };\n CrispChat.prototype.isVisible = function () {\n if (!this.parent.isCrispInjected()) {\n return false;\n }\n return window.$crisp.is(\"chat:visible\");\n };\n CrispChat.prototype.onChatInitiated = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"chat:initiated\"]);\n window.$crisp.push([\"on\", \"chat:initiated\", callback]);\n };\n CrispChat.prototype.onChatOpened = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"chat:opened\"]);\n window.$crisp.push([\"on\", \"chat:opened\", callback]);\n };\n CrispChat.prototype.onChatClose = function (callback) {\n this.parent.createSingletonIfNecessary();\n window.$crisp.push([\"off\", \"chat:closed\"]);\n window.$crisp.push([\"on\", \"chat:closed\", callback]);\n };\n return CrispChat;\n}());\n\nvar ChatboxColors;\n(function (ChatboxColors) {\n ChatboxColors[\"Default\"] = \"default\";\n ChatboxColors[\"Amber\"] = \"amber\";\n ChatboxColors[\"Black\"] = \"black\";\n ChatboxColors[\"Blue\"] = \"blue\";\n ChatboxColors[\"BlueGrey\"] = \"blue_grey\";\n ChatboxColors[\"LightBlue\"] = \"light_blue\";\n ChatboxColors[\"Brown\"] = \"brown\";\n ChatboxColors[\"Cyan\"] = \"cyan\";\n ChatboxColors[\"Green\"] = \"green\";\n ChatboxColors[\"LightGreen\"] = \"light_green\";\n ChatboxColors[\"Grey\"] = \"grey\";\n ChatboxColors[\"Indigo\"] = \"indigo\";\n ChatboxColors[\"Orange\"] = \"orange\";\n ChatboxColors[\"DeepOrange\"] = \"deep_orange\";\n ChatboxColors[\"Pink\"] = \"pink\";\n ChatboxColors[\"Purple\"] = \"purple\";\n ChatboxColors[\"DeepPurple\"] = \"deep_purple\";\n ChatboxColors[\"Red\"] = \"red\";\n ChatboxColors[\"Teal\"] = \"teal\";\n})(ChatboxColors || (ChatboxColors = {}));\nvar ChatboxPosition;\n(function (ChatboxPosition) {\n ChatboxPosition[\"Left\"] = \"left\";\n ChatboxPosition[\"Right\"] = \"right\";\n})(ChatboxPosition || (ChatboxPosition = {}));\nvar Crisp = /** @class */ (function () {\n function Crisp() {\n // Options\n this.clientUrl = \"https://client.crisp.chat/l.js\";\n this.websiteId = \"\";\n this.autoload = true;\n // States\n this.injected = false;\n this.chat = new CrispChat(this);\n this.session = new CrispSession(this);\n this.user = new CrispUser(this);\n this.message = new CrispMessage(this);\n this.trigger = new CrispTrigger(this);\n }\n Crisp.prototype.configure = function (websiteId, options) {\n if (options === void 0) { options = {}; }\n this.websiteId = websiteId;\n this.tokenId = options.tokenId;\n this.locale = options.locale;\n this.sessionMerge = options.sessionMerge;\n this.cookieDomain = options.cookieDomain;\n this.lockFullview = options.lockFullview;\n this.lockMaximized = options.lockMaximized;\n this.safeMode = options.safeMode;\n if (options.clientUrl !== undefined) {\n this.clientUrl = options.clientUrl;\n }\n if (options.autoload !== undefined) {\n this.autoload = options.autoload;\n }\n // Autoload Crisp is option is enavled\n if (this.autoload) {\n this.load();\n }\n };\n Crisp.prototype.load = function () {\n var _head = document.getElementsByTagName(\"head\");\n this.createSingletonIfNecessary();\n // Prevents from loading Crisp twice\n if (this.isCrispInjected() === true) {\n return;\n }\n if (!this.websiteId) {\n throw new Error(\"websiteId must be set before loading Crisp\");\n }\n window.CRISP_WEBSITE_ID = this.websiteId;\n window.CRISP_RUNTIME_CONFIG = {};\n if (this.tokenId) {\n window.CRISP_TOKEN_ID = this.tokenId;\n }\n if (this.sessionMerge) {\n window.CRISP_RUNTIME_CONFIG.session_merge = true;\n }\n if (this.locale) {\n window.CRISP_RUNTIME_CONFIG.locale = this.locale;\n }\n if (this.lockFullview) {\n window.CRISP_RUNTIME_CONFIG.lock_full_view = true;\n }\n if (this.lockMaximized) {\n window.CRISP_RUNTIME_CONFIG.lock_maximized = true;\n }\n if (this.cookieDomain) {\n window.CRISP_COOKIE_DOMAIN = this.cookieDomain;\n }\n if (this.cookieExpire) {\n window.CRISP_COOKIE_EXPIRE = this.cookieExpire;\n }\n if (!_head || !_head[0]) {\n return this.deferredLoading();\n }\n if (this.safeMode === true) {\n this.setSafeMode(true);\n }\n var _script = document.createElement(\"script\");\n _script.src = this.clientUrl;\n _script.async = true;\n _head[0].appendChild(_script);\n this.injected = true;\n };\n Crisp.prototype.setTokenId = function (tokenId) {\n this.tokenId = tokenId;\n // Refresh injected token?\n if (this.isCrispInjected() === true) {\n if (tokenId) {\n window.CRISP_TOKEN_ID = tokenId;\n }\n else {\n delete window.CRISP_TOKEN_ID;\n }\n }\n };\n Crisp.prototype.setZIndex = function (zIndex) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"container:index\", [zIndex]]);\n };\n Crisp.prototype.setColorTheme = function (color) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"color:theme\", [color]]);\n };\n Crisp.prototype.setHideOnAway = function (enabled) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"hide:on:away\", [enabled]]);\n };\n Crisp.prototype.setHideOnMobile = function (enabled) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"hide:on:mobile\", [enabled]]);\n };\n Crisp.prototype.setPosition = function (position) {\n this.createSingletonIfNecessary();\n $crisp.push([\"config\", \"position:reverse\", [position === ChatboxPosition.Left]]);\n };\n Crisp.prototype.setAvailabilityTooltip = function (enabled) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"availability:tooltip\", [enabled]]);\n };\n Crisp.prototype.setVacationMode = function (enabled) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"hide:vacation\", [enabled]]);\n };\n Crisp.prototype.setSafeMode = function (safe) {\n if (safe === void 0) { safe = true; }\n this.createSingletonIfNecessary();\n window.$crisp.push([\"safe\", safe]);\n };\n Crisp.prototype.muteSound = function (mute) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"sound:mute\", [mute]]);\n };\n Crisp.prototype.toggleOperatorCount = function (enabled) {\n this.createSingletonIfNecessary();\n window.$crisp.push([\"config\", \"show:operator:count\", [enabled]]);\n };\n Crisp.prototype.createSingletonIfNecessary = function () {\n // Assigns $crisp singleton\n if (window.$crisp === undefined) {\n window.$crisp = [];\n }\n };\n Crisp.prototype.autoInjectIfNecessasy = function () {\n if (this.isCrispInjected() !== true) {\n this.load();\n }\n };\n Crisp.prototype.isCrispInjected = function () {\n // Check if Crisp was injected (either from the Web SDK, or from another \\\n // source)\n if (this.injected === true || (window.$crisp && window.$crisp.is)) {\n return true;\n }\n return false;\n };\n Crisp.prototype.deferredLoading = function () {\n var _this = this;\n document.addEventListener(\"DOMContentLoaded\", function () {\n _this.load();\n });\n };\n return Crisp;\n}());\nvar singleton = new Crisp();\n\nexport { singleton as Crisp, Crisp as CrispClass };\n//# sourceMappingURL=crisp.esm.js.map\n","import {Controller} from '@hotwired/stimulus';\nimport {Crisp} from 'crisp-sdk-web';\n\n/* stimulusFetch: 'lazy' */\nexport default class extends Controller {\n connect() {\n Crisp.configure('2085c7f9-09bd-4e15-b93f-881c5640f648', {\n autoload: false,\n sessionMerge: true,\n });\n Crisp.setSafeMode(true);\n Crisp.setHideOnAway(false);\n Crisp.setAvailabilityTooltip(false);\n\n if (Object.keys(window.user).length > 0) {\n let sessionData = {\n customer_id: window.user.id,\n account_type: window.user.accountType.name,\n account_type_id: window.user.accountType.id,\n account_type_type: window.user.accountType.type,\n subscription_id: window.user.lastSubscriptionId ? window.user.lastSubscriptionId : 'none',\n };\n\n Crisp.setTokenId(window.user.token);\n Crisp.user.setEmail(window.user.email);\n Crisp.user.setNickname(window.user.username);\n Crisp.session.setSegments(['logged-in'], true);\n Crisp.session.setData(sessionData);\n } else {\n Crisp.session.setSegments(['logged-out'], true);\n }\n Crisp.chat.show();\n }\n\n disconnect() {\n if (!Crisp.chat.isChatOpened()) {\n Crisp.session.reset();\n Crisp.chat.hide();\n Crisp.setVacationMode(true);\n }\n }\n\n open() {\n Crisp.setVacationMode(false);\n if (Crisp.chat.isChatOpened()) {\n Crisp.chat.close();\n } else {\n Crisp.chat.open();\n }\n }\n}\n"],"names":["EventsColors","CrispMessage","crisp","this","parent","prototype","send","type","content","createSingletonIfNecessary","window","$crisp","push","sendText","sendFile","sendAnimation","sendAudio","show","showText","showFile","showAnimation","showAudio","showPicker","showField","showCarousel","markAsRead","onMessageSent","callback","onMessageReceived","onMessageComposeSent","onMessageComposeReceive","CrispUser","setNickname","nickname","setEmail","email","hmac","setPhone","phone","setAvatar","avatar","setCompany","name","data","_payload","url","description","employment","title","role","getEmail","isCrispInjected","get","getPhone","getNickname","getAvatar","getCompany","onEmailChanged","onPhoneChanged","onNicknameChanged","onAvatarChanged","CrispTrigger","run","ChatboxColors","ChatboxPosition","CrispSession","reset","reload","do","setSegments","segments","overwrite","setData","_this","Object","entries","forEach","item","isValidDataValue","pushEvent","color","Blue","getData","key","getIdentifier","onLoaded","value","CrispChat","autoInjectIfNecessasy","hide","open","close","unreadCount","isChatOpened","is","isVisible","onChatInitiated","onChatOpened","onChatClose","singleton","Crisp","clientUrl","websiteId","autoload","injected","chat","session","user","message","trigger","configure","options","tokenId","locale","sessionMerge","cookieDomain","lockFullview","lockMaximized","safeMode","undefined","load","_head","document","getElementsByTagName","Error","CRISP_WEBSITE_ID","CRISP_RUNTIME_CONFIG","CRISP_TOKEN_ID","session_merge","lock_full_view","lock_maximized","CRISP_COOKIE_DOMAIN","cookieExpire","CRISP_COOKIE_EXPIRE","deferredLoading","setSafeMode","_script","createElement","src","async","appendChild","setTokenId","setZIndex","zIndex","setColorTheme","setHideOnAway","enabled","setHideOnMobile","setPosition","position","Left","setAvailabilityTooltip","setVacationMode","safe","muteSound","mute","toggleOperatorCount","addEventListener","Controller","connect","keys","length","sessionData","customer_id","id","account_type","accountType","account_type_id","account_type_type","subscription_id","lastSubscriptionId","token","username","disconnect"],"sourceRoot":""}