@profoundlogic/coderflow-server 0.6.8 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/coder-server.js +1 -1
  2. package/dist/config.js +1 -1
  3. package/dist/lib/agent-keepalive.js +1 -1
  4. package/dist/lib/agent-models.js +1 -1
  5. package/dist/lib/api-keys.js +1 -1
  6. package/dist/lib/apiKeys.js +1 -1
  7. package/dist/lib/app-server-ports.js +1 -1
  8. package/dist/lib/auto-judge.js +1 -1
  9. package/dist/lib/automation-service.js +1 -1
  10. package/dist/lib/basic-auth.js +1 -1
  11. package/dist/lib/bindings.js +1 -1
  12. package/dist/lib/build-history.js +1 -1
  13. package/dist/lib/build-output-service.js +1 -1
  14. package/dist/lib/build-scheduler.js +1 -1
  15. package/dist/lib/build-service.js +1 -1
  16. package/dist/lib/ca-certificates.js +1 -1
  17. package/dist/lib/claude-oauth-refresh.js +1 -1
  18. package/dist/lib/cli/build.js +1 -1
  19. package/dist/lib/cli/cleanup-users.js +1 -1
  20. package/dist/lib/cli/config-command.js +1 -1
  21. package/dist/lib/cli/config.js +1 -1
  22. package/dist/lib/cli/create-user.js +1 -1
  23. package/dist/lib/cli/grant-admin.js +1 -1
  24. package/dist/lib/cli/init.js +1 -1
  25. package/dist/lib/cli/jira.js +1 -1
  26. package/dist/lib/cli/license.js +1 -1
  27. package/dist/lib/cli/list-roles.js +1 -1
  28. package/dist/lib/cli/list-users.js +1 -1
  29. package/dist/lib/cli/server-manager.js +1 -1
  30. package/dist/lib/cli/set-password.js +1 -1
  31. package/dist/lib/config-migration.js +1 -1
  32. package/dist/lib/container-credential-sync.js +1 -1
  33. package/dist/lib/container-tokens.js +1 -1
  34. package/dist/lib/data-dir.js +1 -1
  35. package/dist/lib/deployment-history.js +1 -1
  36. package/dist/lib/deployment-service.js +1 -1
  37. package/dist/lib/docker-utils.js +1 -1
  38. package/dist/lib/email.js +1 -1
  39. package/dist/lib/emailTemplates.js +1 -1
  40. package/dist/lib/entitlement.js +1 -1
  41. package/dist/lib/external-connections.js +1 -1
  42. package/dist/lib/fetch-utils.js +1 -1
  43. package/dist/lib/git-commit-details-route.js +1 -1
  44. package/dist/lib/git-history-diff-guardrails.js +1 -1
  45. package/dist/lib/git-provider-service.js +1 -1
  46. package/dist/lib/git-provider-setup/github-setup-handler.js +1 -1
  47. package/dist/lib/git-provider-setup/index.js +1 -1
  48. package/dist/lib/git-provider-setup/setup-factory.js +1 -1
  49. package/dist/lib/git-provider-setup/setup-interface.js +1 -1
  50. package/dist/lib/git-providers/azure-devops-provider.js +1 -1
  51. package/dist/lib/git-providers/github-app-provider.js +1 -1
  52. package/dist/lib/git-providers/index.js +1 -1
  53. package/dist/lib/git-providers/provider-factory.js +1 -1
  54. package/dist/lib/git-providers/provider-interface.js +1 -1
  55. package/dist/lib/github-urls.js +1 -1
  56. package/dist/lib/group-objective-linking.js +1 -1
  57. package/dist/lib/ibmi-sync.js +1 -1
  58. package/dist/lib/jira-client.js +1 -1
  59. package/dist/lib/judge-blinding.js +1 -1
  60. package/dist/lib/logger.js +1 -1
  61. package/dist/lib/migration-to-scoped-rbac.js +1 -1
  62. package/dist/lib/model-fetcher.js +1 -1
  63. package/dist/lib/notifications.js +1 -1
  64. package/dist/lib/objective-context.js +1 -1
  65. package/dist/lib/oidc-auth.js +1 -1
  66. package/dist/lib/oidc-device-flow.js +1 -1
  67. package/dist/lib/passwordTokens.js +1 -1
  68. package/dist/lib/permission-resolver.js +1 -1
  69. package/dist/lib/pin-cascade.js +1 -1
  70. package/dist/lib/provider-accounts.js +1 -1
  71. package/dist/lib/provider-oauth.js +1 -1
  72. package/dist/lib/provider-profile.js +1 -1
  73. package/dist/lib/provider-token-refresh.js +1 -1
  74. package/dist/lib/rbac-user-state.js +1 -1
  75. package/dist/lib/request-url.js +1 -1
  76. package/dist/lib/rewind.js +1 -1
  77. package/dist/lib/role-definitions.js +1 -1
  78. package/dist/lib/roles.js +1 -1
  79. package/dist/lib/secrets.js +1 -1
  80. package/dist/lib/setup-repo-git-auth.js +1 -1
  81. package/dist/lib/state-capture.js +1 -1
  82. package/dist/lib/static-files.js +1 -1
  83. package/dist/lib/task-aliases.js +1 -1
  84. package/dist/lib/task-name-format.js +1 -1
  85. package/dist/lib/task-name-generator.js +1 -1
  86. package/dist/lib/task-source-metadata.js +1 -1
  87. package/dist/lib/teams.js +1 -1
  88. package/dist/lib/user-git-oauth.js +1 -1
  89. package/dist/lib/user-git-tokens.js +1 -1
  90. package/dist/lib/users.js +1 -1
  91. package/dist/middleware/requireAuth.js +1 -1
  92. package/dist/middleware/requireInit.js +1 -1
  93. package/dist/middleware/requirePermission.js +1 -1
  94. package/dist/package.json +1 -1
  95. package/dist/playwright.config.js +1 -1
  96. package/dist/playwright.task-terminal.config.js +1 -1
  97. package/dist/routes/apiKeys.js +1 -1
  98. package/dist/routes/auth-oidc.js +1 -1
  99. package/dist/routes/auth.js +1 -1
  100. package/dist/routes/automations.js +1 -1
  101. package/dist/routes/bindings.js +1 -1
  102. package/dist/routes/build.js +1 -1
  103. package/dist/routes/containers.js +1 -1
  104. package/dist/routes/deploy-task.js +1 -1
  105. package/dist/routes/environment-management.js +1 -1
  106. package/dist/routes/environments.js +1 -1
  107. package/dist/routes/external-skills.js +1 -1
  108. package/dist/routes/git-credentials.js +1 -1
  109. package/dist/routes/git-oauth.js +1 -1
  110. package/dist/routes/git-provider-setup.js +1 -1
  111. package/dist/routes/health.js +1 -1
  112. package/dist/routes/jira.js +1 -1
  113. package/dist/routes/objective-management.js +1 -1
  114. package/dist/routes/password.js +1 -1
  115. package/dist/routes/prompt.js +1 -1
  116. package/dist/routes/provider-auth.js +1 -1
  117. package/dist/routes/qa.js +1 -1
  118. package/dist/routes/roles.js +1 -1
  119. package/dist/routes/settings.js +1 -1
  120. package/dist/routes/skill-management.js +1 -1
  121. package/dist/routes/skills.js +1 -1
  122. package/dist/routes/tasks.js +1 -1
  123. package/dist/routes/teams.js +1 -1
  124. package/dist/routes/templates.js +1 -1
  125. package/dist/routes/test-task.js +1 -1
  126. package/dist/routes/test.js +1 -1
  127. package/dist/routes/users.js +1 -1
  128. package/dist/routes/visualizations.js +1 -1
  129. package/dist/scripts/create-user.js +1 -1
  130. package/dist/scripts/migrate-config-to-data-dir.js +1 -1
  131. package/dist/start.js +1 -1
  132. package/dist/web-ui/public/activity-detail-modal.js +1 -1
  133. package/dist/web-ui/public/activity-feed.js +1 -1
  134. package/dist/web-ui/public/activity-formatters.js +1 -1
  135. package/dist/web-ui/public/agent-event-parser.js +1 -1
  136. package/dist/web-ui/public/app.js +1 -1
  137. package/dist/web-ui/public/approve-dialog.js +1 -1
  138. package/dist/web-ui/public/automation-links.js +1 -1
  139. package/dist/web-ui/public/automation-schedule.js +1 -1
  140. package/dist/web-ui/public/comments-widget.js +1 -1
  141. package/dist/web-ui/public/diff-utils.js +1 -1
  142. package/dist/web-ui/public/environments.html +11 -8
  143. package/dist/web-ui/public/environments.js +1 -1
  144. package/dist/web-ui/public/feedback-widget.js +1 -1
  145. package/dist/web-ui/public/file-selection-tree.js +1 -1
  146. package/dist/web-ui/public/git-history-lazy-utils.js +1 -1
  147. package/dist/web-ui/public/git-history.js +1 -1
  148. package/dist/web-ui/public/git-status.js +1 -1
  149. package/dist/web-ui/public/ibmi-file-filter.js +1 -1
  150. package/dist/web-ui/public/index.js +1 -1
  151. package/dist/web-ui/public/login.js +1 -1
  152. package/dist/web-ui/public/markdown-editor.js +1 -1
  153. package/dist/web-ui/public/markdown-file-editor.js +1 -1
  154. package/dist/web-ui/public/modal-maximize.js +1 -1
  155. package/dist/web-ui/public/notifications.js +1 -1
  156. package/dist/web-ui/public/permissions.js +1 -1
  157. package/dist/web-ui/public/pr-dialog.js +1 -1
  158. package/dist/web-ui/public/roles.js +1 -1
  159. package/dist/web-ui/public/server-health.js +1 -1
  160. package/dist/web-ui/public/settings.js +1 -1
  161. package/dist/web-ui/public/setup-password.js +1 -1
  162. package/dist/web-ui/public/skills.js +1 -1
  163. package/dist/web-ui/public/sse-client.js +1 -1
  164. package/dist/web-ui/public/sse-shared-worker.js +1 -1
  165. package/dist/web-ui/public/task-judging-helpers.js +1 -1
  166. package/dist/web-ui/public/task.js +1 -1
  167. package/dist/web-ui/public/teams.js +1 -1
  168. package/dist/web-ui/public/terminal.js +1 -1
  169. package/dist/web-ui/public/theme.js +1 -1
  170. package/dist/web-ui/public/users.js +1 -1
  171. package/dist/web-ui/public/variant-grouping.js +1 -1
  172. package/package.json +1 -1
@@ -1 +1 @@
1
- function isLogOnlyTaskType(_0x40b4ce){return _0x40b4ce==='test'||_0x40b4ce==='deploy';}export function createApproveDialogHTML(_0x2a0420='',_0x22dde8={}){const _0x27c913=_0x2a0420,_0x267596=_0x22dde8['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x2accd2=_0x22dde8['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x40bd83=_0x22dde8['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'approve-modal\x22\x20class=\x22'+_0x267596+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-overlay\x22></div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2>Approve\x20Changes</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22modal-close\x22\x20id=\x22'+_0x27c913+'close-approve-modal\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'approve-warning\x22\x20class=\x22'+_0x2accd2+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x27c913+'approve-warning-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'approve-error\x22\x20class=\x22'+_0x40bd83+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22error-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x27c913+'approve-error-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-info\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x27c913+'approve-repo-name\x22\x20class=\x22modal-repo\x22>Repository</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x27c913+'approve-stats\x22\x20class=\x22modal-stats\x22>0\x20files\x20changed</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'approve-branches\x22\x20class=\x22modal-branches\x22\x20hidden></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x27c913+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x27c913+'commit-message-input\x22\x20class=\x22commit-message-input\x22\x20rows=\x226\x22\x20placeholder=\x22Enter\x20commit\x20message...\x22></textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20id=\x22'+_0x27c913+'multi-repo-note\x22\x20class=\x22field-hint\x22\x20hidden>This\x20commit\x20message\x20will\x20be\x20used\x20for\x20all\x20repositories\x20listed\x20above.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x27c913+'pull-before-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Pull\x20from\x20remote\x20after\x20commit\x20(rebase)</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x27c913+'push-after-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Push\x20to\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x27c913+'create-new-branch\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20new\x20branch</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'new-branch-input-container\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x27c913+'new-branch-name\x22\x20class=\x22new-branch-input\x22\x20placeholder=\x22Enter\x20new\x20branch\x20name...\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>A\x20new\x20branch\x20will\x20be\x20created\x20from\x20the\x20current\x20branch\x20before\x20committing.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'pr-option-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x27c913+'create-pull-request\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20pull\x20request</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22\x20id=\x22'+_0x27c913+'pr-hint\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20A\x20new\x20branch\x20will\x20be\x20created,\x20pushed,\x20and\x20a\x20pull\x20request\x20opened.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'ibmi-sync-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22approve-divider\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x27c913+'sync-to-ibmi\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Sync\x20to\x20IBM\x20i</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'ibmi-sync-fields\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x27c913+'ibmi-sync-library\x22>Library\x20name</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x27c913+'ibmi-sync-library\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYLIB\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'ibmi-sync-credentials-row\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x27c913+'ibmi-sync-user\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>User\x20profile</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x27c913+'ibmi-sync-user\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYUSER\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x27c913+'ibmi-sync-password\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>Password</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22password\x22\x20id=\x22'+_0x27c913+'ibmi-sync-password\x22\x20class=\x22new-branch-input\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Enter\x20password\x22\x20style=\x22width:\x20160px;\x22\x20autocomplete=\x22off\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'ibmi-sync-files-section\x22\x20style=\x22margin-top:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:\x20block;\x20margin-bottom:\x204px;\x22>Files\x20to\x20sync</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x27c913+'ibmi-sync-file-tree\x22\x20class=\x22file-selection-tree-container\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22max-height:\x20250px;\x20overflow-y:\x20auto;\x20border:\x201px\x20solid\x20var(--border-color,\x20var(--color-border));\x20border-radius:\x204px;\x20padding:\x208px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-selection-summary\x22\x20id=\x22'+_0x27c913+'ibmi-sync-files-summary\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-ghost\x22\x20id=\x22'+_0x27c913+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x27c913+'confirm-approve\x22>Commit\x20Changes</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20';}export class ApproveDialog{constructor(_0x105a35={}){this['prefix']=_0x105a35['prefix']||'',this['onApprove']=_0x105a35['onApprove'],this['onSync']=_0x105a35['onSync'],this['onSuccess']=_0x105a35['onSuccess'],this['onError']=_0x105a35['onError'],this['onCreatePR']=_0x105a35['onCreatePR'],this['showToast']=_0x105a35['showToast']||(()=>{}),this['container']=_0x105a35['container']||document['body'],this['useTaskPageStyles']=_0x105a35['useTaskPageStyles']||![],this['baseUrl']=_0x105a35['baseUrl']||'',this['coderflowAttribution']=_0x105a35['coderflowAttribution'],this['onSyncToIbmi']=_0x105a35['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x105a35['onGetSyncFiles']||null,this['taskData']=null,this['initialized']=![],this['isSyncing']=![],this['_createPR']=![],this['_attributionRequestId']=0x0,this['_syncFileTree']=null,this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}['init'](){if(this['initialized'])return;const _0x161e66=document['createElement']('div');_0x161e66['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x161e66['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x1ac6ae){return document['getElementById'](''+this['prefix']+_0x1ac6ae);}['_bindEvents'](){const _0x26feb7=this['_el']('approve-modal'),_0x1aa939=this['_el']('close-approve-modal'),_0x3c8b71=this['_el']('cancel-approve'),_0x133ad6=this['_el']('confirm-approve'),_0x10d221=_0x26feb7?.['querySelector']('.modal-overlay'),_0x5aa46c=this['_el']('create-new-branch'),_0x5690bc=this['_el']('new-branch-input-container'),_0xb15d58=this['_el']('new-branch-name'),_0x4a4ec6=this['_el']('push-after-commit'),_0xc475df=this['_el']('create-pull-request'),_0x26d15e=this['_el']('pr-hint');_0x1aa939?.['addEventListener']('click',()=>this['hide']()),_0x3c8b71?.['addEventListener']('click',()=>this['hide']()),_0x10d221?.['addEventListener']('click',()=>this['hide']()),_0x133ad6?.['addEventListener']('click',()=>this['_handleApprove']());_0x5aa46c&&_0x5aa46c['addEventListener']('change',()=>{_0x5690bc&&(_0x5690bc['hidden']=!_0x5aa46c['checked']),_0x5aa46c['checked']&&_0xb15d58&&_0xb15d58['focus']();});_0xc475df&&_0x4a4ec6&&_0x5aa46c&&(_0xc475df['addEventListener']('change',()=>{this['_createPR']=_0xc475df['checked'];if(_0xc475df['checked']){_0x4a4ec6['checked']=!![],_0x4a4ec6['disabled']=!![],_0x5aa46c['checked']=!![],_0x5aa46c['disabled']=!![];_0x5690bc&&(_0x5690bc['hidden']=![]);if(_0x26d15e)_0x26d15e['hidden']=![];}else{_0x4a4ec6['disabled']=![],_0x5aa46c['disabled']=![];if(_0x26d15e)_0x26d15e['hidden']=!![];}}),_0x4a4ec6['addEventListener']('change',()=>{if(!_0x4a4ec6['checked']&&_0xc475df['checked']){_0xc475df['checked']=![],this['_createPR']=![],_0x4a4ec6['disabled']=![],_0x5aa46c['disabled']=![];if(_0x26d15e)_0x26d15e['hidden']=!![];}}));const _0x57f252=this['_el']('sync-to-ibmi');_0x57f252&&_0x57f252['addEventListener']('change',async _0x282b51=>{const _0x5c5e47=this['_el']('ibmi-sync-fields');if(_0x5c5e47)_0x5c5e47['hidden']=!_0x282b51['target']['checked'];if(_0x282b51['target']['checked']){const _0x4cce70=this['_el']('ibmi-sync-library'),_0x2f0afb=localStorage['getItem']('coderflow_ibmi_sync_library');_0x2f0afb&&_0x4cce70&&!_0x4cce70['value']&&(_0x4cce70['value']=_0x2f0afb);const _0x242aad=this['_el']('ibmi-sync-user');if(_0x242aad&&!_0x242aad['value']){const _0x44944f=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x44944f)_0x242aad['value']=_0x44944f;}const _0x4a6234=this['_el']('ibmi-sync-password');if(_0x4a6234)_0x4a6234['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0xcfe57a=>{_0xcfe57a['key']==='Escape'&&_0x26feb7&&!_0x26feb7['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x4622d4=this['_el']('ibmi-sync-file-tree'),_0x2869fd=this['_el']('ibmi-sync-files-summary');if(!_0x4622d4)return;_0x4622d4['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x2869fd)_0x2869fd['textContent']='';try{const {files:_0x3839c8,absolutePaths:_0x4063f2}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x3839c8,this['_syncAbsolutePaths']=_0x4063f2;if(_0x3839c8['length']===0x0){_0x4622d4['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x291bd2}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x452fae,hasKnownIbmiExtension:_0x3fe0a7}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x291bd2({'container':_0x4622d4,'files':_0x3839c8,'isPreselected':_0x3cd822=>{const {valid:_0x5e1084}=_0x452fae(_0x3cd822);return _0x5e1084&&_0x3fe0a7(_0x3cd822);},'isDisabled':_0x5ce124=>{const {valid:_0x556dea,reason:_0x37db6d}=_0x452fae(_0x5ce124);return{'disabled':!_0x556dea,'reason':_0x37db6d};},'isAutoCheckEligible':_0x7d7813=>{const {valid:_0x2c9115}=_0x452fae(_0x7d7813);return _0x2c9115&&_0x3fe0a7(_0x7d7813);},'onChange':_0x132ba6=>{_0x2869fd&&(_0x2869fd['textContent']=_0x132ba6['length']+'\x20of\x20'+_0x3839c8['length']+'\x20file'+(_0x3839c8['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x9186b3){_0x4622d4['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x42a3f1){const _0x268737=this['_el']('approve-error'),_0x3249ad=this['_el']('approve-error-text');_0x268737&&_0x3249ad&&(_0x3249ad['textContent']=_0x42a3f1,_0x268737['hidden']=![],_0x268737['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x26909c=this['_el']('approve-error'),_0x2b5fad=this['_el']('approve-error-text');_0x26909c&&_0x2b5fad&&(_0x26909c['hidden']=!![],_0x2b5fad['textContent']='');}['_displayBranchInfo'](_0x27e369,_0xbec836={}){const _0x1dfbdd=this['_el']('approve-branches');if(!_0x1dfbdd)return;const _0x23fa57=[];for(const _0xc92e of _0x27e369){_0xbec836[_0xc92e['name']]&&_0x23fa57['push']({'repo':_0xc92e['name'],'branch':_0xbec836[_0xc92e['name']]});}if(_0x23fa57['length']>0x0){_0x1dfbdd['hidden']=![];if(_0x23fa57['length']===0x1)_0x1dfbdd['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x23fa57[0x0]['branch']+'</code></div>';else{const _0x2860c4=_0x23fa57['map'](_0x3556ee=>'<div\x20class=\x22branch-item\x22><strong>'+_0x3556ee['repo']+':</strong>\x20<code>'+_0x3556ee['branch']+'</code></div>')['join']('');_0x1dfbdd['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x2860c4+'</div></div>';}}else _0x1dfbdd['hidden']=!![],_0x1dfbdd['innerHTML']='';}['showWarning'](_0x3d9f7a){const _0x2f87c2=this['_el']('approve-warning'),_0x2d79c0=this['_el']('approve-warning-text');_0x2f87c2&&_0x2d79c0&&(_0x2d79c0['textContent']=_0x3d9f7a,_0x2f87c2['hidden']=![]);}['hideWarning'](){const _0x1ce355=this['_el']('approve-warning'),_0x521b73=this['_el']('approve-warning-text');_0x1ce355&&_0x521b73&&(_0x1ce355['hidden']=!![],_0x521b73['textContent']='');}['_stripCoAuthoredByLines'](_0xad038d){return _0xad038d['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x1a45a7){try{let _0x5decbd;try{const _0x719f6d=await fetch(this['baseUrl']+'/settings');if(_0x719f6d['ok']){const _0x497a8e=await _0x719f6d['json']();_0x5decbd=_0x497a8e['coderflow_attribution']!==![];}}catch(_0x4725cc){}_0x5decbd===undefined&&(this['coderflowAttribution']!==undefined?_0x5decbd=this['coderflowAttribution']!==![]:_0x5decbd=!![]);const _0x2919e8=this['_stripCoAuthoredByLines'](_0x1a45a7);if(!_0x5decbd)return _0x2919e8;const _0x42f959='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x2919e8+_0x42f959;}catch(_0x46e012){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x46e012),_0x1a45a7;}}['show'](_0xa55f6){!this['initialized']&&this['init']();this['taskData']=_0xa55f6;const _0x315154=this['_el']('approve-modal'),_0x549584=this['_el']('commit-message-input'),_0x48fec6=this['_el']('pull-before-commit'),_0x53cebd=this['_el']('push-after-commit'),_0x3d8e45=this['_el']('create-new-branch'),_0x5e6ecb=this['_el']('new-branch-input-container'),_0x1893c4=this['_el']('new-branch-name'),_0x193056=this['_el']('approve-repo-name'),_0x4e7ebe=this['_el']('approve-stats'),_0x31f0ad=this['_el']('multi-repo-note');if(!_0x315154)return;this['hideError'](),this['hideWarning']();_0xa55f6['warning']&&this['showWarning'](_0xa55f6['warning']);const _0x31ae3c=_0xa55f6['reposChanged']||[];if(_0x31ae3c['length']===0x0&&!_0xa55f6['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x31ae3c,_0xa55f6);const _0xe9d001=_0xa55f6['commitMessage']||'',_0x30cfb7=this['_stripCoAuthoredByLines'](_0xe9d001);_0x549584['value']=_0x30cfb7;if(_0x48fec6)_0x48fec6['checked']=!![];if(_0x53cebd)_0x53cebd['checked']=!![];_0x3d8e45&&(_0x3d8e45['checked']=![]);_0x5e6ecb&&(_0x5e6ecb['hidden']=!![]);_0x1893c4&&(_0x1893c4['value']='');if(_0x53cebd)_0x53cebd['disabled']=![];if(_0x3d8e45)_0x3d8e45['disabled']=![];this['updatePRSupport'](_0xa55f6['prSupported']===!![]);const _0x85c0a6=this['_el']('ibmi-sync-section');if(_0x85c0a6){_0x85c0a6['hidden']=!_0xa55f6['ibmiSyncAvailable'];const _0x19b48e=this['_el']('sync-to-ibmi'),_0x2032ba=this['_el']('ibmi-sync-fields'),_0x10bb64=this['_el']('ibmi-sync-library');if(_0x19b48e)_0x19b48e['checked']=![];if(_0x2032ba)_0x2032ba['hidden']=!![];if(_0x10bb64)_0x10bb64['value']='';const _0x398962=this['_el']('ibmi-sync-credentials-row');_0x398962&&(_0x398962['hidden']=!(_0xa55f6['ibmiSyncAvailable']&&_0xa55f6['syncCredentials']==='prompt'));}const _0x3eacb6=this['_el']('confirm-approve');_0xa55f6['syncFirst']&&this['onSync']?(_0x3eacb6&&(_0x3eacb6['disabled']=!![],_0x3eacb6['textContent']='Syncing...'),this['_performSync']()):_0x3eacb6&&(_0x3eacb6['disabled']=![],_0x3eacb6['textContent']='Commit\x20Changes');_0x315154['hidden']=![];const _0x4f816b=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x4f816b,'taskId':_0xa55f6['taskId'],'originalCommitMessage':_0x30cfb7}),setTimeout(()=>{_0x549584['focus'](),_0x549584['setSelectionRange'](0x0,_0x549584['value']['length']);},0x64);}['updatePRSupport'](_0xf987a){const _0x4bf9cb=this['_el']('pr-option-section'),_0x5838d0=this['_el']('create-pull-request'),_0x32297c=this['_el']('pr-hint'),_0x4173c6=this['_el']('push-after-commit'),_0x210bb0=this['_el']('create-new-branch');if(!_0x4bf9cb)return;if(_0xf987a){_0x4bf9cb['hidden']=![];_0x5838d0&&!_0x5838d0['disabled']&&(_0x5838d0['checked']=![]);if(_0x32297c)_0x32297c['hidden']=!![];this['_createPR']=![];return;}_0x5838d0?.['checked']&&(_0x5838d0['checked']=![]);if(_0x32297c)_0x32297c['hidden']=!![];if(_0x4173c6)_0x4173c6['disabled']=![];if(_0x210bb0)_0x210bb0['disabled']=![];this['_createPR']=![],_0x4bf9cb['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x5ab8e8,taskId:_0x232876,originalCommitMessage:_0x3a0372}){const _0x49e53d=this['_el']('commit-message-input');if(!_0x49e53d)return;const _0xe578f6=await this['_addAttributionIfEnabled'](_0x3a0372);if(_0x5ab8e8!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x232876)return;if(!this['isVisible']())return;const _0x3d3c71=_0x1de05b=>_0x1de05b['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x3d3c71(_0x49e53d['value'])!==_0x3d3c71(_0x3a0372))return;_0x49e53d['value']=_0xe578f6;}['_updateDisplay'](_0x541292,_0x5e497b){const _0xb84532=this['_el']('approve-repo-name'),_0x5b65aa=this['_el']('approve-stats'),_0x88db66=this['_el']('multi-repo-note');if(_0x541292['length']===0x0){if(_0xb84532)_0xb84532['textContent']='Syncing...';if(_0x5b65aa)_0x5b65aa['textContent']='';if(_0x88db66)_0x88db66['hidden']=!![];return;}const _0x22de26=_0x541292['reduce']((_0x27e92f,_0x7cea82)=>_0x27e92f+(_0x7cea82['files_changed']||0x0),0x0),_0x195338=_0x541292['reduce']((_0x5c8abe,_0x260934)=>_0x5c8abe+(_0x260934['lines_added']||0x0),0x0),_0x47cd93=_0x541292['reduce']((_0x45e2e0,_0x4b4752)=>_0x45e2e0+(_0x4b4752['lines_deleted']||0x0),0x0);if(_0x541292['length']===0x1){if(_0xb84532)_0xb84532['textContent']=_0x541292[0x0]?.['name']||'repository';if(_0x88db66)_0x88db66['hidden']=!![];}else{const _0x5115e9=_0x541292['map'](_0x2d516a=>_0x2d516a['name'])['join'](',\x20');if(_0xb84532)_0xb84532['textContent']=_0x541292['length']+'\x20repositories:\x20'+_0x5115e9;if(_0x88db66)_0x88db66['hidden']=![];}_0x5b65aa&&(_0x5b65aa['textContent']=_0x22de26+'\x20file'+(_0x22de26===0x1?'':'s')+'\x20changed\x20(+'+_0x195338+'\x20-'+_0x47cd93+')'),this['_displayBranchInfo'](_0x541292,_0x5e497b?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x47c852=this['_el']('confirm-approve');try{const _0x59392f=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x59392f['repos_changed']){const _0x9086f0=this['taskData']['reposChanged']?.['length']||0x0,_0x27b0a3=this['taskData']['reposChanged']?.['reduce']((_0x253d67,_0x2f94bb)=>_0x253d67+(_0x2f94bb['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x59392f['repos_changed'];if(_0x59392f['current_branches']){const _0x54ed6f={...this['taskData']['branches']||{}};for(const [_0x237701,_0x54d475]of Object['entries'](_0x59392f['current_branches'])){_0x54d475?_0x54ed6f[_0x237701]=_0x54d475:delete _0x54ed6f[_0x237701];}this['taskData']['branches']=_0x54ed6f;}this['_updateDisplay'](_0x59392f['repos_changed'],this['taskData']);const _0x877666=_0x59392f['repos_changed']['length'],_0x2d3582=_0x59392f['repos_changed']['reduce']((_0x3d35e0,_0x54d488)=>_0x3d35e0+(_0x54d488['files_changed']||0x0),0x0);(_0x2d3582>_0x27b0a3||_0x877666>_0x9086f0)&&this['showWarning'](this['taskData']['warning']?this['taskData']['warning']+'\x20Additional\x20changes\x20detected\x20since\x20last\x20sync.':'Additional\x20changes\x20detected\x20since\x20last\x20sync.\x20Review\x20the\x20updated\x20file\x20list.');}_0x47c852&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x47c852['disabled']=!![],_0x47c852['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x47c852['disabled']=![],_0x47c852['textContent']='Commit\x20Changes'));}catch(_0x5098bf){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x5098bf);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x5098bf['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x47c852&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x47c852['disabled']=![],_0x47c852['textContent']='Commit\x20Changes'):(_0x47c852['disabled']=!![],_0x47c852['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x5e2368=this['_el']('approve-modal');_0x5e2368&&(_0x5e2368['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x43d827=this['_el']('commit-message-input'),_0x2d79ee=this['_el']('pull-before-commit'),_0x3c375d=this['_el']('push-after-commit'),_0x49fa01=this['_el']('create-new-branch'),_0x1e3249=this['_el']('new-branch-name'),_0x487f27=this['_el']('confirm-approve'),_0x37a387=_0x43d827['value']['trim'](),_0x54790c=_0x2d79ee?.['checked']??!![],_0x489928=_0x3c375d?.['checked']??!![],_0x5b7eb3=_0x49fa01?.['checked']||![],_0x3fee88=_0x1e3249?.['value']['trim']()||'';this['hideError']();if(!_0x37a387){this['showError']('Commit\x20message\x20is\x20required'),_0x43d827['focus']();return;}if(_0x5b7eb3&&!_0x3fee88){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x1e3249?.['focus']();return;}if(_0x5b7eb3&&_0x3fee88){const _0x4a601b=/[\s~^:?*\[\\]/;if(_0x4a601b['test'](_0x3fee88)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x1e3249?.['focus']();return;}}const _0x5374eb=this['_el']('sync-to-ibmi')?.['checked'];if(_0x5374eb){const _0x58b75e=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x58b75e){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x9e0522=this['_syncFileTree']['getSelectedFiles']();if(_0x9e0522['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x497c6e=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x497c6e){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x4a0d15=this['_el']('ibmi-sync-password')?.['value'];if(!_0x4a0d15){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x2f7a60=_0x487f27?.['textContent']||'Commit\x20Changes';_0x487f27&&(_0x487f27['disabled']=!![],_0x5b7eb3?_0x487f27['textContent']='Creating\x20branch\x20&\x20committing...':_0x487f27['textContent']=_0x54790c?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x50af32={'commit_message':_0x37a387,'pull':_0x54790c,'push':_0x489928};_0x5b7eb3&&_0x3fee88&&(_0x50af32['new_branch']=_0x3fee88);let _0x457281=null;this['onApprove']&&(_0x457281=await this['onApprove'](this['taskData']['taskId'],_0x50af32));let _0x14ef64='Changes\x20committed';if(_0x5b7eb3)_0x14ef64='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x3fee88+'\x27',_0x489928&&(_0x14ef64+='\x20and\x20pushed');else{if(_0x54790c&&_0x489928)_0x14ef64='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x54790c)_0x14ef64='Changes\x20pulled\x20and\x20committed';else _0x489928&&(_0x14ef64='Changes\x20committed\x20and\x20pushed');}}const _0x4cb5dc=this['_el']('sync-to-ibmi')?.['checked'];let _0x2bfd66=null,_0x45adbd=null,_0x1ffb0e=null,_0x1a7e31=null;if(_0x4cb5dc&&this['onSyncToIbmi']){_0x2bfd66=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x45adbd=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x1ffb0e=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x126987=this['_syncFileTree']['getSelectedFiles']();_0x1a7e31=_0x126987['map'](_0x49f5d6=>{const _0x24b1e3=this['_syncRelativeFiles']['indexOf'](_0x49f5d6);return _0x24b1e3>=0x0?this['_syncAbsolutePaths'][_0x24b1e3]:_0x49f5d6;});}}this['showToast'](_0x14ef64,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x457281||{});}catch(_0x5d1e1f){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x5d1e1f);}if(_0x4cb5dc&&this['onSyncToIbmi']&&_0x2bfd66){localStorage['setItem']('coderflow_ibmi_sync_library',_0x2bfd66);if(_0x45adbd)localStorage['setItem']('coderflow_ibmi_sync_user',_0x45adbd);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x2bfd66,_0x45adbd,_0x1ffb0e,_0x1a7e31);}catch(_0x2c4b2a){this['showToast']('Sync\x20failed:\x20'+_0x2c4b2a['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x1da6d7){console['error']('Failed\x20to\x20approve\x20changes',_0x1da6d7),this['showError']('Failed\x20to\x20commit:\x20'+_0x1da6d7['message']),_0x487f27&&(_0x487f27['disabled']=![],_0x487f27['textContent']=_0x2f7a60),this['onError']&&this['onError'](_0x1da6d7);}}['isVisible'](){const _0x4aa70b=this['_el']('approve-modal');return _0x4aa70b&&!_0x4aa70b['hidden'];}['destroy'](){const _0x44c785=this['_el']('approve-modal');_0x44c785&&_0x44c785['remove'](),this['initialized']=![];}}export function getApproveState(_0x4dcb3f,_0xe2fa70){if(!_0x4dcb3f)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x4dcb3f['taskType']))return{'canApprove':![],'reason':(_0x4dcb3f['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x17ee29=_0xe2fa70?.['repos_changed']?.['length']>0x0,_0x57bb82=_0x4dcb3f['status']==='completed'||_0x4dcb3f['status']==='failed'||_0x4dcb3f['status']==='interrupted',_0x3f5f98=_0x4dcb3f['containerState']==='running',_0x423e7c=_0x4dcb3f['approvedBy']!==undefined&&_0x4dcb3f['approvedBy']!==null;if(_0x423e7c){const _0x497d8a=_0x4dcb3f['approvedBy']['name']||_0x4dcb3f['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x497d8a};}if(!_0x17ee29)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x57bb82)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x4dcb3f['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x3f5f98)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
1
+ function isLogOnlyTaskType(_0x1b1ea2){return _0x1b1ea2==='test'||_0x1b1ea2==='deploy';}export function createApproveDialogHTML(_0x30d75e='',_0x338ac7={}){const _0x5d769b=_0x30d75e,_0x5b6976=_0x338ac7['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x30c374=_0x338ac7['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x579220=_0x338ac7['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'approve-modal\x22\x20class=\x22'+_0x5b6976+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-overlay\x22></div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2>Approve\x20Changes</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22modal-close\x22\x20id=\x22'+_0x5d769b+'close-approve-modal\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'approve-warning\x22\x20class=\x22'+_0x30c374+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x5d769b+'approve-warning-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'approve-error\x22\x20class=\x22'+_0x579220+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22error-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x5d769b+'approve-error-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-info\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x5d769b+'approve-repo-name\x22\x20class=\x22modal-repo\x22>Repository</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x5d769b+'approve-stats\x22\x20class=\x22modal-stats\x22>0\x20files\x20changed</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'approve-branches\x22\x20class=\x22modal-branches\x22\x20hidden></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x5d769b+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x5d769b+'commit-message-input\x22\x20class=\x22commit-message-input\x22\x20rows=\x226\x22\x20placeholder=\x22Enter\x20commit\x20message...\x22></textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20id=\x22'+_0x5d769b+'multi-repo-note\x22\x20class=\x22field-hint\x22\x20hidden>This\x20commit\x20message\x20will\x20be\x20used\x20for\x20all\x20repositories\x20listed\x20above.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x5d769b+'pull-before-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Pull\x20from\x20remote\x20after\x20commit\x20(rebase)</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x5d769b+'push-after-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Push\x20to\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x5d769b+'create-new-branch\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20new\x20branch</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'new-branch-input-container\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x5d769b+'new-branch-name\x22\x20class=\x22new-branch-input\x22\x20placeholder=\x22Enter\x20new\x20branch\x20name...\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>A\x20new\x20branch\x20will\x20be\x20created\x20from\x20the\x20current\x20branch\x20before\x20committing.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'pr-option-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x5d769b+'create-pull-request\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20pull\x20request</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22\x20id=\x22'+_0x5d769b+'pr-hint\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20A\x20new\x20branch\x20will\x20be\x20created,\x20pushed,\x20and\x20a\x20pull\x20request\x20opened.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'ibmi-sync-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22approve-divider\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x5d769b+'sync-to-ibmi\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Sync\x20to\x20IBM\x20i</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'ibmi-sync-fields\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x5d769b+'ibmi-sync-library\x22>Library\x20name</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x5d769b+'ibmi-sync-library\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYLIB\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'ibmi-sync-credentials-row\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x5d769b+'ibmi-sync-user\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>User\x20profile</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x5d769b+'ibmi-sync-user\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYUSER\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x5d769b+'ibmi-sync-password\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>Password</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22password\x22\x20id=\x22'+_0x5d769b+'ibmi-sync-password\x22\x20class=\x22new-branch-input\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Enter\x20password\x22\x20style=\x22width:\x20160px;\x22\x20autocomplete=\x22off\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'ibmi-sync-files-section\x22\x20style=\x22margin-top:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:\x20block;\x20margin-bottom:\x204px;\x22>Files\x20to\x20sync</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x5d769b+'ibmi-sync-file-tree\x22\x20class=\x22file-selection-tree-container\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22max-height:\x20250px;\x20overflow-y:\x20auto;\x20border:\x201px\x20solid\x20var(--border-color,\x20var(--color-border));\x20border-radius:\x204px;\x20padding:\x208px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-selection-summary\x22\x20id=\x22'+_0x5d769b+'ibmi-sync-files-summary\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-ghost\x22\x20id=\x22'+_0x5d769b+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x5d769b+'confirm-approve\x22>Commit\x20Changes</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20';}export class ApproveDialog{constructor(_0x1e70c3={}){this['prefix']=_0x1e70c3['prefix']||'',this['onApprove']=_0x1e70c3['onApprove'],this['onSync']=_0x1e70c3['onSync'],this['onSuccess']=_0x1e70c3['onSuccess'],this['onError']=_0x1e70c3['onError'],this['onCreatePR']=_0x1e70c3['onCreatePR'],this['showToast']=_0x1e70c3['showToast']||(()=>{}),this['container']=_0x1e70c3['container']||document['body'],this['useTaskPageStyles']=_0x1e70c3['useTaskPageStyles']||![],this['baseUrl']=_0x1e70c3['baseUrl']||'',this['coderflowAttribution']=_0x1e70c3['coderflowAttribution'],this['onSyncToIbmi']=_0x1e70c3['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x1e70c3['onGetSyncFiles']||null,this['taskData']=null,this['initialized']=![],this['isSyncing']=![],this['_createPR']=![],this['_attributionRequestId']=0x0,this['_syncFileTree']=null,this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}['init'](){if(this['initialized'])return;const _0xeb5bff=document['createElement']('div');_0xeb5bff['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0xeb5bff['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x57c5fa){return document['getElementById'](''+this['prefix']+_0x57c5fa);}['_bindEvents'](){const _0x29b953=this['_el']('approve-modal'),_0x5aac0c=this['_el']('close-approve-modal'),_0x7fa8b5=this['_el']('cancel-approve'),_0x527eb8=this['_el']('confirm-approve'),_0x3e7854=_0x29b953?.['querySelector']('.modal-overlay'),_0x474cd2=this['_el']('create-new-branch'),_0x1b170f=this['_el']('new-branch-input-container'),_0x3794c9=this['_el']('new-branch-name'),_0xac80db=this['_el']('push-after-commit'),_0xd3fc0e=this['_el']('create-pull-request'),_0x4918dd=this['_el']('pr-hint');_0x5aac0c?.['addEventListener']('click',()=>this['hide']()),_0x7fa8b5?.['addEventListener']('click',()=>this['hide']()),_0x3e7854?.['addEventListener']('click',()=>this['hide']()),_0x527eb8?.['addEventListener']('click',()=>this['_handleApprove']());_0x474cd2&&_0x474cd2['addEventListener']('change',()=>{_0x1b170f&&(_0x1b170f['hidden']=!_0x474cd2['checked']),_0x474cd2['checked']&&_0x3794c9&&_0x3794c9['focus']();});_0xd3fc0e&&_0xac80db&&_0x474cd2&&(_0xd3fc0e['addEventListener']('change',()=>{this['_createPR']=_0xd3fc0e['checked'];if(_0xd3fc0e['checked']){_0xac80db['checked']=!![],_0xac80db['disabled']=!![],_0x474cd2['checked']=!![],_0x474cd2['disabled']=!![];_0x1b170f&&(_0x1b170f['hidden']=![]);if(_0x4918dd)_0x4918dd['hidden']=![];}else{_0xac80db['disabled']=![],_0x474cd2['disabled']=![];if(_0x4918dd)_0x4918dd['hidden']=!![];}}),_0xac80db['addEventListener']('change',()=>{if(!_0xac80db['checked']&&_0xd3fc0e['checked']){_0xd3fc0e['checked']=![],this['_createPR']=![],_0xac80db['disabled']=![],_0x474cd2['disabled']=![];if(_0x4918dd)_0x4918dd['hidden']=!![];}}));const _0x50d789=this['_el']('sync-to-ibmi');_0x50d789&&_0x50d789['addEventListener']('change',async _0x396df2=>{const _0x19f012=this['_el']('ibmi-sync-fields');if(_0x19f012)_0x19f012['hidden']=!_0x396df2['target']['checked'];if(_0x396df2['target']['checked']){const _0x2180b8=this['_el']('ibmi-sync-library'),_0x7cf63f=localStorage['getItem']('coderflow_ibmi_sync_library');_0x7cf63f&&_0x2180b8&&!_0x2180b8['value']&&(_0x2180b8['value']=_0x7cf63f);const _0x9c1e13=this['_el']('ibmi-sync-user');if(_0x9c1e13&&!_0x9c1e13['value']){const _0x5a17ec=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x5a17ec)_0x9c1e13['value']=_0x5a17ec;}const _0x8e9ac2=this['_el']('ibmi-sync-password');if(_0x8e9ac2)_0x8e9ac2['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0x1b13e5=>{_0x1b13e5['key']==='Escape'&&_0x29b953&&!_0x29b953['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x4b8077=this['_el']('ibmi-sync-file-tree'),_0x433442=this['_el']('ibmi-sync-files-summary');if(!_0x4b8077)return;_0x4b8077['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x433442)_0x433442['textContent']='';try{const {files:_0x1c8cc2,absolutePaths:_0x410057}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x1c8cc2,this['_syncAbsolutePaths']=_0x410057;if(_0x1c8cc2['length']===0x0){_0x4b8077['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0xfff046}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x556098,hasKnownIbmiExtension:_0x4da0d1}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0xfff046({'container':_0x4b8077,'files':_0x1c8cc2,'isPreselected':_0x4491fa=>{const {valid:_0xec9f9b}=_0x556098(_0x4491fa);return _0xec9f9b&&_0x4da0d1(_0x4491fa);},'isDisabled':_0x36d668=>{const {valid:_0x41b4cb,reason:_0x235fa5}=_0x556098(_0x36d668);return{'disabled':!_0x41b4cb,'reason':_0x235fa5};},'isAutoCheckEligible':_0x13edb8=>{const {valid:_0x471823}=_0x556098(_0x13edb8);return _0x471823&&_0x4da0d1(_0x13edb8);},'onChange':_0x12bd02=>{_0x433442&&(_0x433442['textContent']=_0x12bd02['length']+'\x20of\x20'+_0x1c8cc2['length']+'\x20file'+(_0x1c8cc2['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x3f7b3d){_0x4b8077['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x2472a0){const _0x215529=this['_el']('approve-error'),_0x117eaf=this['_el']('approve-error-text');_0x215529&&_0x117eaf&&(_0x117eaf['textContent']=_0x2472a0,_0x215529['hidden']=![],_0x215529['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x396c62=this['_el']('approve-error'),_0x339210=this['_el']('approve-error-text');_0x396c62&&_0x339210&&(_0x396c62['hidden']=!![],_0x339210['textContent']='');}['_displayBranchInfo'](_0x4f1970,_0x186e71={}){const _0x5044c5=this['_el']('approve-branches');if(!_0x5044c5)return;const _0x17106a=[];for(const _0x5e4848 of _0x4f1970){_0x186e71[_0x5e4848['name']]&&_0x17106a['push']({'repo':_0x5e4848['name'],'branch':_0x186e71[_0x5e4848['name']]});}if(_0x17106a['length']>0x0){_0x5044c5['hidden']=![];if(_0x17106a['length']===0x1)_0x5044c5['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x17106a[0x0]['branch']+'</code></div>';else{const _0x17bfd2=_0x17106a['map'](_0x308877=>'<div\x20class=\x22branch-item\x22><strong>'+_0x308877['repo']+':</strong>\x20<code>'+_0x308877['branch']+'</code></div>')['join']('');_0x5044c5['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x17bfd2+'</div></div>';}}else _0x5044c5['hidden']=!![],_0x5044c5['innerHTML']='';}['showWarning'](_0x5b7826){const _0x44c4a0=this['_el']('approve-warning'),_0x230d41=this['_el']('approve-warning-text');_0x44c4a0&&_0x230d41&&(_0x230d41['textContent']=_0x5b7826,_0x44c4a0['hidden']=![]);}['hideWarning'](){const _0x140d91=this['_el']('approve-warning'),_0x4506e6=this['_el']('approve-warning-text');_0x140d91&&_0x4506e6&&(_0x140d91['hidden']=!![],_0x4506e6['textContent']='');}['_stripCoAuthoredByLines'](_0x1d2463){return _0x1d2463['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x4fe0ac){try{let _0xf6fd58;try{const _0x1a090f=await fetch(this['baseUrl']+'/settings');if(_0x1a090f['ok']){const _0x3ac7d4=await _0x1a090f['json']();_0xf6fd58=_0x3ac7d4['coderflow_attribution']!==![];}}catch(_0x4df657){}_0xf6fd58===undefined&&(this['coderflowAttribution']!==undefined?_0xf6fd58=this['coderflowAttribution']!==![]:_0xf6fd58=!![]);const _0x90a5b6=this['_stripCoAuthoredByLines'](_0x4fe0ac);if(!_0xf6fd58)return _0x90a5b6;const _0x2cc28a='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x90a5b6+_0x2cc28a;}catch(_0x1addef){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x1addef),_0x4fe0ac;}}['show'](_0x584b8c){!this['initialized']&&this['init']();this['taskData']=_0x584b8c;const _0xb30ab1=this['_el']('approve-modal'),_0x3a379d=this['_el']('commit-message-input'),_0x3a2726=this['_el']('pull-before-commit'),_0x41bcec=this['_el']('push-after-commit'),_0x16d7bf=this['_el']('create-new-branch'),_0x38d08f=this['_el']('new-branch-input-container'),_0x16ca03=this['_el']('new-branch-name'),_0x136498=this['_el']('approve-repo-name'),_0x21b8ee=this['_el']('approve-stats'),_0x3e0eb6=this['_el']('multi-repo-note');if(!_0xb30ab1)return;this['hideError'](),this['hideWarning']();_0x584b8c['warning']&&this['showWarning'](_0x584b8c['warning']);const _0x4751db=_0x584b8c['reposChanged']||[];if(_0x4751db['length']===0x0&&!_0x584b8c['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x4751db,_0x584b8c);const _0x4c8db7=_0x584b8c['commitMessage']||'',_0x2d4c04=this['_stripCoAuthoredByLines'](_0x4c8db7);_0x3a379d['value']=_0x2d4c04;if(_0x3a2726)_0x3a2726['checked']=!![];if(_0x41bcec)_0x41bcec['checked']=!![];_0x16d7bf&&(_0x16d7bf['checked']=![]);_0x38d08f&&(_0x38d08f['hidden']=!![]);_0x16ca03&&(_0x16ca03['value']='');if(_0x41bcec)_0x41bcec['disabled']=![];if(_0x16d7bf)_0x16d7bf['disabled']=![];this['updatePRSupport'](_0x584b8c['prSupported']===!![]);const _0x599242=this['_el']('ibmi-sync-section');if(_0x599242){_0x599242['hidden']=!_0x584b8c['ibmiSyncAvailable'];const _0x4a80ff=this['_el']('sync-to-ibmi'),_0x42d446=this['_el']('ibmi-sync-fields'),_0x267b43=this['_el']('ibmi-sync-library');if(_0x4a80ff)_0x4a80ff['checked']=![];if(_0x42d446)_0x42d446['hidden']=!![];if(_0x267b43)_0x267b43['value']='';const _0x93c060=this['_el']('ibmi-sync-credentials-row');_0x93c060&&(_0x93c060['hidden']=!(_0x584b8c['ibmiSyncAvailable']&&_0x584b8c['syncCredentials']==='prompt'));}const _0x928c6=this['_el']('confirm-approve');_0x584b8c['syncFirst']&&this['onSync']?(_0x928c6&&(_0x928c6['disabled']=!![],_0x928c6['textContent']='Syncing...'),this['_performSync']()):_0x928c6&&(_0x928c6['disabled']=![],_0x928c6['textContent']='Commit\x20Changes');_0xb30ab1['hidden']=![];const _0xcd255d=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0xcd255d,'taskId':_0x584b8c['taskId'],'originalCommitMessage':_0x2d4c04}),setTimeout(()=>{_0x3a379d['focus'](),_0x3a379d['setSelectionRange'](0x0,_0x3a379d['value']['length']);},0x64);}['updatePRSupport'](_0x2cf2ba){const _0x67461a=this['_el']('pr-option-section'),_0xa2bccb=this['_el']('create-pull-request'),_0x1d2766=this['_el']('pr-hint'),_0x55a341=this['_el']('push-after-commit'),_0x53bb74=this['_el']('create-new-branch');if(!_0x67461a)return;if(_0x2cf2ba){_0x67461a['hidden']=![];_0xa2bccb&&!_0xa2bccb['disabled']&&(_0xa2bccb['checked']=![]);if(_0x1d2766)_0x1d2766['hidden']=!![];this['_createPR']=![];return;}_0xa2bccb?.['checked']&&(_0xa2bccb['checked']=![]);if(_0x1d2766)_0x1d2766['hidden']=!![];if(_0x55a341)_0x55a341['disabled']=![];if(_0x53bb74)_0x53bb74['disabled']=![];this['_createPR']=![],_0x67461a['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x418b99,taskId:_0x98f8af,originalCommitMessage:_0x1dfab4}){const _0x1429b2=this['_el']('commit-message-input');if(!_0x1429b2)return;const _0x2d04d6=await this['_addAttributionIfEnabled'](_0x1dfab4);if(_0x418b99!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x98f8af)return;if(!this['isVisible']())return;const _0x5ebeeb=_0x8f3e4c=>_0x8f3e4c['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x5ebeeb(_0x1429b2['value'])!==_0x5ebeeb(_0x1dfab4))return;_0x1429b2['value']=_0x2d04d6;}['_updateDisplay'](_0x37f0cd,_0x151ad3){const _0x5c337f=this['_el']('approve-repo-name'),_0x1d2616=this['_el']('approve-stats'),_0x420752=this['_el']('multi-repo-note');if(_0x37f0cd['length']===0x0){if(_0x5c337f)_0x5c337f['textContent']='Syncing...';if(_0x1d2616)_0x1d2616['textContent']='';if(_0x420752)_0x420752['hidden']=!![];return;}const _0x18d4a5=_0x37f0cd['reduce']((_0x2c15ff,_0x3aaa52)=>_0x2c15ff+(_0x3aaa52['files_changed']||0x0),0x0),_0x26e28b=_0x37f0cd['reduce']((_0xa9d0d6,_0x28b398)=>_0xa9d0d6+(_0x28b398['lines_added']||0x0),0x0),_0x3574a0=_0x37f0cd['reduce']((_0x50429d,_0x4cf8c0)=>_0x50429d+(_0x4cf8c0['lines_deleted']||0x0),0x0);if(_0x37f0cd['length']===0x1){if(_0x5c337f)_0x5c337f['textContent']=_0x37f0cd[0x0]?.['name']||'repository';if(_0x420752)_0x420752['hidden']=!![];}else{const _0x5c010b=_0x37f0cd['map'](_0x1af959=>_0x1af959['name'])['join'](',\x20');if(_0x5c337f)_0x5c337f['textContent']=_0x37f0cd['length']+'\x20repositories:\x20'+_0x5c010b;if(_0x420752)_0x420752['hidden']=![];}_0x1d2616&&(_0x1d2616['textContent']=_0x18d4a5+'\x20file'+(_0x18d4a5===0x1?'':'s')+'\x20changed\x20(+'+_0x26e28b+'\x20-'+_0x3574a0+')'),this['_displayBranchInfo'](_0x37f0cd,_0x151ad3?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x3fab48=this['_el']('confirm-approve');try{const _0x47933f=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x47933f['repos_changed']){const _0x20e94c=this['taskData']['reposChanged']?.['length']||0x0,_0x28c1d9=this['taskData']['reposChanged']?.['reduce']((_0x50beb0,_0x482bd0)=>_0x50beb0+(_0x482bd0['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x47933f['repos_changed'];if(_0x47933f['current_branches']){const _0x2c4e43={...this['taskData']['branches']||{}};for(const [_0x6b6910,_0x1e8960]of Object['entries'](_0x47933f['current_branches'])){_0x1e8960?_0x2c4e43[_0x6b6910]=_0x1e8960:delete _0x2c4e43[_0x6b6910];}this['taskData']['branches']=_0x2c4e43;}this['_updateDisplay'](_0x47933f['repos_changed'],this['taskData']);const _0x4c74d6=_0x47933f['repos_changed']['length'],_0x7ef873=_0x47933f['repos_changed']['reduce']((_0x3112f5,_0x392a43)=>_0x3112f5+(_0x392a43['files_changed']||0x0),0x0);(_0x7ef873>_0x28c1d9||_0x4c74d6>_0x20e94c)&&this['showWarning'](this['taskData']['warning']?this['taskData']['warning']+'\x20Additional\x20changes\x20detected\x20since\x20last\x20sync.':'Additional\x20changes\x20detected\x20since\x20last\x20sync.\x20Review\x20the\x20updated\x20file\x20list.');}_0x3fab48&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x3fab48['disabled']=!![],_0x3fab48['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x3fab48['disabled']=![],_0x3fab48['textContent']='Commit\x20Changes'));}catch(_0xbcae60){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0xbcae60);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0xbcae60['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x3fab48&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x3fab48['disabled']=![],_0x3fab48['textContent']='Commit\x20Changes'):(_0x3fab48['disabled']=!![],_0x3fab48['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x192b20=this['_el']('approve-modal');_0x192b20&&(_0x192b20['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x52a850=this['_el']('commit-message-input'),_0x72f6e1=this['_el']('pull-before-commit'),_0x2bc1ad=this['_el']('push-after-commit'),_0x539acb=this['_el']('create-new-branch'),_0x4fedf8=this['_el']('new-branch-name'),_0x2f0dbb=this['_el']('confirm-approve'),_0x3a9e24=_0x52a850['value']['trim'](),_0x37ae97=_0x72f6e1?.['checked']??!![],_0xd44869=_0x2bc1ad?.['checked']??!![],_0x33711f=_0x539acb?.['checked']||![],_0x2e6cef=_0x4fedf8?.['value']['trim']()||'';this['hideError']();if(!_0x3a9e24){this['showError']('Commit\x20message\x20is\x20required'),_0x52a850['focus']();return;}if(_0x33711f&&!_0x2e6cef){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x4fedf8?.['focus']();return;}if(_0x33711f&&_0x2e6cef){const _0x4ad702=/[\s~^:?*\[\\]/;if(_0x4ad702['test'](_0x2e6cef)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x4fedf8?.['focus']();return;}}const _0xfd4678=this['_el']('sync-to-ibmi')?.['checked'];if(_0xfd4678){const _0x3e661c=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x3e661c){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x398ff8=this['_syncFileTree']['getSelectedFiles']();if(_0x398ff8['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x20240a=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x20240a){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x1f70ba=this['_el']('ibmi-sync-password')?.['value'];if(!_0x1f70ba){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x1f56e5=_0x2f0dbb?.['textContent']||'Commit\x20Changes';_0x2f0dbb&&(_0x2f0dbb['disabled']=!![],_0x33711f?_0x2f0dbb['textContent']='Creating\x20branch\x20&\x20committing...':_0x2f0dbb['textContent']=_0x37ae97?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x579b0e={'commit_message':_0x3a9e24,'pull':_0x37ae97,'push':_0xd44869};_0x33711f&&_0x2e6cef&&(_0x579b0e['new_branch']=_0x2e6cef);let _0x5cbbe6=null;this['onApprove']&&(_0x5cbbe6=await this['onApprove'](this['taskData']['taskId'],_0x579b0e));let _0x2f7bb2='Changes\x20committed';if(_0x33711f)_0x2f7bb2='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x2e6cef+'\x27',_0xd44869&&(_0x2f7bb2+='\x20and\x20pushed');else{if(_0x37ae97&&_0xd44869)_0x2f7bb2='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x37ae97)_0x2f7bb2='Changes\x20pulled\x20and\x20committed';else _0xd44869&&(_0x2f7bb2='Changes\x20committed\x20and\x20pushed');}}const _0x10aa0f=this['_el']('sync-to-ibmi')?.['checked'];let _0x509ac4=null,_0x9965ca=null,_0x5653a7=null,_0x3d8c35=null;if(_0x10aa0f&&this['onSyncToIbmi']){_0x509ac4=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x9965ca=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x5653a7=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0xcfd71c=this['_syncFileTree']['getSelectedFiles']();_0x3d8c35=_0xcfd71c['map'](_0x35d1df=>{const _0x481776=this['_syncRelativeFiles']['indexOf'](_0x35d1df);return _0x481776>=0x0?this['_syncAbsolutePaths'][_0x481776]:_0x35d1df;});}}this['showToast'](_0x2f7bb2,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x5cbbe6||{});}catch(_0x5baf1b){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x5baf1b);}if(_0x10aa0f&&this['onSyncToIbmi']&&_0x509ac4){localStorage['setItem']('coderflow_ibmi_sync_library',_0x509ac4);if(_0x9965ca)localStorage['setItem']('coderflow_ibmi_sync_user',_0x9965ca);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x509ac4,_0x9965ca,_0x5653a7,_0x3d8c35);}catch(_0x2070c2){this['showToast']('Sync\x20failed:\x20'+_0x2070c2['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0xbc9738){console['error']('Failed\x20to\x20approve\x20changes',_0xbc9738),this['showError']('Failed\x20to\x20commit:\x20'+_0xbc9738['message']),_0x2f0dbb&&(_0x2f0dbb['disabled']=![],_0x2f0dbb['textContent']=_0x1f56e5),this['onError']&&this['onError'](_0xbc9738);}}['isVisible'](){const _0x6304a8=this['_el']('approve-modal');return _0x6304a8&&!_0x6304a8['hidden'];}['destroy'](){const _0x25910f=this['_el']('approve-modal');_0x25910f&&_0x25910f['remove'](),this['initialized']=![];}}export function getApproveState(_0x2da9f8,_0x14307d){if(!_0x2da9f8)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x2da9f8['taskType']))return{'canApprove':![],'reason':(_0x2da9f8['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0xed307=_0x14307d?.['repos_changed']?.['length']>0x0,_0x2f7c45=_0x2da9f8['status']==='completed'||_0x2da9f8['status']==='failed'||_0x2da9f8['status']==='interrupted',_0x17f6eb=_0x2da9f8['containerState']==='running',_0x4744ef=_0x2da9f8['approvedBy']!==undefined&&_0x2da9f8['approvedBy']!==null;if(_0x4744ef){const _0x24352c=_0x2da9f8['approvedBy']['name']||_0x2da9f8['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x24352c};}if(!_0xed307)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x2f7c45)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x2da9f8['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x17f6eb)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
@@ -1 +1 @@
1
- export function buildAutomationEnvironmentHref(_0x24a36a,_0x1ebb6e){const _0x1f3ff7=new URLSearchParams();_0x24a36a&&_0x1f3ff7['set']('env',String(_0x24a36a));_0x1f3ff7['set']('tab','automations');_0x1ebb6e&&_0x1f3ff7['set']('automation',String(_0x1ebb6e));const _0x107a5c=_0x1f3ff7['toString']();return'environments.html'+(_0x107a5c?'?'+_0x107a5c:'');}export function buildAutomationTaskFilterHref(_0x18d229){const _0x5d1aab=new URLSearchParams();_0x18d229&&_0x5d1aab['set']('automation',String(_0x18d229));const _0x2471a1=_0x5d1aab['toString']();return'index.html'+(_0x2471a1?'?'+_0x2471a1:'');}export function parseAutomationDeepLinkParams(_0x1df9c4=''){const _0x14d245=new URLSearchParams(_0x1df9c4||'');return{'env':_0x14d245['get']('env'),'tab':_0x14d245['get']('tab'),'automation':_0x14d245['get']('automation')};}
1
+ export function buildAutomationEnvironmentHref(_0x2b387e,_0x150102){const _0x555f65=new URLSearchParams();_0x2b387e&&_0x555f65['set']('env',String(_0x2b387e));_0x555f65['set']('tab','automations');_0x150102&&_0x555f65['set']('automation',String(_0x150102));const _0xb2baed=_0x555f65['toString']();return'environments.html'+(_0xb2baed?'?'+_0xb2baed:'');}export function buildAutomationTaskFilterHref(_0x428700){const _0x342ef2=new URLSearchParams();_0x428700&&_0x342ef2['set']('automation',String(_0x428700));const _0x2c09b4=_0x342ef2['toString']();return'index.html'+(_0x2c09b4?'?'+_0x2c09b4:'');}export function parseAutomationDeepLinkParams(_0x2fbc5b=''){const _0x3ced86=new URLSearchParams(_0x2fbc5b||'');return{'env':_0x3ced86['get']('env'),'tab':_0x3ced86['get']('tab'),'automation':_0x3ced86['get']('automation')};}
@@ -1 +1 @@
1
- export const AUTOMATION_MONTHLY_DAY_MIN=0x1;export const AUTOMATION_MONTHLY_DAY_MAX=0x1c;const DEFAULT_SCHEDULE_FORM_STATE=Object['freeze']({'frequency':'daily','dailyHour':'2','dailyMinute':'0','weeklyDay':'1','weeklyHour':'9','weeklyMinute':'0','monthlyDay':'1','monthlyHour':'0','monthlyMinute':'0','recurringInterval':'*/30\x20*\x20*\x20*\x20*','recurringStartHour':'','recurringEndHour':'','recurringDayToken':'*','customCron':''}),RECURRING_INTERVAL_STEPS=['2','4','6','8','12'];function createDefaultScheduleFormState(){return{...DEFAULT_SCHEDULE_FORM_STATE};}function parseBoundedInteger(_0x5cadac,_0x35d536,_0x4066d8){const _0x5929a2=Number['parseInt'](_0x5cadac,0xa);if(!Number['isInteger'](_0x5929a2)||_0x5929a2<_0x35d536||_0x5929a2>_0x4066d8)return null;return _0x5929a2;}function inferRecurringInterval(_0x229fe4,_0x3ec40f){if(_0x229fe4==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x229fe4==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x229fe4!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x3ec40f==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x3ec40f))return'0\x20*\x20*\x20*\x20*';for(const _0x2b43e5 of RECURRING_INTERVAL_STEPS){if(_0x3ec40f['startsWith']('*/'+_0x2b43e5)||_0x3ec40f['includes']('/'+_0x2b43e5))return'0\x20*/'+_0x2b43e5+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x1c813e){const _0x2c9e21=String(_0x1c813e||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x2c9e21)return{'start':'','end':''};const _0x405ceb=parseBoundedInteger(_0x2c9e21[0x1],0x0,0x17),_0x501fbe=parseBoundedInteger(_0x2c9e21[0x2],0x0,0x17);if(_0x405ceb===null||_0x501fbe===null||_0x405ceb>_0x501fbe)return{'start':'','end':''};return{'start':String(_0x405ceb),'end':String(_0x501fbe)};}export function parseAutomationScheduleToFormState(_0x3cc7a2){const _0x52cd92=String(_0x3cc7a2||'')['trim'](),_0x4b5d79=createDefaultScheduleFormState(),_0x5adc80=_0x52cd92['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x5adc80){const _0x3b6558=parseBoundedInteger(_0x5adc80[0x1],0x0,0x3b),_0x5be4b7=parseBoundedInteger(_0x5adc80[0x2],0x0,0x17);if(_0x3b6558!==null&&_0x5be4b7!==null)return _0x4b5d79['frequency']='daily',_0x4b5d79['dailyMinute']=String(_0x3b6558),_0x4b5d79['dailyHour']=String(_0x5be4b7),_0x4b5d79;}const _0x123f54=_0x52cd92['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x123f54){const _0x3a8edf=parseBoundedInteger(_0x123f54[0x1],0x0,0x3b),_0x394509=parseBoundedInteger(_0x123f54[0x2],0x0,0x17),_0x378564=parseBoundedInteger(_0x123f54[0x3],0x0,0x7);if(_0x3a8edf!==null&&_0x394509!==null&&_0x378564!==null)return _0x4b5d79['frequency']='weekly',_0x4b5d79['weeklyMinute']=String(_0x3a8edf),_0x4b5d79['weeklyHour']=String(_0x394509),_0x4b5d79['weeklyDay']=String(_0x378564===0x7?0x0:_0x378564),_0x4b5d79;}const _0x28f1d9=_0x52cd92['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x28f1d9){const _0x25759a=parseBoundedInteger(_0x28f1d9[0x1],0x0,0x3b),_0x536c58=parseBoundedInteger(_0x28f1d9[0x2],0x0,0x17),_0x5336f2=parseBoundedInteger(_0x28f1d9[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x25759a!==null&&_0x536c58!==null&&_0x5336f2!==null)return _0x4b5d79['frequency']='monthly',_0x4b5d79['monthlyMinute']=String(_0x25759a),_0x4b5d79['monthlyHour']=String(_0x536c58),_0x4b5d79['monthlyDay']=String(_0x5336f2),_0x4b5d79;}const _0x39913e=_0x52cd92['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x39913e){const [,_0x574990,_0x137292,_0x309f35]=_0x39913e;_0x4b5d79['frequency']='recurring',_0x4b5d79['recurringInterval']=inferRecurringInterval(_0x574990,_0x137292),_0x4b5d79['recurringDayToken']=String(_0x309f35||'')['trim']()||'*';const _0x19ee09=parseRecurringHourRange(_0x137292);return _0x4b5d79['recurringStartHour']=_0x19ee09['start'],_0x4b5d79['recurringEndHour']=_0x19ee09['end'],_0x4b5d79;}return _0x4b5d79['frequency']='custom',_0x4b5d79['customCron']=_0x52cd92,_0x4b5d79;}export function buildAutomationCronFromFormState(_0x1faac4={}){const _0x2e4bdc=String(_0x1faac4['frequency']||'daily');if(_0x2e4bdc==='custom')return String(_0x1faac4['customCron']||'')['trim']();if(_0x2e4bdc==='daily'){const _0x268ecf=String(_0x1faac4['dailyHour']??'2'),_0x2eb078=String(_0x1faac4['dailyMinute']??'0');return _0x2eb078+'\x20'+_0x268ecf+'\x20*\x20*\x20*';}if(_0x2e4bdc==='weekly'){const _0x5bb73e=String(_0x1faac4['weeklyDay']??'1'),_0x478f29=String(_0x1faac4['weeklyHour']??'9'),_0x10c9fb=String(_0x1faac4['weeklyMinute']??'0');return _0x10c9fb+'\x20'+_0x478f29+'\x20*\x20*\x20'+_0x5bb73e;}if(_0x2e4bdc==='monthly'){const _0x24386d=String(_0x1faac4['monthlyDay']??'1'),_0x478068=String(_0x1faac4['monthlyHour']??'0'),_0xc30442=String(_0x1faac4['monthlyMinute']??'0');return _0xc30442+'\x20'+_0x478068+'\x20'+_0x24386d+'\x20*\x20*';}const _0x8032d5=String(_0x1faac4['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x59f51a='*/30',_0x4023ad='*']=_0x8032d5['split'](/\s+/);let _0x9850b0=_0x4023ad;const _0x20e056=String(_0x1faac4['recurringStartHour']??'')['trim'](),_0x14a15a=String(_0x1faac4['recurringEndHour']??'')['trim']();if(_0x20e056!==''&&_0x14a15a!==''){const _0x99f47f=Number['parseInt'](_0x20e056,0xa),_0x199436=Number['parseInt'](_0x14a15a,0xa);if(Number['isInteger'](_0x99f47f)&&Number['isInteger'](_0x199436)&&_0x99f47f<=_0x199436){const _0x2d2d0d=_0x4023ad['match'](/^\*\/(\d+)$/);_0x2d2d0d?_0x9850b0=_0x99f47f+'-'+_0x199436+'/'+_0x2d2d0d[0x1]:_0x9850b0=_0x99f47f+'-'+_0x199436;}}const _0x489712=String(_0x1faac4['recurringDayToken']??'*')['trim']()||'*';return _0x59f51a+'\x20'+_0x9850b0+'\x20*\x20*\x20'+_0x489712;}
1
+ export const AUTOMATION_MONTHLY_DAY_MIN=0x1;export const AUTOMATION_MONTHLY_DAY_MAX=0x1c;const DEFAULT_SCHEDULE_FORM_STATE=Object['freeze']({'frequency':'daily','dailyHour':'2','dailyMinute':'0','weeklyDay':'1','weeklyHour':'9','weeklyMinute':'0','monthlyDay':'1','monthlyHour':'0','monthlyMinute':'0','recurringInterval':'*/30\x20*\x20*\x20*\x20*','recurringStartHour':'','recurringEndHour':'','recurringDayToken':'*','customCron':''}),RECURRING_INTERVAL_STEPS=['2','4','6','8','12'];function createDefaultScheduleFormState(){return{...DEFAULT_SCHEDULE_FORM_STATE};}function parseBoundedInteger(_0x2adc5b,_0x5ac1fa,_0x4f0671){const _0x5a5fe9=Number['parseInt'](_0x2adc5b,0xa);if(!Number['isInteger'](_0x5a5fe9)||_0x5a5fe9<_0x5ac1fa||_0x5a5fe9>_0x4f0671)return null;return _0x5a5fe9;}function inferRecurringInterval(_0x4d9c45,_0x44f20e){if(_0x4d9c45==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x4d9c45==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x4d9c45!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x44f20e==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x44f20e))return'0\x20*\x20*\x20*\x20*';for(const _0x4086bf of RECURRING_INTERVAL_STEPS){if(_0x44f20e['startsWith']('*/'+_0x4086bf)||_0x44f20e['includes']('/'+_0x4086bf))return'0\x20*/'+_0x4086bf+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x1b5400){const _0x407c14=String(_0x1b5400||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x407c14)return{'start':'','end':''};const _0x21c1b1=parseBoundedInteger(_0x407c14[0x1],0x0,0x17),_0x4fe1eb=parseBoundedInteger(_0x407c14[0x2],0x0,0x17);if(_0x21c1b1===null||_0x4fe1eb===null||_0x21c1b1>_0x4fe1eb)return{'start':'','end':''};return{'start':String(_0x21c1b1),'end':String(_0x4fe1eb)};}export function parseAutomationScheduleToFormState(_0x4a7292){const _0x573fd9=String(_0x4a7292||'')['trim'](),_0x4c6c16=createDefaultScheduleFormState(),_0x144328=_0x573fd9['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x144328){const _0xf9a8a6=parseBoundedInteger(_0x144328[0x1],0x0,0x3b),_0x5d9a84=parseBoundedInteger(_0x144328[0x2],0x0,0x17);if(_0xf9a8a6!==null&&_0x5d9a84!==null)return _0x4c6c16['frequency']='daily',_0x4c6c16['dailyMinute']=String(_0xf9a8a6),_0x4c6c16['dailyHour']=String(_0x5d9a84),_0x4c6c16;}const _0x31af3d=_0x573fd9['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x31af3d){const _0x46fec0=parseBoundedInteger(_0x31af3d[0x1],0x0,0x3b),_0xd838c4=parseBoundedInteger(_0x31af3d[0x2],0x0,0x17),_0x5e31a2=parseBoundedInteger(_0x31af3d[0x3],0x0,0x7);if(_0x46fec0!==null&&_0xd838c4!==null&&_0x5e31a2!==null)return _0x4c6c16['frequency']='weekly',_0x4c6c16['weeklyMinute']=String(_0x46fec0),_0x4c6c16['weeklyHour']=String(_0xd838c4),_0x4c6c16['weeklyDay']=String(_0x5e31a2===0x7?0x0:_0x5e31a2),_0x4c6c16;}const _0x372f2b=_0x573fd9['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x372f2b){const _0x4eaadc=parseBoundedInteger(_0x372f2b[0x1],0x0,0x3b),_0x1c172d=parseBoundedInteger(_0x372f2b[0x2],0x0,0x17),_0x46c787=parseBoundedInteger(_0x372f2b[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x4eaadc!==null&&_0x1c172d!==null&&_0x46c787!==null)return _0x4c6c16['frequency']='monthly',_0x4c6c16['monthlyMinute']=String(_0x4eaadc),_0x4c6c16['monthlyHour']=String(_0x1c172d),_0x4c6c16['monthlyDay']=String(_0x46c787),_0x4c6c16;}const _0x575000=_0x573fd9['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x575000){const [,_0x29f337,_0x375262,_0x16ca7d]=_0x575000;_0x4c6c16['frequency']='recurring',_0x4c6c16['recurringInterval']=inferRecurringInterval(_0x29f337,_0x375262),_0x4c6c16['recurringDayToken']=String(_0x16ca7d||'')['trim']()||'*';const _0x3d7bcb=parseRecurringHourRange(_0x375262);return _0x4c6c16['recurringStartHour']=_0x3d7bcb['start'],_0x4c6c16['recurringEndHour']=_0x3d7bcb['end'],_0x4c6c16;}return _0x4c6c16['frequency']='custom',_0x4c6c16['customCron']=_0x573fd9,_0x4c6c16;}export function buildAutomationCronFromFormState(_0x34212d={}){const _0x49b520=String(_0x34212d['frequency']||'daily');if(_0x49b520==='custom')return String(_0x34212d['customCron']||'')['trim']();if(_0x49b520==='daily'){const _0x1dc11d=String(_0x34212d['dailyHour']??'2'),_0x46cd98=String(_0x34212d['dailyMinute']??'0');return _0x46cd98+'\x20'+_0x1dc11d+'\x20*\x20*\x20*';}if(_0x49b520==='weekly'){const _0x2e67f3=String(_0x34212d['weeklyDay']??'1'),_0x3a0b61=String(_0x34212d['weeklyHour']??'9'),_0x1bf3bb=String(_0x34212d['weeklyMinute']??'0');return _0x1bf3bb+'\x20'+_0x3a0b61+'\x20*\x20*\x20'+_0x2e67f3;}if(_0x49b520==='monthly'){const _0x14f7ed=String(_0x34212d['monthlyDay']??'1'),_0x39d7c1=String(_0x34212d['monthlyHour']??'0'),_0x4156cf=String(_0x34212d['monthlyMinute']??'0');return _0x4156cf+'\x20'+_0x39d7c1+'\x20'+_0x14f7ed+'\x20*\x20*';}const _0x9d2fda=String(_0x34212d['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x2c7a0b='*/30',_0x3b1df8='*']=_0x9d2fda['split'](/\s+/);let _0x27455c=_0x3b1df8;const _0x48daab=String(_0x34212d['recurringStartHour']??'')['trim'](),_0x139549=String(_0x34212d['recurringEndHour']??'')['trim']();if(_0x48daab!==''&&_0x139549!==''){const _0x2973c3=Number['parseInt'](_0x48daab,0xa),_0x3724c7=Number['parseInt'](_0x139549,0xa);if(Number['isInteger'](_0x2973c3)&&Number['isInteger'](_0x3724c7)&&_0x2973c3<=_0x3724c7){const _0x4cf9ab=_0x3b1df8['match'](/^\*\/(\d+)$/);_0x4cf9ab?_0x27455c=_0x2973c3+'-'+_0x3724c7+'/'+_0x4cf9ab[0x1]:_0x27455c=_0x2973c3+'-'+_0x3724c7;}}const _0xceffbe=String(_0x34212d['recurringDayToken']??'*')['trim']()||'*';return _0x2c7a0b+'\x20'+_0x27455c+'\x20*\x20*\x20'+_0xceffbe;}
@@ -1 +1 @@
1
- export class CommentsWidget{constructor(_0x2a55c3,_0x3f5597={}){this['container']=_0x2a55c3,this['options']={'taskId':_0x3f5597['taskId']||null,'currentUserId':_0x3f5597['currentUserId']||null,'compact':_0x3f5597['compact']||![],'skipHeader':_0x3f5597['skipHeader']||![],'onCommentsLoaded':_0x3f5597['onCommentsLoaded']||null,'onCommentsChanged':_0x3f5597['onCommentsChanged']||null,'enableAttachments':_0x3f5597['enableAttachments']||![],'getAPI':_0x3f5597['getAPI']||(()=>window['API'])},this['comments']=[],this['editor']=null,this['editingCommentId']=null,this['isLoading']=![],this['pendingAttachments']=[],this['existingAttachments']=[],this['init']();}['init'](){this['container']['innerHTML']='',this['container']['className']='comments-widget\x20'+(this['options']['compact']?'comments-widget-compact':''),this['createHeader'](),this['createCommentsList'](),this['createInputSection'](),this['options']['taskId']&&(this['loadComments'](),this['options']['enableAttachments']&&this['loadExistingAttachments']());}async['loadExistingAttachments'](){try{const _0x13be6d=this['options']['getAPI'](),_0x39458e=await _0x13be6d['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x39458e['attachments']||[];}catch(_0x1776fb){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x1776fb),this['existingAttachments']=[];}}['createHeader'](){if(this['options']['skipHeader']){this['header']=null,this['isExpanded']=!![];return;}if(this['options']['compact']){this['header']=document['createElement']('div'),this['header']['className']='comments-header\x20comments-header-compact',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22comments-toggle-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-toggle-icon\x22\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-label\x22>Comments</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-badge\x22\x20id=\x22comments-count-badge\x22>0</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-chevron\x22\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x226\x209\x2012\x2015\x2018\x209\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']);const _0x440a9d=this['header']['querySelector']('.comments-toggle-btn');_0x440a9d['addEventListener']('click',()=>this['toggleExpanded']()),this['isExpanded']=![];}else this['header']=document['createElement']('div'),this['header']['className']='comments-header',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20class=\x22comments-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2218\x22\x20height=\x2218\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Comments\x20<span\x20class=\x22comments-count\x22\x20id=\x22comments-count\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']),this['isExpanded']=!![];}['createCommentsList'](){this['commentsListWrapper']=document['createElement']('div'),this['commentsListWrapper']['className']='comments-list-wrapper',this['options']['compact']&&!this['isExpanded']&&(this['commentsListWrapper']['hidden']=!![]),this['commentsList']=document['createElement']('div'),this['commentsList']['className']='comments-list',this['commentsListWrapper']['appendChild'](this['commentsList']),this['container']['appendChild'](this['commentsListWrapper']);}['createInputSection'](){this['inputSection']=document['createElement']('div'),this['inputSection']['className']='comments-input-section';this['options']['compact']&&!this['isExpanded']&&(this['inputSection']['hidden']=!![]);const _0xd33e53=document['createElement']('div');_0xd33e53['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0xd33e53['appendChild'](this['toolbar']);const _0x52ec13=document['createElement']('div');_0x52ec13['className']='comments-editor-placeholder',_0xd33e53['appendChild'](_0x52ec13);const _0x124ef2=document['createElement']('div');_0x124ef2['className']='comments-input-actions',_0x124ef2['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-cancel-btn\x22\x20hidden>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-primary\x20btn-small\x20comments-submit-btn\x22\x20disabled>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-text\x22>Add\x20Comment</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-loading\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22spinner\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20width=\x2214\x22\x20height=\x2214\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x223\x22\x20stroke-dasharray=\x2231.4\x2031.4\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20',this['inputSection']['appendChild'](_0xd33e53),this['inputSection']['appendChild'](_0x124ef2),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x52ec13),this['submitBtn']=_0x124ef2['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x124ef2['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0x5f2599){const _0x316055=document['createElement']('textarea');_0x316055['placeholder']='Add\x20a\x20comment...',_0x316055['className']='comments-textarea',_0x5f2599['appendChild'](_0x316055);const _0x39726f=window['MarkdownEditor'];if(!_0x39726f){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x2899b4={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x139a52=>{const _0x10b2e2=_0x139a52&&_0x139a52['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x10b2e2;},'fetchUsers':async()=>{const _0x1a14ee=this['options']['getAPI']();return _0x1a14ee['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x2899b4['onAddAttachments']=_0x470b32=>{this['pendingAttachments']['push'](..._0x470b32),this['submitBtn']['disabled']=![];},_0x2899b4['resolveAttachmentUrl']=_0x128c6f=>{const _0x4fffbc=this['options']['getAPI']();return _0x4fffbc['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x128c6f);},_0x2899b4['isAttachmentNameTaken']=_0x368e61=>{return this['pendingAttachments']['some'](_0x4e1964=>_0x4e1964['name']===_0x368e61)||this['existingAttachments']['some'](_0x1e180c=>_0x1e180c['name']===_0x368e61);});this['editor']=new _0x39726f(_0x316055,_0x2899b4);const _0x36e81a=this['editor']['editor'],_0x154492=this['editor']['toolbar'];_0x154492&&(_0x154492['classList']['add']('comments-toolbar-hidden'),_0x36e81a['addEventListener']('focus',()=>{_0x154492['classList']['remove']('comments-toolbar-hidden');}),_0x36e81a['addEventListener']('blur',_0x467d78=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x154492['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x154492['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x83f9fc=this['header']['querySelector']('.comments-chevron');_0x83f9fc&&(_0x83f9fc['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x1e21ff){this['options']['taskId']=_0x1e21ff,this['comments']=[],this['renderComments'](),_0x1e21ff&&this['loadComments']();}async['loadComments'](){if(!this['options']['taskId']||this['isLoading'])return;this['isLoading']=!![],this['commentsList']['innerHTML']='<div\x20class=\x22comments-loading\x22>Loading\x20comments...</div>';try{const _0x4646d9=this['options']['getAPI'](),_0x27ea40=await _0x4646d9['getComments'](this['options']['taskId']);this['comments']=_0x27ea40['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x5befa3){console['error']('Failed\x20to\x20load\x20comments:',_0x5befa3),this['commentsList']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-error\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Failed\x20to\x20load\x20comments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x22\x20onclick=\x22this.parentElement.parentElement.closest(\x27.comments-widget\x27).__widget.loadComments()\x22>Retry</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20';}finally{this['isLoading']=![];}}['renderComments'](){if(this['comments']['length']===0x0){this['commentsList']['innerHTML']='<div\x20class=\x22comments-empty\x22>No\x20comments\x20yet</div>';return;}this['commentsList']['innerHTML']='',this['comments']['forEach'](_0x19c58d=>{const _0x2993ee=this['createCommentElement'](_0x19c58d);this['commentsList']['appendChild'](_0x2993ee);});}['createCommentElement'](_0x234232){const _0x406d44=document['createElement']('div');_0x406d44['className']='comment-item',_0x406d44['dataset']['commentId']=_0x234232['id'];const _0x549d19=this['options']['currentUserId']&&_0x234232['author']?.['userId']===this['options']['currentUserId'],_0x1237b1=this['formatDate'](_0x234232['createdAt']),_0x29b2f7=_0x234232['updatedAt']!==_0x234232['createdAt'],_0x54b7ba=this['resolveAttachmentUrls'](_0x234232['content']);let _0x283285=window['marked']?window['marked']['parse'](_0x54b7ba):_0x54b7ba;_0x283285=this['renderMentions'](_0x283285),_0x406d44['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-author\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-author-name\x22>'+this['escapeHtml'](_0x234232['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x234232['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1237b1+(_0x29b2f7?'\x20(edited)':'')+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x549d19?'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-edit-btn\x22\x20title=\x22Edit\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-delete-btn\x22\x20title=\x22Delete\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20':'')+'\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-content\x22>'+_0x283285+'</div>\x0a\x20\x20\x20\x20';if(_0x549d19){const _0x110a5a=_0x406d44['querySelector']('.comment-edit-btn'),_0x48e616=_0x406d44['querySelector']('.comment-delete-btn');_0x110a5a?.['addEventListener']('click',()=>this['startEdit'](_0x234232)),_0x48e616?.['addEventListener']('click',()=>this['deleteComment'](_0x234232['id']));}return _0x406d44;}['formatDate'](_0x484047){const _0x42b49e=new Date(_0x484047),_0x53df8b=new Date(),_0x8cf3a6=_0x53df8b-_0x42b49e,_0x9b3ea8=Math['floor'](_0x8cf3a6/0xea60),_0x204640=Math['floor'](_0x8cf3a6/0x36ee80),_0x47ec4c=Math['floor'](_0x8cf3a6/0x5265c00);if(_0x9b3ea8<0x1)return'just\x20now';if(_0x9b3ea8<0x3c)return _0x9b3ea8+'m\x20ago';if(_0x204640<0x18)return _0x204640+'h\x20ago';if(_0x47ec4c<0x7)return _0x47ec4c+'d\x20ago';return _0x42b49e['toLocaleDateString']();}['escapeHtml'](_0x106602){const _0x3614ce=document['createElement']('div');return _0x3614ce['textContent']=_0x106602,_0x3614ce['innerHTML'];}['resolveAttachmentUrls'](_0x48b0d8){if(!_0x48b0d8||!this['options']['taskId'])return _0x48b0d8;const _0x25892a=this['options']['getAPI'](),_0x517b2c=_0x25892a['getBaseUrl']();let _0x1c4393=String(_0x48b0d8)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x417749,_0x1eaf8f)=>{const _0x490e19=String(_0x1eaf8f||'')['trim']();if(!_0x490e19)return _0x417749;let _0x45e2dc=_0x490e19;try{_0x45e2dc=decodeURIComponent(_0x490e19);}catch{}return']('+_0x517b2c+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x45e2dc)+')';});return _0x1c4393;}['renderMentions'](_0x46b0a1){if(!_0x46b0a1)return _0x46b0a1;return String(_0x46b0a1)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x3dc900,_0xae2f6a,_0x474160)=>{const _0x184b71=this['escapeHtml'](_0x474160),_0x46a12c=this['escapeHtml'](_0xae2f6a);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x46a12c+'\x22>@'+_0x184b71+'</span>';});}['startEdit'](_0x42f4c3){this['editingCommentId']=_0x42f4c3['id'],this['editor']['setValue'](_0x42f4c3['content']),this['editor']['focus'](),this['cancelBtn']['hidden']=![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Save',this['editor']['toolbar']&&this['editor']['toolbar']['classList']['remove']('comments-toolbar-hidden'),this['inputSection']['scrollIntoView']({'behavior':'smooth','block':'nearest'});}['cancelEdit'](){this['editingCommentId']=null,this['editor']['clear'](),this['cancelBtn']['hidden']=!![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Add\x20Comment',this['submitBtn']['disabled']=!![],this['editor']['toolbar']&&!this['editor']['getValue']()?.['trim']()&&this['editor']['toolbar']['classList']['add']('comments-toolbar-hidden');}async['handleSubmit'](){const _0x10bb75=this['editor']['getValue']()?.['trim']();if(!_0x10bb75&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x53ed99=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x53ed99['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x28a882=>({'name':_0x28a882['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x42165e=await _0x53ed99['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x10bb75),_0x549578=this['comments']['findIndex'](_0xf74310=>_0xf74310['id']===this['editingCommentId']);_0x549578!==-0x1&&(this['comments'][_0x549578]=_0x42165e['comment']);}else{const _0x2976e0=await _0x53ed99['addComment'](this['options']['taskId'],_0x10bb75);this['comments']['push'](_0x2976e0['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x27c7a6){console['error']('Failed\x20to\x20save\x20comment:',_0x27c7a6),alert('Failed\x20to\x20save\x20comment:\x20'+_0x27c7a6['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x1006ac){const _0x26840d=await this['showDeleteConfirmModal']();if(!_0x26840d)return;try{const _0x5c893b=this['options']['getAPI']();await _0x5c893b['deleteComment'](this['options']['taskId'],_0x1006ac),this['comments']=this['comments']['filter'](_0x1a3b4e=>_0x1a3b4e['id']!==_0x1006ac),this['renderComments'](),this['updateCount']();}catch(_0xfca618){console['error']('Failed\x20to\x20delete\x20comment:',_0xfca618),alert('Failed\x20to\x20delete\x20comment:\x20'+_0xfca618['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x200f01=>{const _0x4436b8=document['createElement']('div');_0x4436b8['className']='comments-confirm-modal',_0x4436b8['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-backdrop\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-dialog\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3>Delete\x20Comment</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon\x20comments-confirm-close\x22\x20title=\x22Close\x22>×</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20this\x20comment?\x20This\x20action\x20cannot\x20be\x20undone.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-confirm-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-danger\x20btn-small\x20comments-confirm-delete\x22>Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20',document['body']['appendChild'](_0x4436b8);const _0x47919a=_0x424dea=>{document['removeEventListener']('keydown',_0x3ff95f),_0x4436b8['remove'](),_0x200f01(_0x424dea);},_0x3ff95f=_0xbe4851=>{if(_0xbe4851['key']==='Escape')_0x47919a(![]);};document['addEventListener']('keydown',_0x3ff95f),_0x4436b8['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x47919a(![])),_0x4436b8['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x47919a(![])),_0x4436b8['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x47919a(![])),_0x4436b8['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x47919a(!![])),_0x4436b8['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x239fcf){this['submitBtn']['disabled']=_0x239fcf,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x239fcf,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x239fcf;}['updateCount'](){const _0x3e0c7e=this['comments']['length'],_0x158d5e=this['container']['querySelector']('#comments-count-badge');_0x158d5e&&(_0x158d5e['textContent']=_0x3e0c7e,_0x158d5e['hidden']=_0x3e0c7e===0x0);const _0x5a1552=this['container']['querySelector']('#comments-count');_0x5a1552&&(_0x5a1552['textContent']=_0x3e0c7e>0x0?'('+_0x3e0c7e+')':''),this['options']['onCommentsChanged']&&this['options']['onCommentsChanged'](this['comments']);}['getCommentCount'](){return this['comments']['length'];}['destroy'](){this['editor']&&this['editor']['destroy'](),this['container']['innerHTML']='';}}CommentsWidget['prototype']['_attachToContainer']=function(){this['container']['__widget']=this;};typeof window!=='undefined'&&(window['CommentsWidget']=CommentsWidget);
1
+ export class CommentsWidget{constructor(_0x544fdc,_0x53857e={}){this['container']=_0x544fdc,this['options']={'taskId':_0x53857e['taskId']||null,'currentUserId':_0x53857e['currentUserId']||null,'compact':_0x53857e['compact']||![],'skipHeader':_0x53857e['skipHeader']||![],'onCommentsLoaded':_0x53857e['onCommentsLoaded']||null,'onCommentsChanged':_0x53857e['onCommentsChanged']||null,'enableAttachments':_0x53857e['enableAttachments']||![],'getAPI':_0x53857e['getAPI']||(()=>window['API'])},this['comments']=[],this['editor']=null,this['editingCommentId']=null,this['isLoading']=![],this['pendingAttachments']=[],this['existingAttachments']=[],this['init']();}['init'](){this['container']['innerHTML']='',this['container']['className']='comments-widget\x20'+(this['options']['compact']?'comments-widget-compact':''),this['createHeader'](),this['createCommentsList'](),this['createInputSection'](),this['options']['taskId']&&(this['loadComments'](),this['options']['enableAttachments']&&this['loadExistingAttachments']());}async['loadExistingAttachments'](){try{const _0x2facb6=this['options']['getAPI'](),_0x187e4a=await _0x2facb6['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x187e4a['attachments']||[];}catch(_0x4e31b0){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x4e31b0),this['existingAttachments']=[];}}['createHeader'](){if(this['options']['skipHeader']){this['header']=null,this['isExpanded']=!![];return;}if(this['options']['compact']){this['header']=document['createElement']('div'),this['header']['className']='comments-header\x20comments-header-compact',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22comments-toggle-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-toggle-icon\x22\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-label\x22>Comments</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-badge\x22\x20id=\x22comments-count-badge\x22>0</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-chevron\x22\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x226\x209\x2012\x2015\x2018\x209\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']);const _0x454c10=this['header']['querySelector']('.comments-toggle-btn');_0x454c10['addEventListener']('click',()=>this['toggleExpanded']()),this['isExpanded']=![];}else this['header']=document['createElement']('div'),this['header']['className']='comments-header',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20class=\x22comments-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2218\x22\x20height=\x2218\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Comments\x20<span\x20class=\x22comments-count\x22\x20id=\x22comments-count\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']),this['isExpanded']=!![];}['createCommentsList'](){this['commentsListWrapper']=document['createElement']('div'),this['commentsListWrapper']['className']='comments-list-wrapper',this['options']['compact']&&!this['isExpanded']&&(this['commentsListWrapper']['hidden']=!![]),this['commentsList']=document['createElement']('div'),this['commentsList']['className']='comments-list',this['commentsListWrapper']['appendChild'](this['commentsList']),this['container']['appendChild'](this['commentsListWrapper']);}['createInputSection'](){this['inputSection']=document['createElement']('div'),this['inputSection']['className']='comments-input-section';this['options']['compact']&&!this['isExpanded']&&(this['inputSection']['hidden']=!![]);const _0x4313ae=document['createElement']('div');_0x4313ae['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x4313ae['appendChild'](this['toolbar']);const _0x383750=document['createElement']('div');_0x383750['className']='comments-editor-placeholder',_0x4313ae['appendChild'](_0x383750);const _0x70ac1a=document['createElement']('div');_0x70ac1a['className']='comments-input-actions',_0x70ac1a['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-cancel-btn\x22\x20hidden>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-primary\x20btn-small\x20comments-submit-btn\x22\x20disabled>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-text\x22>Add\x20Comment</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-loading\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22spinner\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20width=\x2214\x22\x20height=\x2214\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x223\x22\x20stroke-dasharray=\x2231.4\x2031.4\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20',this['inputSection']['appendChild'](_0x4313ae),this['inputSection']['appendChild'](_0x70ac1a),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x383750),this['submitBtn']=_0x70ac1a['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x70ac1a['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0xde5445){const _0x19610d=document['createElement']('textarea');_0x19610d['placeholder']='Add\x20a\x20comment...',_0x19610d['className']='comments-textarea',_0xde5445['appendChild'](_0x19610d);const _0x1403a5=window['MarkdownEditor'];if(!_0x1403a5){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x102851={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x7c5476=>{const _0x46c01c=_0x7c5476&&_0x7c5476['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x46c01c;},'fetchUsers':async()=>{const _0x2b9e7d=this['options']['getAPI']();return _0x2b9e7d['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x102851['onAddAttachments']=_0x1b9caf=>{this['pendingAttachments']['push'](..._0x1b9caf),this['submitBtn']['disabled']=![];},_0x102851['resolveAttachmentUrl']=_0x7e3d8a=>{const _0x2416b3=this['options']['getAPI']();return _0x2416b3['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x7e3d8a);},_0x102851['isAttachmentNameTaken']=_0x40171c=>{return this['pendingAttachments']['some'](_0x48841a=>_0x48841a['name']===_0x40171c)||this['existingAttachments']['some'](_0x424252=>_0x424252['name']===_0x40171c);});this['editor']=new _0x1403a5(_0x19610d,_0x102851);const _0x908e7a=this['editor']['editor'],_0xa94022=this['editor']['toolbar'];_0xa94022&&(_0xa94022['classList']['add']('comments-toolbar-hidden'),_0x908e7a['addEventListener']('focus',()=>{_0xa94022['classList']['remove']('comments-toolbar-hidden');}),_0x908e7a['addEventListener']('blur',_0x2de2cc=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0xa94022['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0xa94022['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x208a78=this['header']['querySelector']('.comments-chevron');_0x208a78&&(_0x208a78['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x425844){this['options']['taskId']=_0x425844,this['comments']=[],this['renderComments'](),_0x425844&&this['loadComments']();}async['loadComments'](){if(!this['options']['taskId']||this['isLoading'])return;this['isLoading']=!![],this['commentsList']['innerHTML']='<div\x20class=\x22comments-loading\x22>Loading\x20comments...</div>';try{const _0x1810ea=this['options']['getAPI'](),_0x4918e6=await _0x1810ea['getComments'](this['options']['taskId']);this['comments']=_0x4918e6['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x303cfb){console['error']('Failed\x20to\x20load\x20comments:',_0x303cfb),this['commentsList']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-error\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Failed\x20to\x20load\x20comments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x22\x20onclick=\x22this.parentElement.parentElement.closest(\x27.comments-widget\x27).__widget.loadComments()\x22>Retry</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20';}finally{this['isLoading']=![];}}['renderComments'](){if(this['comments']['length']===0x0){this['commentsList']['innerHTML']='<div\x20class=\x22comments-empty\x22>No\x20comments\x20yet</div>';return;}this['commentsList']['innerHTML']='',this['comments']['forEach'](_0x2b8b7d=>{const _0xe48323=this['createCommentElement'](_0x2b8b7d);this['commentsList']['appendChild'](_0xe48323);});}['createCommentElement'](_0x37461f){const _0x3aac9b=document['createElement']('div');_0x3aac9b['className']='comment-item',_0x3aac9b['dataset']['commentId']=_0x37461f['id'];const _0x357bc7=this['options']['currentUserId']&&_0x37461f['author']?.['userId']===this['options']['currentUserId'],_0x338711=this['formatDate'](_0x37461f['createdAt']),_0x5a6e23=_0x37461f['updatedAt']!==_0x37461f['createdAt'],_0x2384a3=this['resolveAttachmentUrls'](_0x37461f['content']);let _0x53ff78=window['marked']?window['marked']['parse'](_0x2384a3):_0x2384a3;_0x53ff78=this['renderMentions'](_0x53ff78),_0x3aac9b['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-author\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-author-name\x22>'+this['escapeHtml'](_0x37461f['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x37461f['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x338711+(_0x5a6e23?'\x20(edited)':'')+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x357bc7?'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-edit-btn\x22\x20title=\x22Edit\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-delete-btn\x22\x20title=\x22Delete\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20':'')+'\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-content\x22>'+_0x53ff78+'</div>\x0a\x20\x20\x20\x20';if(_0x357bc7){const _0x1036bb=_0x3aac9b['querySelector']('.comment-edit-btn'),_0x126200=_0x3aac9b['querySelector']('.comment-delete-btn');_0x1036bb?.['addEventListener']('click',()=>this['startEdit'](_0x37461f)),_0x126200?.['addEventListener']('click',()=>this['deleteComment'](_0x37461f['id']));}return _0x3aac9b;}['formatDate'](_0x9794b2){const _0x44089d=new Date(_0x9794b2),_0x293291=new Date(),_0x47890f=_0x293291-_0x44089d,_0x31ddd6=Math['floor'](_0x47890f/0xea60),_0xab2feb=Math['floor'](_0x47890f/0x36ee80),_0x17dfe4=Math['floor'](_0x47890f/0x5265c00);if(_0x31ddd6<0x1)return'just\x20now';if(_0x31ddd6<0x3c)return _0x31ddd6+'m\x20ago';if(_0xab2feb<0x18)return _0xab2feb+'h\x20ago';if(_0x17dfe4<0x7)return _0x17dfe4+'d\x20ago';return _0x44089d['toLocaleDateString']();}['escapeHtml'](_0x3cd6c4){const _0x2bd2fc=document['createElement']('div');return _0x2bd2fc['textContent']=_0x3cd6c4,_0x2bd2fc['innerHTML'];}['resolveAttachmentUrls'](_0x4d824a){if(!_0x4d824a||!this['options']['taskId'])return _0x4d824a;const _0xadd2ad=this['options']['getAPI'](),_0x2fbebe=_0xadd2ad['getBaseUrl']();let _0x94a46b=String(_0x4d824a)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x26d853,_0x1bef68)=>{const _0x288f7b=String(_0x1bef68||'')['trim']();if(!_0x288f7b)return _0x26d853;let _0x5bc564=_0x288f7b;try{_0x5bc564=decodeURIComponent(_0x288f7b);}catch{}return']('+_0x2fbebe+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x5bc564)+')';});return _0x94a46b;}['renderMentions'](_0x38cc28){if(!_0x38cc28)return _0x38cc28;return String(_0x38cc28)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x111bb2,_0x4e7c8d,_0x3759c1)=>{const _0x1e4ec6=this['escapeHtml'](_0x3759c1),_0x1792c1=this['escapeHtml'](_0x4e7c8d);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x1792c1+'\x22>@'+_0x1e4ec6+'</span>';});}['startEdit'](_0x2d8a66){this['editingCommentId']=_0x2d8a66['id'],this['editor']['setValue'](_0x2d8a66['content']),this['editor']['focus'](),this['cancelBtn']['hidden']=![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Save',this['editor']['toolbar']&&this['editor']['toolbar']['classList']['remove']('comments-toolbar-hidden'),this['inputSection']['scrollIntoView']({'behavior':'smooth','block':'nearest'});}['cancelEdit'](){this['editingCommentId']=null,this['editor']['clear'](),this['cancelBtn']['hidden']=!![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Add\x20Comment',this['submitBtn']['disabled']=!![],this['editor']['toolbar']&&!this['editor']['getValue']()?.['trim']()&&this['editor']['toolbar']['classList']['add']('comments-toolbar-hidden');}async['handleSubmit'](){const _0x55e4e6=this['editor']['getValue']()?.['trim']();if(!_0x55e4e6&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x2ed7c0=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x2ed7c0['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0xe56de7=>({'name':_0xe56de7['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x1db6f3=await _0x2ed7c0['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x55e4e6),_0x438477=this['comments']['findIndex'](_0x3bd2a6=>_0x3bd2a6['id']===this['editingCommentId']);_0x438477!==-0x1&&(this['comments'][_0x438477]=_0x1db6f3['comment']);}else{const _0xdd6894=await _0x2ed7c0['addComment'](this['options']['taskId'],_0x55e4e6);this['comments']['push'](_0xdd6894['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x3ee2f2){console['error']('Failed\x20to\x20save\x20comment:',_0x3ee2f2),alert('Failed\x20to\x20save\x20comment:\x20'+_0x3ee2f2['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x564490){const _0x542b1a=await this['showDeleteConfirmModal']();if(!_0x542b1a)return;try{const _0xe13f19=this['options']['getAPI']();await _0xe13f19['deleteComment'](this['options']['taskId'],_0x564490),this['comments']=this['comments']['filter'](_0x3f4da2=>_0x3f4da2['id']!==_0x564490),this['renderComments'](),this['updateCount']();}catch(_0x45b773){console['error']('Failed\x20to\x20delete\x20comment:',_0x45b773),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x45b773['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x8057c2=>{const _0x2c82da=document['createElement']('div');_0x2c82da['className']='comments-confirm-modal',_0x2c82da['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-backdrop\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-dialog\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3>Delete\x20Comment</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon\x20comments-confirm-close\x22\x20title=\x22Close\x22>×</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20this\x20comment?\x20This\x20action\x20cannot\x20be\x20undone.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-confirm-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-danger\x20btn-small\x20comments-confirm-delete\x22>Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20',document['body']['appendChild'](_0x2c82da);const _0x253bc1=_0x215438=>{document['removeEventListener']('keydown',_0xd5bb76),_0x2c82da['remove'](),_0x8057c2(_0x215438);},_0xd5bb76=_0x5a8847=>{if(_0x5a8847['key']==='Escape')_0x253bc1(![]);};document['addEventListener']('keydown',_0xd5bb76),_0x2c82da['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x253bc1(![])),_0x2c82da['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x253bc1(![])),_0x2c82da['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x253bc1(![])),_0x2c82da['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x253bc1(!![])),_0x2c82da['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x1947f1){this['submitBtn']['disabled']=_0x1947f1,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x1947f1,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x1947f1;}['updateCount'](){const _0x5a406d=this['comments']['length'],_0x341b6d=this['container']['querySelector']('#comments-count-badge');_0x341b6d&&(_0x341b6d['textContent']=_0x5a406d,_0x341b6d['hidden']=_0x5a406d===0x0);const _0x382465=this['container']['querySelector']('#comments-count');_0x382465&&(_0x382465['textContent']=_0x5a406d>0x0?'('+_0x5a406d+')':''),this['options']['onCommentsChanged']&&this['options']['onCommentsChanged'](this['comments']);}['getCommentCount'](){return this['comments']['length'];}['destroy'](){this['editor']&&this['editor']['destroy'](),this['container']['innerHTML']='';}}CommentsWidget['prototype']['_attachToContainer']=function(){this['container']['__widget']=this;};typeof window!=='undefined'&&(window['CommentsWidget']=CommentsWidget);
@@ -1 +1 @@
1
- import{Utils}from'./app.js';export function parsePatchContent(_0x3ec969){const _0x35bfa8=[],_0x5f5999=_0x3ec969['split']('\x0a');let _0x822b50=null,_0x1b3591=null;for(const _0x2baa06 of _0x5f5999){if(_0x2baa06['startsWith']('diff\x20--git')){_0x822b50&&_0x1b3591&&_0x822b50['hunks']['push'](_0x1b3591);_0x822b50&&_0x35bfa8['push'](_0x822b50);const _0x4a2e85=_0x2baa06['match'](/diff --git a\/(.+?) b\/(.+)/);_0x822b50={'oldPath':_0x4a2e85?_0x4a2e85[0x1]:'','newPath':_0x4a2e85?_0x4a2e85[0x2]:'','hunks':[],'isDeleted':![]},_0x1b3591=null;}else{if(_0x2baa06['startsWith']('deleted\x20file\x20mode')&&_0x822b50)_0x822b50['isDeleted']=!![];else{if(_0x2baa06['startsWith']('@@'))_0x1b3591&&_0x822b50&&_0x822b50['hunks']['push'](_0x1b3591),_0x1b3591={'header':_0x2baa06,'lines':[]};else _0x1b3591&&_0x1b3591['lines']['push'](_0x2baa06);}}}return _0x822b50&&_0x1b3591&&_0x822b50['hunks']['push'](_0x1b3591),_0x822b50&&_0x35bfa8['push'](_0x822b50),_0x35bfa8;}export function parseHunkHeader(_0x13dbd6){const _0x44f59d=_0x13dbd6['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x44f59d)return{'oldStart':parseInt(_0x44f59d[0x1],0xa),'newStart':parseInt(_0x44f59d[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x2c3516,_0x57d5f8){const _0x3706ed=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x3706ed&&_0x57d5f8)try{const _0x247c09=_0x3706ed['getLanguage'](_0x57d5f8)?_0x57d5f8:null;if(_0x247c09)return _0x3706ed['highlight'](_0x2c3516,{'language':_0x247c09})['value'];}catch(_0x337c48){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x337c48);}return Utils['escapeHtml'](_0x2c3516);}export function getFileLanguage(_0x21af42){const _0x1d006f=_0x21af42['split']('.')['pop']()['toLowerCase'](),_0x153c13={'js':'javascript','jsx':'javascript','ts':'typescript','tsx':'typescript','py':'python','java':'java','c':'c','cpp':'cpp','cs':'csharp','go':'go','rs':'rust','php':'php','rb':'ruby','html':'xml','css':'css','json':'json','yml':'yaml','yaml':'yaml','md':'markdown','sh':'bash','bash':'bash'};return _0x153c13[_0x1d006f]||null;}export function computeWordDiff(_0x5cc639,_0xc5fa87){const _0x3825b2=_0x56d91f=>{const _0x1d99d3=[];let _0x58fba6='',_0x5000b6=![];for(let _0x5efe6c=0x0;_0x5efe6c<_0x56d91f['length'];_0x5efe6c++){const _0x5d0ebd=_0x56d91f[_0x5efe6c],_0x4075fe=/\s/['test'](_0x5d0ebd);if(_0x58fba6==='')_0x58fba6=_0x5d0ebd,_0x5000b6=_0x4075fe;else _0x4075fe===_0x5000b6?_0x58fba6+=_0x5d0ebd:(_0x1d99d3['push'](_0x58fba6),_0x58fba6=_0x5d0ebd,_0x5000b6=_0x4075fe);}return _0x58fba6&&_0x1d99d3['push'](_0x58fba6),_0x1d99d3;},_0x3ee5d6=_0x3825b2(_0x5cc639),_0x2314b6=_0x3825b2(_0xc5fa87),_0x5938fb=_0x3ee5d6['length'],_0x3e4c8d=_0x2314b6['length'],_0x48e247=Array(_0x5938fb+0x1)['fill'](null)['map'](()=>Array(_0x3e4c8d+0x1)['fill'](0x0));for(let _0x17e04f=0x1;_0x17e04f<=_0x5938fb;_0x17e04f++){for(let _0x432c4a=0x1;_0x432c4a<=_0x3e4c8d;_0x432c4a++){_0x3ee5d6[_0x17e04f-0x1]===_0x2314b6[_0x432c4a-0x1]?_0x48e247[_0x17e04f][_0x432c4a]=_0x48e247[_0x17e04f-0x1][_0x432c4a-0x1]+0x1:_0x48e247[_0x17e04f][_0x432c4a]=Math['max'](_0x48e247[_0x17e04f-0x1][_0x432c4a],_0x48e247[_0x17e04f][_0x432c4a-0x1]);}}const _0x3f5778={'old':[],'new':[]};let _0x35c619=_0x5938fb,_0x1e20d1=_0x3e4c8d;const _0x713b04=[],_0x5b6cb=[];while(_0x35c619>0x0||_0x1e20d1>0x0){if(_0x35c619>0x0&&_0x1e20d1>0x0&&_0x3ee5d6[_0x35c619-0x1]===_0x2314b6[_0x1e20d1-0x1])_0x713b04['unshift']({'type':'equal','text':_0x3ee5d6[_0x35c619-0x1]}),_0x5b6cb['unshift']({'type':'equal','text':_0x2314b6[_0x1e20d1-0x1]}),_0x35c619--,_0x1e20d1--;else{if(_0x1e20d1>0x0&&(_0x35c619===0x0||_0x48e247[_0x35c619][_0x1e20d1-0x1]>=_0x48e247[_0x35c619-0x1][_0x1e20d1]))_0x5b6cb['unshift']({'type':'insert','text':_0x2314b6[_0x1e20d1-0x1]}),_0x1e20d1--;else _0x35c619>0x0&&(_0x713b04['unshift']({'type':'delete','text':_0x3ee5d6[_0x35c619-0x1]}),_0x35c619--);}}return _0x3f5778['old']=_0x713b04,_0x3f5778['new']=_0x5b6cb,_0x3f5778;}export function renderDiffLineWithWordHighlight(_0x2ff545,_0x39ea7c,_0xfbd3c7,_0x5c3aaf){if(!_0x39ea7c||_0x39ea7c['length']===0x0)return highlightDiffLine(_0x2ff545,_0x5c3aaf);let _0xc4cddb='';const _0x219178=_0xfbd3c7==='add'?'diff-word-add':'diff-word-remove',_0x137c3e=_0xfbd3c7==='add'?'insert':'delete';for(const _0x136e80 of _0x39ea7c){const _0x1dd4c1=Utils['escapeHtml'](_0x136e80['text']);_0x136e80['type']===_0x137c3e?_0xc4cddb+='<span\x20class=\x22'+_0x219178+'\x22>'+_0x1dd4c1+'</span>':_0xc4cddb+=_0x1dd4c1;}return _0xc4cddb;}export function calculateDiffStats(_0x23281f){let _0x4d1579=0x0,_0x3dac8c=0x0,_0xdc6fb8=0x0;return _0x23281f['forEach'](_0x4e964f=>{let _0x7bcd45=0x0,_0x577b39=0x0;_0x4e964f['hunks']['forEach'](_0x40a999=>{_0x40a999['lines']['forEach'](_0x1719bf=>{if(_0x1719bf['startsWith']('+'))_0x7bcd45+=0x1;else{if(_0x1719bf['startsWith']('-'))_0x577b39+=0x1;}});}),(_0x7bcd45+_0x577b39>0x0||_0x4e964f['isDeleted'])&&(_0xdc6fb8+=0x1),_0x4d1579+=_0x7bcd45,_0x3dac8c+=_0x577b39;}),{'additions':_0x4d1579,'deletions':_0x3dac8c,'files':_0xdc6fb8};}export function getFileStatus(_0x5d8a0c,_0x394c04,_0x22c76b){if(_0x5d8a0c['isDeleted'])return'deleted';if(_0x394c04>0x0&&_0x22c76b===0x0)return'added';return'modified';}export function safeBase64(_0x1a9841){try{return btoa(unescape(encodeURIComponent(_0x1a9841)));}catch(_0x5d7df6){return btoa(_0x1a9841);}}export function getStorageKey(_0x40ad94,_0x491f6f){return _0x40ad94+'-'+safeBase64(_0x491f6f);}export function getCollapsedState(_0x3b37e5,_0x521267){const _0x3beb13=localStorage['getItem'](getStorageKey(_0x3b37e5,_0x521267));return _0x3beb13==='true';}export function renderUnifiedDiff(_0x13348b,_0x17b8cc){return _0x13348b['map']((_0x39071f,_0xc744ee)=>{const _0x1694c8=_0x39071f['newPath']||_0x39071f['oldPath']||'unknown',_0x56f913='diff-'+_0x17b8cc+'-'+_0xc744ee,_0x2fdcbe=getFileLanguage(_0x1694c8),{additions:_0x5cd00d,deletions:_0x47b5c9}=calculateDiffStats([_0x39071f]),_0x298868=getCollapsedState(_0x17b8cc,_0x1694c8),_0x50c888=getFileStatus(_0x39071f,_0x5cd00d,_0x47b5c9),_0x208e33=_0x50c888==='added'?'A':_0x50c888==='deleted'?'D':'M',_0x2959d7=_0x39071f['hunks']['map'](_0x30fb42=>{const {oldStart:_0x118b00,newStart:_0x49c21b}=parseHunkHeader(_0x30fb42['header']);let _0x5ebb45=_0x118b00,_0x594b1f=_0x49c21b;const _0x565e38=_0x30fb42['lines']['map'](_0x24063a=>({'line':_0x24063a,'type':_0x24063a['startsWith']('+')?'add':_0x24063a['startsWith']('-')?'remove':_0x24063a['startsWith']('\x5c')?'meta':'context'}));let _0x40de3b=0x0;while(_0x40de3b<_0x565e38['length']){if(_0x565e38[_0x40de3b]['type']==='remove'){let _0x481223=_0x40de3b,_0x39303b=_0x40de3b;while(_0x39303b<_0x565e38['length']&&_0x565e38[_0x39303b]['type']==='remove')_0x39303b++;let _0x2dfd5f=_0x39303b,_0x48676e=_0x2dfd5f;while(_0x48676e<_0x565e38['length']&&_0x565e38[_0x48676e]['type']==='add')_0x48676e++;const _0x362b13=_0x39303b-_0x481223,_0x315e04=_0x48676e-_0x2dfd5f,_0x42256f=Math['min'](_0x362b13,_0x315e04);for(let _0x2b2210=0x0;_0x2b2210<_0x42256f;_0x2b2210++){const _0x3bb157=_0x565e38[_0x481223+_0x2b2210]['line']['substring'](0x1),_0x475c11=_0x565e38[_0x2dfd5f+_0x2b2210]['line']['substring'](0x1),_0x4435d6=computeWordDiff(_0x3bb157,_0x475c11);_0x565e38[_0x481223+_0x2b2210]['wordDiff']=_0x4435d6['old'],_0x565e38[_0x2dfd5f+_0x2b2210]['wordDiff']=_0x4435d6['new'];}_0x40de3b=_0x48676e;}else _0x40de3b++;}const _0x2387ce=_0x565e38['map'](_0x3c11c6=>{const _0x1954e3=_0x3c11c6['line'];if(_0x1954e3['startsWith']('+')){const _0x285067=_0x1954e3['substring'](0x1),_0x274535=_0x3c11c6['wordDiff']?renderDiffLineWithWordHighlight(_0x285067,_0x3c11c6['wordDiff'],'add',_0x2fdcbe):highlightDiffLine(_0x285067,_0x2fdcbe),_0x54fe95='<div\x20class=\x22diff-line\x20diff-add\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x594b1f+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x274535+'</span></div>';return _0x594b1f+=0x1,_0x54fe95;}if(_0x1954e3['startsWith']('-')){const _0x265a7b=_0x1954e3['substring'](0x1),_0x938cb=_0x3c11c6['wordDiff']?renderDiffLineWithWordHighlight(_0x265a7b,_0x3c11c6['wordDiff'],'remove',_0x2fdcbe):highlightDiffLine(_0x265a7b,_0x2fdcbe),_0x22dbf1='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x5ebb45+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x938cb+'</span></div>';return _0x5ebb45+=0x1,_0x22dbf1;}if(_0x1954e3['startsWith']('\x5c'))return'<div\x20class=\x22diff-line\x20diff-meta\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22>'+Utils['escapeHtml'](_0x1954e3)+'</span></div>';const _0x6c9c6=_0x1954e3['startsWith']('\x20')?_0x1954e3['substring'](0x1):_0x1954e3,_0x193f94=highlightDiffLine(_0x6c9c6,_0x2fdcbe),_0x1cfe59='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x5ebb45+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x594b1f+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x193f94+'</span></div>';return _0x5ebb45+=0x1,_0x594b1f+=0x1,_0x1cfe59;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x30fb42['header'])+'</div>'+_0x2387ce+'</div>';})['join'](''),_0x2b3981=_0x2959d7||'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>No\x20textual\x20diff\x20available</div></div>';return'\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff\x22\x20id=\x22file-'+_0x56f913+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x56f913+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x1694c8)+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-status-badge\x20'+_0x50c888+'\x22>'+_0x208e33+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x1694c8)+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-stat\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-add\x22>+'+_0x5cd00d+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x47b5c9+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22file-diff-toggle-btn\x22\x20data-diff-id=\x22'+_0x56f913+'\x22\x20data-collapsed=\x22'+_0x298868+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x298868?'Expand':'Collapse')+'\x22></button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-content\x20'+(_0x298868?'collapsed':'')+'\x22\x20id=\x22'+_0x56f913+'\x22>'+_0x2b3981+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
1
+ import{Utils}from'./app.js';export function parsePatchContent(_0x2bf0e3){const _0x3b7895=[],_0x100db8=_0x2bf0e3['split']('\x0a');let _0x64e658=null,_0x3cf652=null;for(const _0x58aa33 of _0x100db8){if(_0x58aa33['startsWith']('diff\x20--git')){_0x64e658&&_0x3cf652&&_0x64e658['hunks']['push'](_0x3cf652);_0x64e658&&_0x3b7895['push'](_0x64e658);const _0x1b3b7e=_0x58aa33['match'](/diff --git a\/(.+?) b\/(.+)/);_0x64e658={'oldPath':_0x1b3b7e?_0x1b3b7e[0x1]:'','newPath':_0x1b3b7e?_0x1b3b7e[0x2]:'','hunks':[],'isDeleted':![]},_0x3cf652=null;}else{if(_0x58aa33['startsWith']('deleted\x20file\x20mode')&&_0x64e658)_0x64e658['isDeleted']=!![];else{if(_0x58aa33['startsWith']('@@'))_0x3cf652&&_0x64e658&&_0x64e658['hunks']['push'](_0x3cf652),_0x3cf652={'header':_0x58aa33,'lines':[]};else _0x3cf652&&_0x3cf652['lines']['push'](_0x58aa33);}}}return _0x64e658&&_0x3cf652&&_0x64e658['hunks']['push'](_0x3cf652),_0x64e658&&_0x3b7895['push'](_0x64e658),_0x3b7895;}export function parseHunkHeader(_0x455c5c){const _0x222328=_0x455c5c['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x222328)return{'oldStart':parseInt(_0x222328[0x1],0xa),'newStart':parseInt(_0x222328[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x912590,_0x303007){const _0x53bbc7=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x53bbc7&&_0x303007)try{const _0x1f0433=_0x53bbc7['getLanguage'](_0x303007)?_0x303007:null;if(_0x1f0433)return _0x53bbc7['highlight'](_0x912590,{'language':_0x1f0433})['value'];}catch(_0x5385bd){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x5385bd);}return Utils['escapeHtml'](_0x912590);}export function getFileLanguage(_0x41bb29){const _0x19a04c=_0x41bb29['split']('.')['pop']()['toLowerCase'](),_0x378305={'js':'javascript','jsx':'javascript','ts':'typescript','tsx':'typescript','py':'python','java':'java','c':'c','cpp':'cpp','cs':'csharp','go':'go','rs':'rust','php':'php','rb':'ruby','html':'xml','css':'css','json':'json','yml':'yaml','yaml':'yaml','md':'markdown','sh':'bash','bash':'bash'};return _0x378305[_0x19a04c]||null;}export function computeWordDiff(_0x2ee4fa,_0x9bd913){const _0x2d7657=_0x45432b=>{const _0x5cd9e0=[];let _0x2f0caa='',_0x226e5d=![];for(let _0x229b0f=0x0;_0x229b0f<_0x45432b['length'];_0x229b0f++){const _0x5474a5=_0x45432b[_0x229b0f],_0x595ed8=/\s/['test'](_0x5474a5);if(_0x2f0caa==='')_0x2f0caa=_0x5474a5,_0x226e5d=_0x595ed8;else _0x595ed8===_0x226e5d?_0x2f0caa+=_0x5474a5:(_0x5cd9e0['push'](_0x2f0caa),_0x2f0caa=_0x5474a5,_0x226e5d=_0x595ed8);}return _0x2f0caa&&_0x5cd9e0['push'](_0x2f0caa),_0x5cd9e0;},_0x2c19ee=_0x2d7657(_0x2ee4fa),_0x17b100=_0x2d7657(_0x9bd913),_0x31bb37=_0x2c19ee['length'],_0x496a49=_0x17b100['length'],_0x3e2805=Array(_0x31bb37+0x1)['fill'](null)['map'](()=>Array(_0x496a49+0x1)['fill'](0x0));for(let _0x5d4aac=0x1;_0x5d4aac<=_0x31bb37;_0x5d4aac++){for(let _0x2198bf=0x1;_0x2198bf<=_0x496a49;_0x2198bf++){_0x2c19ee[_0x5d4aac-0x1]===_0x17b100[_0x2198bf-0x1]?_0x3e2805[_0x5d4aac][_0x2198bf]=_0x3e2805[_0x5d4aac-0x1][_0x2198bf-0x1]+0x1:_0x3e2805[_0x5d4aac][_0x2198bf]=Math['max'](_0x3e2805[_0x5d4aac-0x1][_0x2198bf],_0x3e2805[_0x5d4aac][_0x2198bf-0x1]);}}const _0x3c9cd0={'old':[],'new':[]};let _0x4e2ab9=_0x31bb37,_0x1b7f24=_0x496a49;const _0x21da0d=[],_0x33ca39=[];while(_0x4e2ab9>0x0||_0x1b7f24>0x0){if(_0x4e2ab9>0x0&&_0x1b7f24>0x0&&_0x2c19ee[_0x4e2ab9-0x1]===_0x17b100[_0x1b7f24-0x1])_0x21da0d['unshift']({'type':'equal','text':_0x2c19ee[_0x4e2ab9-0x1]}),_0x33ca39['unshift']({'type':'equal','text':_0x17b100[_0x1b7f24-0x1]}),_0x4e2ab9--,_0x1b7f24--;else{if(_0x1b7f24>0x0&&(_0x4e2ab9===0x0||_0x3e2805[_0x4e2ab9][_0x1b7f24-0x1]>=_0x3e2805[_0x4e2ab9-0x1][_0x1b7f24]))_0x33ca39['unshift']({'type':'insert','text':_0x17b100[_0x1b7f24-0x1]}),_0x1b7f24--;else _0x4e2ab9>0x0&&(_0x21da0d['unshift']({'type':'delete','text':_0x2c19ee[_0x4e2ab9-0x1]}),_0x4e2ab9--);}}return _0x3c9cd0['old']=_0x21da0d,_0x3c9cd0['new']=_0x33ca39,_0x3c9cd0;}export function renderDiffLineWithWordHighlight(_0x2485cc,_0x56a567,_0x1b8880,_0xd8a27e){if(!_0x56a567||_0x56a567['length']===0x0)return highlightDiffLine(_0x2485cc,_0xd8a27e);let _0x2cbcd3='';const _0x488926=_0x1b8880==='add'?'diff-word-add':'diff-word-remove',_0x5390da=_0x1b8880==='add'?'insert':'delete';for(const _0x36b3ec of _0x56a567){const _0x44f589=Utils['escapeHtml'](_0x36b3ec['text']);_0x36b3ec['type']===_0x5390da?_0x2cbcd3+='<span\x20class=\x22'+_0x488926+'\x22>'+_0x44f589+'</span>':_0x2cbcd3+=_0x44f589;}return _0x2cbcd3;}export function calculateDiffStats(_0x53904e){let _0x3f6fd1=0x0,_0xf48aab=0x0,_0x1e574c=0x0;return _0x53904e['forEach'](_0x5a3b8f=>{let _0x3f90c5=0x0,_0x370ab6=0x0;_0x5a3b8f['hunks']['forEach'](_0x5e6a5d=>{_0x5e6a5d['lines']['forEach'](_0x129c8b=>{if(_0x129c8b['startsWith']('+'))_0x3f90c5+=0x1;else{if(_0x129c8b['startsWith']('-'))_0x370ab6+=0x1;}});}),(_0x3f90c5+_0x370ab6>0x0||_0x5a3b8f['isDeleted'])&&(_0x1e574c+=0x1),_0x3f6fd1+=_0x3f90c5,_0xf48aab+=_0x370ab6;}),{'additions':_0x3f6fd1,'deletions':_0xf48aab,'files':_0x1e574c};}export function getFileStatus(_0x3c67fe,_0x4507a6,_0x5a0488){if(_0x3c67fe['isDeleted'])return'deleted';if(_0x4507a6>0x0&&_0x5a0488===0x0)return'added';return'modified';}export function safeBase64(_0x2b3f4f){try{return btoa(unescape(encodeURIComponent(_0x2b3f4f)));}catch(_0xde4ef6){return btoa(_0x2b3f4f);}}export function getStorageKey(_0x292361,_0x35b0e8){return _0x292361+'-'+safeBase64(_0x35b0e8);}export function getCollapsedState(_0x22f82e,_0x11c7e8){const _0x1a0f89=localStorage['getItem'](getStorageKey(_0x22f82e,_0x11c7e8));return _0x1a0f89==='true';}export function renderUnifiedDiff(_0x59aa97,_0xc498c5){return _0x59aa97['map']((_0x3acfe3,_0x4bb392)=>{const _0x3b330b=_0x3acfe3['newPath']||_0x3acfe3['oldPath']||'unknown',_0x452ac3='diff-'+_0xc498c5+'-'+_0x4bb392,_0x400edd=getFileLanguage(_0x3b330b),{additions:_0x50d629,deletions:_0x3d993a}=calculateDiffStats([_0x3acfe3]),_0x3dc15f=getCollapsedState(_0xc498c5,_0x3b330b),_0x1bcb77=getFileStatus(_0x3acfe3,_0x50d629,_0x3d993a),_0x5e5e0f=_0x1bcb77==='added'?'A':_0x1bcb77==='deleted'?'D':'M',_0x1b00cc=_0x3acfe3['hunks']['map'](_0x11c6da=>{const {oldStart:_0x558519,newStart:_0x1e47b3}=parseHunkHeader(_0x11c6da['header']);let _0x2b8a4e=_0x558519,_0x560343=_0x1e47b3;const _0x233ef2=_0x11c6da['lines']['map'](_0x5f408c=>({'line':_0x5f408c,'type':_0x5f408c['startsWith']('+')?'add':_0x5f408c['startsWith']('-')?'remove':_0x5f408c['startsWith']('\x5c')?'meta':'context'}));let _0x18f030=0x0;while(_0x18f030<_0x233ef2['length']){if(_0x233ef2[_0x18f030]['type']==='remove'){let _0x9f08a6=_0x18f030,_0x3be7e3=_0x18f030;while(_0x3be7e3<_0x233ef2['length']&&_0x233ef2[_0x3be7e3]['type']==='remove')_0x3be7e3++;let _0x2feeb5=_0x3be7e3,_0x360998=_0x2feeb5;while(_0x360998<_0x233ef2['length']&&_0x233ef2[_0x360998]['type']==='add')_0x360998++;const _0x2b852f=_0x3be7e3-_0x9f08a6,_0x5d6985=_0x360998-_0x2feeb5,_0x51b5cd=Math['min'](_0x2b852f,_0x5d6985);for(let _0x286b88=0x0;_0x286b88<_0x51b5cd;_0x286b88++){const _0x407898=_0x233ef2[_0x9f08a6+_0x286b88]['line']['substring'](0x1),_0x149c69=_0x233ef2[_0x2feeb5+_0x286b88]['line']['substring'](0x1),_0x5f329b=computeWordDiff(_0x407898,_0x149c69);_0x233ef2[_0x9f08a6+_0x286b88]['wordDiff']=_0x5f329b['old'],_0x233ef2[_0x2feeb5+_0x286b88]['wordDiff']=_0x5f329b['new'];}_0x18f030=_0x360998;}else _0x18f030++;}const _0x24f334=_0x233ef2['map'](_0x4ea9ee=>{const _0x1b5aaa=_0x4ea9ee['line'];if(_0x1b5aaa['startsWith']('+')){const _0x5e9d07=_0x1b5aaa['substring'](0x1),_0x111a15=_0x4ea9ee['wordDiff']?renderDiffLineWithWordHighlight(_0x5e9d07,_0x4ea9ee['wordDiff'],'add',_0x400edd):highlightDiffLine(_0x5e9d07,_0x400edd),_0x43b157='<div\x20class=\x22diff-line\x20diff-add\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x560343+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x111a15+'</span></div>';return _0x560343+=0x1,_0x43b157;}if(_0x1b5aaa['startsWith']('-')){const _0x6e334e=_0x1b5aaa['substring'](0x1),_0x348a57=_0x4ea9ee['wordDiff']?renderDiffLineWithWordHighlight(_0x6e334e,_0x4ea9ee['wordDiff'],'remove',_0x400edd):highlightDiffLine(_0x6e334e,_0x400edd),_0x6624db='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x2b8a4e+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x348a57+'</span></div>';return _0x2b8a4e+=0x1,_0x6624db;}if(_0x1b5aaa['startsWith']('\x5c'))return'<div\x20class=\x22diff-line\x20diff-meta\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22>'+Utils['escapeHtml'](_0x1b5aaa)+'</span></div>';const _0x43caba=_0x1b5aaa['startsWith']('\x20')?_0x1b5aaa['substring'](0x1):_0x1b5aaa,_0x13c41d=highlightDiffLine(_0x43caba,_0x400edd),_0x1f3d3d='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x2b8a4e+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x560343+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x13c41d+'</span></div>';return _0x2b8a4e+=0x1,_0x560343+=0x1,_0x1f3d3d;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x11c6da['header'])+'</div>'+_0x24f334+'</div>';})['join'](''),_0x1199dd=_0x1b00cc||'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>No\x20textual\x20diff\x20available</div></div>';return'\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff\x22\x20id=\x22file-'+_0x452ac3+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x452ac3+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x3b330b)+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-status-badge\x20'+_0x1bcb77+'\x22>'+_0x5e5e0f+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x3b330b)+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-stat\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-add\x22>+'+_0x50d629+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x3d993a+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22file-diff-toggle-btn\x22\x20data-diff-id=\x22'+_0x452ac3+'\x22\x20data-collapsed=\x22'+_0x3dc15f+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x3dc15f?'Expand':'Collapse')+'\x22></button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-content\x20'+(_0x3dc15f?'collapsed':'')+'\x22\x20id=\x22'+_0x452ac3+'\x22>'+_0x1199dd+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
@@ -543,14 +543,17 @@
543
543
  <div id="urls-list" class="config-list"></div>
544
544
  </div>
545
545
 
546
- <div class="subsection">
547
- <div class="subsection-header">
548
- <h4>Volume Mounts</h4>
549
- <button class="btn-secondary btn-small" id="add-volume-mount-btn">+ Add Mount</button>
550
- </div>
551
- <p class="text-muted" style="margin-bottom: 12px;">Mount host directories into containers for testing with host data</p>
552
- <div id="volume-mounts-list" class="config-list"></div>
553
- </div>
546
+ </div>
547
+ </div>
548
+
549
+ <div class="content-card">
550
+ <div class="card-header">
551
+ <h3>Volume Mounts</h3>
552
+ <button class="btn-secondary btn-small" id="add-volume-mount-btn">+ Add Mount</button>
553
+ </div>
554
+ <div class="card-body">
555
+ <p class="text-muted" style="margin-bottom: 12px;">Mount host directories into containers</p>
556
+ <div id="volume-mounts-list" class="config-list"></div>
554
557
  </div>
555
558
  </div>
556
559
  </div>