@profoundlogic/coderflow-server 0.6.5 → 0.6.7

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 (178) hide show
  1. package/dist/base-image/agent-wrapper.sh +1 -1
  2. package/dist/base-image/sync-repos.sh +7 -1
  3. package/dist/coder-server.js +1 -1
  4. package/dist/config/cli-models.json +0 -12
  5. package/dist/config.js +1 -1
  6. package/dist/lib/agent-keepalive.js +1 -1
  7. package/dist/lib/agent-models.js +1 -1
  8. package/dist/lib/api-keys.js +1 -1
  9. package/dist/lib/apiKeys.js +1 -1
  10. package/dist/lib/app-server-ports.js +1 -1
  11. package/dist/lib/auto-judge.js +1 -1
  12. package/dist/lib/automation-service.js +1 -1
  13. package/dist/lib/basic-auth.js +1 -1
  14. package/dist/lib/bindings.js +1 -1
  15. package/dist/lib/build-history.js +1 -1
  16. package/dist/lib/build-output-service.js +1 -1
  17. package/dist/lib/build-scheduler.js +1 -1
  18. package/dist/lib/build-service.js +1 -1
  19. package/dist/lib/ca-certificates.js +1 -1
  20. package/dist/lib/claude-oauth-refresh.js +1 -1
  21. package/dist/lib/cli/build.js +1 -1
  22. package/dist/lib/cli/cleanup-users.js +1 -1
  23. package/dist/lib/cli/config-command.js +1 -1
  24. package/dist/lib/cli/config.js +1 -1
  25. package/dist/lib/cli/create-user.js +1 -1
  26. package/dist/lib/cli/grant-admin.js +1 -1
  27. package/dist/lib/cli/init.js +1 -1
  28. package/dist/lib/cli/jira.js +1 -1
  29. package/dist/lib/cli/license.js +1 -1
  30. package/dist/lib/cli/list-roles.js +1 -1
  31. package/dist/lib/cli/list-users.js +1 -1
  32. package/dist/lib/cli/server-manager.js +1 -1
  33. package/dist/lib/cli/set-password.js +1 -1
  34. package/dist/lib/config-migration.js +1 -1
  35. package/dist/lib/container-credential-sync.js +1 -1
  36. package/dist/lib/container-tokens.js +1 -1
  37. package/dist/lib/data-dir.js +1 -1
  38. package/dist/lib/deployment-history.js +1 -1
  39. package/dist/lib/deployment-service.js +1 -1
  40. package/dist/lib/docker-utils.js +1 -1
  41. package/dist/lib/email.js +1 -1
  42. package/dist/lib/emailTemplates.js +1 -1
  43. package/dist/lib/entitlement.js +1 -1
  44. package/dist/lib/external-connections.js +1 -1
  45. package/dist/lib/fetch-utils.js +1 -1
  46. package/dist/lib/git-commit-details-route.js +1 -1
  47. package/dist/lib/git-history-diff-guardrails.js +1 -1
  48. package/dist/lib/git-provider-service.js +1 -1
  49. package/dist/lib/git-provider-setup/github-setup-handler.js +1 -1
  50. package/dist/lib/git-provider-setup/index.js +1 -1
  51. package/dist/lib/git-provider-setup/setup-factory.js +1 -1
  52. package/dist/lib/git-provider-setup/setup-interface.js +1 -1
  53. package/dist/lib/git-providers/azure-devops-provider.js +1 -1
  54. package/dist/lib/git-providers/github-app-provider.js +1 -1
  55. package/dist/lib/git-providers/index.js +1 -1
  56. package/dist/lib/git-providers/provider-factory.js +1 -1
  57. package/dist/lib/git-providers/provider-interface.js +1 -1
  58. package/dist/lib/github-urls.js +1 -1
  59. package/dist/lib/group-objective-linking.js +1 -1
  60. package/dist/lib/ibmi-sync.js +1 -1
  61. package/dist/lib/jira-client.js +1 -1
  62. package/dist/lib/judge-blinding.js +1 -1
  63. package/dist/lib/logger.js +1 -1
  64. package/dist/lib/migration-to-scoped-rbac.js +1 -1
  65. package/dist/lib/model-fetcher.js +1 -1
  66. package/dist/lib/notifications.js +1 -1
  67. package/dist/lib/objective-context.js +1 -1
  68. package/dist/lib/oidc-auth.js +1 -1
  69. package/dist/lib/oidc-device-flow.js +1 -1
  70. package/dist/lib/passwordTokens.js +1 -1
  71. package/dist/lib/permission-resolver.js +1 -1
  72. package/dist/lib/pin-cascade.js +1 -1
  73. package/dist/lib/provider-accounts.js +1 -1
  74. package/dist/lib/provider-oauth.js +1 -1
  75. package/dist/lib/provider-profile.js +1 -1
  76. package/dist/lib/provider-token-refresh.js +1 -1
  77. package/dist/lib/rbac-user-state.js +1 -1
  78. package/dist/lib/request-url.js +1 -1
  79. package/dist/lib/rewind.js +1 -1
  80. package/dist/lib/role-definitions.js +1 -1
  81. package/dist/lib/roles.js +1 -1
  82. package/dist/lib/secrets.js +1 -1
  83. package/dist/lib/setup-repo-git-auth.js +1 -1
  84. package/dist/lib/state-capture.js +1 -1
  85. package/dist/lib/static-files.js +1 -1
  86. package/dist/lib/task-aliases.js +1 -0
  87. package/dist/lib/task-name-format.js +1 -1
  88. package/dist/lib/task-name-generator.js +1 -1
  89. package/dist/lib/task-source-metadata.js +1 -1
  90. package/dist/lib/teams.js +1 -1
  91. package/dist/lib/user-git-oauth.js +1 -1
  92. package/dist/lib/user-git-tokens.js +1 -1
  93. package/dist/lib/users.js +1 -1
  94. package/dist/middleware/requireAuth.js +1 -1
  95. package/dist/middleware/requireInit.js +1 -1
  96. package/dist/middleware/requirePermission.js +1 -1
  97. package/dist/package.json +1 -1
  98. package/dist/playwright.config.js +1 -1
  99. package/dist/playwright.task-terminal.config.js +1 -1
  100. package/dist/routes/apiKeys.js +1 -1
  101. package/dist/routes/auth-oidc.js +1 -1
  102. package/dist/routes/auth.js +1 -1
  103. package/dist/routes/automations.js +1 -1
  104. package/dist/routes/bindings.js +1 -1
  105. package/dist/routes/build.js +1 -1
  106. package/dist/routes/containers.js +1 -1
  107. package/dist/routes/deploy-task.js +1 -1
  108. package/dist/routes/environment-management.js +1 -1
  109. package/dist/routes/environments.js +1 -1
  110. package/dist/routes/external-skills.js +1 -1
  111. package/dist/routes/git-credentials.js +1 -1
  112. package/dist/routes/git-oauth.js +1 -1
  113. package/dist/routes/git-provider-setup.js +1 -1
  114. package/dist/routes/health.js +1 -1
  115. package/dist/routes/jira.js +1 -1
  116. package/dist/routes/objective-management.js +1 -1
  117. package/dist/routes/password.js +1 -1
  118. package/dist/routes/prompt.js +1 -1
  119. package/dist/routes/provider-auth.js +1 -1
  120. package/dist/routes/qa.js +1 -1
  121. package/dist/routes/roles.js +1 -1
  122. package/dist/routes/settings.js +1 -1
  123. package/dist/routes/skill-management.js +1 -1
  124. package/dist/routes/skills.js +1 -1
  125. package/dist/routes/tasks.js +1 -1
  126. package/dist/routes/teams.js +1 -1
  127. package/dist/routes/templates.js +1 -1
  128. package/dist/routes/test-task.js +1 -1
  129. package/dist/routes/test.js +1 -1
  130. package/dist/routes/users.js +1 -1
  131. package/dist/routes/visualizations.js +1 -1
  132. package/dist/scripts/create-user.js +1 -1
  133. package/dist/scripts/migrate-config-to-data-dir.js +1 -1
  134. package/dist/start.js +1 -1
  135. package/dist/web-ui/public/activity-detail-modal.js +1 -1
  136. package/dist/web-ui/public/activity-feed.js +1 -1
  137. package/dist/web-ui/public/activity-formatters.js +1 -1
  138. package/dist/web-ui/public/agent-event-parser.js +1 -1
  139. package/dist/web-ui/public/app.js +1 -1
  140. package/dist/web-ui/public/approve-dialog.js +1 -1
  141. package/dist/web-ui/public/automation-links.js +1 -1
  142. package/dist/web-ui/public/automation-schedule.js +1 -1
  143. package/dist/web-ui/public/comments-widget.js +1 -1
  144. package/dist/web-ui/public/diff-utils.js +1 -1
  145. package/dist/web-ui/public/environments.js +1 -1
  146. package/dist/web-ui/public/feedback-widget.css +39 -0
  147. package/dist/web-ui/public/feedback-widget.js +1 -1
  148. package/dist/web-ui/public/file-selection-tree.js +1 -1
  149. package/dist/web-ui/public/git-history-lazy-utils.js +1 -1
  150. package/dist/web-ui/public/git-history.js +1 -1
  151. package/dist/web-ui/public/git-status.js +1 -1
  152. package/dist/web-ui/public/ibmi-file-filter.js +1 -1
  153. package/dist/web-ui/public/index.js +1 -1
  154. package/dist/web-ui/public/login.js +1 -1
  155. package/dist/web-ui/public/markdown-editor.js +1 -1
  156. package/dist/web-ui/public/markdown-file-editor.js +1 -1
  157. package/dist/web-ui/public/modal-maximize.js +1 -1
  158. package/dist/web-ui/public/notifications.js +1 -1
  159. package/dist/web-ui/public/permissions.js +1 -1
  160. package/dist/web-ui/public/pr-dialog.js +1 -1
  161. package/dist/web-ui/public/roles.js +1 -1
  162. package/dist/web-ui/public/server-health.js +1 -1
  163. package/dist/web-ui/public/settings.html +0 -4
  164. package/dist/web-ui/public/settings.js +1 -1
  165. package/dist/web-ui/public/setup-password.js +1 -1
  166. package/dist/web-ui/public/skills.js +1 -1
  167. package/dist/web-ui/public/sse-client.js +1 -1
  168. package/dist/web-ui/public/sse-shared-worker.js +1 -1
  169. package/dist/web-ui/public/styles.css +34 -0
  170. package/dist/web-ui/public/task-judging-helpers.js +1 -0
  171. package/dist/web-ui/public/task.html +1 -0
  172. package/dist/web-ui/public/task.js +1 -1
  173. package/dist/web-ui/public/teams.js +1 -1
  174. package/dist/web-ui/public/terminal.js +1 -1
  175. package/dist/web-ui/public/theme.js +1 -1
  176. package/dist/web-ui/public/users.js +1 -1
  177. package/dist/web-ui/public/variant-grouping.js +1 -1
  178. package/package.json +1 -1
@@ -1 +1 @@
1
- function isLogOnlyTaskType(_0x339222){return _0x339222==='test'||_0x339222==='deploy';}export function createApproveDialogHTML(_0x566446='',_0x45d462={}){const _0x2a92f6=_0x566446,_0xfa61a9=_0x45d462['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x4b0c15=_0x45d462['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x4da5ce=_0x45d462['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x2a92f6+'approve-modal\x22\x20class=\x22'+_0xfa61a9+'\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'+_0x2a92f6+'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'+_0x2a92f6+'approve-warning\x22\x20class=\x22'+_0x4b0c15+'\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'+_0x2a92f6+'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'+_0x2a92f6+'approve-error\x22\x20class=\x22'+_0x4da5ce+'\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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'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'+_0x2a92f6+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x2a92f6+'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(_0x1a9a92={}){this['prefix']=_0x1a9a92['prefix']||'',this['onApprove']=_0x1a9a92['onApprove'],this['onSync']=_0x1a9a92['onSync'],this['onSuccess']=_0x1a9a92['onSuccess'],this['onError']=_0x1a9a92['onError'],this['onCreatePR']=_0x1a9a92['onCreatePR'],this['showToast']=_0x1a9a92['showToast']||(()=>{}),this['container']=_0x1a9a92['container']||document['body'],this['useTaskPageStyles']=_0x1a9a92['useTaskPageStyles']||![],this['baseUrl']=_0x1a9a92['baseUrl']||'',this['coderflowAttribution']=_0x1a9a92['coderflowAttribution'],this['onSyncToIbmi']=_0x1a9a92['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x1a9a92['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 _0x12a046=document['createElement']('div');_0x12a046['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x12a046['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x364e62){return document['getElementById'](''+this['prefix']+_0x364e62);}['_bindEvents'](){const _0x527a51=this['_el']('approve-modal'),_0x29a848=this['_el']('close-approve-modal'),_0x4570ad=this['_el']('cancel-approve'),_0x115c3f=this['_el']('confirm-approve'),_0x5e56cf=_0x527a51?.['querySelector']('.modal-overlay'),_0x2011e=this['_el']('create-new-branch'),_0x3e9a21=this['_el']('new-branch-input-container'),_0x4418a8=this['_el']('new-branch-name'),_0x450d7f=this['_el']('push-after-commit'),_0x15600b=this['_el']('create-pull-request'),_0x1198df=this['_el']('pr-hint');_0x29a848?.['addEventListener']('click',()=>this['hide']()),_0x4570ad?.['addEventListener']('click',()=>this['hide']()),_0x5e56cf?.['addEventListener']('click',()=>this['hide']()),_0x115c3f?.['addEventListener']('click',()=>this['_handleApprove']());_0x2011e&&_0x2011e['addEventListener']('change',()=>{_0x3e9a21&&(_0x3e9a21['hidden']=!_0x2011e['checked']),_0x2011e['checked']&&_0x4418a8&&_0x4418a8['focus']();});_0x15600b&&_0x450d7f&&_0x2011e&&(_0x15600b['addEventListener']('change',()=>{this['_createPR']=_0x15600b['checked'];if(_0x15600b['checked']){_0x450d7f['checked']=!![],_0x450d7f['disabled']=!![],_0x2011e['checked']=!![],_0x2011e['disabled']=!![];_0x3e9a21&&(_0x3e9a21['hidden']=![]);if(_0x1198df)_0x1198df['hidden']=![];}else{_0x450d7f['disabled']=![],_0x2011e['disabled']=![];if(_0x1198df)_0x1198df['hidden']=!![];}}),_0x450d7f['addEventListener']('change',()=>{if(!_0x450d7f['checked']&&_0x15600b['checked']){_0x15600b['checked']=![],this['_createPR']=![],_0x450d7f['disabled']=![],_0x2011e['disabled']=![];if(_0x1198df)_0x1198df['hidden']=!![];}}));const _0x9572cc=this['_el']('sync-to-ibmi');_0x9572cc&&_0x9572cc['addEventListener']('change',async _0x2753a4=>{const _0x3b3044=this['_el']('ibmi-sync-fields');if(_0x3b3044)_0x3b3044['hidden']=!_0x2753a4['target']['checked'];if(_0x2753a4['target']['checked']){const _0x4065cc=this['_el']('ibmi-sync-library'),_0x1770f4=localStorage['getItem']('coderflow_ibmi_sync_library');_0x1770f4&&_0x4065cc&&!_0x4065cc['value']&&(_0x4065cc['value']=_0x1770f4);const _0x4876e=this['_el']('ibmi-sync-user');if(_0x4876e&&!_0x4876e['value']){const _0x31b120=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x31b120)_0x4876e['value']=_0x31b120;}const _0x351a6=this['_el']('ibmi-sync-password');if(_0x351a6)_0x351a6['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0x466940=>{_0x466940['key']==='Escape'&&_0x527a51&&!_0x527a51['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x10af7b=this['_el']('ibmi-sync-file-tree'),_0x352c89=this['_el']('ibmi-sync-files-summary');if(!_0x10af7b)return;_0x10af7b['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x352c89)_0x352c89['textContent']='';try{const {files:_0x4edd19,absolutePaths:_0x390d75}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x4edd19,this['_syncAbsolutePaths']=_0x390d75;if(_0x4edd19['length']===0x0){_0x10af7b['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x4ecf13}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x75ce9,hasKnownIbmiExtension:_0x407524}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x4ecf13({'container':_0x10af7b,'files':_0x4edd19,'isPreselected':_0x4cc2e4=>{const {valid:_0x43f6fc}=_0x75ce9(_0x4cc2e4);return _0x43f6fc&&_0x407524(_0x4cc2e4);},'isDisabled':_0x562a91=>{const {valid:_0xf0bdba,reason:_0x53283f}=_0x75ce9(_0x562a91);return{'disabled':!_0xf0bdba,'reason':_0x53283f};},'isAutoCheckEligible':_0x65daf2=>{const {valid:_0x5b983a}=_0x75ce9(_0x65daf2);return _0x5b983a&&_0x407524(_0x65daf2);},'onChange':_0xa7b13e=>{_0x352c89&&(_0x352c89['textContent']=_0xa7b13e['length']+'\x20of\x20'+_0x4edd19['length']+'\x20file'+(_0x4edd19['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x199295){_0x10af7b['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x1c4f0f){const _0x485ac7=this['_el']('approve-error'),_0x96d55a=this['_el']('approve-error-text');_0x485ac7&&_0x96d55a&&(_0x96d55a['textContent']=_0x1c4f0f,_0x485ac7['hidden']=![],_0x485ac7['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x511561=this['_el']('approve-error'),_0x408f95=this['_el']('approve-error-text');_0x511561&&_0x408f95&&(_0x511561['hidden']=!![],_0x408f95['textContent']='');}['_displayBranchInfo'](_0x4567ff,_0xc0cdd5={}){const _0x1781ad=this['_el']('approve-branches');if(!_0x1781ad)return;const _0xf674be=[];for(const _0x27e4f9 of _0x4567ff){_0xc0cdd5[_0x27e4f9['name']]&&_0xf674be['push']({'repo':_0x27e4f9['name'],'branch':_0xc0cdd5[_0x27e4f9['name']]});}if(_0xf674be['length']>0x0){_0x1781ad['hidden']=![];if(_0xf674be['length']===0x1)_0x1781ad['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0xf674be[0x0]['branch']+'</code></div>';else{const _0x2c1c6f=_0xf674be['map'](_0x3b203c=>'<div\x20class=\x22branch-item\x22><strong>'+_0x3b203c['repo']+':</strong>\x20<code>'+_0x3b203c['branch']+'</code></div>')['join']('');_0x1781ad['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x2c1c6f+'</div></div>';}}else _0x1781ad['hidden']=!![],_0x1781ad['innerHTML']='';}['showWarning'](_0x4b79f8){const _0x395587=this['_el']('approve-warning'),_0x3e1c0f=this['_el']('approve-warning-text');_0x395587&&_0x3e1c0f&&(_0x3e1c0f['textContent']=_0x4b79f8,_0x395587['hidden']=![]);}['hideWarning'](){const _0x1437bb=this['_el']('approve-warning'),_0x2b5c90=this['_el']('approve-warning-text');_0x1437bb&&_0x2b5c90&&(_0x1437bb['hidden']=!![],_0x2b5c90['textContent']='');}['_stripCoAuthoredByLines'](_0x16ebd3){return _0x16ebd3['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x30de53){try{let _0x463eb2;try{const _0x132a41=await fetch(this['baseUrl']+'/settings');if(_0x132a41['ok']){const _0x36fc18=await _0x132a41['json']();_0x463eb2=_0x36fc18['coderflow_attribution']!==![];}}catch(_0x2810a7){}_0x463eb2===undefined&&(this['coderflowAttribution']!==undefined?_0x463eb2=this['coderflowAttribution']!==![]:_0x463eb2=!![]);const _0x309f20=this['_stripCoAuthoredByLines'](_0x30de53);if(!_0x463eb2)return _0x309f20;const _0x377602='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x309f20+_0x377602;}catch(_0x980c9b){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x980c9b),_0x30de53;}}['show'](_0x24d899){!this['initialized']&&this['init']();this['taskData']=_0x24d899;const _0x17c855=this['_el']('approve-modal'),_0x283761=this['_el']('commit-message-input'),_0x233320=this['_el']('pull-before-commit'),_0x38fd62=this['_el']('push-after-commit'),_0x3198b8=this['_el']('create-new-branch'),_0x1178d8=this['_el']('new-branch-input-container'),_0x202f71=this['_el']('new-branch-name'),_0xb088f5=this['_el']('approve-repo-name'),_0x46afde=this['_el']('approve-stats'),_0x21ab0a=this['_el']('multi-repo-note');if(!_0x17c855)return;this['hideError'](),this['hideWarning']();_0x24d899['warning']&&this['showWarning'](_0x24d899['warning']);const _0x54c3c9=_0x24d899['reposChanged']||[];if(_0x54c3c9['length']===0x0&&!_0x24d899['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x54c3c9,_0x24d899);const _0xc2ff48=_0x24d899['commitMessage']||'',_0x11095a=this['_stripCoAuthoredByLines'](_0xc2ff48);_0x283761['value']=_0x11095a;if(_0x233320)_0x233320['checked']=!![];if(_0x38fd62)_0x38fd62['checked']=!![];_0x3198b8&&(_0x3198b8['checked']=![]);_0x1178d8&&(_0x1178d8['hidden']=!![]);_0x202f71&&(_0x202f71['value']='');if(_0x38fd62)_0x38fd62['disabled']=![];if(_0x3198b8)_0x3198b8['disabled']=![];this['updatePRSupport'](_0x24d899['prSupported']===!![]);const _0x28fddb=this['_el']('ibmi-sync-section');if(_0x28fddb){_0x28fddb['hidden']=!_0x24d899['ibmiSyncAvailable'];const _0x585f33=this['_el']('sync-to-ibmi'),_0x3ea5ee=this['_el']('ibmi-sync-fields'),_0x454842=this['_el']('ibmi-sync-library');if(_0x585f33)_0x585f33['checked']=![];if(_0x3ea5ee)_0x3ea5ee['hidden']=!![];if(_0x454842)_0x454842['value']='';const _0x23d2db=this['_el']('ibmi-sync-credentials-row');_0x23d2db&&(_0x23d2db['hidden']=!(_0x24d899['ibmiSyncAvailable']&&_0x24d899['syncCredentials']==='prompt'));}const _0x171034=this['_el']('confirm-approve');_0x24d899['syncFirst']&&this['onSync']?(_0x171034&&(_0x171034['disabled']=!![],_0x171034['textContent']='Syncing...'),this['_performSync']()):_0x171034&&(_0x171034['disabled']=![],_0x171034['textContent']='Commit\x20Changes');_0x17c855['hidden']=![];const _0x272688=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x272688,'taskId':_0x24d899['taskId'],'originalCommitMessage':_0x11095a}),setTimeout(()=>{_0x283761['focus'](),_0x283761['setSelectionRange'](0x0,_0x283761['value']['length']);},0x64);}['updatePRSupport'](_0x4fa2ca){const _0x3d673c=this['_el']('pr-option-section'),_0xd21c13=this['_el']('create-pull-request'),_0x5af6cd=this['_el']('pr-hint'),_0x405bca=this['_el']('push-after-commit'),_0x2461c4=this['_el']('create-new-branch');if(!_0x3d673c)return;if(_0x4fa2ca){_0x3d673c['hidden']=![];_0xd21c13&&!_0xd21c13['disabled']&&(_0xd21c13['checked']=![]);if(_0x5af6cd)_0x5af6cd['hidden']=!![];this['_createPR']=![];return;}_0xd21c13?.['checked']&&(_0xd21c13['checked']=![]);if(_0x5af6cd)_0x5af6cd['hidden']=!![];if(_0x405bca)_0x405bca['disabled']=![];if(_0x2461c4)_0x2461c4['disabled']=![];this['_createPR']=![],_0x3d673c['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x2f6c0c,taskId:_0x5f3839,originalCommitMessage:_0x5cc9a6}){const _0x448da0=this['_el']('commit-message-input');if(!_0x448da0)return;const _0x41778a=await this['_addAttributionIfEnabled'](_0x5cc9a6);if(_0x2f6c0c!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x5f3839)return;if(!this['isVisible']())return;const _0x37b2ef=_0x5f1665=>_0x5f1665['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x37b2ef(_0x448da0['value'])!==_0x37b2ef(_0x5cc9a6))return;_0x448da0['value']=_0x41778a;}['_updateDisplay'](_0x113c06,_0x140b81){const _0x51d60f=this['_el']('approve-repo-name'),_0x46b038=this['_el']('approve-stats'),_0x3730f4=this['_el']('multi-repo-note');if(_0x113c06['length']===0x0){if(_0x51d60f)_0x51d60f['textContent']='Syncing...';if(_0x46b038)_0x46b038['textContent']='';if(_0x3730f4)_0x3730f4['hidden']=!![];return;}const _0x35f974=_0x113c06['reduce']((_0x183dda,_0x28a352)=>_0x183dda+(_0x28a352['files_changed']||0x0),0x0),_0xff8e64=_0x113c06['reduce']((_0x5ad0f7,_0x374f58)=>_0x5ad0f7+(_0x374f58['lines_added']||0x0),0x0),_0x3b75fa=_0x113c06['reduce']((_0x3b18a2,_0x49647e)=>_0x3b18a2+(_0x49647e['lines_deleted']||0x0),0x0);if(_0x113c06['length']===0x1){if(_0x51d60f)_0x51d60f['textContent']=_0x113c06[0x0]?.['name']||'repository';if(_0x3730f4)_0x3730f4['hidden']=!![];}else{const _0x3038b0=_0x113c06['map'](_0x2c7ec0=>_0x2c7ec0['name'])['join'](',\x20');if(_0x51d60f)_0x51d60f['textContent']=_0x113c06['length']+'\x20repositories:\x20'+_0x3038b0;if(_0x3730f4)_0x3730f4['hidden']=![];}_0x46b038&&(_0x46b038['textContent']=_0x35f974+'\x20file'+(_0x35f974===0x1?'':'s')+'\x20changed\x20(+'+_0xff8e64+'\x20-'+_0x3b75fa+')'),this['_displayBranchInfo'](_0x113c06,_0x140b81?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x1a89a7=this['_el']('confirm-approve');try{const _0x39baf3=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x39baf3['repos_changed']){const _0x210b9c=this['taskData']['reposChanged']?.['length']||0x0,_0x42f0a4=this['taskData']['reposChanged']?.['reduce']((_0x4e368f,_0xe69e68)=>_0x4e368f+(_0xe69e68['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x39baf3['repos_changed'],this['_updateDisplay'](_0x39baf3['repos_changed'],this['taskData']);const _0x333806=_0x39baf3['repos_changed']['length'],_0x163ef3=_0x39baf3['repos_changed']['reduce']((_0x55b584,_0x51eedc)=>_0x55b584+(_0x51eedc['files_changed']||0x0),0x0);(_0x163ef3>_0x42f0a4||_0x333806>_0x210b9c)&&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.');}_0x1a89a7&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x1a89a7['disabled']=!![],_0x1a89a7['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x1a89a7['disabled']=![],_0x1a89a7['textContent']='Commit\x20Changes'));}catch(_0x30fe47){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x30fe47);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x30fe47['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x1a89a7&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x1a89a7['disabled']=![],_0x1a89a7['textContent']='Commit\x20Changes'):(_0x1a89a7['disabled']=!![],_0x1a89a7['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x21d706=this['_el']('approve-modal');_0x21d706&&(_0x21d706['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x1b42c6=this['_el']('commit-message-input'),_0x468264=this['_el']('pull-before-commit'),_0xc56612=this['_el']('push-after-commit'),_0x59f103=this['_el']('create-new-branch'),_0x2259b0=this['_el']('new-branch-name'),_0x26b3bc=this['_el']('confirm-approve'),_0x30b593=_0x1b42c6['value']['trim'](),_0x52f0b7=_0x468264?.['checked']??!![],_0x95b1cc=_0xc56612?.['checked']??!![],_0xf0b70a=_0x59f103?.['checked']||![],_0x4ba1f1=_0x2259b0?.['value']['trim']()||'';this['hideError']();if(!_0x30b593){this['showError']('Commit\x20message\x20is\x20required'),_0x1b42c6['focus']();return;}if(_0xf0b70a&&!_0x4ba1f1){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x2259b0?.['focus']();return;}if(_0xf0b70a&&_0x4ba1f1){const _0x2ead15=/[\s~^:?*\[\\]/;if(_0x2ead15['test'](_0x4ba1f1)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x2259b0?.['focus']();return;}}const _0x37bfd2=this['_el']('sync-to-ibmi')?.['checked'];if(_0x37bfd2){const _0x3abaa3=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x3abaa3){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x35cf6a=this['_syncFileTree']['getSelectedFiles']();if(_0x35cf6a['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x4b147a=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x4b147a){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x46808a=this['_el']('ibmi-sync-password')?.['value'];if(!_0x46808a){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x3510a0=_0x26b3bc?.['textContent']||'Commit\x20Changes';_0x26b3bc&&(_0x26b3bc['disabled']=!![],_0xf0b70a?_0x26b3bc['textContent']='Creating\x20branch\x20&\x20committing...':_0x26b3bc['textContent']=_0x52f0b7?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x4b77a4={'commit_message':_0x30b593,'pull':_0x52f0b7,'push':_0x95b1cc};_0xf0b70a&&_0x4ba1f1&&(_0x4b77a4['new_branch']=_0x4ba1f1);let _0x215614=null;this['onApprove']&&(_0x215614=await this['onApprove'](this['taskData']['taskId'],_0x4b77a4));let _0x29e949='Changes\x20committed';if(_0xf0b70a)_0x29e949='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x4ba1f1+'\x27',_0x95b1cc&&(_0x29e949+='\x20and\x20pushed');else{if(_0x52f0b7&&_0x95b1cc)_0x29e949='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x52f0b7)_0x29e949='Changes\x20pulled\x20and\x20committed';else _0x95b1cc&&(_0x29e949='Changes\x20committed\x20and\x20pushed');}}const _0x5c51f3=this['_el']('sync-to-ibmi')?.['checked'];let _0x3bfc41=null,_0x2c2c3a=null,_0x539353=null,_0x2688cb=null;if(_0x5c51f3&&this['onSyncToIbmi']){_0x3bfc41=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x2c2c3a=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x539353=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x3c6f43=this['_syncFileTree']['getSelectedFiles']();_0x2688cb=_0x3c6f43['map'](_0x9932d8=>{const _0x3ac53b=this['_syncRelativeFiles']['indexOf'](_0x9932d8);return _0x3ac53b>=0x0?this['_syncAbsolutePaths'][_0x3ac53b]:_0x9932d8;});}}this['showToast'](_0x29e949,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x215614||{});}catch(_0x12ab59){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x12ab59);}if(_0x5c51f3&&this['onSyncToIbmi']&&_0x3bfc41){localStorage['setItem']('coderflow_ibmi_sync_library',_0x3bfc41);if(_0x2c2c3a)localStorage['setItem']('coderflow_ibmi_sync_user',_0x2c2c3a);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x3bfc41,_0x2c2c3a,_0x539353,_0x2688cb);}catch(_0x18fde7){this['showToast']('Sync\x20failed:\x20'+_0x18fde7['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x3829da){console['error']('Failed\x20to\x20approve\x20changes',_0x3829da),this['showError']('Failed\x20to\x20commit:\x20'+_0x3829da['message']),_0x26b3bc&&(_0x26b3bc['disabled']=![],_0x26b3bc['textContent']=_0x3510a0),this['onError']&&this['onError'](_0x3829da);}}['isVisible'](){const _0x38a479=this['_el']('approve-modal');return _0x38a479&&!_0x38a479['hidden'];}['destroy'](){const _0x30d816=this['_el']('approve-modal');_0x30d816&&_0x30d816['remove'](),this['initialized']=![];}}export function getApproveState(_0x1f9982,_0x154e0a){if(!_0x1f9982)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x1f9982['taskType']))return{'canApprove':![],'reason':(_0x1f9982['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x323538=_0x154e0a?.['repos_changed']?.['length']>0x0,_0x7838a5=_0x1f9982['status']==='completed'||_0x1f9982['status']==='failed'||_0x1f9982['status']==='interrupted',_0x5d4730=_0x1f9982['containerState']==='running',_0x40dddc=_0x1f9982['approvedBy']!==undefined&&_0x1f9982['approvedBy']!==null;if(_0x40dddc){const _0x4da268=_0x1f9982['approvedBy']['name']||_0x1f9982['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x4da268};}if(!_0x323538)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x7838a5)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x1f9982['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x5d4730)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
1
+ function isLogOnlyTaskType(_0x540c39){return _0x540c39==='test'||_0x540c39==='deploy';}export function createApproveDialogHTML(_0x4e3521='',_0xb4597f={}){const _0x50c7c0=_0x4e3521,_0x325716=_0xb4597f['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x1fa4a4=_0xb4597f['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x7ca2ff=_0xb4597f['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x50c7c0+'approve-modal\x22\x20class=\x22'+_0x325716+'\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'+_0x50c7c0+'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'+_0x50c7c0+'approve-warning\x22\x20class=\x22'+_0x1fa4a4+'\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'+_0x50c7c0+'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'+_0x50c7c0+'approve-error\x22\x20class=\x22'+_0x7ca2ff+'\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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'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'+_0x50c7c0+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x50c7c0+'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(_0x458827={}){this['prefix']=_0x458827['prefix']||'',this['onApprove']=_0x458827['onApprove'],this['onSync']=_0x458827['onSync'],this['onSuccess']=_0x458827['onSuccess'],this['onError']=_0x458827['onError'],this['onCreatePR']=_0x458827['onCreatePR'],this['showToast']=_0x458827['showToast']||(()=>{}),this['container']=_0x458827['container']||document['body'],this['useTaskPageStyles']=_0x458827['useTaskPageStyles']||![],this['baseUrl']=_0x458827['baseUrl']||'',this['coderflowAttribution']=_0x458827['coderflowAttribution'],this['onSyncToIbmi']=_0x458827['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x458827['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 _0x3cf660=document['createElement']('div');_0x3cf660['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x3cf660['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x452725){return document['getElementById'](''+this['prefix']+_0x452725);}['_bindEvents'](){const _0x5df85f=this['_el']('approve-modal'),_0x2028ee=this['_el']('close-approve-modal'),_0x6ecb7a=this['_el']('cancel-approve'),_0x4d7ac1=this['_el']('confirm-approve'),_0x511eb4=_0x5df85f?.['querySelector']('.modal-overlay'),_0x39896d=this['_el']('create-new-branch'),_0x2a212f=this['_el']('new-branch-input-container'),_0x101488=this['_el']('new-branch-name'),_0x162829=this['_el']('push-after-commit'),_0xa968c=this['_el']('create-pull-request'),_0x5516f5=this['_el']('pr-hint');_0x2028ee?.['addEventListener']('click',()=>this['hide']()),_0x6ecb7a?.['addEventListener']('click',()=>this['hide']()),_0x511eb4?.['addEventListener']('click',()=>this['hide']()),_0x4d7ac1?.['addEventListener']('click',()=>this['_handleApprove']());_0x39896d&&_0x39896d['addEventListener']('change',()=>{_0x2a212f&&(_0x2a212f['hidden']=!_0x39896d['checked']),_0x39896d['checked']&&_0x101488&&_0x101488['focus']();});_0xa968c&&_0x162829&&_0x39896d&&(_0xa968c['addEventListener']('change',()=>{this['_createPR']=_0xa968c['checked'];if(_0xa968c['checked']){_0x162829['checked']=!![],_0x162829['disabled']=!![],_0x39896d['checked']=!![],_0x39896d['disabled']=!![];_0x2a212f&&(_0x2a212f['hidden']=![]);if(_0x5516f5)_0x5516f5['hidden']=![];}else{_0x162829['disabled']=![],_0x39896d['disabled']=![];if(_0x5516f5)_0x5516f5['hidden']=!![];}}),_0x162829['addEventListener']('change',()=>{if(!_0x162829['checked']&&_0xa968c['checked']){_0xa968c['checked']=![],this['_createPR']=![],_0x162829['disabled']=![],_0x39896d['disabled']=![];if(_0x5516f5)_0x5516f5['hidden']=!![];}}));const _0x3edd2f=this['_el']('sync-to-ibmi');_0x3edd2f&&_0x3edd2f['addEventListener']('change',async _0x465808=>{const _0x11b581=this['_el']('ibmi-sync-fields');if(_0x11b581)_0x11b581['hidden']=!_0x465808['target']['checked'];if(_0x465808['target']['checked']){const _0x219500=this['_el']('ibmi-sync-library'),_0x121362=localStorage['getItem']('coderflow_ibmi_sync_library');_0x121362&&_0x219500&&!_0x219500['value']&&(_0x219500['value']=_0x121362);const _0x493259=this['_el']('ibmi-sync-user');if(_0x493259&&!_0x493259['value']){const _0x53b253=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x53b253)_0x493259['value']=_0x53b253;}const _0x541c09=this['_el']('ibmi-sync-password');if(_0x541c09)_0x541c09['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0x5861dd=>{_0x5861dd['key']==='Escape'&&_0x5df85f&&!_0x5df85f['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x462ba9=this['_el']('ibmi-sync-file-tree'),_0x4d49f9=this['_el']('ibmi-sync-files-summary');if(!_0x462ba9)return;_0x462ba9['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x4d49f9)_0x4d49f9['textContent']='';try{const {files:_0x1c047c,absolutePaths:_0x19a5ab}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x1c047c,this['_syncAbsolutePaths']=_0x19a5ab;if(_0x1c047c['length']===0x0){_0x462ba9['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x3fa84e}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x5aba60,hasKnownIbmiExtension:_0x30c8d6}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x3fa84e({'container':_0x462ba9,'files':_0x1c047c,'isPreselected':_0x393a92=>{const {valid:_0x582166}=_0x5aba60(_0x393a92);return _0x582166&&_0x30c8d6(_0x393a92);},'isDisabled':_0x4709e6=>{const {valid:_0x16f0a6,reason:_0x548194}=_0x5aba60(_0x4709e6);return{'disabled':!_0x16f0a6,'reason':_0x548194};},'isAutoCheckEligible':_0x4542b5=>{const {valid:_0x1fe6d4}=_0x5aba60(_0x4542b5);return _0x1fe6d4&&_0x30c8d6(_0x4542b5);},'onChange':_0x406823=>{_0x4d49f9&&(_0x4d49f9['textContent']=_0x406823['length']+'\x20of\x20'+_0x1c047c['length']+'\x20file'+(_0x1c047c['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x3658f5){_0x462ba9['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x4fe3a9){const _0x1d34b6=this['_el']('approve-error'),_0x4402fa=this['_el']('approve-error-text');_0x1d34b6&&_0x4402fa&&(_0x4402fa['textContent']=_0x4fe3a9,_0x1d34b6['hidden']=![],_0x1d34b6['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x6703f3=this['_el']('approve-error'),_0x38fd30=this['_el']('approve-error-text');_0x6703f3&&_0x38fd30&&(_0x6703f3['hidden']=!![],_0x38fd30['textContent']='');}['_displayBranchInfo'](_0x12a88e,_0x2e9030={}){const _0xa7f317=this['_el']('approve-branches');if(!_0xa7f317)return;const _0x4c9d3d=[];for(const _0x1c6fb7 of _0x12a88e){_0x2e9030[_0x1c6fb7['name']]&&_0x4c9d3d['push']({'repo':_0x1c6fb7['name'],'branch':_0x2e9030[_0x1c6fb7['name']]});}if(_0x4c9d3d['length']>0x0){_0xa7f317['hidden']=![];if(_0x4c9d3d['length']===0x1)_0xa7f317['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x4c9d3d[0x0]['branch']+'</code></div>';else{const _0x1cae65=_0x4c9d3d['map'](_0x486aad=>'<div\x20class=\x22branch-item\x22><strong>'+_0x486aad['repo']+':</strong>\x20<code>'+_0x486aad['branch']+'</code></div>')['join']('');_0xa7f317['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x1cae65+'</div></div>';}}else _0xa7f317['hidden']=!![],_0xa7f317['innerHTML']='';}['showWarning'](_0x598c11){const _0xfe4f1b=this['_el']('approve-warning'),_0x231e6b=this['_el']('approve-warning-text');_0xfe4f1b&&_0x231e6b&&(_0x231e6b['textContent']=_0x598c11,_0xfe4f1b['hidden']=![]);}['hideWarning'](){const _0x189bfa=this['_el']('approve-warning'),_0x2592df=this['_el']('approve-warning-text');_0x189bfa&&_0x2592df&&(_0x189bfa['hidden']=!![],_0x2592df['textContent']='');}['_stripCoAuthoredByLines'](_0x28626e){return _0x28626e['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x3302f0){try{let _0x39d36b;try{const _0x4e64d3=await fetch(this['baseUrl']+'/settings');if(_0x4e64d3['ok']){const _0x1a72d4=await _0x4e64d3['json']();_0x39d36b=_0x1a72d4['coderflow_attribution']!==![];}}catch(_0x2bc362){}_0x39d36b===undefined&&(this['coderflowAttribution']!==undefined?_0x39d36b=this['coderflowAttribution']!==![]:_0x39d36b=!![]);const _0x24d986=this['_stripCoAuthoredByLines'](_0x3302f0);if(!_0x39d36b)return _0x24d986;const _0x13a436='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x24d986+_0x13a436;}catch(_0x4f8af7){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x4f8af7),_0x3302f0;}}['show'](_0x349d53){!this['initialized']&&this['init']();this['taskData']=_0x349d53;const _0x4a386a=this['_el']('approve-modal'),_0x5a902d=this['_el']('commit-message-input'),_0x4a3d60=this['_el']('pull-before-commit'),_0x4ef0cd=this['_el']('push-after-commit'),_0x2c8159=this['_el']('create-new-branch'),_0x9dfaa7=this['_el']('new-branch-input-container'),_0x38441e=this['_el']('new-branch-name'),_0x599497=this['_el']('approve-repo-name'),_0x58e35d=this['_el']('approve-stats'),_0x555936=this['_el']('multi-repo-note');if(!_0x4a386a)return;this['hideError'](),this['hideWarning']();_0x349d53['warning']&&this['showWarning'](_0x349d53['warning']);const _0x11bc5f=_0x349d53['reposChanged']||[];if(_0x11bc5f['length']===0x0&&!_0x349d53['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x11bc5f,_0x349d53);const _0x2fede8=_0x349d53['commitMessage']||'',_0x1685d8=this['_stripCoAuthoredByLines'](_0x2fede8);_0x5a902d['value']=_0x1685d8;if(_0x4a3d60)_0x4a3d60['checked']=!![];if(_0x4ef0cd)_0x4ef0cd['checked']=!![];_0x2c8159&&(_0x2c8159['checked']=![]);_0x9dfaa7&&(_0x9dfaa7['hidden']=!![]);_0x38441e&&(_0x38441e['value']='');if(_0x4ef0cd)_0x4ef0cd['disabled']=![];if(_0x2c8159)_0x2c8159['disabled']=![];this['updatePRSupport'](_0x349d53['prSupported']===!![]);const _0x575abc=this['_el']('ibmi-sync-section');if(_0x575abc){_0x575abc['hidden']=!_0x349d53['ibmiSyncAvailable'];const _0x512a82=this['_el']('sync-to-ibmi'),_0x37839d=this['_el']('ibmi-sync-fields'),_0x2471ae=this['_el']('ibmi-sync-library');if(_0x512a82)_0x512a82['checked']=![];if(_0x37839d)_0x37839d['hidden']=!![];if(_0x2471ae)_0x2471ae['value']='';const _0x58944=this['_el']('ibmi-sync-credentials-row');_0x58944&&(_0x58944['hidden']=!(_0x349d53['ibmiSyncAvailable']&&_0x349d53['syncCredentials']==='prompt'));}const _0x43ffa4=this['_el']('confirm-approve');_0x349d53['syncFirst']&&this['onSync']?(_0x43ffa4&&(_0x43ffa4['disabled']=!![],_0x43ffa4['textContent']='Syncing...'),this['_performSync']()):_0x43ffa4&&(_0x43ffa4['disabled']=![],_0x43ffa4['textContent']='Commit\x20Changes');_0x4a386a['hidden']=![];const _0x5eb0ec=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x5eb0ec,'taskId':_0x349d53['taskId'],'originalCommitMessage':_0x1685d8}),setTimeout(()=>{_0x5a902d['focus'](),_0x5a902d['setSelectionRange'](0x0,_0x5a902d['value']['length']);},0x64);}['updatePRSupport'](_0x4b7e6c){const _0x3fb28e=this['_el']('pr-option-section'),_0x6946b9=this['_el']('create-pull-request'),_0x2c7bdc=this['_el']('pr-hint'),_0xc40aca=this['_el']('push-after-commit'),_0x22c58e=this['_el']('create-new-branch');if(!_0x3fb28e)return;if(_0x4b7e6c){_0x3fb28e['hidden']=![];_0x6946b9&&!_0x6946b9['disabled']&&(_0x6946b9['checked']=![]);if(_0x2c7bdc)_0x2c7bdc['hidden']=!![];this['_createPR']=![];return;}_0x6946b9?.['checked']&&(_0x6946b9['checked']=![]);if(_0x2c7bdc)_0x2c7bdc['hidden']=!![];if(_0xc40aca)_0xc40aca['disabled']=![];if(_0x22c58e)_0x22c58e['disabled']=![];this['_createPR']=![],_0x3fb28e['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x2bb6fa,taskId:_0x5e3366,originalCommitMessage:_0x502790}){const _0x26900a=this['_el']('commit-message-input');if(!_0x26900a)return;const _0x257965=await this['_addAttributionIfEnabled'](_0x502790);if(_0x2bb6fa!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x5e3366)return;if(!this['isVisible']())return;const _0x3d86b5=_0xf1983f=>_0xf1983f['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x3d86b5(_0x26900a['value'])!==_0x3d86b5(_0x502790))return;_0x26900a['value']=_0x257965;}['_updateDisplay'](_0x53764d,_0x36012d){const _0x106b1e=this['_el']('approve-repo-name'),_0x245698=this['_el']('approve-stats'),_0x4b8460=this['_el']('multi-repo-note');if(_0x53764d['length']===0x0){if(_0x106b1e)_0x106b1e['textContent']='Syncing...';if(_0x245698)_0x245698['textContent']='';if(_0x4b8460)_0x4b8460['hidden']=!![];return;}const _0x3f1941=_0x53764d['reduce']((_0x4b11a4,_0x107f14)=>_0x4b11a4+(_0x107f14['files_changed']||0x0),0x0),_0x115e7b=_0x53764d['reduce']((_0x274baf,_0x196335)=>_0x274baf+(_0x196335['lines_added']||0x0),0x0),_0x383273=_0x53764d['reduce']((_0x57a7b1,_0x9e5432)=>_0x57a7b1+(_0x9e5432['lines_deleted']||0x0),0x0);if(_0x53764d['length']===0x1){if(_0x106b1e)_0x106b1e['textContent']=_0x53764d[0x0]?.['name']||'repository';if(_0x4b8460)_0x4b8460['hidden']=!![];}else{const _0x2f36eb=_0x53764d['map'](_0x33df04=>_0x33df04['name'])['join'](',\x20');if(_0x106b1e)_0x106b1e['textContent']=_0x53764d['length']+'\x20repositories:\x20'+_0x2f36eb;if(_0x4b8460)_0x4b8460['hidden']=![];}_0x245698&&(_0x245698['textContent']=_0x3f1941+'\x20file'+(_0x3f1941===0x1?'':'s')+'\x20changed\x20(+'+_0x115e7b+'\x20-'+_0x383273+')'),this['_displayBranchInfo'](_0x53764d,_0x36012d?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x2c0d55=this['_el']('confirm-approve');try{const _0x34cf4e=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x34cf4e['repos_changed']){const _0x1fab21=this['taskData']['reposChanged']?.['length']||0x0,_0x1cadb1=this['taskData']['reposChanged']?.['reduce']((_0x671e3d,_0x21e5db)=>_0x671e3d+(_0x21e5db['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x34cf4e['repos_changed'];if(_0x34cf4e['current_branches']){const _0x5d95f2={...this['taskData']['branches']||{}};for(const [_0x174496,_0x47bd84]of Object['entries'](_0x34cf4e['current_branches'])){_0x47bd84?_0x5d95f2[_0x174496]=_0x47bd84:delete _0x5d95f2[_0x174496];}this['taskData']['branches']=_0x5d95f2;}this['_updateDisplay'](_0x34cf4e['repos_changed'],this['taskData']);const _0x18b976=_0x34cf4e['repos_changed']['length'],_0x19d4c6=_0x34cf4e['repos_changed']['reduce']((_0x4eabde,_0x2b0d1a)=>_0x4eabde+(_0x2b0d1a['files_changed']||0x0),0x0);(_0x19d4c6>_0x1cadb1||_0x18b976>_0x1fab21)&&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.');}_0x2c0d55&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x2c0d55['disabled']=!![],_0x2c0d55['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x2c0d55['disabled']=![],_0x2c0d55['textContent']='Commit\x20Changes'));}catch(_0x17d3df){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x17d3df);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x17d3df['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x2c0d55&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x2c0d55['disabled']=![],_0x2c0d55['textContent']='Commit\x20Changes'):(_0x2c0d55['disabled']=!![],_0x2c0d55['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x472529=this['_el']('approve-modal');_0x472529&&(_0x472529['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x313420=this['_el']('commit-message-input'),_0x21f0b2=this['_el']('pull-before-commit'),_0x16c2a6=this['_el']('push-after-commit'),_0x33d745=this['_el']('create-new-branch'),_0x10978b=this['_el']('new-branch-name'),_0x158fd2=this['_el']('confirm-approve'),_0x5f3e2c=_0x313420['value']['trim'](),_0x1dab3d=_0x21f0b2?.['checked']??!![],_0x28083e=_0x16c2a6?.['checked']??!![],_0x16154e=_0x33d745?.['checked']||![],_0x2955ae=_0x10978b?.['value']['trim']()||'';this['hideError']();if(!_0x5f3e2c){this['showError']('Commit\x20message\x20is\x20required'),_0x313420['focus']();return;}if(_0x16154e&&!_0x2955ae){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x10978b?.['focus']();return;}if(_0x16154e&&_0x2955ae){const _0x21c2a6=/[\s~^:?*\[\\]/;if(_0x21c2a6['test'](_0x2955ae)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x10978b?.['focus']();return;}}const _0x48ea1c=this['_el']('sync-to-ibmi')?.['checked'];if(_0x48ea1c){const _0x52ebb7=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x52ebb7){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x438b0c=this['_syncFileTree']['getSelectedFiles']();if(_0x438b0c['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x4ac355=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x4ac355){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x41c17f=this['_el']('ibmi-sync-password')?.['value'];if(!_0x41c17f){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x2db1f2=_0x158fd2?.['textContent']||'Commit\x20Changes';_0x158fd2&&(_0x158fd2['disabled']=!![],_0x16154e?_0x158fd2['textContent']='Creating\x20branch\x20&\x20committing...':_0x158fd2['textContent']=_0x1dab3d?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x4bc091={'commit_message':_0x5f3e2c,'pull':_0x1dab3d,'push':_0x28083e};_0x16154e&&_0x2955ae&&(_0x4bc091['new_branch']=_0x2955ae);let _0x20c2bc=null;this['onApprove']&&(_0x20c2bc=await this['onApprove'](this['taskData']['taskId'],_0x4bc091));let _0x481d5e='Changes\x20committed';if(_0x16154e)_0x481d5e='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x2955ae+'\x27',_0x28083e&&(_0x481d5e+='\x20and\x20pushed');else{if(_0x1dab3d&&_0x28083e)_0x481d5e='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x1dab3d)_0x481d5e='Changes\x20pulled\x20and\x20committed';else _0x28083e&&(_0x481d5e='Changes\x20committed\x20and\x20pushed');}}const _0xa91957=this['_el']('sync-to-ibmi')?.['checked'];let _0x572738=null,_0x893152=null,_0x9d3bd9=null,_0x591d78=null;if(_0xa91957&&this['onSyncToIbmi']){_0x572738=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x893152=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x9d3bd9=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x222208=this['_syncFileTree']['getSelectedFiles']();_0x591d78=_0x222208['map'](_0x62a782=>{const _0x2a5c1a=this['_syncRelativeFiles']['indexOf'](_0x62a782);return _0x2a5c1a>=0x0?this['_syncAbsolutePaths'][_0x2a5c1a]:_0x62a782;});}}this['showToast'](_0x481d5e,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x20c2bc||{});}catch(_0x2379f9){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x2379f9);}if(_0xa91957&&this['onSyncToIbmi']&&_0x572738){localStorage['setItem']('coderflow_ibmi_sync_library',_0x572738);if(_0x893152)localStorage['setItem']('coderflow_ibmi_sync_user',_0x893152);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x572738,_0x893152,_0x9d3bd9,_0x591d78);}catch(_0xa22dc4){this['showToast']('Sync\x20failed:\x20'+_0xa22dc4['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x573e02){console['error']('Failed\x20to\x20approve\x20changes',_0x573e02),this['showError']('Failed\x20to\x20commit:\x20'+_0x573e02['message']),_0x158fd2&&(_0x158fd2['disabled']=![],_0x158fd2['textContent']=_0x2db1f2),this['onError']&&this['onError'](_0x573e02);}}['isVisible'](){const _0x4ea01d=this['_el']('approve-modal');return _0x4ea01d&&!_0x4ea01d['hidden'];}['destroy'](){const _0x2004d9=this['_el']('approve-modal');_0x2004d9&&_0x2004d9['remove'](),this['initialized']=![];}}export function getApproveState(_0x5cedf7,_0x56eace){if(!_0x5cedf7)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x5cedf7['taskType']))return{'canApprove':![],'reason':(_0x5cedf7['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x517688=_0x56eace?.['repos_changed']?.['length']>0x0,_0x40cd1c=_0x5cedf7['status']==='completed'||_0x5cedf7['status']==='failed'||_0x5cedf7['status']==='interrupted',_0x326c6c=_0x5cedf7['containerState']==='running',_0x5c884d=_0x5cedf7['approvedBy']!==undefined&&_0x5cedf7['approvedBy']!==null;if(_0x5c884d){const _0x3c1ca4=_0x5cedf7['approvedBy']['name']||_0x5cedf7['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x3c1ca4};}if(!_0x517688)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x40cd1c)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x5cedf7['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x326c6c)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
@@ -1 +1 @@
1
- export function buildAutomationEnvironmentHref(_0x382839,_0x445fd3){const _0x171a67=new URLSearchParams();_0x382839&&_0x171a67['set']('env',String(_0x382839));_0x171a67['set']('tab','automations');_0x445fd3&&_0x171a67['set']('automation',String(_0x445fd3));const _0x33f66c=_0x171a67['toString']();return'environments.html'+(_0x33f66c?'?'+_0x33f66c:'');}export function buildAutomationTaskFilterHref(_0x200530){const _0x4144de=new URLSearchParams();_0x200530&&_0x4144de['set']('automation',String(_0x200530));const _0x2ba9bd=_0x4144de['toString']();return'index.html'+(_0x2ba9bd?'?'+_0x2ba9bd:'');}export function parseAutomationDeepLinkParams(_0x55d14e=''){const _0xb9331a=new URLSearchParams(_0x55d14e||'');return{'env':_0xb9331a['get']('env'),'tab':_0xb9331a['get']('tab'),'automation':_0xb9331a['get']('automation')};}
1
+ export function buildAutomationEnvironmentHref(_0x2c4686,_0x32171e){const _0x1c9f84=new URLSearchParams();_0x2c4686&&_0x1c9f84['set']('env',String(_0x2c4686));_0x1c9f84['set']('tab','automations');_0x32171e&&_0x1c9f84['set']('automation',String(_0x32171e));const _0x2431d6=_0x1c9f84['toString']();return'environments.html'+(_0x2431d6?'?'+_0x2431d6:'');}export function buildAutomationTaskFilterHref(_0x15fa4b){const _0x3b0cee=new URLSearchParams();_0x15fa4b&&_0x3b0cee['set']('automation',String(_0x15fa4b));const _0x4c7578=_0x3b0cee['toString']();return'index.html'+(_0x4c7578?'?'+_0x4c7578:'');}export function parseAutomationDeepLinkParams(_0x11dab4=''){const _0x3346da=new URLSearchParams(_0x11dab4||'');return{'env':_0x3346da['get']('env'),'tab':_0x3346da['get']('tab'),'automation':_0x3346da['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(_0x5171b5,_0x5bb7af,_0xd7c492){const _0x3a87b8=Number['parseInt'](_0x5171b5,0xa);if(!Number['isInteger'](_0x3a87b8)||_0x3a87b8<_0x5bb7af||_0x3a87b8>_0xd7c492)return null;return _0x3a87b8;}function inferRecurringInterval(_0x4ecd9e,_0x2f7134){if(_0x4ecd9e==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x4ecd9e==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x4ecd9e!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x2f7134==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x2f7134))return'0\x20*\x20*\x20*\x20*';for(const _0x3d81f3 of RECURRING_INTERVAL_STEPS){if(_0x2f7134['startsWith']('*/'+_0x3d81f3)||_0x2f7134['includes']('/'+_0x3d81f3))return'0\x20*/'+_0x3d81f3+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x57cd34){const _0x2d1c84=String(_0x57cd34||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x2d1c84)return{'start':'','end':''};const _0x4b8763=parseBoundedInteger(_0x2d1c84[0x1],0x0,0x17),_0x51a3d2=parseBoundedInteger(_0x2d1c84[0x2],0x0,0x17);if(_0x4b8763===null||_0x51a3d2===null||_0x4b8763>_0x51a3d2)return{'start':'','end':''};return{'start':String(_0x4b8763),'end':String(_0x51a3d2)};}export function parseAutomationScheduleToFormState(_0x39db65){const _0x554792=String(_0x39db65||'')['trim'](),_0xa3a250=createDefaultScheduleFormState(),_0x1c3fee=_0x554792['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x1c3fee){const _0x53bd52=parseBoundedInteger(_0x1c3fee[0x1],0x0,0x3b),_0x4f0fde=parseBoundedInteger(_0x1c3fee[0x2],0x0,0x17);if(_0x53bd52!==null&&_0x4f0fde!==null)return _0xa3a250['frequency']='daily',_0xa3a250['dailyMinute']=String(_0x53bd52),_0xa3a250['dailyHour']=String(_0x4f0fde),_0xa3a250;}const _0x121358=_0x554792['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x121358){const _0x491335=parseBoundedInteger(_0x121358[0x1],0x0,0x3b),_0x5ec297=parseBoundedInteger(_0x121358[0x2],0x0,0x17),_0x28b59f=parseBoundedInteger(_0x121358[0x3],0x0,0x7);if(_0x491335!==null&&_0x5ec297!==null&&_0x28b59f!==null)return _0xa3a250['frequency']='weekly',_0xa3a250['weeklyMinute']=String(_0x491335),_0xa3a250['weeklyHour']=String(_0x5ec297),_0xa3a250['weeklyDay']=String(_0x28b59f===0x7?0x0:_0x28b59f),_0xa3a250;}const _0x29a4b4=_0x554792['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x29a4b4){const _0x1d9a1c=parseBoundedInteger(_0x29a4b4[0x1],0x0,0x3b),_0xbbddb6=parseBoundedInteger(_0x29a4b4[0x2],0x0,0x17),_0x558a31=parseBoundedInteger(_0x29a4b4[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x1d9a1c!==null&&_0xbbddb6!==null&&_0x558a31!==null)return _0xa3a250['frequency']='monthly',_0xa3a250['monthlyMinute']=String(_0x1d9a1c),_0xa3a250['monthlyHour']=String(_0xbbddb6),_0xa3a250['monthlyDay']=String(_0x558a31),_0xa3a250;}const _0x4533ce=_0x554792['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x4533ce){const [,_0x4d101a,_0x21db6f,_0x232b5a]=_0x4533ce;_0xa3a250['frequency']='recurring',_0xa3a250['recurringInterval']=inferRecurringInterval(_0x4d101a,_0x21db6f),_0xa3a250['recurringDayToken']=String(_0x232b5a||'')['trim']()||'*';const _0x18b3b3=parseRecurringHourRange(_0x21db6f);return _0xa3a250['recurringStartHour']=_0x18b3b3['start'],_0xa3a250['recurringEndHour']=_0x18b3b3['end'],_0xa3a250;}return _0xa3a250['frequency']='custom',_0xa3a250['customCron']=_0x554792,_0xa3a250;}export function buildAutomationCronFromFormState(_0x25bf4d={}){const _0x40e341=String(_0x25bf4d['frequency']||'daily');if(_0x40e341==='custom')return String(_0x25bf4d['customCron']||'')['trim']();if(_0x40e341==='daily'){const _0xf328be=String(_0x25bf4d['dailyHour']??'2'),_0x753fe9=String(_0x25bf4d['dailyMinute']??'0');return _0x753fe9+'\x20'+_0xf328be+'\x20*\x20*\x20*';}if(_0x40e341==='weekly'){const _0x4c665f=String(_0x25bf4d['weeklyDay']??'1'),_0x15fcbe=String(_0x25bf4d['weeklyHour']??'9'),_0x28fe7a=String(_0x25bf4d['weeklyMinute']??'0');return _0x28fe7a+'\x20'+_0x15fcbe+'\x20*\x20*\x20'+_0x4c665f;}if(_0x40e341==='monthly'){const _0x5e5996=String(_0x25bf4d['monthlyDay']??'1'),_0x58a0e4=String(_0x25bf4d['monthlyHour']??'0'),_0x2d71e7=String(_0x25bf4d['monthlyMinute']??'0');return _0x2d71e7+'\x20'+_0x58a0e4+'\x20'+_0x5e5996+'\x20*\x20*';}const _0x16c976=String(_0x25bf4d['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x8967e7='*/30',_0x374688='*']=_0x16c976['split'](/\s+/);let _0x4a25c9=_0x374688;const _0xa35336=String(_0x25bf4d['recurringStartHour']??'')['trim'](),_0x5353fb=String(_0x25bf4d['recurringEndHour']??'')['trim']();if(_0xa35336!==''&&_0x5353fb!==''){const _0x42155c=Number['parseInt'](_0xa35336,0xa),_0x2eb62c=Number['parseInt'](_0x5353fb,0xa);if(Number['isInteger'](_0x42155c)&&Number['isInteger'](_0x2eb62c)&&_0x42155c<=_0x2eb62c){const _0x362113=_0x374688['match'](/^\*\/(\d+)$/);_0x362113?_0x4a25c9=_0x42155c+'-'+_0x2eb62c+'/'+_0x362113[0x1]:_0x4a25c9=_0x42155c+'-'+_0x2eb62c;}}const _0xa26b26=String(_0x25bf4d['recurringDayToken']??'*')['trim']()||'*';return _0x8967e7+'\x20'+_0x4a25c9+'\x20*\x20*\x20'+_0xa26b26;}
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(_0x553e88,_0x1bb633,_0x46eb84){const _0x4d04cf=Number['parseInt'](_0x553e88,0xa);if(!Number['isInteger'](_0x4d04cf)||_0x4d04cf<_0x1bb633||_0x4d04cf>_0x46eb84)return null;return _0x4d04cf;}function inferRecurringInterval(_0x1db2b4,_0xf8688b){if(_0x1db2b4==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x1db2b4==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x1db2b4!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0xf8688b==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0xf8688b))return'0\x20*\x20*\x20*\x20*';for(const _0x215b2b of RECURRING_INTERVAL_STEPS){if(_0xf8688b['startsWith']('*/'+_0x215b2b)||_0xf8688b['includes']('/'+_0x215b2b))return'0\x20*/'+_0x215b2b+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x1bf47a){const _0x1c5888=String(_0x1bf47a||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x1c5888)return{'start':'','end':''};const _0x492380=parseBoundedInteger(_0x1c5888[0x1],0x0,0x17),_0xbd3664=parseBoundedInteger(_0x1c5888[0x2],0x0,0x17);if(_0x492380===null||_0xbd3664===null||_0x492380>_0xbd3664)return{'start':'','end':''};return{'start':String(_0x492380),'end':String(_0xbd3664)};}export function parseAutomationScheduleToFormState(_0x46f46b){const _0x15b4c9=String(_0x46f46b||'')['trim'](),_0x2fd419=createDefaultScheduleFormState(),_0x68d521=_0x15b4c9['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x68d521){const _0x4b5fa9=parseBoundedInteger(_0x68d521[0x1],0x0,0x3b),_0x4c441d=parseBoundedInteger(_0x68d521[0x2],0x0,0x17);if(_0x4b5fa9!==null&&_0x4c441d!==null)return _0x2fd419['frequency']='daily',_0x2fd419['dailyMinute']=String(_0x4b5fa9),_0x2fd419['dailyHour']=String(_0x4c441d),_0x2fd419;}const _0x45ceb9=_0x15b4c9['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x45ceb9){const _0x57feb6=parseBoundedInteger(_0x45ceb9[0x1],0x0,0x3b),_0x47209a=parseBoundedInteger(_0x45ceb9[0x2],0x0,0x17),_0xe8fbad=parseBoundedInteger(_0x45ceb9[0x3],0x0,0x7);if(_0x57feb6!==null&&_0x47209a!==null&&_0xe8fbad!==null)return _0x2fd419['frequency']='weekly',_0x2fd419['weeklyMinute']=String(_0x57feb6),_0x2fd419['weeklyHour']=String(_0x47209a),_0x2fd419['weeklyDay']=String(_0xe8fbad===0x7?0x0:_0xe8fbad),_0x2fd419;}const _0x3f4531=_0x15b4c9['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x3f4531){const _0x45cede=parseBoundedInteger(_0x3f4531[0x1],0x0,0x3b),_0x484512=parseBoundedInteger(_0x3f4531[0x2],0x0,0x17),_0x5c49ae=parseBoundedInteger(_0x3f4531[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x45cede!==null&&_0x484512!==null&&_0x5c49ae!==null)return _0x2fd419['frequency']='monthly',_0x2fd419['monthlyMinute']=String(_0x45cede),_0x2fd419['monthlyHour']=String(_0x484512),_0x2fd419['monthlyDay']=String(_0x5c49ae),_0x2fd419;}const _0x4e867e=_0x15b4c9['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x4e867e){const [,_0x27465e,_0x5e7f78,_0x31c1a0]=_0x4e867e;_0x2fd419['frequency']='recurring',_0x2fd419['recurringInterval']=inferRecurringInterval(_0x27465e,_0x5e7f78),_0x2fd419['recurringDayToken']=String(_0x31c1a0||'')['trim']()||'*';const _0x4fbaf3=parseRecurringHourRange(_0x5e7f78);return _0x2fd419['recurringStartHour']=_0x4fbaf3['start'],_0x2fd419['recurringEndHour']=_0x4fbaf3['end'],_0x2fd419;}return _0x2fd419['frequency']='custom',_0x2fd419['customCron']=_0x15b4c9,_0x2fd419;}export function buildAutomationCronFromFormState(_0x3000b0={}){const _0x385d83=String(_0x3000b0['frequency']||'daily');if(_0x385d83==='custom')return String(_0x3000b0['customCron']||'')['trim']();if(_0x385d83==='daily'){const _0x159a54=String(_0x3000b0['dailyHour']??'2'),_0x1212b6=String(_0x3000b0['dailyMinute']??'0');return _0x1212b6+'\x20'+_0x159a54+'\x20*\x20*\x20*';}if(_0x385d83==='weekly'){const _0x1792a8=String(_0x3000b0['weeklyDay']??'1'),_0x949cd=String(_0x3000b0['weeklyHour']??'9'),_0x456fb3=String(_0x3000b0['weeklyMinute']??'0');return _0x456fb3+'\x20'+_0x949cd+'\x20*\x20*\x20'+_0x1792a8;}if(_0x385d83==='monthly'){const _0x3ec78d=String(_0x3000b0['monthlyDay']??'1'),_0x190ea6=String(_0x3000b0['monthlyHour']??'0'),_0x548e40=String(_0x3000b0['monthlyMinute']??'0');return _0x548e40+'\x20'+_0x190ea6+'\x20'+_0x3ec78d+'\x20*\x20*';}const _0xd654f2=String(_0x3000b0['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x4df753='*/30',_0x373219='*']=_0xd654f2['split'](/\s+/);let _0x3dfd4c=_0x373219;const _0x4d5e0b=String(_0x3000b0['recurringStartHour']??'')['trim'](),_0x43445a=String(_0x3000b0['recurringEndHour']??'')['trim']();if(_0x4d5e0b!==''&&_0x43445a!==''){const _0x34e6ef=Number['parseInt'](_0x4d5e0b,0xa),_0x304935=Number['parseInt'](_0x43445a,0xa);if(Number['isInteger'](_0x34e6ef)&&Number['isInteger'](_0x304935)&&_0x34e6ef<=_0x304935){const _0x13186d=_0x373219['match'](/^\*\/(\d+)$/);_0x13186d?_0x3dfd4c=_0x34e6ef+'-'+_0x304935+'/'+_0x13186d[0x1]:_0x3dfd4c=_0x34e6ef+'-'+_0x304935;}}const _0x4e5e17=String(_0x3000b0['recurringDayToken']??'*')['trim']()||'*';return _0x4df753+'\x20'+_0x3dfd4c+'\x20*\x20*\x20'+_0x4e5e17;}
@@ -1 +1 @@
1
- export class CommentsWidget{constructor(_0x5bd1ba,_0x2de546={}){this['container']=_0x5bd1ba,this['options']={'taskId':_0x2de546['taskId']||null,'currentUserId':_0x2de546['currentUserId']||null,'compact':_0x2de546['compact']||![],'skipHeader':_0x2de546['skipHeader']||![],'onCommentsLoaded':_0x2de546['onCommentsLoaded']||null,'onCommentsChanged':_0x2de546['onCommentsChanged']||null,'enableAttachments':_0x2de546['enableAttachments']||![],'getAPI':_0x2de546['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 _0x2d5e53=this['options']['getAPI'](),_0x279e8f=await _0x2d5e53['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x279e8f['attachments']||[];}catch(_0x105d58){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x105d58),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 _0x1cdc30=this['header']['querySelector']('.comments-toggle-btn');_0x1cdc30['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 _0x11a71d=document['createElement']('div');_0x11a71d['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x11a71d['appendChild'](this['toolbar']);const _0x435a44=document['createElement']('div');_0x435a44['className']='comments-editor-placeholder',_0x11a71d['appendChild'](_0x435a44);const _0x3a84a1=document['createElement']('div');_0x3a84a1['className']='comments-input-actions',_0x3a84a1['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'](_0x11a71d),this['inputSection']['appendChild'](_0x3a84a1),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x435a44),this['submitBtn']=_0x3a84a1['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x3a84a1['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0xf3d42){const _0x19b6ea=document['createElement']('textarea');_0x19b6ea['placeholder']='Add\x20a\x20comment...',_0x19b6ea['className']='comments-textarea',_0xf3d42['appendChild'](_0x19b6ea);const _0x167fca=window['MarkdownEditor'];if(!_0x167fca){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x527bc7={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x549426=>{const _0x2a7dc3=_0x549426&&_0x549426['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x2a7dc3;},'fetchUsers':async()=>{const _0x39b8dd=this['options']['getAPI']();return _0x39b8dd['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x527bc7['onAddAttachments']=_0x45f569=>{this['pendingAttachments']['push'](..._0x45f569),this['submitBtn']['disabled']=![];},_0x527bc7['resolveAttachmentUrl']=_0x1363b6=>{const _0x185c93=this['options']['getAPI']();return _0x185c93['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x1363b6);},_0x527bc7['isAttachmentNameTaken']=_0x55decc=>{return this['pendingAttachments']['some'](_0x1ec8bf=>_0x1ec8bf['name']===_0x55decc)||this['existingAttachments']['some'](_0x57c9bf=>_0x57c9bf['name']===_0x55decc);});this['editor']=new _0x167fca(_0x19b6ea,_0x527bc7);const _0xe02ab2=this['editor']['editor'],_0x52a146=this['editor']['toolbar'];_0x52a146&&(_0x52a146['classList']['add']('comments-toolbar-hidden'),_0xe02ab2['addEventListener']('focus',()=>{_0x52a146['classList']['remove']('comments-toolbar-hidden');}),_0xe02ab2['addEventListener']('blur',_0x2603c3=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x52a146['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x52a146['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x48e29e=this['header']['querySelector']('.comments-chevron');_0x48e29e&&(_0x48e29e['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x475714){this['options']['taskId']=_0x475714,this['comments']=[],this['renderComments'](),_0x475714&&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 _0x291401=this['options']['getAPI'](),_0x1ae35b=await _0x291401['getComments'](this['options']['taskId']);this['comments']=_0x1ae35b['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0xbf11be){console['error']('Failed\x20to\x20load\x20comments:',_0xbf11be),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'](_0x5ce9e0=>{const _0x24903b=this['createCommentElement'](_0x5ce9e0);this['commentsList']['appendChild'](_0x24903b);});}['createCommentElement'](_0x43524d){const _0x1bfc7c=document['createElement']('div');_0x1bfc7c['className']='comment-item',_0x1bfc7c['dataset']['commentId']=_0x43524d['id'];const _0x5cce72=this['options']['currentUserId']&&_0x43524d['author']?.['userId']===this['options']['currentUserId'],_0x382c0c=this['formatDate'](_0x43524d['createdAt']),_0xb24088=_0x43524d['updatedAt']!==_0x43524d['createdAt'],_0x349b8d=this['resolveAttachmentUrls'](_0x43524d['content']);let _0x552097=window['marked']?window['marked']['parse'](_0x349b8d):_0x349b8d;_0x552097=this['renderMentions'](_0x552097),_0x1bfc7c['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'](_0x43524d['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x43524d['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x382c0c+(_0xb24088?'\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'+(_0x5cce72?'\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>'+_0x552097+'</div>\x0a\x20\x20\x20\x20';if(_0x5cce72){const _0x536fcc=_0x1bfc7c['querySelector']('.comment-edit-btn'),_0x519261=_0x1bfc7c['querySelector']('.comment-delete-btn');_0x536fcc?.['addEventListener']('click',()=>this['startEdit'](_0x43524d)),_0x519261?.['addEventListener']('click',()=>this['deleteComment'](_0x43524d['id']));}return _0x1bfc7c;}['formatDate'](_0x35259c){const _0x42072d=new Date(_0x35259c),_0x1e8184=new Date(),_0x59f485=_0x1e8184-_0x42072d,_0x40ddf9=Math['floor'](_0x59f485/0xea60),_0x42a92a=Math['floor'](_0x59f485/0x36ee80),_0x564338=Math['floor'](_0x59f485/0x5265c00);if(_0x40ddf9<0x1)return'just\x20now';if(_0x40ddf9<0x3c)return _0x40ddf9+'m\x20ago';if(_0x42a92a<0x18)return _0x42a92a+'h\x20ago';if(_0x564338<0x7)return _0x564338+'d\x20ago';return _0x42072d['toLocaleDateString']();}['escapeHtml'](_0x6ee5cb){const _0x38c31f=document['createElement']('div');return _0x38c31f['textContent']=_0x6ee5cb,_0x38c31f['innerHTML'];}['resolveAttachmentUrls'](_0x27b142){if(!_0x27b142||!this['options']['taskId'])return _0x27b142;const _0x1665cf=this['options']['getAPI'](),_0x166f18=_0x1665cf['getBaseUrl']();let _0x15cd8f=String(_0x27b142)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x258282,_0x7dde5)=>{const _0x5b4f86=String(_0x7dde5||'')['trim']();if(!_0x5b4f86)return _0x258282;let _0x3288df=_0x5b4f86;try{_0x3288df=decodeURIComponent(_0x5b4f86);}catch{}return']('+_0x166f18+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x3288df)+')';});return _0x15cd8f;}['renderMentions'](_0xcca313){if(!_0xcca313)return _0xcca313;return String(_0xcca313)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x416d68,_0xbd0f1c,_0x25e7a3)=>{const _0x1f98ac=this['escapeHtml'](_0x25e7a3),_0x1803d3=this['escapeHtml'](_0xbd0f1c);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x1803d3+'\x22>@'+_0x1f98ac+'</span>';});}['startEdit'](_0x3219ad){this['editingCommentId']=_0x3219ad['id'],this['editor']['setValue'](_0x3219ad['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 _0x3a99b8=this['editor']['getValue']()?.['trim']();if(!_0x3a99b8&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x3f14e5=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x3f14e5['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x2a60d3=>({'name':_0x2a60d3['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x164831=await _0x3f14e5['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x3a99b8),_0x48fb2f=this['comments']['findIndex'](_0x5643f1=>_0x5643f1['id']===this['editingCommentId']);_0x48fb2f!==-0x1&&(this['comments'][_0x48fb2f]=_0x164831['comment']);}else{const _0x18da34=await _0x3f14e5['addComment'](this['options']['taskId'],_0x3a99b8);this['comments']['push'](_0x18da34['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x3154d7){console['error']('Failed\x20to\x20save\x20comment:',_0x3154d7),alert('Failed\x20to\x20save\x20comment:\x20'+_0x3154d7['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x4842c7){const _0x10d929=await this['showDeleteConfirmModal']();if(!_0x10d929)return;try{const _0x28e902=this['options']['getAPI']();await _0x28e902['deleteComment'](this['options']['taskId'],_0x4842c7),this['comments']=this['comments']['filter'](_0x4a4bbc=>_0x4a4bbc['id']!==_0x4842c7),this['renderComments'](),this['updateCount']();}catch(_0x230938){console['error']('Failed\x20to\x20delete\x20comment:',_0x230938),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x230938['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x9d5d87=>{const _0x2ff40c=document['createElement']('div');_0x2ff40c['className']='comments-confirm-modal',_0x2ff40c['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'](_0x2ff40c);const _0x53935d=_0x18698e=>{document['removeEventListener']('keydown',_0x5b2cc5),_0x2ff40c['remove'](),_0x9d5d87(_0x18698e);},_0x5b2cc5=_0x179714=>{if(_0x179714['key']==='Escape')_0x53935d(![]);};document['addEventListener']('keydown',_0x5b2cc5),_0x2ff40c['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x53935d(![])),_0x2ff40c['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x53935d(![])),_0x2ff40c['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x53935d(![])),_0x2ff40c['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x53935d(!![])),_0x2ff40c['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x20245f){this['submitBtn']['disabled']=_0x20245f,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x20245f,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x20245f;}['updateCount'](){const _0x59125c=this['comments']['length'],_0x1cfbb4=this['container']['querySelector']('#comments-count-badge');_0x1cfbb4&&(_0x1cfbb4['textContent']=_0x59125c,_0x1cfbb4['hidden']=_0x59125c===0x0);const _0x46ea34=this['container']['querySelector']('#comments-count');_0x46ea34&&(_0x46ea34['textContent']=_0x59125c>0x0?'('+_0x59125c+')':''),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(_0x523778,_0x1824bd={}){this['container']=_0x523778,this['options']={'taskId':_0x1824bd['taskId']||null,'currentUserId':_0x1824bd['currentUserId']||null,'compact':_0x1824bd['compact']||![],'skipHeader':_0x1824bd['skipHeader']||![],'onCommentsLoaded':_0x1824bd['onCommentsLoaded']||null,'onCommentsChanged':_0x1824bd['onCommentsChanged']||null,'enableAttachments':_0x1824bd['enableAttachments']||![],'getAPI':_0x1824bd['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 _0x22ea6e=this['options']['getAPI'](),_0x4e8273=await _0x22ea6e['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x4e8273['attachments']||[];}catch(_0x230c75){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x230c75),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 _0x2e58d7=this['header']['querySelector']('.comments-toggle-btn');_0x2e58d7['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 _0x19d662=document['createElement']('div');_0x19d662['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x19d662['appendChild'](this['toolbar']);const _0x372e9a=document['createElement']('div');_0x372e9a['className']='comments-editor-placeholder',_0x19d662['appendChild'](_0x372e9a);const _0x19d667=document['createElement']('div');_0x19d667['className']='comments-input-actions',_0x19d667['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'](_0x19d662),this['inputSection']['appendChild'](_0x19d667),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x372e9a),this['submitBtn']=_0x19d667['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x19d667['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0x4b4f94){const _0x2e5a08=document['createElement']('textarea');_0x2e5a08['placeholder']='Add\x20a\x20comment...',_0x2e5a08['className']='comments-textarea',_0x4b4f94['appendChild'](_0x2e5a08);const _0x34c762=window['MarkdownEditor'];if(!_0x34c762){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x982c3e={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x21fad8=>{const _0x9d8cc7=_0x21fad8&&_0x21fad8['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x9d8cc7;},'fetchUsers':async()=>{const _0x185200=this['options']['getAPI']();return _0x185200['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x982c3e['onAddAttachments']=_0x5682b0=>{this['pendingAttachments']['push'](..._0x5682b0),this['submitBtn']['disabled']=![];},_0x982c3e['resolveAttachmentUrl']=_0x41e4df=>{const _0x44a738=this['options']['getAPI']();return _0x44a738['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x41e4df);},_0x982c3e['isAttachmentNameTaken']=_0x451d95=>{return this['pendingAttachments']['some'](_0x21015a=>_0x21015a['name']===_0x451d95)||this['existingAttachments']['some'](_0x50a669=>_0x50a669['name']===_0x451d95);});this['editor']=new _0x34c762(_0x2e5a08,_0x982c3e);const _0x228df3=this['editor']['editor'],_0x85e742=this['editor']['toolbar'];_0x85e742&&(_0x85e742['classList']['add']('comments-toolbar-hidden'),_0x228df3['addEventListener']('focus',()=>{_0x85e742['classList']['remove']('comments-toolbar-hidden');}),_0x228df3['addEventListener']('blur',_0x3cbe61=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x85e742['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x85e742['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x2a4233=this['header']['querySelector']('.comments-chevron');_0x2a4233&&(_0x2a4233['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x4b5fe8){this['options']['taskId']=_0x4b5fe8,this['comments']=[],this['renderComments'](),_0x4b5fe8&&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 _0x1e2981=this['options']['getAPI'](),_0x3da52a=await _0x1e2981['getComments'](this['options']['taskId']);this['comments']=_0x3da52a['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x428237){console['error']('Failed\x20to\x20load\x20comments:',_0x428237),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'](_0x5e8c1c=>{const _0x4f9565=this['createCommentElement'](_0x5e8c1c);this['commentsList']['appendChild'](_0x4f9565);});}['createCommentElement'](_0x2caff6){const _0x2a78e2=document['createElement']('div');_0x2a78e2['className']='comment-item',_0x2a78e2['dataset']['commentId']=_0x2caff6['id'];const _0x1fe149=this['options']['currentUserId']&&_0x2caff6['author']?.['userId']===this['options']['currentUserId'],_0x16ea82=this['formatDate'](_0x2caff6['createdAt']),_0x4e6fd2=_0x2caff6['updatedAt']!==_0x2caff6['createdAt'],_0x459dee=this['resolveAttachmentUrls'](_0x2caff6['content']);let _0x4c8fec=window['marked']?window['marked']['parse'](_0x459dee):_0x459dee;_0x4c8fec=this['renderMentions'](_0x4c8fec),_0x2a78e2['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'](_0x2caff6['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x2caff6['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x16ea82+(_0x4e6fd2?'\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'+(_0x1fe149?'\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>'+_0x4c8fec+'</div>\x0a\x20\x20\x20\x20';if(_0x1fe149){const _0x4976d6=_0x2a78e2['querySelector']('.comment-edit-btn'),_0x76f3d8=_0x2a78e2['querySelector']('.comment-delete-btn');_0x4976d6?.['addEventListener']('click',()=>this['startEdit'](_0x2caff6)),_0x76f3d8?.['addEventListener']('click',()=>this['deleteComment'](_0x2caff6['id']));}return _0x2a78e2;}['formatDate'](_0x36bd45){const _0x2d1fab=new Date(_0x36bd45),_0x43be68=new Date(),_0x5f2ac5=_0x43be68-_0x2d1fab,_0x48b23f=Math['floor'](_0x5f2ac5/0xea60),_0x358466=Math['floor'](_0x5f2ac5/0x36ee80),_0x398c6a=Math['floor'](_0x5f2ac5/0x5265c00);if(_0x48b23f<0x1)return'just\x20now';if(_0x48b23f<0x3c)return _0x48b23f+'m\x20ago';if(_0x358466<0x18)return _0x358466+'h\x20ago';if(_0x398c6a<0x7)return _0x398c6a+'d\x20ago';return _0x2d1fab['toLocaleDateString']();}['escapeHtml'](_0x520e33){const _0x442cad=document['createElement']('div');return _0x442cad['textContent']=_0x520e33,_0x442cad['innerHTML'];}['resolveAttachmentUrls'](_0x29cebf){if(!_0x29cebf||!this['options']['taskId'])return _0x29cebf;const _0x421c5d=this['options']['getAPI'](),_0x24fc64=_0x421c5d['getBaseUrl']();let _0x1d7654=String(_0x29cebf)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x3233c7,_0x381462)=>{const _0x496b03=String(_0x381462||'')['trim']();if(!_0x496b03)return _0x3233c7;let _0x3f9d7d=_0x496b03;try{_0x3f9d7d=decodeURIComponent(_0x496b03);}catch{}return']('+_0x24fc64+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x3f9d7d)+')';});return _0x1d7654;}['renderMentions'](_0x2418eb){if(!_0x2418eb)return _0x2418eb;return String(_0x2418eb)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x4455d6,_0x36fd81,_0x7f6a73)=>{const _0x31cea5=this['escapeHtml'](_0x7f6a73),_0x3e93ba=this['escapeHtml'](_0x36fd81);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x3e93ba+'\x22>@'+_0x31cea5+'</span>';});}['startEdit'](_0x51ffa6){this['editingCommentId']=_0x51ffa6['id'],this['editor']['setValue'](_0x51ffa6['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 _0x176dfb=this['editor']['getValue']()?.['trim']();if(!_0x176dfb&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x1f464b=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x1f464b['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x28e3c2=>({'name':_0x28e3c2['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x17ac36=await _0x1f464b['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x176dfb),_0x36e5fb=this['comments']['findIndex'](_0x100a42=>_0x100a42['id']===this['editingCommentId']);_0x36e5fb!==-0x1&&(this['comments'][_0x36e5fb]=_0x17ac36['comment']);}else{const _0x10c91b=await _0x1f464b['addComment'](this['options']['taskId'],_0x176dfb);this['comments']['push'](_0x10c91b['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x2af11d){console['error']('Failed\x20to\x20save\x20comment:',_0x2af11d),alert('Failed\x20to\x20save\x20comment:\x20'+_0x2af11d['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x2e4db3){const _0x308584=await this['showDeleteConfirmModal']();if(!_0x308584)return;try{const _0x2c8630=this['options']['getAPI']();await _0x2c8630['deleteComment'](this['options']['taskId'],_0x2e4db3),this['comments']=this['comments']['filter'](_0x12fc6d=>_0x12fc6d['id']!==_0x2e4db3),this['renderComments'](),this['updateCount']();}catch(_0x1eb6ff){console['error']('Failed\x20to\x20delete\x20comment:',_0x1eb6ff),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x1eb6ff['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x3fc5db=>{const _0x2cbfa7=document['createElement']('div');_0x2cbfa7['className']='comments-confirm-modal',_0x2cbfa7['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'](_0x2cbfa7);const _0x49505a=_0x255962=>{document['removeEventListener']('keydown',_0x1d0297),_0x2cbfa7['remove'](),_0x3fc5db(_0x255962);},_0x1d0297=_0xe1fd73=>{if(_0xe1fd73['key']==='Escape')_0x49505a(![]);};document['addEventListener']('keydown',_0x1d0297),_0x2cbfa7['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x49505a(![])),_0x2cbfa7['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x49505a(![])),_0x2cbfa7['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x49505a(![])),_0x2cbfa7['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x49505a(!![])),_0x2cbfa7['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x2780ff){this['submitBtn']['disabled']=_0x2780ff,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x2780ff,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x2780ff;}['updateCount'](){const _0x308e98=this['comments']['length'],_0x310b5f=this['container']['querySelector']('#comments-count-badge');_0x310b5f&&(_0x310b5f['textContent']=_0x308e98,_0x310b5f['hidden']=_0x308e98===0x0);const _0x617953=this['container']['querySelector']('#comments-count');_0x617953&&(_0x617953['textContent']=_0x308e98>0x0?'('+_0x308e98+')':''),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(_0x599287){const _0x28db58=[],_0x4ecf66=_0x599287['split']('\x0a');let _0x17e610=null,_0x490337=null;for(const _0x26d6a3 of _0x4ecf66){if(_0x26d6a3['startsWith']('diff\x20--git')){_0x17e610&&_0x490337&&_0x17e610['hunks']['push'](_0x490337);_0x17e610&&_0x28db58['push'](_0x17e610);const _0x188c30=_0x26d6a3['match'](/diff --git a\/(.+?) b\/(.+)/);_0x17e610={'oldPath':_0x188c30?_0x188c30[0x1]:'','newPath':_0x188c30?_0x188c30[0x2]:'','hunks':[],'isDeleted':![]},_0x490337=null;}else{if(_0x26d6a3['startsWith']('deleted\x20file\x20mode')&&_0x17e610)_0x17e610['isDeleted']=!![];else{if(_0x26d6a3['startsWith']('@@'))_0x490337&&_0x17e610&&_0x17e610['hunks']['push'](_0x490337),_0x490337={'header':_0x26d6a3,'lines':[]};else _0x490337&&_0x490337['lines']['push'](_0x26d6a3);}}}return _0x17e610&&_0x490337&&_0x17e610['hunks']['push'](_0x490337),_0x17e610&&_0x28db58['push'](_0x17e610),_0x28db58;}export function parseHunkHeader(_0x5c22c6){const _0x139909=_0x5c22c6['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x139909)return{'oldStart':parseInt(_0x139909[0x1],0xa),'newStart':parseInt(_0x139909[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x19297c,_0x3ee2ce){const _0x26399b=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x26399b&&_0x3ee2ce)try{const _0x46bf17=_0x26399b['getLanguage'](_0x3ee2ce)?_0x3ee2ce:null;if(_0x46bf17)return _0x26399b['highlight'](_0x19297c,{'language':_0x46bf17})['value'];}catch(_0x24805a){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x24805a);}return Utils['escapeHtml'](_0x19297c);}export function getFileLanguage(_0x16b121){const _0x399d4f=_0x16b121['split']('.')['pop']()['toLowerCase'](),_0x8882dc={'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 _0x8882dc[_0x399d4f]||null;}export function computeWordDiff(_0x5cc6d4,_0x15fad8){const _0x2e769e=_0x111316=>{const _0x28cb7c=[];let _0x4ef438='',_0x1d27cd=![];for(let _0x1f324e=0x0;_0x1f324e<_0x111316['length'];_0x1f324e++){const _0x14d7ee=_0x111316[_0x1f324e],_0x3bd762=/\s/['test'](_0x14d7ee);if(_0x4ef438==='')_0x4ef438=_0x14d7ee,_0x1d27cd=_0x3bd762;else _0x3bd762===_0x1d27cd?_0x4ef438+=_0x14d7ee:(_0x28cb7c['push'](_0x4ef438),_0x4ef438=_0x14d7ee,_0x1d27cd=_0x3bd762);}return _0x4ef438&&_0x28cb7c['push'](_0x4ef438),_0x28cb7c;},_0x1b4aad=_0x2e769e(_0x5cc6d4),_0xf2fc16=_0x2e769e(_0x15fad8),_0x181f58=_0x1b4aad['length'],_0x309b80=_0xf2fc16['length'],_0x23c4fb=Array(_0x181f58+0x1)['fill'](null)['map'](()=>Array(_0x309b80+0x1)['fill'](0x0));for(let _0x552b96=0x1;_0x552b96<=_0x181f58;_0x552b96++){for(let _0x4fdbd7=0x1;_0x4fdbd7<=_0x309b80;_0x4fdbd7++){_0x1b4aad[_0x552b96-0x1]===_0xf2fc16[_0x4fdbd7-0x1]?_0x23c4fb[_0x552b96][_0x4fdbd7]=_0x23c4fb[_0x552b96-0x1][_0x4fdbd7-0x1]+0x1:_0x23c4fb[_0x552b96][_0x4fdbd7]=Math['max'](_0x23c4fb[_0x552b96-0x1][_0x4fdbd7],_0x23c4fb[_0x552b96][_0x4fdbd7-0x1]);}}const _0x4ed9c0={'old':[],'new':[]};let _0x7ec06=_0x181f58,_0x395922=_0x309b80;const _0x1a7250=[],_0x4f9ba8=[];while(_0x7ec06>0x0||_0x395922>0x0){if(_0x7ec06>0x0&&_0x395922>0x0&&_0x1b4aad[_0x7ec06-0x1]===_0xf2fc16[_0x395922-0x1])_0x1a7250['unshift']({'type':'equal','text':_0x1b4aad[_0x7ec06-0x1]}),_0x4f9ba8['unshift']({'type':'equal','text':_0xf2fc16[_0x395922-0x1]}),_0x7ec06--,_0x395922--;else{if(_0x395922>0x0&&(_0x7ec06===0x0||_0x23c4fb[_0x7ec06][_0x395922-0x1]>=_0x23c4fb[_0x7ec06-0x1][_0x395922]))_0x4f9ba8['unshift']({'type':'insert','text':_0xf2fc16[_0x395922-0x1]}),_0x395922--;else _0x7ec06>0x0&&(_0x1a7250['unshift']({'type':'delete','text':_0x1b4aad[_0x7ec06-0x1]}),_0x7ec06--);}}return _0x4ed9c0['old']=_0x1a7250,_0x4ed9c0['new']=_0x4f9ba8,_0x4ed9c0;}export function renderDiffLineWithWordHighlight(_0x3e179a,_0x2ea047,_0x38331e,_0x58abda){if(!_0x2ea047||_0x2ea047['length']===0x0)return highlightDiffLine(_0x3e179a,_0x58abda);let _0x4934fd='';const _0xebee4e=_0x38331e==='add'?'diff-word-add':'diff-word-remove',_0x4b0c3a=_0x38331e==='add'?'insert':'delete';for(const _0x48819d of _0x2ea047){const _0x5cf0c4=Utils['escapeHtml'](_0x48819d['text']);_0x48819d['type']===_0x4b0c3a?_0x4934fd+='<span\x20class=\x22'+_0xebee4e+'\x22>'+_0x5cf0c4+'</span>':_0x4934fd+=_0x5cf0c4;}return _0x4934fd;}export function calculateDiffStats(_0x1c3b74){let _0x6e04e2=0x0,_0x210f64=0x0,_0x31510f=0x0;return _0x1c3b74['forEach'](_0x112f9a=>{let _0x413bf9=0x0,_0x4dfb33=0x0;_0x112f9a['hunks']['forEach'](_0x4d8870=>{_0x4d8870['lines']['forEach'](_0x5488f2=>{if(_0x5488f2['startsWith']('+'))_0x413bf9+=0x1;else{if(_0x5488f2['startsWith']('-'))_0x4dfb33+=0x1;}});}),(_0x413bf9+_0x4dfb33>0x0||_0x112f9a['isDeleted'])&&(_0x31510f+=0x1),_0x6e04e2+=_0x413bf9,_0x210f64+=_0x4dfb33;}),{'additions':_0x6e04e2,'deletions':_0x210f64,'files':_0x31510f};}export function getFileStatus(_0x10ace7,_0x3ced49,_0x43523f){if(_0x10ace7['isDeleted'])return'deleted';if(_0x3ced49>0x0&&_0x43523f===0x0)return'added';return'modified';}export function safeBase64(_0xbe17bb){try{return btoa(unescape(encodeURIComponent(_0xbe17bb)));}catch(_0x38624e){return btoa(_0xbe17bb);}}export function getStorageKey(_0x5c59c7,_0x39af0c){return _0x5c59c7+'-'+safeBase64(_0x39af0c);}export function getCollapsedState(_0x241207,_0x34f9af){const _0x20cc7d=localStorage['getItem'](getStorageKey(_0x241207,_0x34f9af));return _0x20cc7d==='true';}export function renderUnifiedDiff(_0x620eb9,_0x150d46){return _0x620eb9['map']((_0x3990d6,_0x4715d8)=>{const _0x5caef0=_0x3990d6['newPath']||_0x3990d6['oldPath']||'unknown',_0x366db5='diff-'+_0x150d46+'-'+_0x4715d8,_0x2b9a43=getFileLanguage(_0x5caef0),{additions:_0x269eab,deletions:_0x40a7cb}=calculateDiffStats([_0x3990d6]),_0x56fb5b=getCollapsedState(_0x150d46,_0x5caef0),_0x1dccfd=getFileStatus(_0x3990d6,_0x269eab,_0x40a7cb),_0x2b304b=_0x1dccfd==='added'?'A':_0x1dccfd==='deleted'?'D':'M',_0x5804c1=_0x3990d6['hunks']['map'](_0x431687=>{const {oldStart:_0x1381d3,newStart:_0x1c706f}=parseHunkHeader(_0x431687['header']);let _0x15c8fd=_0x1381d3,_0x5aecfd=_0x1c706f;const _0x179a7e=_0x431687['lines']['map'](_0x3ad196=>({'line':_0x3ad196,'type':_0x3ad196['startsWith']('+')?'add':_0x3ad196['startsWith']('-')?'remove':_0x3ad196['startsWith']('\x5c')?'meta':'context'}));let _0x590da5=0x0;while(_0x590da5<_0x179a7e['length']){if(_0x179a7e[_0x590da5]['type']==='remove'){let _0xc92d13=_0x590da5,_0x23a3d6=_0x590da5;while(_0x23a3d6<_0x179a7e['length']&&_0x179a7e[_0x23a3d6]['type']==='remove')_0x23a3d6++;let _0x4d1d04=_0x23a3d6,_0x1a2580=_0x4d1d04;while(_0x1a2580<_0x179a7e['length']&&_0x179a7e[_0x1a2580]['type']==='add')_0x1a2580++;const _0x198182=_0x23a3d6-_0xc92d13,_0x5e389c=_0x1a2580-_0x4d1d04,_0x2916dd=Math['min'](_0x198182,_0x5e389c);for(let _0x4980b3=0x0;_0x4980b3<_0x2916dd;_0x4980b3++){const _0x32ab89=_0x179a7e[_0xc92d13+_0x4980b3]['line']['substring'](0x1),_0x3c8a26=_0x179a7e[_0x4d1d04+_0x4980b3]['line']['substring'](0x1),_0x69dfd=computeWordDiff(_0x32ab89,_0x3c8a26);_0x179a7e[_0xc92d13+_0x4980b3]['wordDiff']=_0x69dfd['old'],_0x179a7e[_0x4d1d04+_0x4980b3]['wordDiff']=_0x69dfd['new'];}_0x590da5=_0x1a2580;}else _0x590da5++;}const _0x51f545=_0x179a7e['map'](_0x2ba661=>{const _0x4960a6=_0x2ba661['line'];if(_0x4960a6['startsWith']('+')){const _0x3a6b4c=_0x4960a6['substring'](0x1),_0x421f68=_0x2ba661['wordDiff']?renderDiffLineWithWordHighlight(_0x3a6b4c,_0x2ba661['wordDiff'],'add',_0x2b9a43):highlightDiffLine(_0x3a6b4c,_0x2b9a43),_0x21f806='<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>'+_0x5aecfd+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x421f68+'</span></div>';return _0x5aecfd+=0x1,_0x21f806;}if(_0x4960a6['startsWith']('-')){const _0x354d66=_0x4960a6['substring'](0x1),_0x396f34=_0x2ba661['wordDiff']?renderDiffLineWithWordHighlight(_0x354d66,_0x2ba661['wordDiff'],'remove',_0x2b9a43):highlightDiffLine(_0x354d66,_0x2b9a43),_0x45c98e='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x15c8fd+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x396f34+'</span></div>';return _0x15c8fd+=0x1,_0x45c98e;}if(_0x4960a6['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'](_0x4960a6)+'</span></div>';const _0xfe696f=_0x4960a6['startsWith']('\x20')?_0x4960a6['substring'](0x1):_0x4960a6,_0xcee54=highlightDiffLine(_0xfe696f,_0x2b9a43),_0x1b0d94='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x15c8fd+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x5aecfd+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0xcee54+'</span></div>';return _0x15c8fd+=0x1,_0x5aecfd+=0x1,_0x1b0d94;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x431687['header'])+'</div>'+_0x51f545+'</div>';})['join'](''),_0x4cbbe1=_0x5804c1||'<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-'+_0x366db5+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x366db5+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x5caef0)+'\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'+_0x1dccfd+'\x22>'+_0x2b304b+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x5caef0)+'</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>+'+_0x269eab+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x40a7cb+'</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'+_0x366db5+'\x22\x20data-collapsed=\x22'+_0x56fb5b+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x56fb5b?'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'+(_0x56fb5b?'collapsed':'')+'\x22\x20id=\x22'+_0x366db5+'\x22>'+_0x4cbbe1+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
1
+ import{Utils}from'./app.js';export function parsePatchContent(_0x507dd8){const _0x5e8b0b=[],_0x12335b=_0x507dd8['split']('\x0a');let _0x3665df=null,_0x325e12=null;for(const _0x28a677 of _0x12335b){if(_0x28a677['startsWith']('diff\x20--git')){_0x3665df&&_0x325e12&&_0x3665df['hunks']['push'](_0x325e12);_0x3665df&&_0x5e8b0b['push'](_0x3665df);const _0x4c6d17=_0x28a677['match'](/diff --git a\/(.+?) b\/(.+)/);_0x3665df={'oldPath':_0x4c6d17?_0x4c6d17[0x1]:'','newPath':_0x4c6d17?_0x4c6d17[0x2]:'','hunks':[],'isDeleted':![]},_0x325e12=null;}else{if(_0x28a677['startsWith']('deleted\x20file\x20mode')&&_0x3665df)_0x3665df['isDeleted']=!![];else{if(_0x28a677['startsWith']('@@'))_0x325e12&&_0x3665df&&_0x3665df['hunks']['push'](_0x325e12),_0x325e12={'header':_0x28a677,'lines':[]};else _0x325e12&&_0x325e12['lines']['push'](_0x28a677);}}}return _0x3665df&&_0x325e12&&_0x3665df['hunks']['push'](_0x325e12),_0x3665df&&_0x5e8b0b['push'](_0x3665df),_0x5e8b0b;}export function parseHunkHeader(_0x294506){const _0x3ea24b=_0x294506['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x3ea24b)return{'oldStart':parseInt(_0x3ea24b[0x1],0xa),'newStart':parseInt(_0x3ea24b[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0xd1a2ed,_0x456566){const _0x3dc40a=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x3dc40a&&_0x456566)try{const _0xa23e9c=_0x3dc40a['getLanguage'](_0x456566)?_0x456566:null;if(_0xa23e9c)return _0x3dc40a['highlight'](_0xd1a2ed,{'language':_0xa23e9c})['value'];}catch(_0x272cda){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x272cda);}return Utils['escapeHtml'](_0xd1a2ed);}export function getFileLanguage(_0x54105d){const _0x120180=_0x54105d['split']('.')['pop']()['toLowerCase'](),_0x33d650={'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 _0x33d650[_0x120180]||null;}export function computeWordDiff(_0x1f560c,_0x31f77a){const _0x11c71a=_0x1cd739=>{const _0x3dc41f=[];let _0xf09b8e='',_0x6e5189=![];for(let _0x103ba9=0x0;_0x103ba9<_0x1cd739['length'];_0x103ba9++){const _0x2f1122=_0x1cd739[_0x103ba9],_0x228df8=/\s/['test'](_0x2f1122);if(_0xf09b8e==='')_0xf09b8e=_0x2f1122,_0x6e5189=_0x228df8;else _0x228df8===_0x6e5189?_0xf09b8e+=_0x2f1122:(_0x3dc41f['push'](_0xf09b8e),_0xf09b8e=_0x2f1122,_0x6e5189=_0x228df8);}return _0xf09b8e&&_0x3dc41f['push'](_0xf09b8e),_0x3dc41f;},_0x1a9c23=_0x11c71a(_0x1f560c),_0x161b26=_0x11c71a(_0x31f77a),_0x56512d=_0x1a9c23['length'],_0x231884=_0x161b26['length'],_0x56f0f5=Array(_0x56512d+0x1)['fill'](null)['map'](()=>Array(_0x231884+0x1)['fill'](0x0));for(let _0x309262=0x1;_0x309262<=_0x56512d;_0x309262++){for(let _0x383f61=0x1;_0x383f61<=_0x231884;_0x383f61++){_0x1a9c23[_0x309262-0x1]===_0x161b26[_0x383f61-0x1]?_0x56f0f5[_0x309262][_0x383f61]=_0x56f0f5[_0x309262-0x1][_0x383f61-0x1]+0x1:_0x56f0f5[_0x309262][_0x383f61]=Math['max'](_0x56f0f5[_0x309262-0x1][_0x383f61],_0x56f0f5[_0x309262][_0x383f61-0x1]);}}const _0x240a84={'old':[],'new':[]};let _0x1a614c=_0x56512d,_0x4a5cba=_0x231884;const _0x3878cd=[],_0x556ff6=[];while(_0x1a614c>0x0||_0x4a5cba>0x0){if(_0x1a614c>0x0&&_0x4a5cba>0x0&&_0x1a9c23[_0x1a614c-0x1]===_0x161b26[_0x4a5cba-0x1])_0x3878cd['unshift']({'type':'equal','text':_0x1a9c23[_0x1a614c-0x1]}),_0x556ff6['unshift']({'type':'equal','text':_0x161b26[_0x4a5cba-0x1]}),_0x1a614c--,_0x4a5cba--;else{if(_0x4a5cba>0x0&&(_0x1a614c===0x0||_0x56f0f5[_0x1a614c][_0x4a5cba-0x1]>=_0x56f0f5[_0x1a614c-0x1][_0x4a5cba]))_0x556ff6['unshift']({'type':'insert','text':_0x161b26[_0x4a5cba-0x1]}),_0x4a5cba--;else _0x1a614c>0x0&&(_0x3878cd['unshift']({'type':'delete','text':_0x1a9c23[_0x1a614c-0x1]}),_0x1a614c--);}}return _0x240a84['old']=_0x3878cd,_0x240a84['new']=_0x556ff6,_0x240a84;}export function renderDiffLineWithWordHighlight(_0x55ef42,_0x4bfca0,_0x21e840,_0x352065){if(!_0x4bfca0||_0x4bfca0['length']===0x0)return highlightDiffLine(_0x55ef42,_0x352065);let _0x5614ab='';const _0x112b4e=_0x21e840==='add'?'diff-word-add':'diff-word-remove',_0x4578d0=_0x21e840==='add'?'insert':'delete';for(const _0x58aac7 of _0x4bfca0){const _0x129456=Utils['escapeHtml'](_0x58aac7['text']);_0x58aac7['type']===_0x4578d0?_0x5614ab+='<span\x20class=\x22'+_0x112b4e+'\x22>'+_0x129456+'</span>':_0x5614ab+=_0x129456;}return _0x5614ab;}export function calculateDiffStats(_0x5c4c29){let _0x144264=0x0,_0x44e1bf=0x0,_0x32fc8a=0x0;return _0x5c4c29['forEach'](_0x539e1b=>{let _0x44ebda=0x0,_0x27ca5f=0x0;_0x539e1b['hunks']['forEach'](_0x2c0550=>{_0x2c0550['lines']['forEach'](_0x468dfa=>{if(_0x468dfa['startsWith']('+'))_0x44ebda+=0x1;else{if(_0x468dfa['startsWith']('-'))_0x27ca5f+=0x1;}});}),(_0x44ebda+_0x27ca5f>0x0||_0x539e1b['isDeleted'])&&(_0x32fc8a+=0x1),_0x144264+=_0x44ebda,_0x44e1bf+=_0x27ca5f;}),{'additions':_0x144264,'deletions':_0x44e1bf,'files':_0x32fc8a};}export function getFileStatus(_0x48c2b0,_0x32d898,_0x26cbbd){if(_0x48c2b0['isDeleted'])return'deleted';if(_0x32d898>0x0&&_0x26cbbd===0x0)return'added';return'modified';}export function safeBase64(_0x2fdc20){try{return btoa(unescape(encodeURIComponent(_0x2fdc20)));}catch(_0x1dfd2a){return btoa(_0x2fdc20);}}export function getStorageKey(_0xe6c8ce,_0xb2026c){return _0xe6c8ce+'-'+safeBase64(_0xb2026c);}export function getCollapsedState(_0x159c89,_0x20ca41){const _0x2f2a3f=localStorage['getItem'](getStorageKey(_0x159c89,_0x20ca41));return _0x2f2a3f==='true';}export function renderUnifiedDiff(_0x3805ee,_0x1c82ce){return _0x3805ee['map']((_0x5b146b,_0x1b62b0)=>{const _0xe5c8b4=_0x5b146b['newPath']||_0x5b146b['oldPath']||'unknown',_0x3b8572='diff-'+_0x1c82ce+'-'+_0x1b62b0,_0x375a3e=getFileLanguage(_0xe5c8b4),{additions:_0x3838ab,deletions:_0x583628}=calculateDiffStats([_0x5b146b]),_0x5ebe48=getCollapsedState(_0x1c82ce,_0xe5c8b4),_0x21476f=getFileStatus(_0x5b146b,_0x3838ab,_0x583628),_0x21527f=_0x21476f==='added'?'A':_0x21476f==='deleted'?'D':'M',_0x33783b=_0x5b146b['hunks']['map'](_0x3a576d=>{const {oldStart:_0x2b4f7e,newStart:_0x11f836}=parseHunkHeader(_0x3a576d['header']);let _0x442df5=_0x2b4f7e,_0x596eaa=_0x11f836;const _0x15bf02=_0x3a576d['lines']['map'](_0x366ad8=>({'line':_0x366ad8,'type':_0x366ad8['startsWith']('+')?'add':_0x366ad8['startsWith']('-')?'remove':_0x366ad8['startsWith']('\x5c')?'meta':'context'}));let _0x2c4841=0x0;while(_0x2c4841<_0x15bf02['length']){if(_0x15bf02[_0x2c4841]['type']==='remove'){let _0x5d8e4b=_0x2c4841,_0x533859=_0x2c4841;while(_0x533859<_0x15bf02['length']&&_0x15bf02[_0x533859]['type']==='remove')_0x533859++;let _0x27f893=_0x533859,_0x274b8d=_0x27f893;while(_0x274b8d<_0x15bf02['length']&&_0x15bf02[_0x274b8d]['type']==='add')_0x274b8d++;const _0x36dae2=_0x533859-_0x5d8e4b,_0x108903=_0x274b8d-_0x27f893,_0x550b3e=Math['min'](_0x36dae2,_0x108903);for(let _0x5b022b=0x0;_0x5b022b<_0x550b3e;_0x5b022b++){const _0x14ec53=_0x15bf02[_0x5d8e4b+_0x5b022b]['line']['substring'](0x1),_0x2745c5=_0x15bf02[_0x27f893+_0x5b022b]['line']['substring'](0x1),_0x5365d2=computeWordDiff(_0x14ec53,_0x2745c5);_0x15bf02[_0x5d8e4b+_0x5b022b]['wordDiff']=_0x5365d2['old'],_0x15bf02[_0x27f893+_0x5b022b]['wordDiff']=_0x5365d2['new'];}_0x2c4841=_0x274b8d;}else _0x2c4841++;}const _0x1f7667=_0x15bf02['map'](_0x3f0c2e=>{const _0x40ce1b=_0x3f0c2e['line'];if(_0x40ce1b['startsWith']('+')){const _0x40b45a=_0x40ce1b['substring'](0x1),_0x4d91a3=_0x3f0c2e['wordDiff']?renderDiffLineWithWordHighlight(_0x40b45a,_0x3f0c2e['wordDiff'],'add',_0x375a3e):highlightDiffLine(_0x40b45a,_0x375a3e),_0x26ba15='<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>'+_0x596eaa+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x4d91a3+'</span></div>';return _0x596eaa+=0x1,_0x26ba15;}if(_0x40ce1b['startsWith']('-')){const _0x59d659=_0x40ce1b['substring'](0x1),_0xcf2d85=_0x3f0c2e['wordDiff']?renderDiffLineWithWordHighlight(_0x59d659,_0x3f0c2e['wordDiff'],'remove',_0x375a3e):highlightDiffLine(_0x59d659,_0x375a3e),_0x224ad3='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x442df5+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0xcf2d85+'</span></div>';return _0x442df5+=0x1,_0x224ad3;}if(_0x40ce1b['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'](_0x40ce1b)+'</span></div>';const _0x48a991=_0x40ce1b['startsWith']('\x20')?_0x40ce1b['substring'](0x1):_0x40ce1b,_0x262c73=highlightDiffLine(_0x48a991,_0x375a3e),_0x21c5f3='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x442df5+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x596eaa+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x262c73+'</span></div>';return _0x442df5+=0x1,_0x596eaa+=0x1,_0x21c5f3;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x3a576d['header'])+'</div>'+_0x1f7667+'</div>';})['join'](''),_0x5b631b=_0x33783b||'<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-'+_0x3b8572+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x3b8572+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0xe5c8b4)+'\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'+_0x21476f+'\x22>'+_0x21527f+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0xe5c8b4)+'</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>+'+_0x3838ab+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x583628+'</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'+_0x3b8572+'\x22\x20data-collapsed=\x22'+_0x5ebe48+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x5ebe48?'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'+(_0x5ebe48?'collapsed':'')+'\x22\x20id=\x22'+_0x3b8572+'\x22>'+_0x5b631b+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}