@profoundlogic/coderflow-server 0.7.1 → 0.7.2

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 (171) hide show
  1. package/dist/coder-server.js +1 -1
  2. package/dist/config.js +1 -1
  3. package/dist/lib/agent-keepalive.js +1 -1
  4. package/dist/lib/agent-models.js +1 -1
  5. package/dist/lib/api-keys.js +1 -1
  6. package/dist/lib/apiKeys.js +1 -1
  7. package/dist/lib/app-server-ports.js +1 -1
  8. package/dist/lib/auto-judge.js +1 -1
  9. package/dist/lib/automation-service.js +1 -1
  10. package/dist/lib/basic-auth.js +1 -1
  11. package/dist/lib/bindings.js +1 -1
  12. package/dist/lib/build-history.js +1 -1
  13. package/dist/lib/build-output-service.js +1 -1
  14. package/dist/lib/build-scheduler.js +1 -1
  15. package/dist/lib/build-service.js +1 -1
  16. package/dist/lib/ca-certificates.js +1 -1
  17. package/dist/lib/claude-oauth-refresh.js +1 -1
  18. package/dist/lib/cli/build.js +1 -1
  19. package/dist/lib/cli/cleanup-users.js +1 -1
  20. package/dist/lib/cli/config-command.js +1 -1
  21. package/dist/lib/cli/config.js +1 -1
  22. package/dist/lib/cli/create-user.js +1 -1
  23. package/dist/lib/cli/grant-admin.js +1 -1
  24. package/dist/lib/cli/init.js +1 -1
  25. package/dist/lib/cli/jira.js +1 -1
  26. package/dist/lib/cli/license.js +1 -1
  27. package/dist/lib/cli/list-roles.js +1 -1
  28. package/dist/lib/cli/list-users.js +1 -1
  29. package/dist/lib/cli/server-manager.js +1 -1
  30. package/dist/lib/cli/set-password.js +1 -1
  31. package/dist/lib/config-migration.js +1 -1
  32. package/dist/lib/container-credential-sync.js +1 -1
  33. package/dist/lib/container-tokens.js +1 -1
  34. package/dist/lib/data-dir.js +1 -1
  35. package/dist/lib/deployment-history.js +1 -1
  36. package/dist/lib/deployment-service.js +1 -1
  37. package/dist/lib/docker-utils.js +1 -1
  38. package/dist/lib/email.js +1 -1
  39. package/dist/lib/emailTemplates.js +1 -1
  40. package/dist/lib/entitlement.js +1 -1
  41. package/dist/lib/external-connections.js +1 -1
  42. package/dist/lib/fetch-utils.js +1 -1
  43. package/dist/lib/git-commit-details-route.js +1 -1
  44. package/dist/lib/git-history-diff-guardrails.js +1 -1
  45. package/dist/lib/git-provider-service.js +1 -1
  46. package/dist/lib/git-provider-setup/github-setup-handler.js +1 -1
  47. package/dist/lib/git-provider-setup/index.js +1 -1
  48. package/dist/lib/git-provider-setup/setup-factory.js +1 -1
  49. package/dist/lib/git-provider-setup/setup-interface.js +1 -1
  50. package/dist/lib/git-providers/azure-devops-provider.js +1 -1
  51. package/dist/lib/git-providers/github-app-provider.js +1 -1
  52. package/dist/lib/git-providers/index.js +1 -1
  53. package/dist/lib/git-providers/provider-factory.js +1 -1
  54. package/dist/lib/git-providers/provider-interface.js +1 -1
  55. package/dist/lib/github-urls.js +1 -1
  56. package/dist/lib/group-objective-linking.js +1 -1
  57. package/dist/lib/ibmi-sync.js +1 -1
  58. package/dist/lib/jira-client.js +1 -1
  59. package/dist/lib/judge-blinding.js +1 -1
  60. package/dist/lib/logger.js +1 -1
  61. package/dist/lib/migration-to-scoped-rbac.js +1 -1
  62. package/dist/lib/model-fetcher.js +1 -1
  63. package/dist/lib/notifications.js +1 -1
  64. package/dist/lib/objective-context.js +1 -1
  65. package/dist/lib/oidc-auth.js +1 -1
  66. package/dist/lib/oidc-device-flow.js +1 -1
  67. package/dist/lib/passwordTokens.js +1 -1
  68. package/dist/lib/permission-resolver.js +1 -1
  69. package/dist/lib/pin-cascade.js +1 -1
  70. package/dist/lib/provider-accounts.js +1 -1
  71. package/dist/lib/provider-oauth.js +1 -1
  72. package/dist/lib/provider-profile.js +1 -1
  73. package/dist/lib/provider-token-refresh.js +1 -1
  74. package/dist/lib/rbac-user-state.js +1 -1
  75. package/dist/lib/request-url.js +1 -1
  76. package/dist/lib/rewind.js +1 -1
  77. package/dist/lib/role-definitions.js +1 -1
  78. package/dist/lib/roles.js +1 -1
  79. package/dist/lib/secrets.js +1 -1
  80. package/dist/lib/setup-repo-git-auth.js +1 -1
  81. package/dist/lib/state-capture.js +1 -1
  82. package/dist/lib/static-files.js +1 -1
  83. package/dist/lib/task-aliases.js +1 -1
  84. package/dist/lib/task-name-format.js +1 -1
  85. package/dist/lib/task-name-generator.js +1 -1
  86. package/dist/lib/task-source-metadata.js +1 -1
  87. package/dist/lib/teams.js +1 -1
  88. package/dist/lib/user-git-oauth.js +1 -1
  89. package/dist/lib/user-git-tokens.js +1 -1
  90. package/dist/lib/users.js +1 -1
  91. package/dist/middleware/requireAuth.js +1 -1
  92. package/dist/middleware/requireInit.js +1 -1
  93. package/dist/middleware/requirePermission.js +1 -1
  94. package/dist/package.json +1 -1
  95. package/dist/playwright.config.js +1 -1
  96. package/dist/playwright.task-terminal.config.js +1 -1
  97. package/dist/routes/apiKeys.js +1 -1
  98. package/dist/routes/auth-oidc.js +1 -1
  99. package/dist/routes/auth.js +1 -1
  100. package/dist/routes/automations.js +1 -1
  101. package/dist/routes/bindings.js +1 -1
  102. package/dist/routes/build.js +1 -1
  103. package/dist/routes/containers.js +1 -1
  104. package/dist/routes/deploy-task.js +1 -1
  105. package/dist/routes/environment-management.js +1 -1
  106. package/dist/routes/environments.js +1 -1
  107. package/dist/routes/external-skills.js +1 -1
  108. package/dist/routes/git-credentials.js +1 -1
  109. package/dist/routes/git-oauth.js +1 -1
  110. package/dist/routes/git-provider-setup.js +1 -1
  111. package/dist/routes/health.js +1 -1
  112. package/dist/routes/jira.js +1 -1
  113. package/dist/routes/objective-management.js +1 -1
  114. package/dist/routes/password.js +1 -1
  115. package/dist/routes/prompt.js +1 -1
  116. package/dist/routes/provider-auth.js +1 -1
  117. package/dist/routes/qa.js +1 -1
  118. package/dist/routes/roles.js +1 -1
  119. package/dist/routes/settings.js +1 -1
  120. package/dist/routes/skill-management.js +1 -1
  121. package/dist/routes/skills.js +1 -1
  122. package/dist/routes/tasks.js +1 -1
  123. package/dist/routes/teams.js +1 -1
  124. package/dist/routes/templates.js +1 -1
  125. package/dist/routes/test-task.js +1 -1
  126. package/dist/routes/test.js +1 -1
  127. package/dist/routes/users.js +1 -1
  128. package/dist/routes/visualizations.js +1 -1
  129. package/dist/scripts/create-user.js +1 -1
  130. package/dist/scripts/migrate-config-to-data-dir.js +1 -1
  131. package/dist/start.js +1 -1
  132. package/dist/web-ui/public/activity-detail-modal.js +1 -1
  133. package/dist/web-ui/public/activity-feed.js +1 -1
  134. package/dist/web-ui/public/activity-formatters.js +1 -1
  135. package/dist/web-ui/public/agent-event-parser.js +1 -1
  136. package/dist/web-ui/public/app.js +1 -1
  137. package/dist/web-ui/public/approve-dialog.js +1 -1
  138. package/dist/web-ui/public/automation-links.js +1 -1
  139. package/dist/web-ui/public/automation-schedule.js +1 -1
  140. package/dist/web-ui/public/comments-widget.js +1 -1
  141. package/dist/web-ui/public/diff-utils.js +1 -1
  142. package/dist/web-ui/public/environments.js +1 -1
  143. package/dist/web-ui/public/feedback-widget.js +1 -1
  144. package/dist/web-ui/public/file-selection-tree.js +1 -1
  145. package/dist/web-ui/public/git-history-lazy-utils.js +1 -1
  146. package/dist/web-ui/public/git-history.js +1 -1
  147. package/dist/web-ui/public/git-status.js +1 -1
  148. package/dist/web-ui/public/ibmi-file-filter.js +1 -1
  149. package/dist/web-ui/public/index.js +1 -1
  150. package/dist/web-ui/public/login.js +1 -1
  151. package/dist/web-ui/public/markdown-editor.js +1 -1
  152. package/dist/web-ui/public/markdown-file-editor.js +1 -1
  153. package/dist/web-ui/public/modal-maximize.js +1 -1
  154. package/dist/web-ui/public/notifications.js +1 -1
  155. package/dist/web-ui/public/permissions.js +1 -1
  156. package/dist/web-ui/public/pr-dialog.js +1 -1
  157. package/dist/web-ui/public/roles.js +1 -1
  158. package/dist/web-ui/public/server-health.js +1 -1
  159. package/dist/web-ui/public/settings.js +1 -1
  160. package/dist/web-ui/public/setup-password.js +1 -1
  161. package/dist/web-ui/public/skills.js +1 -1
  162. package/dist/web-ui/public/sse-client.js +1 -1
  163. package/dist/web-ui/public/sse-shared-worker.js +1 -1
  164. package/dist/web-ui/public/task-judging-helpers.js +1 -1
  165. package/dist/web-ui/public/task.js +1 -1
  166. package/dist/web-ui/public/teams.js +1 -1
  167. package/dist/web-ui/public/terminal.js +1 -1
  168. package/dist/web-ui/public/theme.js +1 -1
  169. package/dist/web-ui/public/users.js +1 -1
  170. package/dist/web-ui/public/variant-grouping.js +1 -1
  171. package/package.json +1 -1
@@ -1 +1 @@
1
- function isLogOnlyTaskType(_0x901fdf){return _0x901fdf==='test'||_0x901fdf==='deploy';}export function createApproveDialogHTML(_0x3f8f70='',_0x177a74={}){const _0x45e65d=_0x3f8f70,_0x1f8976=_0x177a74['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x3202a1=_0x177a74['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x3cbdd1=_0x177a74['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x45e65d+'approve-modal\x22\x20class=\x22'+_0x1f8976+'\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'+_0x45e65d+'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'+_0x45e65d+'approve-warning\x22\x20class=\x22'+_0x3202a1+'\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'+_0x45e65d+'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'+_0x45e65d+'approve-error\x22\x20class=\x22'+_0x3cbdd1+'\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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'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'+_0x45e65d+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x45e65d+'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(_0x2b94c2={}){this['prefix']=_0x2b94c2['prefix']||'',this['onApprove']=_0x2b94c2['onApprove'],this['onSync']=_0x2b94c2['onSync'],this['onSuccess']=_0x2b94c2['onSuccess'],this['onError']=_0x2b94c2['onError'],this['onCreatePR']=_0x2b94c2['onCreatePR'],this['showToast']=_0x2b94c2['showToast']||(()=>{}),this['container']=_0x2b94c2['container']||document['body'],this['useTaskPageStyles']=_0x2b94c2['useTaskPageStyles']||![],this['baseUrl']=_0x2b94c2['baseUrl']||'',this['coderflowAttribution']=_0x2b94c2['coderflowAttribution'],this['onSyncToIbmi']=_0x2b94c2['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x2b94c2['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 _0x55e94c=document['createElement']('div');_0x55e94c['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x55e94c['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x236c60){return document['getElementById'](''+this['prefix']+_0x236c60);}['_bindEvents'](){const _0x11d12b=this['_el']('approve-modal'),_0xc9b245=this['_el']('close-approve-modal'),_0x1b39d9=this['_el']('cancel-approve'),_0x29e34a=this['_el']('confirm-approve'),_0x15462b=_0x11d12b?.['querySelector']('.modal-overlay'),_0x2e9ff8=this['_el']('create-new-branch'),_0x2226d0=this['_el']('new-branch-input-container'),_0x583626=this['_el']('new-branch-name'),_0x334f27=this['_el']('push-after-commit'),_0xd3db6b=this['_el']('create-pull-request'),_0x4fabc4=this['_el']('pr-hint');_0xc9b245?.['addEventListener']('click',()=>this['hide']()),_0x1b39d9?.['addEventListener']('click',()=>this['hide']()),_0x15462b?.['addEventListener']('click',()=>this['hide']()),_0x29e34a?.['addEventListener']('click',()=>this['_handleApprove']());_0x2e9ff8&&_0x2e9ff8['addEventListener']('change',()=>{_0x2226d0&&(_0x2226d0['hidden']=!_0x2e9ff8['checked']),_0x2e9ff8['checked']&&_0x583626&&_0x583626['focus']();});_0xd3db6b&&_0x334f27&&_0x2e9ff8&&(_0xd3db6b['addEventListener']('change',()=>{this['_createPR']=_0xd3db6b['checked'];if(_0xd3db6b['checked']){_0x334f27['checked']=!![],_0x334f27['disabled']=!![],_0x2e9ff8['checked']=!![],_0x2e9ff8['disabled']=!![];_0x2226d0&&(_0x2226d0['hidden']=![]);if(_0x4fabc4)_0x4fabc4['hidden']=![];}else{_0x334f27['disabled']=![],_0x2e9ff8['disabled']=![];if(_0x4fabc4)_0x4fabc4['hidden']=!![];}}),_0x334f27['addEventListener']('change',()=>{if(!_0x334f27['checked']&&_0xd3db6b['checked']){_0xd3db6b['checked']=![],this['_createPR']=![],_0x334f27['disabled']=![],_0x2e9ff8['disabled']=![];if(_0x4fabc4)_0x4fabc4['hidden']=!![];}}));const _0x23be65=this['_el']('sync-to-ibmi');_0x23be65&&_0x23be65['addEventListener']('change',async _0x4243be=>{const _0x16d280=this['_el']('ibmi-sync-fields');if(_0x16d280)_0x16d280['hidden']=!_0x4243be['target']['checked'];if(_0x4243be['target']['checked']){const _0x12b2be=this['_el']('ibmi-sync-library'),_0x4e9dce=localStorage['getItem']('coderflow_ibmi_sync_library');_0x4e9dce&&_0x12b2be&&!_0x12b2be['value']&&(_0x12b2be['value']=_0x4e9dce);const _0x3a61aa=this['_el']('ibmi-sync-user');if(_0x3a61aa&&!_0x3a61aa['value']){const _0x1961f3=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x1961f3)_0x3a61aa['value']=_0x1961f3;}const _0x5ad8d0=this['_el']('ibmi-sync-password');if(_0x5ad8d0)_0x5ad8d0['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0x3b4df9=>{_0x3b4df9['key']==='Escape'&&_0x11d12b&&!_0x11d12b['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x6b2d1=this['_el']('ibmi-sync-file-tree'),_0x4d8a5a=this['_el']('ibmi-sync-files-summary');if(!_0x6b2d1)return;_0x6b2d1['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x4d8a5a)_0x4d8a5a['textContent']='';try{const {files:_0x7d0214,absolutePaths:_0x3974af}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x7d0214,this['_syncAbsolutePaths']=_0x3974af;if(_0x7d0214['length']===0x0){_0x6b2d1['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x26bd16}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x28540d,hasKnownIbmiExtension:_0x292ac8}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x26bd16({'container':_0x6b2d1,'files':_0x7d0214,'isPreselected':_0x13c3f9=>{const {valid:_0xe5fd17}=_0x28540d(_0x13c3f9);return _0xe5fd17&&_0x292ac8(_0x13c3f9);},'isDisabled':_0x1903ed=>{const {valid:_0x241d72,reason:_0x58fa85}=_0x28540d(_0x1903ed);return{'disabled':!_0x241d72,'reason':_0x58fa85};},'isAutoCheckEligible':_0x19963b=>{const {valid:_0x33f73f}=_0x28540d(_0x19963b);return _0x33f73f&&_0x292ac8(_0x19963b);},'onChange':_0x56d8d3=>{_0x4d8a5a&&(_0x4d8a5a['textContent']=_0x56d8d3['length']+'\x20of\x20'+_0x7d0214['length']+'\x20file'+(_0x7d0214['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x3ce04d){_0x6b2d1['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0xb1d212){const _0x52b00c=this['_el']('approve-error'),_0x200585=this['_el']('approve-error-text');_0x52b00c&&_0x200585&&(_0x200585['textContent']=_0xb1d212,_0x52b00c['hidden']=![],_0x52b00c['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x598d76=this['_el']('approve-error'),_0x46d16c=this['_el']('approve-error-text');_0x598d76&&_0x46d16c&&(_0x598d76['hidden']=!![],_0x46d16c['textContent']='');}['_displayBranchInfo'](_0x5e6173,_0x3b913c={}){const _0x3c9425=this['_el']('approve-branches');if(!_0x3c9425)return;const _0x3b300a=[];for(const _0x2eebc7 of _0x5e6173){_0x3b913c[_0x2eebc7['name']]&&_0x3b300a['push']({'repo':_0x2eebc7['name'],'branch':_0x3b913c[_0x2eebc7['name']]});}if(_0x3b300a['length']>0x0){_0x3c9425['hidden']=![];if(_0x3b300a['length']===0x1)_0x3c9425['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x3b300a[0x0]['branch']+'</code></div>';else{const _0x520442=_0x3b300a['map'](_0x1b3707=>'<div\x20class=\x22branch-item\x22><strong>'+_0x1b3707['repo']+':</strong>\x20<code>'+_0x1b3707['branch']+'</code></div>')['join']('');_0x3c9425['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x520442+'</div></div>';}}else _0x3c9425['hidden']=!![],_0x3c9425['innerHTML']='';}['showWarning'](_0x51908d){const _0x5abd50=this['_el']('approve-warning'),_0x364d1c=this['_el']('approve-warning-text');_0x5abd50&&_0x364d1c&&(_0x364d1c['textContent']=_0x51908d,_0x5abd50['hidden']=![]);}['hideWarning'](){const _0x1491b1=this['_el']('approve-warning'),_0x3de523=this['_el']('approve-warning-text');_0x1491b1&&_0x3de523&&(_0x1491b1['hidden']=!![],_0x3de523['textContent']='');}['_stripCoAuthoredByLines'](_0xbc3f92){return _0xbc3f92['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x2d741e){try{let _0x4b0b1f;try{const _0x22bfb1=await fetch(this['baseUrl']+'/settings');if(_0x22bfb1['ok']){const _0x298595=await _0x22bfb1['json']();_0x4b0b1f=_0x298595['coderflow_attribution']!==![];}}catch(_0x41cc1a){}_0x4b0b1f===undefined&&(this['coderflowAttribution']!==undefined?_0x4b0b1f=this['coderflowAttribution']!==![]:_0x4b0b1f=!![]);const _0x331a54=this['_stripCoAuthoredByLines'](_0x2d741e);if(!_0x4b0b1f)return _0x331a54;const _0x20b715='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x331a54+_0x20b715;}catch(_0x275421){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x275421),_0x2d741e;}}['show'](_0x47b038){!this['initialized']&&this['init']();this['taskData']=_0x47b038;const _0x142bac=this['_el']('approve-modal'),_0xb5e6b7=this['_el']('commit-message-input'),_0x2c431d=this['_el']('pull-before-commit'),_0x597bc1=this['_el']('push-after-commit'),_0x35d6f0=this['_el']('create-new-branch'),_0xd300bb=this['_el']('new-branch-input-container'),_0x56ad22=this['_el']('new-branch-name'),_0x42a16e=this['_el']('approve-repo-name'),_0x46efc6=this['_el']('approve-stats'),_0x1ddacc=this['_el']('multi-repo-note');if(!_0x142bac)return;this['hideError'](),this['hideWarning']();_0x47b038['warning']&&this['showWarning'](_0x47b038['warning']);const _0x20438f=_0x47b038['reposChanged']||[];if(_0x20438f['length']===0x0&&!_0x47b038['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x20438f,_0x47b038);const _0x10930e=_0x47b038['commitMessage']||'',_0x2f009a=this['_stripCoAuthoredByLines'](_0x10930e);_0xb5e6b7['value']=_0x2f009a;if(_0x2c431d)_0x2c431d['checked']=!![];if(_0x597bc1)_0x597bc1['checked']=!![];_0x35d6f0&&(_0x35d6f0['checked']=![]);_0xd300bb&&(_0xd300bb['hidden']=!![]);_0x56ad22&&(_0x56ad22['value']='');if(_0x597bc1)_0x597bc1['disabled']=![];if(_0x35d6f0)_0x35d6f0['disabled']=![];this['updatePRSupport'](_0x47b038['prSupported']===!![]);const _0x4bbf34=this['_el']('ibmi-sync-section');if(_0x4bbf34){_0x4bbf34['hidden']=!_0x47b038['ibmiSyncAvailable'];const _0x2e5e6c=this['_el']('sync-to-ibmi'),_0x26aa67=this['_el']('ibmi-sync-fields'),_0x36cc81=this['_el']('ibmi-sync-library');if(_0x2e5e6c)_0x2e5e6c['checked']=![];if(_0x26aa67)_0x26aa67['hidden']=!![];if(_0x36cc81)_0x36cc81['value']='';const _0x5ee586=this['_el']('ibmi-sync-credentials-row');_0x5ee586&&(_0x5ee586['hidden']=!(_0x47b038['ibmiSyncAvailable']&&_0x47b038['syncCredentials']==='prompt'));}const _0x3afacf=this['_el']('confirm-approve');_0x47b038['syncFirst']&&this['onSync']?(_0x3afacf&&(_0x3afacf['disabled']=!![],_0x3afacf['textContent']='Syncing...'),this['_performSync']()):_0x3afacf&&(_0x3afacf['disabled']=![],_0x3afacf['textContent']='Commit\x20Changes');_0x142bac['hidden']=![];const _0x4bd6b0=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x4bd6b0,'taskId':_0x47b038['taskId'],'originalCommitMessage':_0x2f009a}),setTimeout(()=>{_0xb5e6b7['focus'](),_0xb5e6b7['setSelectionRange'](0x0,_0xb5e6b7['value']['length']);},0x64);}['updatePRSupport'](_0x4cc3ef){const _0x3990c8=this['_el']('pr-option-section'),_0x5c0bfc=this['_el']('create-pull-request'),_0x52223c=this['_el']('pr-hint'),_0x315ec6=this['_el']('push-after-commit'),_0x58fa31=this['_el']('create-new-branch');if(!_0x3990c8)return;if(_0x4cc3ef){_0x3990c8['hidden']=![];_0x5c0bfc&&!_0x5c0bfc['disabled']&&(_0x5c0bfc['checked']=![]);if(_0x52223c)_0x52223c['hidden']=!![];this['_createPR']=![];return;}_0x5c0bfc?.['checked']&&(_0x5c0bfc['checked']=![]);if(_0x52223c)_0x52223c['hidden']=!![];if(_0x315ec6)_0x315ec6['disabled']=![];if(_0x58fa31)_0x58fa31['disabled']=![];this['_createPR']=![],_0x3990c8['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x5e42e0,taskId:_0x2c4d59,originalCommitMessage:_0x3a4587}){const _0x1d652a=this['_el']('commit-message-input');if(!_0x1d652a)return;const _0x428684=await this['_addAttributionIfEnabled'](_0x3a4587);if(_0x5e42e0!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x2c4d59)return;if(!this['isVisible']())return;const _0x113b88=_0x5cd8cf=>_0x5cd8cf['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x113b88(_0x1d652a['value'])!==_0x113b88(_0x3a4587))return;_0x1d652a['value']=_0x428684;}['_updateDisplay'](_0x134987,_0x2ecd49){const _0x1dc575=this['_el']('approve-repo-name'),_0x3b67df=this['_el']('approve-stats'),_0x349637=this['_el']('multi-repo-note');if(_0x134987['length']===0x0){if(_0x1dc575)_0x1dc575['textContent']='Syncing...';if(_0x3b67df)_0x3b67df['textContent']='';if(_0x349637)_0x349637['hidden']=!![];return;}const _0x417a94=_0x134987['reduce']((_0x3911f6,_0x532347)=>_0x3911f6+(_0x532347['files_changed']||0x0),0x0),_0x2fe79b=_0x134987['reduce']((_0x3249b8,_0xea07c7)=>_0x3249b8+(_0xea07c7['lines_added']||0x0),0x0),_0x1eb59d=_0x134987['reduce']((_0x596499,_0x40bb27)=>_0x596499+(_0x40bb27['lines_deleted']||0x0),0x0);if(_0x134987['length']===0x1){if(_0x1dc575)_0x1dc575['textContent']=_0x134987[0x0]?.['name']||'repository';if(_0x349637)_0x349637['hidden']=!![];}else{const _0x661ef1=_0x134987['map'](_0x2d1fec=>_0x2d1fec['name'])['join'](',\x20');if(_0x1dc575)_0x1dc575['textContent']=_0x134987['length']+'\x20repositories:\x20'+_0x661ef1;if(_0x349637)_0x349637['hidden']=![];}_0x3b67df&&(_0x3b67df['textContent']=_0x417a94+'\x20file'+(_0x417a94===0x1?'':'s')+'\x20changed\x20(+'+_0x2fe79b+'\x20-'+_0x1eb59d+')'),this['_displayBranchInfo'](_0x134987,_0x2ecd49?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x1f41fe=this['_el']('confirm-approve');try{const _0x549cad=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x549cad['repos_changed']){const _0x211203=this['taskData']['reposChanged']?.['length']||0x0,_0x599c8f=this['taskData']['reposChanged']?.['reduce']((_0x141656,_0x57ad49)=>_0x141656+(_0x57ad49['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x549cad['repos_changed'];if(_0x549cad['current_branches']){const _0x499bc2={...this['taskData']['branches']||{}};for(const [_0x2e674d,_0x17c9ab]of Object['entries'](_0x549cad['current_branches'])){_0x17c9ab?_0x499bc2[_0x2e674d]=_0x17c9ab:delete _0x499bc2[_0x2e674d];}this['taskData']['branches']=_0x499bc2;}this['_updateDisplay'](_0x549cad['repos_changed'],this['taskData']);const _0x285c71=_0x549cad['repos_changed']['length'],_0x4357a9=_0x549cad['repos_changed']['reduce']((_0x1fbe6d,_0x9a21a)=>_0x1fbe6d+(_0x9a21a['files_changed']||0x0),0x0);(_0x4357a9>_0x599c8f||_0x285c71>_0x211203)&&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.');}_0x1f41fe&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x1f41fe['disabled']=!![],_0x1f41fe['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x1f41fe['disabled']=![],_0x1f41fe['textContent']='Commit\x20Changes'));}catch(_0x17f654){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x17f654);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x17f654['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x1f41fe&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x1f41fe['disabled']=![],_0x1f41fe['textContent']='Commit\x20Changes'):(_0x1f41fe['disabled']=!![],_0x1f41fe['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0xad9b68=this['_el']('approve-modal');_0xad9b68&&(_0xad9b68['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x40c30a=this['_el']('commit-message-input'),_0x2ddb4f=this['_el']('pull-before-commit'),_0x27a4dd=this['_el']('push-after-commit'),_0x446fbc=this['_el']('create-new-branch'),_0x24522a=this['_el']('new-branch-name'),_0x331133=this['_el']('confirm-approve'),_0x4511b9=_0x40c30a['value']['trim'](),_0x31b9e5=_0x2ddb4f?.['checked']??!![],_0x3a2257=_0x27a4dd?.['checked']??!![],_0x1952f1=_0x446fbc?.['checked']||![],_0x25de1b=_0x24522a?.['value']['trim']()||'';this['hideError']();if(!_0x4511b9){this['showError']('Commit\x20message\x20is\x20required'),_0x40c30a['focus']();return;}if(_0x1952f1&&!_0x25de1b){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x24522a?.['focus']();return;}if(_0x1952f1&&_0x25de1b){const _0x55184f=/[\s~^:?*\[\\]/;if(_0x55184f['test'](_0x25de1b)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x24522a?.['focus']();return;}}const _0x34f43a=this['_el']('sync-to-ibmi')?.['checked'];if(_0x34f43a){const _0x1c4763=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x1c4763){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x7083ce=this['_syncFileTree']['getSelectedFiles']();if(_0x7083ce['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x29daa4=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x29daa4){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x363312=this['_el']('ibmi-sync-password')?.['value'];if(!_0x363312){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x1ebf2c=_0x331133?.['textContent']||'Commit\x20Changes';_0x331133&&(_0x331133['disabled']=!![],_0x1952f1?_0x331133['textContent']='Creating\x20branch\x20&\x20committing...':_0x331133['textContent']=_0x31b9e5?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x3f0d63={'commit_message':_0x4511b9,'pull':_0x31b9e5,'push':_0x3a2257};_0x1952f1&&_0x25de1b&&(_0x3f0d63['new_branch']=_0x25de1b);let _0xe9b956=null;this['onApprove']&&(_0xe9b956=await this['onApprove'](this['taskData']['taskId'],_0x3f0d63));let _0x9f4df8='Changes\x20committed';if(_0x1952f1)_0x9f4df8='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x25de1b+'\x27',_0x3a2257&&(_0x9f4df8+='\x20and\x20pushed');else{if(_0x31b9e5&&_0x3a2257)_0x9f4df8='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x31b9e5)_0x9f4df8='Changes\x20pulled\x20and\x20committed';else _0x3a2257&&(_0x9f4df8='Changes\x20committed\x20and\x20pushed');}}const _0x23f837=this['_el']('sync-to-ibmi')?.['checked'];let _0x279797=null,_0x30afd9=null,_0x589a6f=null,_0x288444=null;if(_0x23f837&&this['onSyncToIbmi']){_0x279797=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x30afd9=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x589a6f=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x4c0976=this['_syncFileTree']['getSelectedFiles']();_0x288444=_0x4c0976['map'](_0x3d0b1d=>{const _0x3ac4d6=this['_syncRelativeFiles']['indexOf'](_0x3d0b1d);return _0x3ac4d6>=0x0?this['_syncAbsolutePaths'][_0x3ac4d6]:_0x3d0b1d;});}}this['showToast'](_0x9f4df8,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0xe9b956||{});}catch(_0x3a3697){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x3a3697);}if(_0x23f837&&this['onSyncToIbmi']&&_0x279797){localStorage['setItem']('coderflow_ibmi_sync_library',_0x279797);if(_0x30afd9)localStorage['setItem']('coderflow_ibmi_sync_user',_0x30afd9);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x279797,_0x30afd9,_0x589a6f,_0x288444);}catch(_0x463ff2){this['showToast']('Sync\x20failed:\x20'+_0x463ff2['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x16b080){console['error']('Failed\x20to\x20approve\x20changes',_0x16b080),this['showError']('Failed\x20to\x20commit:\x20'+_0x16b080['message']),_0x331133&&(_0x331133['disabled']=![],_0x331133['textContent']=_0x1ebf2c),this['onError']&&this['onError'](_0x16b080);}}['isVisible'](){const _0x2a4f8f=this['_el']('approve-modal');return _0x2a4f8f&&!_0x2a4f8f['hidden'];}['destroy'](){const _0x4c663b=this['_el']('approve-modal');_0x4c663b&&_0x4c663b['remove'](),this['initialized']=![];}}export function getApproveState(_0x26955a,_0x1c4b0b){if(!_0x26955a)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x26955a['taskType']))return{'canApprove':![],'reason':(_0x26955a['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0xb282f8=_0x1c4b0b?.['repos_changed']?.['length']>0x0,_0xf51fda=_0x26955a['status']==='completed'||_0x26955a['status']==='failed'||_0x26955a['status']==='interrupted',_0x461e88=_0x26955a['containerState']==='running',_0x7e3763=_0x26955a['approvedBy']!==undefined&&_0x26955a['approvedBy']!==null;if(_0x7e3763){const _0x8dc901=_0x26955a['approvedBy']['name']||_0x26955a['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x8dc901};}if(!_0xb282f8)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0xf51fda)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x26955a['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x461e88)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
1
+ function isLogOnlyTaskType(_0x407ae8){return _0x407ae8==='test'||_0x407ae8==='deploy';}export function createApproveDialogHTML(_0x556673='',_0x229814={}){const _0x39b7ab=_0x556673,_0x2a2fda=_0x229814['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0xe90182=_0x229814['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x553b79=_0x229814['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x39b7ab+'approve-modal\x22\x20class=\x22'+_0x2a2fda+'\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'+_0x39b7ab+'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'+_0x39b7ab+'approve-warning\x22\x20class=\x22'+_0xe90182+'\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'+_0x39b7ab+'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'+_0x39b7ab+'approve-error\x22\x20class=\x22'+_0x553b79+'\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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'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'+_0x39b7ab+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x39b7ab+'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(_0x33edc8={}){this['prefix']=_0x33edc8['prefix']||'',this['onApprove']=_0x33edc8['onApprove'],this['onSync']=_0x33edc8['onSync'],this['onSuccess']=_0x33edc8['onSuccess'],this['onError']=_0x33edc8['onError'],this['onCreatePR']=_0x33edc8['onCreatePR'],this['showToast']=_0x33edc8['showToast']||(()=>{}),this['container']=_0x33edc8['container']||document['body'],this['useTaskPageStyles']=_0x33edc8['useTaskPageStyles']||![],this['baseUrl']=_0x33edc8['baseUrl']||'',this['coderflowAttribution']=_0x33edc8['coderflowAttribution'],this['onSyncToIbmi']=_0x33edc8['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x33edc8['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 _0x4b4b92=document['createElement']('div');_0x4b4b92['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x4b4b92['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x23902e){return document['getElementById'](''+this['prefix']+_0x23902e);}['_bindEvents'](){const _0xb83f81=this['_el']('approve-modal'),_0x386c71=this['_el']('close-approve-modal'),_0x2ac157=this['_el']('cancel-approve'),_0x443cc8=this['_el']('confirm-approve'),_0x53f091=_0xb83f81?.['querySelector']('.modal-overlay'),_0x44ff36=this['_el']('create-new-branch'),_0x1cacf5=this['_el']('new-branch-input-container'),_0x439824=this['_el']('new-branch-name'),_0x1f4a4d=this['_el']('push-after-commit'),_0x136d89=this['_el']('create-pull-request'),_0x580aba=this['_el']('pr-hint');_0x386c71?.['addEventListener']('click',()=>this['hide']()),_0x2ac157?.['addEventListener']('click',()=>this['hide']()),_0x53f091?.['addEventListener']('click',()=>this['hide']()),_0x443cc8?.['addEventListener']('click',()=>this['_handleApprove']());_0x44ff36&&_0x44ff36['addEventListener']('change',()=>{_0x1cacf5&&(_0x1cacf5['hidden']=!_0x44ff36['checked']),_0x44ff36['checked']&&_0x439824&&_0x439824['focus']();});_0x136d89&&_0x1f4a4d&&_0x44ff36&&(_0x136d89['addEventListener']('change',()=>{this['_createPR']=_0x136d89['checked'];if(_0x136d89['checked']){_0x1f4a4d['checked']=!![],_0x1f4a4d['disabled']=!![],_0x44ff36['checked']=!![],_0x44ff36['disabled']=!![];_0x1cacf5&&(_0x1cacf5['hidden']=![]);if(_0x580aba)_0x580aba['hidden']=![];}else{_0x1f4a4d['disabled']=![],_0x44ff36['disabled']=![];if(_0x580aba)_0x580aba['hidden']=!![];}}),_0x1f4a4d['addEventListener']('change',()=>{if(!_0x1f4a4d['checked']&&_0x136d89['checked']){_0x136d89['checked']=![],this['_createPR']=![],_0x1f4a4d['disabled']=![],_0x44ff36['disabled']=![];if(_0x580aba)_0x580aba['hidden']=!![];}}));const _0x9104c=this['_el']('sync-to-ibmi');_0x9104c&&_0x9104c['addEventListener']('change',async _0x4f3999=>{const _0x4a93b1=this['_el']('ibmi-sync-fields');if(_0x4a93b1)_0x4a93b1['hidden']=!_0x4f3999['target']['checked'];if(_0x4f3999['target']['checked']){const _0x57bf06=this['_el']('ibmi-sync-library'),_0x1ea59c=localStorage['getItem']('coderflow_ibmi_sync_library');_0x1ea59c&&_0x57bf06&&!_0x57bf06['value']&&(_0x57bf06['value']=_0x1ea59c);const _0x24cdce=this['_el']('ibmi-sync-user');if(_0x24cdce&&!_0x24cdce['value']){const _0x1ba539=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x1ba539)_0x24cdce['value']=_0x1ba539;}const _0x511ea2=this['_el']('ibmi-sync-password');if(_0x511ea2)_0x511ea2['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),document['addEventListener']('keydown',_0xce5fa5=>{_0xce5fa5['key']==='Escape'&&_0xb83f81&&!_0xb83f81['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x113a5e=this['_el']('ibmi-sync-file-tree'),_0x28da=this['_el']('ibmi-sync-files-summary');if(!_0x113a5e)return;_0x113a5e['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x28da)_0x28da['textContent']='';try{const {files:_0x2630b1,absolutePaths:_0x4358f5}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x2630b1,this['_syncAbsolutePaths']=_0x4358f5;if(_0x2630b1['length']===0x0){_0x113a5e['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x2c753e}=await import('./file-selection-tree.js'),{validateIbmiFile:_0xf0e6ec,hasKnownIbmiExtension:_0x509203}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x2c753e({'container':_0x113a5e,'files':_0x2630b1,'isPreselected':_0x5145ab=>{const {valid:_0x449fdb}=_0xf0e6ec(_0x5145ab);return _0x449fdb&&_0x509203(_0x5145ab);},'isDisabled':_0x1180cd=>{const {valid:_0x5d1f0a,reason:_0x1a9e6f}=_0xf0e6ec(_0x1180cd);return{'disabled':!_0x5d1f0a,'reason':_0x1a9e6f};},'isAutoCheckEligible':_0x14b130=>{const {valid:_0x1df6d5}=_0xf0e6ec(_0x14b130);return _0x1df6d5&&_0x509203(_0x14b130);},'onChange':_0x523226=>{_0x28da&&(_0x28da['textContent']=_0x523226['length']+'\x20of\x20'+_0x2630b1['length']+'\x20file'+(_0x2630b1['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x3af810){_0x113a5e['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x155902){const _0x3cfc1c=this['_el']('approve-error'),_0x1e63d4=this['_el']('approve-error-text');_0x3cfc1c&&_0x1e63d4&&(_0x1e63d4['textContent']=_0x155902,_0x3cfc1c['hidden']=![],_0x3cfc1c['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x1a5565=this['_el']('approve-error'),_0x522038=this['_el']('approve-error-text');_0x1a5565&&_0x522038&&(_0x1a5565['hidden']=!![],_0x522038['textContent']='');}['_displayBranchInfo'](_0xe1ad62,_0x56b23f={}){const _0x37a2e9=this['_el']('approve-branches');if(!_0x37a2e9)return;const _0xd07115=[];for(const _0x10129c of _0xe1ad62){_0x56b23f[_0x10129c['name']]&&_0xd07115['push']({'repo':_0x10129c['name'],'branch':_0x56b23f[_0x10129c['name']]});}if(_0xd07115['length']>0x0){_0x37a2e9['hidden']=![];if(_0xd07115['length']===0x1)_0x37a2e9['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0xd07115[0x0]['branch']+'</code></div>';else{const _0x347b8e=_0xd07115['map'](_0x9ce52d=>'<div\x20class=\x22branch-item\x22><strong>'+_0x9ce52d['repo']+':</strong>\x20<code>'+_0x9ce52d['branch']+'</code></div>')['join']('');_0x37a2e9['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x347b8e+'</div></div>';}}else _0x37a2e9['hidden']=!![],_0x37a2e9['innerHTML']='';}['showWarning'](_0x365d48){const _0x4a6936=this['_el']('approve-warning'),_0x5b1db7=this['_el']('approve-warning-text');_0x4a6936&&_0x5b1db7&&(_0x5b1db7['textContent']=_0x365d48,_0x4a6936['hidden']=![]);}['hideWarning'](){const _0x5b57a5=this['_el']('approve-warning'),_0x135fc4=this['_el']('approve-warning-text');_0x5b57a5&&_0x135fc4&&(_0x5b57a5['hidden']=!![],_0x135fc4['textContent']='');}['_stripCoAuthoredByLines'](_0xe2ae6c){return _0xe2ae6c['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0xf4c958){try{let _0x44763c;try{const _0x21c421=await fetch(this['baseUrl']+'/settings');if(_0x21c421['ok']){const _0x34cb02=await _0x21c421['json']();_0x44763c=_0x34cb02['coderflow_attribution']!==![];}}catch(_0x32b21c){}_0x44763c===undefined&&(this['coderflowAttribution']!==undefined?_0x44763c=this['coderflowAttribution']!==![]:_0x44763c=!![]);const _0x2586e4=this['_stripCoAuthoredByLines'](_0xf4c958);if(!_0x44763c)return _0x2586e4;const _0x2a7693='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x2586e4+_0x2a7693;}catch(_0x3b52d3){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x3b52d3),_0xf4c958;}}['show'](_0xa37668){!this['initialized']&&this['init']();this['taskData']=_0xa37668;const _0x344dee=this['_el']('approve-modal'),_0x4bb746=this['_el']('commit-message-input'),_0x1305e6=this['_el']('pull-before-commit'),_0xa7cddb=this['_el']('push-after-commit'),_0x110420=this['_el']('create-new-branch'),_0x111865=this['_el']('new-branch-input-container'),_0x2f3649=this['_el']('new-branch-name'),_0x3bb82c=this['_el']('approve-repo-name'),_0x103971=this['_el']('approve-stats'),_0x56e04c=this['_el']('multi-repo-note');if(!_0x344dee)return;this['hideError'](),this['hideWarning']();_0xa37668['warning']&&this['showWarning'](_0xa37668['warning']);const _0x52cdb3=_0xa37668['reposChanged']||[];if(_0x52cdb3['length']===0x0&&!_0xa37668['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x52cdb3,_0xa37668);const _0x3d253e=_0xa37668['commitMessage']||'',_0x294052=this['_stripCoAuthoredByLines'](_0x3d253e);_0x4bb746['value']=_0x294052;if(_0x1305e6)_0x1305e6['checked']=!![];if(_0xa7cddb)_0xa7cddb['checked']=!![];_0x110420&&(_0x110420['checked']=![]);_0x111865&&(_0x111865['hidden']=!![]);_0x2f3649&&(_0x2f3649['value']='');if(_0xa7cddb)_0xa7cddb['disabled']=![];if(_0x110420)_0x110420['disabled']=![];this['updatePRSupport'](_0xa37668['prSupported']===!![]);const _0x205c5a=this['_el']('ibmi-sync-section');if(_0x205c5a){_0x205c5a['hidden']=!_0xa37668['ibmiSyncAvailable'];const _0x597842=this['_el']('sync-to-ibmi'),_0x35a336=this['_el']('ibmi-sync-fields'),_0x3fb40c=this['_el']('ibmi-sync-library');if(_0x597842)_0x597842['checked']=![];if(_0x35a336)_0x35a336['hidden']=!![];if(_0x3fb40c)_0x3fb40c['value']='';const _0x3e783d=this['_el']('ibmi-sync-credentials-row');_0x3e783d&&(_0x3e783d['hidden']=!(_0xa37668['ibmiSyncAvailable']&&_0xa37668['syncCredentials']==='prompt'));}const _0x14d6b4=this['_el']('confirm-approve');_0xa37668['syncFirst']&&this['onSync']?(_0x14d6b4&&(_0x14d6b4['disabled']=!![],_0x14d6b4['textContent']='Syncing...'),this['_performSync']()):_0x14d6b4&&(_0x14d6b4['disabled']=![],_0x14d6b4['textContent']='Commit\x20Changes');_0x344dee['hidden']=![];const _0x327a2b=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x327a2b,'taskId':_0xa37668['taskId'],'originalCommitMessage':_0x294052}),setTimeout(()=>{_0x4bb746['focus'](),_0x4bb746['setSelectionRange'](0x0,_0x4bb746['value']['length']);},0x64);}['updatePRSupport'](_0x5e5267){const _0xa0a75a=this['_el']('pr-option-section'),_0x14fb5c=this['_el']('create-pull-request'),_0x28ff63=this['_el']('pr-hint'),_0x82d085=this['_el']('push-after-commit'),_0x1c0984=this['_el']('create-new-branch');if(!_0xa0a75a)return;if(_0x5e5267){_0xa0a75a['hidden']=![];_0x14fb5c&&!_0x14fb5c['disabled']&&(_0x14fb5c['checked']=![]);if(_0x28ff63)_0x28ff63['hidden']=!![];this['_createPR']=![];return;}_0x14fb5c?.['checked']&&(_0x14fb5c['checked']=![]);if(_0x28ff63)_0x28ff63['hidden']=!![];if(_0x82d085)_0x82d085['disabled']=![];if(_0x1c0984)_0x1c0984['disabled']=![];this['_createPR']=![],_0xa0a75a['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x5ebd14,taskId:_0x29f1f4,originalCommitMessage:_0x117703}){const _0x10191a=this['_el']('commit-message-input');if(!_0x10191a)return;const _0x378a8d=await this['_addAttributionIfEnabled'](_0x117703);if(_0x5ebd14!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x29f1f4)return;if(!this['isVisible']())return;const _0x17f883=_0x2358b0=>_0x2358b0['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x17f883(_0x10191a['value'])!==_0x17f883(_0x117703))return;_0x10191a['value']=_0x378a8d;}['_updateDisplay'](_0x3dd851,_0x4b59cc){const _0x18e33d=this['_el']('approve-repo-name'),_0x3c4a26=this['_el']('approve-stats'),_0x14a3b3=this['_el']('multi-repo-note');if(_0x3dd851['length']===0x0){if(_0x18e33d)_0x18e33d['textContent']='Syncing...';if(_0x3c4a26)_0x3c4a26['textContent']='';if(_0x14a3b3)_0x14a3b3['hidden']=!![];return;}const _0x3025c3=_0x3dd851['reduce']((_0x358e1b,_0x261a6b)=>_0x358e1b+(_0x261a6b['files_changed']||0x0),0x0),_0x52c0ce=_0x3dd851['reduce']((_0x2d3011,_0x4313d7)=>_0x2d3011+(_0x4313d7['lines_added']||0x0),0x0),_0x28bc64=_0x3dd851['reduce']((_0x1294c0,_0x2a6d6b)=>_0x1294c0+(_0x2a6d6b['lines_deleted']||0x0),0x0);if(_0x3dd851['length']===0x1){if(_0x18e33d)_0x18e33d['textContent']=_0x3dd851[0x0]?.['name']||'repository';if(_0x14a3b3)_0x14a3b3['hidden']=!![];}else{const _0x12c85a=_0x3dd851['map'](_0x3d7bd3=>_0x3d7bd3['name'])['join'](',\x20');if(_0x18e33d)_0x18e33d['textContent']=_0x3dd851['length']+'\x20repositories:\x20'+_0x12c85a;if(_0x14a3b3)_0x14a3b3['hidden']=![];}_0x3c4a26&&(_0x3c4a26['textContent']=_0x3025c3+'\x20file'+(_0x3025c3===0x1?'':'s')+'\x20changed\x20(+'+_0x52c0ce+'\x20-'+_0x28bc64+')'),this['_displayBranchInfo'](_0x3dd851,_0x4b59cc?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x44c95e=this['_el']('confirm-approve');try{const _0x432491=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x432491['repos_changed']){const _0x447dd1=this['taskData']['reposChanged']?.['length']||0x0,_0x4fa3a7=this['taskData']['reposChanged']?.['reduce']((_0x349c4f,_0x205958)=>_0x349c4f+(_0x205958['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x432491['repos_changed'];if(_0x432491['current_branches']){const _0x41305d={...this['taskData']['branches']||{}};for(const [_0x5175cf,_0x4a5642]of Object['entries'](_0x432491['current_branches'])){_0x4a5642?_0x41305d[_0x5175cf]=_0x4a5642:delete _0x41305d[_0x5175cf];}this['taskData']['branches']=_0x41305d;}this['_updateDisplay'](_0x432491['repos_changed'],this['taskData']);const _0x525c18=_0x432491['repos_changed']['length'],_0x2db86b=_0x432491['repos_changed']['reduce']((_0x41381c,_0x4fb55d)=>_0x41381c+(_0x4fb55d['files_changed']||0x0),0x0);(_0x2db86b>_0x4fa3a7||_0x525c18>_0x447dd1)&&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.');}_0x44c95e&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x44c95e['disabled']=!![],_0x44c95e['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x44c95e['disabled']=![],_0x44c95e['textContent']='Commit\x20Changes'));}catch(_0x18a278){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x18a278);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x18a278['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x44c95e&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x44c95e['disabled']=![],_0x44c95e['textContent']='Commit\x20Changes'):(_0x44c95e['disabled']=!![],_0x44c95e['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0xdfc1ca=this['_el']('approve-modal');_0xdfc1ca&&(_0xdfc1ca['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x50a4c0=this['_el']('commit-message-input'),_0x48e1c3=this['_el']('pull-before-commit'),_0x309ffd=this['_el']('push-after-commit'),_0x10675e=this['_el']('create-new-branch'),_0x407e51=this['_el']('new-branch-name'),_0x1a58ba=this['_el']('confirm-approve'),_0x6dc9d0=_0x50a4c0['value']['trim'](),_0x573b82=_0x48e1c3?.['checked']??!![],_0x2e9557=_0x309ffd?.['checked']??!![],_0x4a3e0f=_0x10675e?.['checked']||![],_0x302716=_0x407e51?.['value']['trim']()||'';this['hideError']();if(!_0x6dc9d0){this['showError']('Commit\x20message\x20is\x20required'),_0x50a4c0['focus']();return;}if(_0x4a3e0f&&!_0x302716){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x407e51?.['focus']();return;}if(_0x4a3e0f&&_0x302716){const _0x102987=/[\s~^:?*\[\\]/;if(_0x102987['test'](_0x302716)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x407e51?.['focus']();return;}}const _0x586ac7=this['_el']('sync-to-ibmi')?.['checked'];if(_0x586ac7){const _0x4a7726=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x4a7726){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x44d9e9=this['_syncFileTree']['getSelectedFiles']();if(_0x44d9e9['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x3c966c=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x3c966c){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x450959=this['_el']('ibmi-sync-password')?.['value'];if(!_0x450959){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x292b7e=_0x1a58ba?.['textContent']||'Commit\x20Changes';_0x1a58ba&&(_0x1a58ba['disabled']=!![],_0x4a3e0f?_0x1a58ba['textContent']='Creating\x20branch\x20&\x20committing...':_0x1a58ba['textContent']=_0x573b82?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x5db6e2={'commit_message':_0x6dc9d0,'pull':_0x573b82,'push':_0x2e9557};_0x4a3e0f&&_0x302716&&(_0x5db6e2['new_branch']=_0x302716);let _0x5a48b6=null;this['onApprove']&&(_0x5a48b6=await this['onApprove'](this['taskData']['taskId'],_0x5db6e2));let _0x10780e='Changes\x20committed';if(_0x4a3e0f)_0x10780e='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x302716+'\x27',_0x2e9557&&(_0x10780e+='\x20and\x20pushed');else{if(_0x573b82&&_0x2e9557)_0x10780e='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x573b82)_0x10780e='Changes\x20pulled\x20and\x20committed';else _0x2e9557&&(_0x10780e='Changes\x20committed\x20and\x20pushed');}}const _0x3aed21=this['_el']('sync-to-ibmi')?.['checked'];let _0x36bdab=null,_0x3055a5=null,_0xe39df6=null,_0x205123=null;if(_0x3aed21&&this['onSyncToIbmi']){_0x36bdab=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x3055a5=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0xe39df6=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0xff33cb=this['_syncFileTree']['getSelectedFiles']();_0x205123=_0xff33cb['map'](_0x5365a5=>{const _0x4e32db=this['_syncRelativeFiles']['indexOf'](_0x5365a5);return _0x4e32db>=0x0?this['_syncAbsolutePaths'][_0x4e32db]:_0x5365a5;});}}this['showToast'](_0x10780e,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x5a48b6||{});}catch(_0x1d54ab){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x1d54ab);}if(_0x3aed21&&this['onSyncToIbmi']&&_0x36bdab){localStorage['setItem']('coderflow_ibmi_sync_library',_0x36bdab);if(_0x3055a5)localStorage['setItem']('coderflow_ibmi_sync_user',_0x3055a5);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x36bdab,_0x3055a5,_0xe39df6,_0x205123);}catch(_0x3bcf6d){this['showToast']('Sync\x20failed:\x20'+_0x3bcf6d['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x355265){console['error']('Failed\x20to\x20approve\x20changes',_0x355265),this['showError']('Failed\x20to\x20commit:\x20'+_0x355265['message']),_0x1a58ba&&(_0x1a58ba['disabled']=![],_0x1a58ba['textContent']=_0x292b7e),this['onError']&&this['onError'](_0x355265);}}['isVisible'](){const _0x551a70=this['_el']('approve-modal');return _0x551a70&&!_0x551a70['hidden'];}['destroy'](){const _0x4d90bc=this['_el']('approve-modal');_0x4d90bc&&_0x4d90bc['remove'](),this['initialized']=![];}}export function getApproveState(_0x44a06d,_0x1dda13){if(!_0x44a06d)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x44a06d['taskType']))return{'canApprove':![],'reason':(_0x44a06d['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x4563fb=_0x1dda13?.['repos_changed']?.['length']>0x0,_0x1fd832=_0x44a06d['status']==='completed'||_0x44a06d['status']==='failed'||_0x44a06d['status']==='interrupted',_0xb57a8c=_0x44a06d['containerState']==='running',_0x56f421=_0x44a06d['approvedBy']!==undefined&&_0x44a06d['approvedBy']!==null;if(_0x56f421){const _0x22f647=_0x44a06d['approvedBy']['name']||_0x44a06d['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x22f647};}if(!_0x4563fb)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x1fd832)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x44a06d['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0xb57a8c)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
@@ -1 +1 @@
1
- export function buildAutomationEnvironmentHref(_0x4aec50,_0x14855e){const _0x2ec5ad=new URLSearchParams();_0x4aec50&&_0x2ec5ad['set']('env',String(_0x4aec50));_0x2ec5ad['set']('tab','automations');_0x14855e&&_0x2ec5ad['set']('automation',String(_0x14855e));const _0x56aa70=_0x2ec5ad['toString']();return'environments.html'+(_0x56aa70?'?'+_0x56aa70:'');}export function buildAutomationTaskFilterHref(_0x14f6c3){const _0x44473d=new URLSearchParams();_0x14f6c3&&_0x44473d['set']('automation',String(_0x14f6c3));const _0x147c7a=_0x44473d['toString']();return'index.html'+(_0x147c7a?'?'+_0x147c7a:'');}export function parseAutomationDeepLinkParams(_0x5b87ca=''){const _0x4b5a72=new URLSearchParams(_0x5b87ca||'');return{'env':_0x4b5a72['get']('env'),'tab':_0x4b5a72['get']('tab'),'automation':_0x4b5a72['get']('automation')};}
1
+ export function buildAutomationEnvironmentHref(_0xa2dda3,_0x345a09){const _0x1e6541=new URLSearchParams();_0xa2dda3&&_0x1e6541['set']('env',String(_0xa2dda3));_0x1e6541['set']('tab','automations');_0x345a09&&_0x1e6541['set']('automation',String(_0x345a09));const _0x366a88=_0x1e6541['toString']();return'environments.html'+(_0x366a88?'?'+_0x366a88:'');}export function buildAutomationTaskFilterHref(_0x481c14){const _0x4e9939=new URLSearchParams();_0x481c14&&_0x4e9939['set']('automation',String(_0x481c14));const _0x151fd3=_0x4e9939['toString']();return'index.html'+(_0x151fd3?'?'+_0x151fd3:'');}export function parseAutomationDeepLinkParams(_0x312998=''){const _0x52d4dd=new URLSearchParams(_0x312998||'');return{'env':_0x52d4dd['get']('env'),'tab':_0x52d4dd['get']('tab'),'automation':_0x52d4dd['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(_0x135b4b,_0x3f0659,_0x1e1d33){const _0x1d480b=Number['parseInt'](_0x135b4b,0xa);if(!Number['isInteger'](_0x1d480b)||_0x1d480b<_0x3f0659||_0x1d480b>_0x1e1d33)return null;return _0x1d480b;}function inferRecurringInterval(_0x3f53e0,_0x3d0cf1){if(_0x3f53e0==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x3f53e0==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x3f53e0!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x3d0cf1==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x3d0cf1))return'0\x20*\x20*\x20*\x20*';for(const _0x592186 of RECURRING_INTERVAL_STEPS){if(_0x3d0cf1['startsWith']('*/'+_0x592186)||_0x3d0cf1['includes']('/'+_0x592186))return'0\x20*/'+_0x592186+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x539426){const _0xafdd3=String(_0x539426||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0xafdd3)return{'start':'','end':''};const _0x1aa8f6=parseBoundedInteger(_0xafdd3[0x1],0x0,0x17),_0x1f3538=parseBoundedInteger(_0xafdd3[0x2],0x0,0x17);if(_0x1aa8f6===null||_0x1f3538===null||_0x1aa8f6>_0x1f3538)return{'start':'','end':''};return{'start':String(_0x1aa8f6),'end':String(_0x1f3538)};}export function parseAutomationScheduleToFormState(_0x319afd){const _0x40e47a=String(_0x319afd||'')['trim'](),_0x41e7ce=createDefaultScheduleFormState(),_0x40511c=_0x40e47a['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x40511c){const _0x3124a3=parseBoundedInteger(_0x40511c[0x1],0x0,0x3b),_0x326621=parseBoundedInteger(_0x40511c[0x2],0x0,0x17);if(_0x3124a3!==null&&_0x326621!==null)return _0x41e7ce['frequency']='daily',_0x41e7ce['dailyMinute']=String(_0x3124a3),_0x41e7ce['dailyHour']=String(_0x326621),_0x41e7ce;}const _0x2af29c=_0x40e47a['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x2af29c){const _0x1f1f2d=parseBoundedInteger(_0x2af29c[0x1],0x0,0x3b),_0x4e99f0=parseBoundedInteger(_0x2af29c[0x2],0x0,0x17),_0x15d108=parseBoundedInteger(_0x2af29c[0x3],0x0,0x7);if(_0x1f1f2d!==null&&_0x4e99f0!==null&&_0x15d108!==null)return _0x41e7ce['frequency']='weekly',_0x41e7ce['weeklyMinute']=String(_0x1f1f2d),_0x41e7ce['weeklyHour']=String(_0x4e99f0),_0x41e7ce['weeklyDay']=String(_0x15d108===0x7?0x0:_0x15d108),_0x41e7ce;}const _0x285731=_0x40e47a['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x285731){const _0x4aa88a=parseBoundedInteger(_0x285731[0x1],0x0,0x3b),_0x24d181=parseBoundedInteger(_0x285731[0x2],0x0,0x17),_0x2ac699=parseBoundedInteger(_0x285731[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x4aa88a!==null&&_0x24d181!==null&&_0x2ac699!==null)return _0x41e7ce['frequency']='monthly',_0x41e7ce['monthlyMinute']=String(_0x4aa88a),_0x41e7ce['monthlyHour']=String(_0x24d181),_0x41e7ce['monthlyDay']=String(_0x2ac699),_0x41e7ce;}const _0x278683=_0x40e47a['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x278683){const [,_0x16f2ec,_0x59e134,_0x5a0e77]=_0x278683;_0x41e7ce['frequency']='recurring',_0x41e7ce['recurringInterval']=inferRecurringInterval(_0x16f2ec,_0x59e134),_0x41e7ce['recurringDayToken']=String(_0x5a0e77||'')['trim']()||'*';const _0x225859=parseRecurringHourRange(_0x59e134);return _0x41e7ce['recurringStartHour']=_0x225859['start'],_0x41e7ce['recurringEndHour']=_0x225859['end'],_0x41e7ce;}return _0x41e7ce['frequency']='custom',_0x41e7ce['customCron']=_0x40e47a,_0x41e7ce;}export function buildAutomationCronFromFormState(_0x1de68c={}){const _0x4fe953=String(_0x1de68c['frequency']||'daily');if(_0x4fe953==='custom')return String(_0x1de68c['customCron']||'')['trim']();if(_0x4fe953==='daily'){const _0x3e57ca=String(_0x1de68c['dailyHour']??'2'),_0x309425=String(_0x1de68c['dailyMinute']??'0');return _0x309425+'\x20'+_0x3e57ca+'\x20*\x20*\x20*';}if(_0x4fe953==='weekly'){const _0x216add=String(_0x1de68c['weeklyDay']??'1'),_0x2b78b2=String(_0x1de68c['weeklyHour']??'9'),_0x1f9831=String(_0x1de68c['weeklyMinute']??'0');return _0x1f9831+'\x20'+_0x2b78b2+'\x20*\x20*\x20'+_0x216add;}if(_0x4fe953==='monthly'){const _0x31e782=String(_0x1de68c['monthlyDay']??'1'),_0x454c44=String(_0x1de68c['monthlyHour']??'0'),_0x44e419=String(_0x1de68c['monthlyMinute']??'0');return _0x44e419+'\x20'+_0x454c44+'\x20'+_0x31e782+'\x20*\x20*';}const _0x3dd232=String(_0x1de68c['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0xa18c1c='*/30',_0x171654='*']=_0x3dd232['split'](/\s+/);let _0x16cd08=_0x171654;const _0x18cdbb=String(_0x1de68c['recurringStartHour']??'')['trim'](),_0x512483=String(_0x1de68c['recurringEndHour']??'')['trim']();if(_0x18cdbb!==''&&_0x512483!==''){const _0x81349e=Number['parseInt'](_0x18cdbb,0xa),_0x1bad62=Number['parseInt'](_0x512483,0xa);if(Number['isInteger'](_0x81349e)&&Number['isInteger'](_0x1bad62)&&_0x81349e<=_0x1bad62){const _0x379f32=_0x171654['match'](/^\*\/(\d+)$/);_0x379f32?_0x16cd08=_0x81349e+'-'+_0x1bad62+'/'+_0x379f32[0x1]:_0x16cd08=_0x81349e+'-'+_0x1bad62;}}const _0x56b355=String(_0x1de68c['recurringDayToken']??'*')['trim']()||'*';return _0xa18c1c+'\x20'+_0x16cd08+'\x20*\x20*\x20'+_0x56b355;}
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(_0x2e56cd,_0x1e2891,_0x434a9d){const _0x103efb=Number['parseInt'](_0x2e56cd,0xa);if(!Number['isInteger'](_0x103efb)||_0x103efb<_0x1e2891||_0x103efb>_0x434a9d)return null;return _0x103efb;}function inferRecurringInterval(_0x2535e6,_0x2c6aa0){if(_0x2535e6==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x2535e6==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x2535e6!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x2c6aa0==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x2c6aa0))return'0\x20*\x20*\x20*\x20*';for(const _0x43bc76 of RECURRING_INTERVAL_STEPS){if(_0x2c6aa0['startsWith']('*/'+_0x43bc76)||_0x2c6aa0['includes']('/'+_0x43bc76))return'0\x20*/'+_0x43bc76+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x180020){const _0x4b1a5c=String(_0x180020||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x4b1a5c)return{'start':'','end':''};const _0x17207d=parseBoundedInteger(_0x4b1a5c[0x1],0x0,0x17),_0x1098be=parseBoundedInteger(_0x4b1a5c[0x2],0x0,0x17);if(_0x17207d===null||_0x1098be===null||_0x17207d>_0x1098be)return{'start':'','end':''};return{'start':String(_0x17207d),'end':String(_0x1098be)};}export function parseAutomationScheduleToFormState(_0x5c1abd){const _0x443cb3=String(_0x5c1abd||'')['trim'](),_0x49991d=createDefaultScheduleFormState(),_0x227ed7=_0x443cb3['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x227ed7){const _0x59aae6=parseBoundedInteger(_0x227ed7[0x1],0x0,0x3b),_0x52c681=parseBoundedInteger(_0x227ed7[0x2],0x0,0x17);if(_0x59aae6!==null&&_0x52c681!==null)return _0x49991d['frequency']='daily',_0x49991d['dailyMinute']=String(_0x59aae6),_0x49991d['dailyHour']=String(_0x52c681),_0x49991d;}const _0xf84e57=_0x443cb3['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0xf84e57){const _0xe174ea=parseBoundedInteger(_0xf84e57[0x1],0x0,0x3b),_0x4a3a2e=parseBoundedInteger(_0xf84e57[0x2],0x0,0x17),_0x2a5614=parseBoundedInteger(_0xf84e57[0x3],0x0,0x7);if(_0xe174ea!==null&&_0x4a3a2e!==null&&_0x2a5614!==null)return _0x49991d['frequency']='weekly',_0x49991d['weeklyMinute']=String(_0xe174ea),_0x49991d['weeklyHour']=String(_0x4a3a2e),_0x49991d['weeklyDay']=String(_0x2a5614===0x7?0x0:_0x2a5614),_0x49991d;}const _0x3dbbe5=_0x443cb3['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x3dbbe5){const _0x439683=parseBoundedInteger(_0x3dbbe5[0x1],0x0,0x3b),_0x972c32=parseBoundedInteger(_0x3dbbe5[0x2],0x0,0x17),_0x4f35b3=parseBoundedInteger(_0x3dbbe5[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x439683!==null&&_0x972c32!==null&&_0x4f35b3!==null)return _0x49991d['frequency']='monthly',_0x49991d['monthlyMinute']=String(_0x439683),_0x49991d['monthlyHour']=String(_0x972c32),_0x49991d['monthlyDay']=String(_0x4f35b3),_0x49991d;}const _0x52f194=_0x443cb3['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x52f194){const [,_0x472902,_0x5b4425,_0x4bf771]=_0x52f194;_0x49991d['frequency']='recurring',_0x49991d['recurringInterval']=inferRecurringInterval(_0x472902,_0x5b4425),_0x49991d['recurringDayToken']=String(_0x4bf771||'')['trim']()||'*';const _0x1f34a7=parseRecurringHourRange(_0x5b4425);return _0x49991d['recurringStartHour']=_0x1f34a7['start'],_0x49991d['recurringEndHour']=_0x1f34a7['end'],_0x49991d;}return _0x49991d['frequency']='custom',_0x49991d['customCron']=_0x443cb3,_0x49991d;}export function buildAutomationCronFromFormState(_0xe04ee={}){const _0x4747c2=String(_0xe04ee['frequency']||'daily');if(_0x4747c2==='custom')return String(_0xe04ee['customCron']||'')['trim']();if(_0x4747c2==='daily'){const _0x3fe528=String(_0xe04ee['dailyHour']??'2'),_0x626af6=String(_0xe04ee['dailyMinute']??'0');return _0x626af6+'\x20'+_0x3fe528+'\x20*\x20*\x20*';}if(_0x4747c2==='weekly'){const _0x3e877a=String(_0xe04ee['weeklyDay']??'1'),_0x397556=String(_0xe04ee['weeklyHour']??'9'),_0x2b82fb=String(_0xe04ee['weeklyMinute']??'0');return _0x2b82fb+'\x20'+_0x397556+'\x20*\x20*\x20'+_0x3e877a;}if(_0x4747c2==='monthly'){const _0x38d843=String(_0xe04ee['monthlyDay']??'1'),_0x108c73=String(_0xe04ee['monthlyHour']??'0'),_0x12d709=String(_0xe04ee['monthlyMinute']??'0');return _0x12d709+'\x20'+_0x108c73+'\x20'+_0x38d843+'\x20*\x20*';}const _0x1f8cad=String(_0xe04ee['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x1c31e0='*/30',_0x3a448e='*']=_0x1f8cad['split'](/\s+/);let _0x5a4187=_0x3a448e;const _0x1112d3=String(_0xe04ee['recurringStartHour']??'')['trim'](),_0x48d34d=String(_0xe04ee['recurringEndHour']??'')['trim']();if(_0x1112d3!==''&&_0x48d34d!==''){const _0xd5a724=Number['parseInt'](_0x1112d3,0xa),_0x57289a=Number['parseInt'](_0x48d34d,0xa);if(Number['isInteger'](_0xd5a724)&&Number['isInteger'](_0x57289a)&&_0xd5a724<=_0x57289a){const _0x1e489a=_0x3a448e['match'](/^\*\/(\d+)$/);_0x1e489a?_0x5a4187=_0xd5a724+'-'+_0x57289a+'/'+_0x1e489a[0x1]:_0x5a4187=_0xd5a724+'-'+_0x57289a;}}const _0x710b81=String(_0xe04ee['recurringDayToken']??'*')['trim']()||'*';return _0x1c31e0+'\x20'+_0x5a4187+'\x20*\x20*\x20'+_0x710b81;}
@@ -1 +1 @@
1
- export class CommentsWidget{constructor(_0xe15ad5,_0x47d0ff={}){this['container']=_0xe15ad5,this['options']={'taskId':_0x47d0ff['taskId']||null,'currentUserId':_0x47d0ff['currentUserId']||null,'compact':_0x47d0ff['compact']||![],'skipHeader':_0x47d0ff['skipHeader']||![],'onCommentsLoaded':_0x47d0ff['onCommentsLoaded']||null,'onCommentsChanged':_0x47d0ff['onCommentsChanged']||null,'enableAttachments':_0x47d0ff['enableAttachments']||![],'getAPI':_0x47d0ff['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 _0x4775bf=this['options']['getAPI'](),_0x4ab0db=await _0x4775bf['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x4ab0db['attachments']||[];}catch(_0xc6e3f){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0xc6e3f),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 _0x21e8fb=this['header']['querySelector']('.comments-toggle-btn');_0x21e8fb['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 _0x394fa3=document['createElement']('div');_0x394fa3['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x394fa3['appendChild'](this['toolbar']);const _0x4e1a27=document['createElement']('div');_0x4e1a27['className']='comments-editor-placeholder',_0x394fa3['appendChild'](_0x4e1a27);const _0x211479=document['createElement']('div');_0x211479['className']='comments-input-actions',_0x211479['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'](_0x394fa3),this['inputSection']['appendChild'](_0x211479),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x4e1a27),this['submitBtn']=_0x211479['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x211479['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0xa35954){const _0x5085d0=document['createElement']('textarea');_0x5085d0['placeholder']='Add\x20a\x20comment...',_0x5085d0['className']='comments-textarea',_0xa35954['appendChild'](_0x5085d0);const _0x4e3c39=window['MarkdownEditor'];if(!_0x4e3c39){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x364e20={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x57c1e0=>{const _0x10c026=_0x57c1e0&&_0x57c1e0['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x10c026;},'fetchUsers':async()=>{const _0x434b2b=this['options']['getAPI']();return _0x434b2b['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x364e20['onAddAttachments']=_0x49edd6=>{this['pendingAttachments']['push'](..._0x49edd6),this['submitBtn']['disabled']=![];},_0x364e20['resolveAttachmentUrl']=_0x11b6b4=>{const _0x3e19f5=this['options']['getAPI']();return _0x3e19f5['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x11b6b4);},_0x364e20['isAttachmentNameTaken']=_0x33a337=>{return this['pendingAttachments']['some'](_0x5c3d02=>_0x5c3d02['name']===_0x33a337)||this['existingAttachments']['some'](_0xeeb77f=>_0xeeb77f['name']===_0x33a337);});this['editor']=new _0x4e3c39(_0x5085d0,_0x364e20);const _0x5da832=this['editor']['editor'],_0x3e0449=this['editor']['toolbar'];_0x3e0449&&(_0x3e0449['classList']['add']('comments-toolbar-hidden'),_0x5da832['addEventListener']('focus',()=>{_0x3e0449['classList']['remove']('comments-toolbar-hidden');}),_0x5da832['addEventListener']('blur',_0x419ab4=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x3e0449['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x3e0449['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x6df408=this['header']['querySelector']('.comments-chevron');_0x6df408&&(_0x6df408['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x3db732){this['options']['taskId']=_0x3db732,this['comments']=[],this['renderComments'](),_0x3db732&&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 _0x191c3a=this['options']['getAPI'](),_0x2f69e4=await _0x191c3a['getComments'](this['options']['taskId']);this['comments']=_0x2f69e4['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x383849){console['error']('Failed\x20to\x20load\x20comments:',_0x383849),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'](_0x32c3bb=>{const _0x25fc51=this['createCommentElement'](_0x32c3bb);this['commentsList']['appendChild'](_0x25fc51);});}['createCommentElement'](_0x5584a7){const _0x2d89e8=document['createElement']('div');_0x2d89e8['className']='comment-item',_0x2d89e8['dataset']['commentId']=_0x5584a7['id'];const _0x192d68=this['options']['currentUserId']&&_0x5584a7['author']?.['userId']===this['options']['currentUserId'],_0x527053=this['formatDate'](_0x5584a7['createdAt']),_0x1597a2=_0x5584a7['updatedAt']!==_0x5584a7['createdAt'],_0x288541=this['resolveAttachmentUrls'](_0x5584a7['content']);let _0x5b2198=window['marked']?window['marked']['parse'](_0x288541):_0x288541;_0x5b2198=this['renderMentions'](_0x5b2198),_0x2d89e8['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'](_0x5584a7['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x5584a7['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x527053+(_0x1597a2?'\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'+(_0x192d68?'\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>'+_0x5b2198+'</div>\x0a\x20\x20\x20\x20';if(_0x192d68){const _0x56de48=_0x2d89e8['querySelector']('.comment-edit-btn'),_0x47296e=_0x2d89e8['querySelector']('.comment-delete-btn');_0x56de48?.['addEventListener']('click',()=>this['startEdit'](_0x5584a7)),_0x47296e?.['addEventListener']('click',()=>this['deleteComment'](_0x5584a7['id']));}return _0x2d89e8;}['formatDate'](_0x284fb7){const _0x29706e=new Date(_0x284fb7),_0x5c77a8=new Date(),_0x4bb115=_0x5c77a8-_0x29706e,_0x4d3813=Math['floor'](_0x4bb115/0xea60),_0xbddf54=Math['floor'](_0x4bb115/0x36ee80),_0x213dae=Math['floor'](_0x4bb115/0x5265c00);if(_0x4d3813<0x1)return'just\x20now';if(_0x4d3813<0x3c)return _0x4d3813+'m\x20ago';if(_0xbddf54<0x18)return _0xbddf54+'h\x20ago';if(_0x213dae<0x7)return _0x213dae+'d\x20ago';return _0x29706e['toLocaleDateString']();}['escapeHtml'](_0x2345cc){const _0x2a2ecc=document['createElement']('div');return _0x2a2ecc['textContent']=_0x2345cc,_0x2a2ecc['innerHTML'];}['resolveAttachmentUrls'](_0x444121){if(!_0x444121||!this['options']['taskId'])return _0x444121;const _0x26da7c=this['options']['getAPI'](),_0x2df190=_0x26da7c['getBaseUrl']();let _0x4f2afd=String(_0x444121)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x4e9242,_0xab5b44)=>{const _0x10197f=String(_0xab5b44||'')['trim']();if(!_0x10197f)return _0x4e9242;let _0x28af43=_0x10197f;try{_0x28af43=decodeURIComponent(_0x10197f);}catch{}return']('+_0x2df190+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x28af43)+')';});return _0x4f2afd;}['renderMentions'](_0x3b29b3){if(!_0x3b29b3)return _0x3b29b3;return String(_0x3b29b3)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0xec8555,_0x3ebfa8,_0x1e8eaf)=>{const _0x2d14b1=this['escapeHtml'](_0x1e8eaf),_0x1f10be=this['escapeHtml'](_0x3ebfa8);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x1f10be+'\x22>@'+_0x2d14b1+'</span>';});}['startEdit'](_0x44f962){this['editingCommentId']=_0x44f962['id'],this['editor']['setValue'](_0x44f962['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 _0x102169=this['editor']['getValue']()?.['trim']();if(!_0x102169&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x4434d6=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x4434d6['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x20fbe7=>({'name':_0x20fbe7['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x38f7b4=await _0x4434d6['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x102169),_0x36cc77=this['comments']['findIndex'](_0x2e1e16=>_0x2e1e16['id']===this['editingCommentId']);_0x36cc77!==-0x1&&(this['comments'][_0x36cc77]=_0x38f7b4['comment']);}else{const _0x256dda=await _0x4434d6['addComment'](this['options']['taskId'],_0x102169);this['comments']['push'](_0x256dda['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x50f1aa){console['error']('Failed\x20to\x20save\x20comment:',_0x50f1aa),alert('Failed\x20to\x20save\x20comment:\x20'+_0x50f1aa['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x14f7a6){const _0x313b6f=await this['showDeleteConfirmModal']();if(!_0x313b6f)return;try{const _0x232119=this['options']['getAPI']();await _0x232119['deleteComment'](this['options']['taskId'],_0x14f7a6),this['comments']=this['comments']['filter'](_0x87810b=>_0x87810b['id']!==_0x14f7a6),this['renderComments'](),this['updateCount']();}catch(_0x1a7bbf){console['error']('Failed\x20to\x20delete\x20comment:',_0x1a7bbf),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x1a7bbf['message']);}}['showDeleteConfirmModal'](){return new Promise(_0xd2c237=>{const _0x278274=document['createElement']('div');_0x278274['className']='comments-confirm-modal',_0x278274['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'](_0x278274);const _0x2b916c=_0x4ef6f2=>{document['removeEventListener']('keydown',_0x48efc9),_0x278274['remove'](),_0xd2c237(_0x4ef6f2);},_0x48efc9=_0x4a6d11=>{if(_0x4a6d11['key']==='Escape')_0x2b916c(![]);};document['addEventListener']('keydown',_0x48efc9),_0x278274['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x2b916c(![])),_0x278274['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x2b916c(![])),_0x278274['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x2b916c(![])),_0x278274['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x2b916c(!![])),_0x278274['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x4181ab){this['submitBtn']['disabled']=_0x4181ab,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x4181ab,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x4181ab;}['updateCount'](){const _0x4ce8ff=this['comments']['length'],_0x198f36=this['container']['querySelector']('#comments-count-badge');_0x198f36&&(_0x198f36['textContent']=_0x4ce8ff,_0x198f36['hidden']=_0x4ce8ff===0x0);const _0x3125f9=this['container']['querySelector']('#comments-count');_0x3125f9&&(_0x3125f9['textContent']=_0x4ce8ff>0x0?'('+_0x4ce8ff+')':''),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(_0x4b93ad,_0x904b50={}){this['container']=_0x4b93ad,this['options']={'taskId':_0x904b50['taskId']||null,'currentUserId':_0x904b50['currentUserId']||null,'compact':_0x904b50['compact']||![],'skipHeader':_0x904b50['skipHeader']||![],'onCommentsLoaded':_0x904b50['onCommentsLoaded']||null,'onCommentsChanged':_0x904b50['onCommentsChanged']||null,'enableAttachments':_0x904b50['enableAttachments']||![],'getAPI':_0x904b50['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 _0x13bcb1=this['options']['getAPI'](),_0x59c8fe=await _0x13bcb1['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x59c8fe['attachments']||[];}catch(_0xf76f4d){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0xf76f4d),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 _0x3d6fb4=this['header']['querySelector']('.comments-toggle-btn');_0x3d6fb4['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 _0x562f5b=document['createElement']('div');_0x562f5b['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x562f5b['appendChild'](this['toolbar']);const _0x318e64=document['createElement']('div');_0x318e64['className']='comments-editor-placeholder',_0x562f5b['appendChild'](_0x318e64);const _0x379dfc=document['createElement']('div');_0x379dfc['className']='comments-input-actions',_0x379dfc['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'](_0x562f5b),this['inputSection']['appendChild'](_0x379dfc),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x318e64),this['submitBtn']=_0x379dfc['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x379dfc['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0x2654b8){const _0xa4aef=document['createElement']('textarea');_0xa4aef['placeholder']='Add\x20a\x20comment...',_0xa4aef['className']='comments-textarea',_0x2654b8['appendChild'](_0xa4aef);const _0x5262bf=window['MarkdownEditor'];if(!_0x5262bf){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0xe81ea0={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x2081a7=>{const _0x51ea31=_0x2081a7&&_0x2081a7['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x51ea31;},'fetchUsers':async()=>{const _0x10ebb3=this['options']['getAPI']();return _0x10ebb3['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0xe81ea0['onAddAttachments']=_0xc56f60=>{this['pendingAttachments']['push'](..._0xc56f60),this['submitBtn']['disabled']=![];},_0xe81ea0['resolveAttachmentUrl']=_0x11b6e7=>{const _0x3c6922=this['options']['getAPI']();return _0x3c6922['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x11b6e7);},_0xe81ea0['isAttachmentNameTaken']=_0x59604c=>{return this['pendingAttachments']['some'](_0x3e91a0=>_0x3e91a0['name']===_0x59604c)||this['existingAttachments']['some'](_0x5ee123=>_0x5ee123['name']===_0x59604c);});this['editor']=new _0x5262bf(_0xa4aef,_0xe81ea0);const _0x4943d2=this['editor']['editor'],_0x359a4f=this['editor']['toolbar'];_0x359a4f&&(_0x359a4f['classList']['add']('comments-toolbar-hidden'),_0x4943d2['addEventListener']('focus',()=>{_0x359a4f['classList']['remove']('comments-toolbar-hidden');}),_0x4943d2['addEventListener']('blur',_0x5845b2=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x359a4f['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x359a4f['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x2b4264=this['header']['querySelector']('.comments-chevron');_0x2b4264&&(_0x2b4264['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x3d0cfe){this['options']['taskId']=_0x3d0cfe,this['comments']=[],this['renderComments'](),_0x3d0cfe&&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 _0x418bd5=this['options']['getAPI'](),_0x5a71dc=await _0x418bd5['getComments'](this['options']['taskId']);this['comments']=_0x5a71dc['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x2fe41e){console['error']('Failed\x20to\x20load\x20comments:',_0x2fe41e),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'](_0xe4931a=>{const _0x1ae487=this['createCommentElement'](_0xe4931a);this['commentsList']['appendChild'](_0x1ae487);});}['createCommentElement'](_0x3e2cce){const _0x30046c=document['createElement']('div');_0x30046c['className']='comment-item',_0x30046c['dataset']['commentId']=_0x3e2cce['id'];const _0x4a11ec=this['options']['currentUserId']&&_0x3e2cce['author']?.['userId']===this['options']['currentUserId'],_0x1b4c32=this['formatDate'](_0x3e2cce['createdAt']),_0xc3305e=_0x3e2cce['updatedAt']!==_0x3e2cce['createdAt'],_0x4141f0=this['resolveAttachmentUrls'](_0x3e2cce['content']);let _0x122026=window['marked']?window['marked']['parse'](_0x4141f0):_0x4141f0;_0x122026=this['renderMentions'](_0x122026),_0x30046c['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'](_0x3e2cce['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x3e2cce['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1b4c32+(_0xc3305e?'\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'+(_0x4a11ec?'\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>'+_0x122026+'</div>\x0a\x20\x20\x20\x20';if(_0x4a11ec){const _0x2eb60b=_0x30046c['querySelector']('.comment-edit-btn'),_0x19c0e6=_0x30046c['querySelector']('.comment-delete-btn');_0x2eb60b?.['addEventListener']('click',()=>this['startEdit'](_0x3e2cce)),_0x19c0e6?.['addEventListener']('click',()=>this['deleteComment'](_0x3e2cce['id']));}return _0x30046c;}['formatDate'](_0x3f9245){const _0xb7ec15=new Date(_0x3f9245),_0x2da9f8=new Date(),_0xb732d1=_0x2da9f8-_0xb7ec15,_0x52e98a=Math['floor'](_0xb732d1/0xea60),_0x2738a5=Math['floor'](_0xb732d1/0x36ee80),_0x2f458c=Math['floor'](_0xb732d1/0x5265c00);if(_0x52e98a<0x1)return'just\x20now';if(_0x52e98a<0x3c)return _0x52e98a+'m\x20ago';if(_0x2738a5<0x18)return _0x2738a5+'h\x20ago';if(_0x2f458c<0x7)return _0x2f458c+'d\x20ago';return _0xb7ec15['toLocaleDateString']();}['escapeHtml'](_0x565c76){const _0x5c939d=document['createElement']('div');return _0x5c939d['textContent']=_0x565c76,_0x5c939d['innerHTML'];}['resolveAttachmentUrls'](_0x1225b1){if(!_0x1225b1||!this['options']['taskId'])return _0x1225b1;const _0x135b9e=this['options']['getAPI'](),_0x22c994=_0x135b9e['getBaseUrl']();let _0x28d947=String(_0x1225b1)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x13d470,_0x5e56f5)=>{const _0x45e0d3=String(_0x5e56f5||'')['trim']();if(!_0x45e0d3)return _0x13d470;let _0x5c791e=_0x45e0d3;try{_0x5c791e=decodeURIComponent(_0x45e0d3);}catch{}return']('+_0x22c994+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x5c791e)+')';});return _0x28d947;}['renderMentions'](_0x1e61ce){if(!_0x1e61ce)return _0x1e61ce;return String(_0x1e61ce)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x2b570a,_0x42a538,_0x34e503)=>{const _0x47d7fa=this['escapeHtml'](_0x34e503),_0x4751f1=this['escapeHtml'](_0x42a538);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x4751f1+'\x22>@'+_0x47d7fa+'</span>';});}['startEdit'](_0x53aa28){this['editingCommentId']=_0x53aa28['id'],this['editor']['setValue'](_0x53aa28['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 _0x2f6bc1=this['editor']['getValue']()?.['trim']();if(!_0x2f6bc1&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x4b67b5=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x4b67b5['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x5085da=>({'name':_0x5085da['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x4a00af=await _0x4b67b5['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x2f6bc1),_0x47f984=this['comments']['findIndex'](_0x18dce9=>_0x18dce9['id']===this['editingCommentId']);_0x47f984!==-0x1&&(this['comments'][_0x47f984]=_0x4a00af['comment']);}else{const _0x568e5d=await _0x4b67b5['addComment'](this['options']['taskId'],_0x2f6bc1);this['comments']['push'](_0x568e5d['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x24da0c){console['error']('Failed\x20to\x20save\x20comment:',_0x24da0c),alert('Failed\x20to\x20save\x20comment:\x20'+_0x24da0c['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x4fab08){const _0x249763=await this['showDeleteConfirmModal']();if(!_0x249763)return;try{const _0x5bc429=this['options']['getAPI']();await _0x5bc429['deleteComment'](this['options']['taskId'],_0x4fab08),this['comments']=this['comments']['filter'](_0x2ad37c=>_0x2ad37c['id']!==_0x4fab08),this['renderComments'](),this['updateCount']();}catch(_0x5c6aa8){console['error']('Failed\x20to\x20delete\x20comment:',_0x5c6aa8),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x5c6aa8['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x54c37a=>{const _0x378459=document['createElement']('div');_0x378459['className']='comments-confirm-modal',_0x378459['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'](_0x378459);const _0x525354=_0x50ccd5=>{document['removeEventListener']('keydown',_0x4752ab),_0x378459['remove'](),_0x54c37a(_0x50ccd5);},_0x4752ab=_0x3f6cfc=>{if(_0x3f6cfc['key']==='Escape')_0x525354(![]);};document['addEventListener']('keydown',_0x4752ab),_0x378459['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x525354(![])),_0x378459['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x525354(![])),_0x378459['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x525354(![])),_0x378459['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x525354(!![])),_0x378459['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x5d6938){this['submitBtn']['disabled']=_0x5d6938,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x5d6938,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x5d6938;}['updateCount'](){const _0x50872f=this['comments']['length'],_0x6f1a82=this['container']['querySelector']('#comments-count-badge');_0x6f1a82&&(_0x6f1a82['textContent']=_0x50872f,_0x6f1a82['hidden']=_0x50872f===0x0);const _0x285fd7=this['container']['querySelector']('#comments-count');_0x285fd7&&(_0x285fd7['textContent']=_0x50872f>0x0?'('+_0x50872f+')':''),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(_0x3d32fa){const _0x49b0f7=[],_0x3fb7ba=_0x3d32fa['split']('\x0a');let _0x16a567=null,_0x2b7062=null;for(const _0x2e8efa of _0x3fb7ba){if(_0x2e8efa['startsWith']('diff\x20--git')){_0x16a567&&_0x2b7062&&_0x16a567['hunks']['push'](_0x2b7062);_0x16a567&&_0x49b0f7['push'](_0x16a567);const _0xcdc2b4=_0x2e8efa['match'](/diff --git a\/(.+?) b\/(.+)/);_0x16a567={'oldPath':_0xcdc2b4?_0xcdc2b4[0x1]:'','newPath':_0xcdc2b4?_0xcdc2b4[0x2]:'','hunks':[],'isDeleted':![]},_0x2b7062=null;}else{if(_0x2e8efa['startsWith']('deleted\x20file\x20mode')&&_0x16a567)_0x16a567['isDeleted']=!![];else{if(_0x2e8efa['startsWith']('@@'))_0x2b7062&&_0x16a567&&_0x16a567['hunks']['push'](_0x2b7062),_0x2b7062={'header':_0x2e8efa,'lines':[]};else _0x2b7062&&_0x2b7062['lines']['push'](_0x2e8efa);}}}return _0x16a567&&_0x2b7062&&_0x16a567['hunks']['push'](_0x2b7062),_0x16a567&&_0x49b0f7['push'](_0x16a567),_0x49b0f7;}export function parseHunkHeader(_0x3edc7e){const _0x3df7af=_0x3edc7e['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x3df7af)return{'oldStart':parseInt(_0x3df7af[0x1],0xa),'newStart':parseInt(_0x3df7af[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0xd8af11,_0x212fd1){const _0x3d3d43=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x3d3d43&&_0x212fd1)try{const _0x348675=_0x3d3d43['getLanguage'](_0x212fd1)?_0x212fd1:null;if(_0x348675)return _0x3d3d43['highlight'](_0xd8af11,{'language':_0x348675})['value'];}catch(_0x37f37f){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x37f37f);}return Utils['escapeHtml'](_0xd8af11);}export function getFileLanguage(_0x2d30fc){const _0x54eeec=_0x2d30fc['split']('.')['pop']()['toLowerCase'](),_0x33c79c={'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 _0x33c79c[_0x54eeec]||null;}export function computeWordDiff(_0x34dba4,_0x1e0338){const _0x653491=_0x3862cb=>{const _0x13fd93=[];let _0x391da3='',_0x56c6f1=![];for(let _0x288f71=0x0;_0x288f71<_0x3862cb['length'];_0x288f71++){const _0x5581d1=_0x3862cb[_0x288f71],_0x274e00=/\s/['test'](_0x5581d1);if(_0x391da3==='')_0x391da3=_0x5581d1,_0x56c6f1=_0x274e00;else _0x274e00===_0x56c6f1?_0x391da3+=_0x5581d1:(_0x13fd93['push'](_0x391da3),_0x391da3=_0x5581d1,_0x56c6f1=_0x274e00);}return _0x391da3&&_0x13fd93['push'](_0x391da3),_0x13fd93;},_0x2b0d95=_0x653491(_0x34dba4),_0x3c930b=_0x653491(_0x1e0338),_0xf7e5ce=_0x2b0d95['length'],_0x4ade98=_0x3c930b['length'],_0x5247dc=Array(_0xf7e5ce+0x1)['fill'](null)['map'](()=>Array(_0x4ade98+0x1)['fill'](0x0));for(let _0x303932=0x1;_0x303932<=_0xf7e5ce;_0x303932++){for(let _0xe8d587=0x1;_0xe8d587<=_0x4ade98;_0xe8d587++){_0x2b0d95[_0x303932-0x1]===_0x3c930b[_0xe8d587-0x1]?_0x5247dc[_0x303932][_0xe8d587]=_0x5247dc[_0x303932-0x1][_0xe8d587-0x1]+0x1:_0x5247dc[_0x303932][_0xe8d587]=Math['max'](_0x5247dc[_0x303932-0x1][_0xe8d587],_0x5247dc[_0x303932][_0xe8d587-0x1]);}}const _0x5d4119={'old':[],'new':[]};let _0x22e6bc=_0xf7e5ce,_0x367c31=_0x4ade98;const _0x5a5d2f=[],_0x14b602=[];while(_0x22e6bc>0x0||_0x367c31>0x0){if(_0x22e6bc>0x0&&_0x367c31>0x0&&_0x2b0d95[_0x22e6bc-0x1]===_0x3c930b[_0x367c31-0x1])_0x5a5d2f['unshift']({'type':'equal','text':_0x2b0d95[_0x22e6bc-0x1]}),_0x14b602['unshift']({'type':'equal','text':_0x3c930b[_0x367c31-0x1]}),_0x22e6bc--,_0x367c31--;else{if(_0x367c31>0x0&&(_0x22e6bc===0x0||_0x5247dc[_0x22e6bc][_0x367c31-0x1]>=_0x5247dc[_0x22e6bc-0x1][_0x367c31]))_0x14b602['unshift']({'type':'insert','text':_0x3c930b[_0x367c31-0x1]}),_0x367c31--;else _0x22e6bc>0x0&&(_0x5a5d2f['unshift']({'type':'delete','text':_0x2b0d95[_0x22e6bc-0x1]}),_0x22e6bc--);}}return _0x5d4119['old']=_0x5a5d2f,_0x5d4119['new']=_0x14b602,_0x5d4119;}export function renderDiffLineWithWordHighlight(_0x3a4525,_0x4db9f3,_0x548315,_0x430a78){if(!_0x4db9f3||_0x4db9f3['length']===0x0)return highlightDiffLine(_0x3a4525,_0x430a78);let _0x4d474c='';const _0x5c17b4=_0x548315==='add'?'diff-word-add':'diff-word-remove',_0x1bcdb0=_0x548315==='add'?'insert':'delete';for(const _0x271fd8 of _0x4db9f3){const _0x229c95=Utils['escapeHtml'](_0x271fd8['text']);_0x271fd8['type']===_0x1bcdb0?_0x4d474c+='<span\x20class=\x22'+_0x5c17b4+'\x22>'+_0x229c95+'</span>':_0x4d474c+=_0x229c95;}return _0x4d474c;}export function calculateDiffStats(_0x464400){let _0x30acbd=0x0,_0xd9d04f=0x0,_0x4ca01d=0x0;return _0x464400['forEach'](_0x5dacd7=>{let _0x3d6a39=0x0,_0x3d050a=0x0;_0x5dacd7['hunks']['forEach'](_0x30e46e=>{_0x30e46e['lines']['forEach'](_0xc951c7=>{if(_0xc951c7['startsWith']('+'))_0x3d6a39+=0x1;else{if(_0xc951c7['startsWith']('-'))_0x3d050a+=0x1;}});}),(_0x3d6a39+_0x3d050a>0x0||_0x5dacd7['isDeleted'])&&(_0x4ca01d+=0x1),_0x30acbd+=_0x3d6a39,_0xd9d04f+=_0x3d050a;}),{'additions':_0x30acbd,'deletions':_0xd9d04f,'files':_0x4ca01d};}export function getFileStatus(_0x1a6d8b,_0x41ef3d,_0x5d770f){if(_0x1a6d8b['isDeleted'])return'deleted';if(_0x41ef3d>0x0&&_0x5d770f===0x0)return'added';return'modified';}export function safeBase64(_0x1e00a3){try{return btoa(unescape(encodeURIComponent(_0x1e00a3)));}catch(_0x40beab){return btoa(_0x1e00a3);}}export function getStorageKey(_0x57bfcd,_0x2e660a){return _0x57bfcd+'-'+safeBase64(_0x2e660a);}export function getCollapsedState(_0x6abeb5,_0x509190){const _0x2d95a7=localStorage['getItem'](getStorageKey(_0x6abeb5,_0x509190));return _0x2d95a7==='true';}export function renderUnifiedDiff(_0x2761e4,_0x57a131){return _0x2761e4['map']((_0x3708eb,_0x376fbf)=>{const _0x1c0d70=_0x3708eb['newPath']||_0x3708eb['oldPath']||'unknown',_0x592f0e='diff-'+_0x57a131+'-'+_0x376fbf,_0x5e8833=getFileLanguage(_0x1c0d70),{additions:_0x59dbfc,deletions:_0x3b4b34}=calculateDiffStats([_0x3708eb]),_0x4ecdeb=getCollapsedState(_0x57a131,_0x1c0d70),_0x230326=getFileStatus(_0x3708eb,_0x59dbfc,_0x3b4b34),_0x4d7863=_0x230326==='added'?'A':_0x230326==='deleted'?'D':'M',_0x12ab92=_0x3708eb['hunks']['map'](_0xefb0c2=>{const {oldStart:_0x3793cc,newStart:_0x5610a8}=parseHunkHeader(_0xefb0c2['header']);let _0x10a5f8=_0x3793cc,_0x36cbf3=_0x5610a8;const _0x5366ea=_0xefb0c2['lines']['map'](_0x2e2733=>({'line':_0x2e2733,'type':_0x2e2733['startsWith']('+')?'add':_0x2e2733['startsWith']('-')?'remove':_0x2e2733['startsWith']('\x5c')?'meta':'context'}));let _0x42cc2d=0x0;while(_0x42cc2d<_0x5366ea['length']){if(_0x5366ea[_0x42cc2d]['type']==='remove'){let _0x5a9818=_0x42cc2d,_0x3609d1=_0x42cc2d;while(_0x3609d1<_0x5366ea['length']&&_0x5366ea[_0x3609d1]['type']==='remove')_0x3609d1++;let _0x146d57=_0x3609d1,_0x462433=_0x146d57;while(_0x462433<_0x5366ea['length']&&_0x5366ea[_0x462433]['type']==='add')_0x462433++;const _0x4ef734=_0x3609d1-_0x5a9818,_0x3d4fec=_0x462433-_0x146d57,_0x469f35=Math['min'](_0x4ef734,_0x3d4fec);for(let _0x217755=0x0;_0x217755<_0x469f35;_0x217755++){const _0x27442a=_0x5366ea[_0x5a9818+_0x217755]['line']['substring'](0x1),_0xfe2b2b=_0x5366ea[_0x146d57+_0x217755]['line']['substring'](0x1),_0x2be237=computeWordDiff(_0x27442a,_0xfe2b2b);_0x5366ea[_0x5a9818+_0x217755]['wordDiff']=_0x2be237['old'],_0x5366ea[_0x146d57+_0x217755]['wordDiff']=_0x2be237['new'];}_0x42cc2d=_0x462433;}else _0x42cc2d++;}const _0x11d398=_0x5366ea['map'](_0x324727=>{const _0x554965=_0x324727['line'];if(_0x554965['startsWith']('+')){const _0x3f6d99=_0x554965['substring'](0x1),_0x4dd5ca=_0x324727['wordDiff']?renderDiffLineWithWordHighlight(_0x3f6d99,_0x324727['wordDiff'],'add',_0x5e8833):highlightDiffLine(_0x3f6d99,_0x5e8833),_0x48365b='<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>'+_0x36cbf3+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x4dd5ca+'</span></div>';return _0x36cbf3+=0x1,_0x48365b;}if(_0x554965['startsWith']('-')){const _0x74ab41=_0x554965['substring'](0x1),_0x49e3b1=_0x324727['wordDiff']?renderDiffLineWithWordHighlight(_0x74ab41,_0x324727['wordDiff'],'remove',_0x5e8833):highlightDiffLine(_0x74ab41,_0x5e8833),_0x53bc6e='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x10a5f8+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x49e3b1+'</span></div>';return _0x10a5f8+=0x1,_0x53bc6e;}if(_0x554965['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'](_0x554965)+'</span></div>';const _0x552443=_0x554965['startsWith']('\x20')?_0x554965['substring'](0x1):_0x554965,_0x204bbb=highlightDiffLine(_0x552443,_0x5e8833),_0x13cbc2='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x10a5f8+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x36cbf3+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x204bbb+'</span></div>';return _0x10a5f8+=0x1,_0x36cbf3+=0x1,_0x13cbc2;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0xefb0c2['header'])+'</div>'+_0x11d398+'</div>';})['join'](''),_0x5a9f81=_0x12ab92||'<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-'+_0x592f0e+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x592f0e+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x1c0d70)+'\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'+_0x230326+'\x22>'+_0x4d7863+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x1c0d70)+'</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>+'+_0x59dbfc+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x3b4b34+'</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'+_0x592f0e+'\x22\x20data-collapsed=\x22'+_0x4ecdeb+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x4ecdeb?'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'+(_0x4ecdeb?'collapsed':'')+'\x22\x20id=\x22'+_0x592f0e+'\x22>'+_0x5a9f81+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
1
+ import{Utils}from'./app.js';export function parsePatchContent(_0x331731){const _0x21967f=[],_0x3e6b9f=_0x331731['split']('\x0a');let _0x197710=null,_0xb9b032=null;for(const _0x6d61d2 of _0x3e6b9f){if(_0x6d61d2['startsWith']('diff\x20--git')){_0x197710&&_0xb9b032&&_0x197710['hunks']['push'](_0xb9b032);_0x197710&&_0x21967f['push'](_0x197710);const _0xdc2bb4=_0x6d61d2['match'](/diff --git a\/(.+?) b\/(.+)/);_0x197710={'oldPath':_0xdc2bb4?_0xdc2bb4[0x1]:'','newPath':_0xdc2bb4?_0xdc2bb4[0x2]:'','hunks':[],'isDeleted':![]},_0xb9b032=null;}else{if(_0x6d61d2['startsWith']('deleted\x20file\x20mode')&&_0x197710)_0x197710['isDeleted']=!![];else{if(_0x6d61d2['startsWith']('@@'))_0xb9b032&&_0x197710&&_0x197710['hunks']['push'](_0xb9b032),_0xb9b032={'header':_0x6d61d2,'lines':[]};else _0xb9b032&&_0xb9b032['lines']['push'](_0x6d61d2);}}}return _0x197710&&_0xb9b032&&_0x197710['hunks']['push'](_0xb9b032),_0x197710&&_0x21967f['push'](_0x197710),_0x21967f;}export function parseHunkHeader(_0x3ba3a4){const _0x58979e=_0x3ba3a4['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x58979e)return{'oldStart':parseInt(_0x58979e[0x1],0xa),'newStart':parseInt(_0x58979e[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x166e6c,_0x2817eb){const _0x2e4c23=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x2e4c23&&_0x2817eb)try{const _0x2936bb=_0x2e4c23['getLanguage'](_0x2817eb)?_0x2817eb:null;if(_0x2936bb)return _0x2e4c23['highlight'](_0x166e6c,{'language':_0x2936bb})['value'];}catch(_0x40fce0){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x40fce0);}return Utils['escapeHtml'](_0x166e6c);}export function getFileLanguage(_0x462ecc){const _0xb83217=_0x462ecc['split']('.')['pop']()['toLowerCase'](),_0x423104={'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 _0x423104[_0xb83217]||null;}export function computeWordDiff(_0x223801,_0x13877b){const _0x513180=_0x10e7d8=>{const _0x3e3597=[];let _0x60776f='',_0x3eb754=![];for(let _0x5596f3=0x0;_0x5596f3<_0x10e7d8['length'];_0x5596f3++){const _0x304e82=_0x10e7d8[_0x5596f3],_0x420697=/\s/['test'](_0x304e82);if(_0x60776f==='')_0x60776f=_0x304e82,_0x3eb754=_0x420697;else _0x420697===_0x3eb754?_0x60776f+=_0x304e82:(_0x3e3597['push'](_0x60776f),_0x60776f=_0x304e82,_0x3eb754=_0x420697);}return _0x60776f&&_0x3e3597['push'](_0x60776f),_0x3e3597;},_0x1a4990=_0x513180(_0x223801),_0x52845c=_0x513180(_0x13877b),_0x28a2cd=_0x1a4990['length'],_0x3c1a5f=_0x52845c['length'],_0x523c43=Array(_0x28a2cd+0x1)['fill'](null)['map'](()=>Array(_0x3c1a5f+0x1)['fill'](0x0));for(let _0x394ff9=0x1;_0x394ff9<=_0x28a2cd;_0x394ff9++){for(let _0x2b063b=0x1;_0x2b063b<=_0x3c1a5f;_0x2b063b++){_0x1a4990[_0x394ff9-0x1]===_0x52845c[_0x2b063b-0x1]?_0x523c43[_0x394ff9][_0x2b063b]=_0x523c43[_0x394ff9-0x1][_0x2b063b-0x1]+0x1:_0x523c43[_0x394ff9][_0x2b063b]=Math['max'](_0x523c43[_0x394ff9-0x1][_0x2b063b],_0x523c43[_0x394ff9][_0x2b063b-0x1]);}}const _0x56fcef={'old':[],'new':[]};let _0x568d4b=_0x28a2cd,_0x35f8f8=_0x3c1a5f;const _0x32131b=[],_0x230eb0=[];while(_0x568d4b>0x0||_0x35f8f8>0x0){if(_0x568d4b>0x0&&_0x35f8f8>0x0&&_0x1a4990[_0x568d4b-0x1]===_0x52845c[_0x35f8f8-0x1])_0x32131b['unshift']({'type':'equal','text':_0x1a4990[_0x568d4b-0x1]}),_0x230eb0['unshift']({'type':'equal','text':_0x52845c[_0x35f8f8-0x1]}),_0x568d4b--,_0x35f8f8--;else{if(_0x35f8f8>0x0&&(_0x568d4b===0x0||_0x523c43[_0x568d4b][_0x35f8f8-0x1]>=_0x523c43[_0x568d4b-0x1][_0x35f8f8]))_0x230eb0['unshift']({'type':'insert','text':_0x52845c[_0x35f8f8-0x1]}),_0x35f8f8--;else _0x568d4b>0x0&&(_0x32131b['unshift']({'type':'delete','text':_0x1a4990[_0x568d4b-0x1]}),_0x568d4b--);}}return _0x56fcef['old']=_0x32131b,_0x56fcef['new']=_0x230eb0,_0x56fcef;}export function renderDiffLineWithWordHighlight(_0x50af74,_0xc40dca,_0x4bd6ee,_0x57256f){if(!_0xc40dca||_0xc40dca['length']===0x0)return highlightDiffLine(_0x50af74,_0x57256f);let _0x301dca='';const _0x663920=_0x4bd6ee==='add'?'diff-word-add':'diff-word-remove',_0x36de68=_0x4bd6ee==='add'?'insert':'delete';for(const _0xf57e2e of _0xc40dca){const _0x4e8a42=Utils['escapeHtml'](_0xf57e2e['text']);_0xf57e2e['type']===_0x36de68?_0x301dca+='<span\x20class=\x22'+_0x663920+'\x22>'+_0x4e8a42+'</span>':_0x301dca+=_0x4e8a42;}return _0x301dca;}export function calculateDiffStats(_0x6665c5){let _0x441d6b=0x0,_0x1baf03=0x0,_0x2fea2e=0x0;return _0x6665c5['forEach'](_0x232ee4=>{let _0x5502d7=0x0,_0x2304cd=0x0;_0x232ee4['hunks']['forEach'](_0x1bd205=>{_0x1bd205['lines']['forEach'](_0x2f74df=>{if(_0x2f74df['startsWith']('+'))_0x5502d7+=0x1;else{if(_0x2f74df['startsWith']('-'))_0x2304cd+=0x1;}});}),(_0x5502d7+_0x2304cd>0x0||_0x232ee4['isDeleted'])&&(_0x2fea2e+=0x1),_0x441d6b+=_0x5502d7,_0x1baf03+=_0x2304cd;}),{'additions':_0x441d6b,'deletions':_0x1baf03,'files':_0x2fea2e};}export function getFileStatus(_0x5d019d,_0x3b5a1f,_0x1a61e8){if(_0x5d019d['isDeleted'])return'deleted';if(_0x3b5a1f>0x0&&_0x1a61e8===0x0)return'added';return'modified';}export function safeBase64(_0xecff43){try{return btoa(unescape(encodeURIComponent(_0xecff43)));}catch(_0x53f4a8){return btoa(_0xecff43);}}export function getStorageKey(_0x5ee82a,_0x23baf6){return _0x5ee82a+'-'+safeBase64(_0x23baf6);}export function getCollapsedState(_0x14287b,_0x3dff8d){const _0x54ed0c=localStorage['getItem'](getStorageKey(_0x14287b,_0x3dff8d));return _0x54ed0c==='true';}export function renderUnifiedDiff(_0x57ba9a,_0x4ddb17){return _0x57ba9a['map']((_0x241cd0,_0x550be2)=>{const _0x1da72f=_0x241cd0['newPath']||_0x241cd0['oldPath']||'unknown',_0x4ed433='diff-'+_0x4ddb17+'-'+_0x550be2,_0x258d6f=getFileLanguage(_0x1da72f),{additions:_0x2a6acb,deletions:_0x4df204}=calculateDiffStats([_0x241cd0]),_0x43eb33=getCollapsedState(_0x4ddb17,_0x1da72f),_0x5ba65d=getFileStatus(_0x241cd0,_0x2a6acb,_0x4df204),_0x2a2d76=_0x5ba65d==='added'?'A':_0x5ba65d==='deleted'?'D':'M',_0x2c32b6=_0x241cd0['hunks']['map'](_0x3adea1=>{const {oldStart:_0x3db60e,newStart:_0x30e2da}=parseHunkHeader(_0x3adea1['header']);let _0x37187f=_0x3db60e,_0x5961f6=_0x30e2da;const _0x5609ef=_0x3adea1['lines']['map'](_0x23bd2a=>({'line':_0x23bd2a,'type':_0x23bd2a['startsWith']('+')?'add':_0x23bd2a['startsWith']('-')?'remove':_0x23bd2a['startsWith']('\x5c')?'meta':'context'}));let _0x3eae38=0x0;while(_0x3eae38<_0x5609ef['length']){if(_0x5609ef[_0x3eae38]['type']==='remove'){let _0x4e173d=_0x3eae38,_0x48d1d9=_0x3eae38;while(_0x48d1d9<_0x5609ef['length']&&_0x5609ef[_0x48d1d9]['type']==='remove')_0x48d1d9++;let _0x3f212d=_0x48d1d9,_0x17eeca=_0x3f212d;while(_0x17eeca<_0x5609ef['length']&&_0x5609ef[_0x17eeca]['type']==='add')_0x17eeca++;const _0x166a94=_0x48d1d9-_0x4e173d,_0x5afc08=_0x17eeca-_0x3f212d,_0x1ff45c=Math['min'](_0x166a94,_0x5afc08);for(let _0x2388ff=0x0;_0x2388ff<_0x1ff45c;_0x2388ff++){const _0x3ae84c=_0x5609ef[_0x4e173d+_0x2388ff]['line']['substring'](0x1),_0x1d8631=_0x5609ef[_0x3f212d+_0x2388ff]['line']['substring'](0x1),_0x36c5dc=computeWordDiff(_0x3ae84c,_0x1d8631);_0x5609ef[_0x4e173d+_0x2388ff]['wordDiff']=_0x36c5dc['old'],_0x5609ef[_0x3f212d+_0x2388ff]['wordDiff']=_0x36c5dc['new'];}_0x3eae38=_0x17eeca;}else _0x3eae38++;}const _0x237b52=_0x5609ef['map'](_0x5b3099=>{const _0x4c7c5a=_0x5b3099['line'];if(_0x4c7c5a['startsWith']('+')){const _0x466ef7=_0x4c7c5a['substring'](0x1),_0x438042=_0x5b3099['wordDiff']?renderDiffLineWithWordHighlight(_0x466ef7,_0x5b3099['wordDiff'],'add',_0x258d6f):highlightDiffLine(_0x466ef7,_0x258d6f),_0xaf45b9='<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>'+_0x5961f6+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x438042+'</span></div>';return _0x5961f6+=0x1,_0xaf45b9;}if(_0x4c7c5a['startsWith']('-')){const _0x48909b=_0x4c7c5a['substring'](0x1),_0x617f35=_0x5b3099['wordDiff']?renderDiffLineWithWordHighlight(_0x48909b,_0x5b3099['wordDiff'],'remove',_0x258d6f):highlightDiffLine(_0x48909b,_0x258d6f),_0x27f5fc='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x37187f+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x617f35+'</span></div>';return _0x37187f+=0x1,_0x27f5fc;}if(_0x4c7c5a['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'](_0x4c7c5a)+'</span></div>';const _0x5a2520=_0x4c7c5a['startsWith']('\x20')?_0x4c7c5a['substring'](0x1):_0x4c7c5a,_0x1fad85=highlightDiffLine(_0x5a2520,_0x258d6f),_0x4e121d='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x37187f+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x5961f6+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x1fad85+'</span></div>';return _0x37187f+=0x1,_0x5961f6+=0x1,_0x4e121d;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x3adea1['header'])+'</div>'+_0x237b52+'</div>';})['join'](''),_0x1152e4=_0x2c32b6||'<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-'+_0x4ed433+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x4ed433+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x1da72f)+'\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'+_0x5ba65d+'\x22>'+_0x2a2d76+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x1da72f)+'</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>+'+_0x2a6acb+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x4df204+'</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'+_0x4ed433+'\x22\x20data-collapsed=\x22'+_0x43eb33+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x43eb33?'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'+(_0x43eb33?'collapsed':'')+'\x22\x20id=\x22'+_0x4ed433+'\x22>'+_0x1152e4+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}