{"version":3,"sources":["webpack:///../WCC.UI/App/helpers/page.js","webpack:///../WCC.UI/App/libraries/messenger.js","webpack:///../WCC.UI/App/shells/community.html?1616","webpack:///../WCC.UI/App/shells/community.ts","webpack:///../WCC.UI/App/shells/shell.html?b04e","webpack:///../WCC.UI/App/shells/shell.ts","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/shells/community.html","webpack:///../WCC.UI/App/shells/shell.html"],"names":["define","this","adjustPageMessages","$header","$","$container","$message","$push","messageHeight","outerHeight","css","prependTo","addClass","window","content","expose","__esModule","default","pageHelpers","require","components","preload","discussionId","communityId","settings","specialPageTypes","enums","CommunityPageType","NoAccess","value","TermsAndConditionsChangeSummary","CommunityShell","Shell","constructor","super","visiblePage","ko","observable","extend","notifyIfChanged","activePage","accessManager","storage","get","CommunityAccessManager","isProcessingAccess","pluck","m","busy","access","CommunityAccess","none","allPages","PublicCommunityPagesManager","includeContent","pages","masterPages","filter","page","type","Master","visiblePageStyles","p","styles","showVisibilePageStyles","isSystem","activeMasterPage","activeMasterContent","activeInstruction","pureComputed","router","effects","register","instruction","undefined","config","masterPage","find","id","masterPageId","mobileAppMaster","getMobileAppMaster","DOMHelpers","assignClassToNode","document","body","getView","checkIfUpdateAllowed","getRoutes","length","singlepage","getSinglePageRoutes","communityStandalonePageType","forbidden","twofactorauth","TwoFactorAuth","termsandconditions","getTermsRoutes","public","getRegularRoutes","membersonly","route","getInitialRoute","initialRoute","afterActivate","setupConfirmDialog","managers","discussionNotifications","subscribe","_","noop","afterCompositionComplete","defer","updateScrollr","$dialog","text","labels","Confirm","Yes","Cancel","skrollr","refresh","ex","isLoggedIn","contains","routes","CommunityPageAccess","LoggedInMembersOnly","NotLoggedIn","map","buildPageRoute","defaultPage","startUpOptions","CommunityPageStartUpOptions","IfLoggedIn","IfNotLoggedIn","Always","defaultRoutes","buildDefaultRoute","concat","mainType","secondaryPageTypes","mainPages","secondaryPages","includes","AlwaysVisible","url","title","name","moduleId","getPageModule","auth","isDefault","SignUp","LogIn","Activity","PasswordReset","AccountActivation","MemberProfile","Unsubscribe","Referral","CommunityMessage","masterName","URLBuilder","from","location","href","getQuery","_p$name","toLowerCase","scheduledRoute","activeRoutes","observableArray","isShellLoaded","isFirstPageLoaded","breadcrumbs","cookieConsentActive","getSetting","container","disposeContainer","createExtendedContainer","wccModules","storageContext","StorageContext","detached","unwrap","isRoutesUpdateRequired","isUpdatingRoutes","areRoutesReady","isRoutesUpdateAllowed","updateRequired","updateAllowed","updatingRoutes","shellLoaded","firstPageLoaded","isNavigating","isActiveRouteUpdateAllowed","ready","requestAnimationFrame","when","then","activate","console","log","reset","initRouter","hash","substr","navigate","setInitialRoute","beforeActivate","create","beforeCompositionComplete","on","onRouteNotFound","bind","onRouteProcessing","onCompositionComplete","onNavigationCancelled","getElementById","fragment","readOnly","Messenger","hideAll","scrollToTop","animate","scrollTop","system","SystemHelpers","html","getTemplatesAndResources","forEach","node","head","appendChild","module","exports"],"mappings":"oHAAAA,uBA2BC,KA3B0B,EAAF,WA0BrB,OAAO,IAzBP,WACeC,KAENC,mBAAqB,WACtB,IAAIC,EAAUC,EAAE,WACZC,EAAaD,EAAE,kBACfE,EAAWF,EAAE,iBAEbG,EAAQH,EAAE,cAEVI,EAAgBF,EAASG,cAEzBD,EAAgB,IAChBD,EAAMG,IAAI,CAAE,OAAUF,IACtBD,EAAMI,UAAUR,GAEhBE,EAAWO,SAAS,gBAEpBP,EAAWK,IAAI,CACX,cAAeF,EAAgB,WAOlD,QA3BsB,OA2BtB,e,kIC3BD,6NAKeK,WAAgB,W,sDCL/B,UAAO,CACC,yFACA,wDAIC,KAJsC,EAAF,SAAYC,EAASC,GAGtD,OADAA,EADAD,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,GAE1CA,GACV,4B,0jBCKT,MAAMI,EAAcC,EAAQ,iCAE5BC,EAAWC,QAAQ,gBAAiB,uBAAwB,iBAE5D,MAAM,aAAEC,EAAcA,aAAcC,GAAgB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,SAASqJ,KAAKC,YAAYF,QAEhE,+B,oGCJDG,EAAOC,QAFI,qnB,gGCEXD,EAAOC,QAFI","file":"204.4ce22cbec7544e57b044.js","sourcesContent":["define('helpers/page', [], function () {\r\n function Model() {\r\n var self = this;\r\n\r\n self.adjustPageMessages = function () {\r\n var $header = $(\"#header\"),\r\n $container = $(\".mainContainer\"),\r\n $message = $(\"#page-message\");\r\n\r\n var $push = $(\"
\");\r\n\r\n var messageHeight = $message.outerHeight();\r\n\r\n if (messageHeight > 0) {\r\n $push.css({ 'height': messageHeight });\r\n $push.prependTo($header);\r\n\r\n $container.addClass('with-message');\r\n\r\n $container.css({\r\n 'margin-top': -messageHeight + 'px'\r\n });\r\n }\r\n }\r\n }\r\n\r\n return new Model();\r\n})","import 'messenger-hubspot/build/js/messenger';\r\n\r\nimport 'messenger-hubspot/build/css/messenger.css';\r\nimport 'messenger-hubspot/build/css/messenger-theme-future.css';\r\n\r\nexport default window.Messenger;","define([\n \"!!../../node_modules/html-loader/dist/cjs.js??ref--26-1!./community.html\", \n \"!../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","import CommunityAccess from 'enums/community/access';\r\nimport { DOMHelpers } from 'helpers/dom';\r\nimport { Subscribable } from 'knockout';\r\nimport CommunityAccessManager from 'managers/community/access';\r\nimport PublicCommunityPagesManager from 'managers/community/pages/public';\r\nimport { instance as managers } from 'managers/context';\r\nimport CommunityPage from 'models/community/page';\r\nimport router from 'plugins/router';\r\nimport URLBuilder from '../builders/url';\r\nimport Shell from './shell';\r\n\r\nconst pageHelpers = require('helpers/page');\r\n\r\ncomponents.preload('master-viewer', 'community-navigation', 'task-activity');\r\n\r\nconst { discussionId, discussionId: communityId } = settings;\r\n\r\nconst specialPageTypes = [\r\n enums.CommunityPageType.NoAccess.value,\r\n enums.CommunityPageType.TermsAndConditionsChangeSummary.value,\r\n // the reason for removing this from special page types is it was not handled anywhere specifically. And it is now a loggedin members option to route to\r\n //enums.CommunityPageType.Unsubscribe.value \r\n]\r\n\r\nexport default class CommunityShell extends Shell {\r\n private visiblePage = ko.observable().extend({ notifyIfChanged: true });\r\n\r\n private pages: Subscribable>\r\n private access: Subscribable\r\n\r\n private isProcessingAccess: Subscribable\r\n\r\n activePage = ko.observable().extend({ notifyIfChanged: true }); //used in pageView page\r\n\r\n visiblePageStyles: Subscribable\r\n activeMasterContent: Subscribable\r\n\r\n showVisibilePageStyles: Subscribable\r\n\r\n constructor() {\r\n super();\r\n\r\n const accessManager = this.storage.get(CommunityAccessManager, { communityId });\r\n this.isProcessingAccess = accessManager.pluck(m => m.busy, true);\r\n this.access = accessManager.pluck(m => m.access, CommunityAccess.none);\r\n\r\n const pagesManager = this.storage.get(PublicCommunityPagesManager, { includeContent: true });\r\n const allPages = pagesManager.pluck(m => m.pages, []);\r\n const masterPages = allPages.filter(page => page.type() == enums.CommunityPageType.Master.value);\r\n this.pages = allPages.filter(page => page.type() != enums.CommunityPageType.Master.value);\r\n\r\n this.visiblePageStyles = this.visiblePage.pluck(p => p.styles, '');\r\n this.showVisibilePageStyles = this.visiblePage.pluck(p => p.isSystem, false);\r\n\r\n const activeMasterPage = ko.observable().extend({ notifyIfChanged: true });\r\n this.activeMasterContent = activeMasterPage.pluck(p => p.content, '');\r\n\r\n const activeInstruction = ko.pureComputed(() => router.activeInstruction());\r\n\r\n this.effects.register((instruction, masterPages) => {\r\n if (instruction != undefined) {\r\n const page = instruction.config.page;\r\n let masterPage = masterPages.find(p => p.id() == page.masterPageId());\r\n\r\n const mobileAppMaster = this.getMobileAppMaster(masterPages);\r\n if (mobileAppMaster != undefined) masterPage = mobileAppMaster;\r\n\r\n activeMasterPage(masterPage);\r\n this.activePage(page);\r\n }\r\n }, [activeInstruction, masterPages]);\r\n\r\n this.effects.register([\r\n DOMHelpers.assignClassToNode(document.body, 'community-layout')\r\n ]);\r\n }\r\n\r\n override getView() {\r\n return require('./community.html');\r\n }\r\n\r\n protected override checkIfUpdateAllowed() {\r\n return !this.isProcessingAccess();\r\n }\r\n\r\n protected getRoutes() {\r\n const routes = ko.pureComputed(() => {\r\n if (this.pages().length > 0) {\r\n switch (this.access()) {\r\n case CommunityAccess.singlepage:\r\n return this.getSinglePageRoutes(settings.communityStandalonePageType);\r\n case CommunityAccess.forbidden:\r\n return this.getSinglePageRoutes(enums.CommunityPageType.NoAccess.value);\r\n case CommunityAccess.twofactorauth:\r\n return this.getSinglePageRoutes(enums.CommunityPageType.TwoFactorAuth.value);\r\n case CommunityAccess.termsandconditions:\r\n return this.getTermsRoutes();\r\n case CommunityAccess.public:\r\n return this.getRegularRoutes(false);\r\n case CommunityAccess.membersonly:\r\n return this.getRegularRoutes(true);\r\n }\r\n }\r\n\r\n return [];\r\n });\r\n\r\n return routes.filter(config => config.route != undefined);\r\n }\r\n\r\n protected override getInitialRoute() {\r\n return settings.initialRoute;\r\n }\r\n\r\n protected override afterActivate() {\r\n super.afterActivate();\r\n\r\n pageHelpers.adjustPageMessages();\r\n this.setupConfirmDialog();\r\n managers.discussionNotifications(discussionId).subscribe(_.noop);\r\n }\r\n\r\n protected override afterCompositionComplete() {\r\n super.afterCompositionComplete();\r\n\r\n this.visiblePage(this.activePage());\r\n\r\n _.defer(() => this.updateScrollr());\r\n }\r\n\r\n private setupConfirmDialog() {\r\n var $dialog = $('#wcc-confirm-dialog');\r\n\r\n $dialog.find('#wcc-confirm-dialog-heading').text(labels.Confirm);\r\n $dialog.find('#wcc-confirm-dialog-button-yes').text(labels.Yes);\r\n $dialog.find('#wcc-confirm-dialog-button-no').text(labels.Cancel);\r\n }\r\n\r\n private updateScrollr() {\r\n try {\r\n skrollr.get().refresh();\r\n } catch (ex) { }\r\n }\r\n\r\n private getRegularRoutes(isLoggedIn: boolean) {\r\n const pages = this.pages().filter(page => !_(specialPageTypes).contains(page.type()));\r\n\r\n const routes = pages\r\n .filter(page => page.access() != enums.CommunityPageAccess.LoggedInMembersOnly.value || isLoggedIn)\r\n .filter(page => page.access() != enums.CommunityPageAccess.NotLoggedIn.value || !isLoggedIn)\r\n .map(page => this.buildPageRoute(page));\r\n\r\n let defaultPage = pages.find(page => page.startUpOptions() == enums.CommunityPageStartUpOptions.IfLoggedIn.value && isLoggedIn ||\r\n page.startUpOptions() == enums.CommunityPageStartUpOptions.IfNotLoggedIn.value && !isLoggedIn);\r\n\r\n if (defaultPage == undefined)\r\n defaultPage = pages.find(page => page.startUpOptions() == enums.CommunityPageStartUpOptions.Always.value);\r\n\r\n var defaultRoutes = [defaultPage]\r\n .filter(page => page != undefined)\r\n .map(page => this.buildDefaultRoute(page));\r\n\r\n return routes.concat(defaultRoutes);\r\n }\r\n\r\n private getSinglePageRoutes(mainType: number, secondaryPageTypes: Array = []) {\r\n const mainPages = this.pages().filter(page => page.type() == mainType);\r\n const secondaryPages = this.pages().filter(page => secondaryPageTypes.includes(page.type()));\r\n\r\n const routes = mainPages.concat(secondaryPages).map(page => this.buildPageRoute(page));\r\n const defaultRoutes = mainPages.map(page => this.buildDefaultRoute(page));\r\n\r\n return routes.concat(defaultRoutes);\r\n }\r\n\r\n private getTermsRoutes() {\r\n const mainPages = this.pages().filter(page => page.type() == enums.CommunityPageType.TermsAndConditionsChangeSummary.value);\r\n\r\n const secondaryPages = this.pages()\r\n .filter(page => !specialPageTypes.includes(page.type()))\r\n .filter(page => page.access() == enums.CommunityPageAccess.AlwaysVisible.value);\r\n\r\n const routes = mainPages.concat(secondaryPages).map(page => this.buildPageRoute(page));\r\n const defaultRoutes = mainPages.map(page => this.buildDefaultRoute(page));\r\n\r\n return routes.concat(defaultRoutes);\r\n }\r\n\r\n private buildPageRoute(page: CommunityPage) {\r\n return {\r\n route: page.url(),\r\n title: page.name(),\r\n moduleId: () => this.getPageModule(page),\r\n auth: page.access() == enums.CommunityPageAccess.LoggedInMembersOnly.value,\r\n page: page\r\n }\r\n }\r\n\r\n private buildDefaultRoute(page: CommunityPage) {\r\n return {\r\n route: '',\r\n title: page.name(),\r\n moduleId: () => this.getPageModule(page),\r\n auth: page.access() == enums.CommunityPageAccess.LoggedInMembersOnly.value,\r\n page: page,\r\n isDefault: true\r\n }\r\n }\r\n\r\n private getPageModule(page: CommunityPage) {\r\n switch (page.type()) {\r\n case enums.CommunityPageType.SignUp.value: return import('pages/community/signup/page');\r\n case enums.CommunityPageType.LogIn.value: return import('pages/community/login/page');\r\n case enums.CommunityPageType.Activity.value: return import('pages/community/activity/page');\r\n case enums.CommunityPageType.PasswordReset.value: return import('pages/community/password/reset/page');\r\n case enums.CommunityPageType.AccountActivation.value: return import('pages/community/password/reset/page');\r\n case enums.CommunityPageType.MemberProfile.value: return import('pages/community/profileforms/profileFormsPage');\r\n case enums.CommunityPageType.NoAccess.value: return import('pages/community/noaccess/page');\r\n case enums.CommunityPageType.TermsAndConditionsChangeSummary.value: return import('pages/community/termsChangeSummary/page');\r\n case enums.CommunityPageType.Unsubscribe.value: return import('pages/unsubscribe/page');\r\n case enums.CommunityPageType.TwoFactorAuth.value: return import('pages/account/twofactorauth/page');\r\n case enums.CommunityPageType.Referral.value: return import('pages/community/referral/page');\r\n case enums.CommunityPageType.CommunityMessage.value: return import('pages/community/discussion/message/communityDiscussionMessage');\r\n\r\n default: return import('pages/community/pageView/page');\r\n }\r\n }\r\n\r\n private getMobileAppMaster(masterPages: CommunityPage[]) {\r\n const url = URLBuilder.from(location.href);\r\n var masterName = url.getQuery('master');\r\n \r\n return masterPages.find(p => p.name()?.toLowerCase() == masterName?.toLowerCase()); \r\n }\r\n}","define([\n \"!!../../node_modules/html-loader/dist/cjs.js??ref--26-1!./shell.html\", \n \"!../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","import { wccModules } from 'enums/wccModules';\r\nimport { Container } from 'inversify';\r\nimport { Subscribable } from 'knockout';\r\nimport Messenger from 'libraries/messenger';\r\nimport { IWCCStorageManager } from 'managers/iStorage';\r\nimport { EffectsContainer } from 'mixins/withEffects';\r\nimport { StorageContext } from 'models/storage/context';\r\nimport router from 'plugins/router';\r\nimport { createExtendedContainer } from '../configuration/inversify/container/extended';\r\nimport { getSetting } from '../helpers/settings';\r\n\r\nexport default abstract class Shell {\r\n private scheduledRoute = ko.observable();\r\n private activeRoutes = ko.observableArray();\r\n\r\n private isShellLoaded = ko.observable(false);\r\n private isFirstPageLoaded = ko.observable(false);\r\n\r\n private storageContext: StorageContext;\r\n private routes: Subscribable>\r\n \r\n private isActiveRouteUpdateAllowed: Subscribable\r\n\r\n protected container: Container\r\n protected storage: IWCCStorageManager\r\n protected effects: EffectsContainer\r\n\r\n css = '';\r\n breadcrumbs = ko.observableArray();\r\n\r\n ready: Subscribable\r\n\r\n detached: Action\r\n\r\n cookieConsentActive = ko.pureComputed(() => getSetting('CookieConsentVersion2'));\r\n\r\n constructor() {\r\n const [container, disposeContainer] = createExtendedContainer();\r\n\r\n this.container = container;\r\n this.storage = this.container.get(wccModules.storage);\r\n this.effects = container.get(wccModules.effects);\r\n this.storageContext = this.effects.register(new StorageContext());\r\n\r\n this.detached = disposeContainer;\r\n\r\n this.routes = ko.pureComputed(() => this.getRoutes()).unwrap();\r\n \r\n const isRoutesUpdateRequired = ko.observable(true);\r\n const isUpdatingRoutes = ko.observable(false);\r\n const areRoutesReady = ko.observable(false); \r\n\r\n const isRoutesUpdateAllowed = ko.pureComputed(() => {\r\n const routes = this.routes();\r\n const updateRequired = isRoutesUpdateRequired();\r\n const updateAllowed = this.checkIfUpdateAllowed();\r\n const updatingRoutes = isUpdatingRoutes();\r\n const shellLoaded = this.isShellLoaded();\r\n const firstPageLoaded = this.isFirstPageLoaded();\r\n const isNavigating = router.isNavigating();\r\n\r\n return updateRequired &&\r\n updateAllowed &&\r\n !updatingRoutes &&\r\n (!shellLoaded || firstPageLoaded) &&\r\n !isNavigating &&\r\n routes.length > 0;\r\n });\r\n\r\n this.isActiveRouteUpdateAllowed = ko.pureComputed(() => {\r\n const activeRoutes = this.activeRoutes();\r\n const updatingRoutes = isUpdatingRoutes();\r\n const updateRequired = isRoutesUpdateRequired();\r\n const updateAllowed = this.checkIfUpdateAllowed();\r\n const isNavigating = router.isNavigating();\r\n\r\n return updateAllowed &&\r\n activeRoutes.length > 0 &&\r\n !updatingRoutes &&\r\n !updateRequired &&\r\n !isNavigating;\r\n });\r\n\r\n this.ready = ko.pureComputed(() => areRoutesReady());\r\n\r\n requestAnimationFrame(() => {\r\n this.ready.when().then(() => router.activate());\r\n\r\n this.effects.register([\r\n this.routes.subscribe(() => isRoutesUpdateRequired(true)),\r\n this.activeRoutes.subscribe(routes => console.log('Active Routes', routes))\r\n ]);\r\n\r\n this.effects.register(updateAllowed => {\r\n if (updateAllowed) {\r\n isUpdatingRoutes(true);\r\n isRoutesUpdateRequired(false);\r\n\r\n const routes = this.routes();\r\n\r\n router.reset();\r\n this.initRouter();\r\n\r\n if (areRoutesReady() && this.scheduledRoute() == undefined)\r\n this.scheduledRoute(location.hash.substr(1));\r\n\r\n if (routes.length > 0) {\r\n router.map(routes);\r\n areRoutesReady(true);\r\n }\r\n\r\n this.activeRoutes(routes);\r\n isUpdatingRoutes(false);\r\n }\r\n }, [isRoutesUpdateAllowed]);\r\n\r\n this.effects.register((route, updateAllowed) => {\r\n if (route && updateAllowed) {\r\n this.scheduledRoute(undefined);\r\n router.navigate(route);\r\n }\r\n }, [this.scheduledRoute, this.isActiveRouteUpdateAllowed]); \r\n\r\n this.setInitialRoute(); \r\n });\r\n }\r\n\r\n getView() {\r\n return require('./shell.html');\r\n }\r\n\r\n activate() {\r\n this.beforeActivate();\r\n this.storageContext.create('shell').from(this);\r\n this.afterActivate();\r\n }\r\n\r\n protected checkIfUpdateAllowed(): boolean {\r\n return true;\r\n }\r\n\r\n protected abstract getRoutes(): Subscribable>\r\n\r\n protected getInitialRoute(): string | undefined {\r\n return undefined;\r\n }\r\n\r\n protected beforeActivate() { }\r\n protected afterActivate() { }\r\n\r\n protected beforeCompositionComplete() { }\r\n protected afterCompositionComplete() { }\r\n\r\n private setInitialRoute() {\r\n const initialRoute = this.getInitialRoute();\r\n\r\n if (initialRoute)\r\n location.hash = initialRoute;\r\n }\r\n\r\n private initRouter() {\r\n router.on('router:route:not-found', this.onRouteNotFound.bind(this));\r\n router.on('router:navigation:processing', this.onRouteProcessing.bind(this));\r\n router.on('router:navigation:composition-complete', this.onCompositionComplete.bind(this));\r\n router.on('router:navigation:cancelled', this.onNavigationCancelled.bind(this));\r\n }\r\n\r\n private onRouteNotFound(url: string) {\r\n if (!this.isActiveRouteUpdateAllowed()) {\r\n this.scheduledRoute(url);\r\n } else if (this.activeRoutes().length > 0 && document.getElementById(url) == undefined) {\r\n router.navigate('');\r\n }\r\n }\r\n\r\n private onRouteProcessing(instruction: any, router: any) {\r\n console.log('activating route', instruction);\r\n\r\n if (!this.isActiveRouteUpdateAllowed() && router.activeInstruction() !== instruction)\r\n this.scheduledRoute(instruction.fragment);\r\n\r\n this.storageContext.readOnly(true);\r\n Messenger().hideAll();\r\n }\r\n\r\n private onCompositionComplete() {\r\n this.beforeCompositionComplete();\r\n\r\n if (!this.isShellLoaded())\r\n this.isShellLoaded(true);\r\n else if (!this.isFirstPageLoaded())\r\n this.isFirstPageLoaded(true);\r\n\r\n this.storageContext.readOnly(false);\r\n this.scrollToTop();\r\n\r\n this.afterCompositionComplete();\r\n }\r\n\r\n private onNavigationCancelled() {\r\n this.storageContext.readOnly(false)\r\n }\r\n\r\n private scrollToTop() {\r\n $('html, body').animate({ scrollTop: 0 });\r\n }\r\n}","define(function () {\r\n const system = require('helpers/system').SystemHelpers;\r\n\r\n return function (html) {\r\n system.getTemplatesAndResources(html)\r\n .forEach(function (node) { document.head.appendChild(node) });\r\n }\r\n});","// Module\nvar code = \"
\\r\\n \\r\\n \\r\\n \\r\\n\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n \\r\\n
\";\n// Exports\nmodule.exports = code;","// Module\nvar code = \"
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n\\r\\n \\r\\n \\r\\n \\r\\n
\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}