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CK,EAAOD,OACf,E,QCLA,SAASG,IAEPC,SAASC,iBAAiB,yBAAyBC,SAAQ,SAACC,GAC1DA,EAAQC,QAAU,SAAUC,GAC1BA,EAAEC,iBAEF,IAAMC,EAASP,SAASQ,cAAcC,KAAKC,aAAa,gBAKxD,OAJIH,GA2CV,SAAmBI,GACjBA,EAAMC,MAAMC,QAAU,QACtBF,EAAMG,UAAUC,IAAI,QACpBf,SAASgB,KAAKF,UAAUC,IAAI,cAG5B,IAAME,EAAWjB,SAASkB,cAAc,OACxCD,EAASH,UAAUC,IAAI,iBAAkB,OAAQ,QACjDf,SAASgB,KAAKG,YAAYF,EAC5B,CAnDQG,CAAUb,IAGL,CACT,CACF,IAGAP,SAASC,iBAAiB,0BAA0BC,SAAQ,SAACmB,GAC3DA,EAASjB,QAAU,SAAUC,GAC3BA,EAAEC,iBAEF,IAAMK,EAAQF,KAAKa,QAAQ,UAK3B,OAJIX,GACFY,EAAUZ,IAGL,CACT,CACF,IAGAX,SAASwB,iBAAiB,WAAW,SAACnB,GACpC,GAAc,WAAVA,EAAEoB,IAAkB,CACtB,IAAMd,EAAQX,SAASQ,cAAc,eACjCG,GACFY,EAAUZ,EAEd,CACF,IAGAX,SAASwB,iBAAiB,SAAS,SAACnB,GAEhCA,EAAEE,OAAOO,UAAUY,SAAS,UAC5BrB,EAAEE,OAAOO,UAAUY,SAAS,SAE5BH,EAAUlB,EAAEE,OAEhB,GACF,CAaA,SAASgB,EAAUZ,GACjBA,EAAMC,MAAMC,QAAU,OACtBF,EAAMG,UAAUa,OAAO,QACvB3B,SAASgB,KAAKF,UAAUa,OAAO,cAG/B,IAAMV,EAAWjB,SAASQ,cAAc,mBACpCS,GACFA,EAASU,QAEb,CA7EA1E,QAAQC,IAAI,8BAGZ8C,SAASwB,iBAAiB,kBAAmBzB,GAC7CC,SAASwB,iBAAiB,mBAAoBzB,E","sources":["webpack:///./app/javascript/packs/shared/sentryInit.js","webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/application.js"],"sourcesContent":["// Initialize Sentry using the global object from CDN\nconsole.log('sentryInit is being loaded');\n\nconst initSentry = () => {\n // Skip Sentry initialization in development\n if (process.env.NODE_ENV === 'development') {\n console.log('Sentry disabled in development mode');\n return createFallbackSentry();\n }\n\n if (window.Sentry) {\n try {\n window.Sentry.init({\n dsn: 'https://54d6d7b096f00b9106b8e59c89790830@o4508881495916544.ingest.us.sentry.io/4508881500766208',\n environment: process.env.NODE_ENV || 'development',\n replaysSessionSampleRate: 1.0,\n replaysOnErrorSampleRate: 1.0,\n integrations: [\n ...(window.Sentry.Replay\n ? [\n new window.Sentry.Replay({\n maskAllText: false,\n maskAllInputs: false,\n blockAllMedia: false,\n stickySession: true,\n minReplayDuration: 1000,\n slowMotionThreshold: 1000,\n dataUrlSizeLimit: 20000,\n errorSampleRate: 1.0,\n }),\n ]\n : []),\n ],\n tracesSampleRate: 0.5,\n });\n\n // Set user context if available\n if (window.currentUser) {\n window.Sentry.setUser({\n id: window.currentUser.id,\n email: window.currentUser.email,\n role: window.currentUser.role,\n });\n\n console.log('Sentry user context set');\n }\n\n console.log('Sentry initialized via CDN');\n return window.Sentry;\n } catch (error) {\n console.error('Error initializing Sentry:', error);\n return createFallbackSentry();\n }\n }\n console.warn('Sentry CDN not loaded');\n return createFallbackSentry();\n};\n\n// Create a fallback Sentry object that won't throw errors\nconst createFallbackSentry = () => ({\n captureException: (error) => console.error('Sentry fallback:', error),\n captureMessage: (message) => console.log('Sentry fallback:', message),\n addBreadcrumb: (breadcrumb) =>\n console.log('Sentry fallback breadcrumb:', breadcrumb),\n setTag: () => {},\n setUser: () => {},\n setExtra: () => {},\n init: () => {},\n});\n\nconst Sentry = initSentry();\n\nexport default Sentry;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\nimport './shared/sentryInit';\n\nconsole.log('Hello World from Webpacker');\n\n// Simple fix for Bootstrap modals\ndocument.addEventListener('turbolinks:load', initializeModals);\ndocument.addEventListener('DOMContentLoaded', initializeModals);\n\nfunction initializeModals() {\n // Modal triggers\n document.querySelectorAll('[data-toggle=\"modal\"]').forEach((trigger) => {\n trigger.onclick = function (e) {\n e.preventDefault();\n\n const target = document.querySelector(this.getAttribute('data-target'));\n if (target) {\n showModal(target);\n }\n\n return false;\n };\n });\n\n // Close buttons\n document.querySelectorAll('[data-dismiss=\"modal\"]').forEach((closeBtn) => {\n closeBtn.onclick = function (e) {\n e.preventDefault();\n\n const modal = this.closest('.modal');\n if (modal) {\n hideModal(modal);\n }\n\n return false;\n };\n });\n\n // ESC key close\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n const modal = document.querySelector('.modal.show');\n if (modal) {\n hideModal(modal);\n }\n }\n });\n\n // Click outside modal\n document.addEventListener('click', (e) => {\n if (\n e.target.classList.contains('modal') &&\n e.target.classList.contains('show')\n ) {\n hideModal(e.target);\n }\n });\n}\n\nfunction showModal(modal) {\n modal.style.display = 'block';\n modal.classList.add('show');\n document.body.classList.add('modal-open');\n\n // Add backdrop\n const backdrop = document.createElement('div');\n backdrop.classList.add('modal-backdrop', 'fade', 'show');\n document.body.appendChild(backdrop);\n}\n\nfunction hideModal(modal) {\n modal.style.display = 'none';\n modal.classList.remove('show');\n document.body.classList.remove('modal-open');\n\n // Remove backdrop\n const backdrop = document.querySelector('.modal-backdrop');\n if (backdrop) {\n backdrop.remove();\n }\n}\n"],"names":["console","log","createFallbackSentry","captureException","error","captureMessage","message","addBreadcrumb","breadcrumb","setTag","setUser","setExtra","init","window","Sentry","dsn","environment","process","replaysSessionSampleRate","replaysOnErrorSampleRate","integrations","_toConsumableArray","Replay","maskAllText","maskAllInputs","blockAllMedia","stickySession","minReplayDuration","slowMotionThreshold","dataUrlSizeLimit","errorSampleRate","tracesSampleRate","currentUser","id","email","role","warn","initSentry","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","initializeModals","document","querySelectorAll","forEach","trigger","onclick","e","preventDefault","target","querySelector","this","getAttribute","modal","style","display","classList","add","body","backdrop","createElement","appendChild","showModal","closeBtn","closest","hideModal","addEventListener","key","contains","remove"],"sourceRoot":""}