@creaditor/web-starterkit 1.0.36 → 1.0.40

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 (285) hide show
  1. package/dist/112.creaditor.bundle.js.gz +0 -0
  2. package/dist/1142.creaditor.bundle.js.gz +0 -0
  3. package/dist/1204.creaditor.bundle.js.gz +0 -0
  4. package/dist/1271.creaditor.bundle.js.gz +0 -0
  5. package/dist/1317.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  6. package/dist/1317.creaditor.bundle.js.gz +0 -0
  7. package/dist/1334.creaditor.bundle.js.gz +0 -0
  8. package/dist/1396.creaditor.bundle.js.gz +0 -0
  9. package/dist/1403.creaditor.bundle.js.gz +0 -0
  10. package/dist/1456.creaditor.bundle.js.gz +0 -0
  11. package/dist/1529.creaditor.bundle.js.gz +0 -0
  12. package/dist/168.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  13. package/dist/168.creaditor.bundle.js.gz +0 -0
  14. package/dist/170.creaditor.bundle.js.gz +0 -0
  15. package/dist/175.creaditor.bundle.js.gz +0 -0
  16. package/dist/1972.creaditor.bundle.js.gz +0 -0
  17. package/dist/2001.creaditor.bundle.js +16 -16
  18. package/dist/2001.creaditor.bundle.js.gz +0 -0
  19. package/dist/211.creaditor.bundle.js.gz +0 -0
  20. package/dist/2112.creaditor.bundle.js.gz +0 -0
  21. package/dist/2154.creaditor.bundle.js.gz +0 -0
  22. package/dist/2234.creaditor.bundle.js.gz +0 -0
  23. package/dist/2298.creaditor.bundle.js.gz +0 -0
  24. package/dist/235.creaditor.bundle.js.gz +0 -0
  25. package/dist/2350.creaditor.bundle.js.gz +0 -0
  26. package/dist/2377.creaditor.bundle.js.gz +0 -0
  27. package/dist/2384.creaditor.bundle.js.gz +0 -0
  28. package/dist/2397.creaditor.bundle.js.gz +0 -0
  29. package/dist/2409.creaditor.bundle.js.gz +0 -0
  30. package/dist/2547.creaditor.bundle.js.gz +0 -0
  31. package/dist/2550.creaditor.bundle.js.gz +0 -0
  32. package/dist/2590.creaditor.bundle.js.gz +0 -0
  33. package/dist/2682.creaditor.bundle.js +195 -0
  34. package/dist/{7051.creaditor.bundle.js.LICENSE.txt → 2682.creaditor.bundle.js.LICENSE.txt} +0 -6
  35. package/dist/{7051.creaditor.bundle.js.LICENSE.txt.gz → 2682.creaditor.bundle.js.LICENSE.txt.gz} +0 -0
  36. package/dist/2682.creaditor.bundle.js.gz +0 -0
  37. package/dist/2706.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  38. package/dist/2706.creaditor.bundle.js.gz +0 -0
  39. package/dist/271.creaditor.bundle.js.gz +0 -0
  40. package/dist/2717.creaditor.bundle.js.gz +0 -0
  41. package/dist/2765.creaditor.bundle.js.gz +0 -0
  42. package/dist/2773.creaditor.bundle.js.gz +0 -0
  43. package/dist/2833.creaditor.bundle.js.gz +0 -0
  44. package/dist/2837.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  45. package/dist/2837.creaditor.bundle.js.gz +0 -0
  46. package/dist/2956.creaditor.bundle.js.gz +0 -0
  47. package/dist/2963.creaditor.bundle.js.gz +0 -0
  48. package/dist/3105.creaditor.bundle.js.gz +0 -0
  49. package/dist/3233.creaditor.bundle.js.gz +0 -0
  50. package/dist/3418.creaditor.bundle.js.gz +0 -0
  51. package/dist/3521.creaditor.bundle.js.gz +0 -0
  52. package/dist/353.creaditor.bundle.js.gz +0 -0
  53. package/dist/3545.creaditor.bundle.js.gz +0 -0
  54. package/dist/3553.creaditor.bundle.js.gz +0 -0
  55. package/dist/3606.creaditor.bundle.js.gz +0 -0
  56. package/dist/3792.creaditor.bundle.js.gz +0 -0
  57. package/dist/380.creaditor.bundle.js.gz +0 -0
  58. package/dist/3827.creaditor.bundle.js.gz +0 -0
  59. package/dist/3847.creaditor.bundle.js +8 -6
  60. package/dist/3847.creaditor.bundle.js.gz +0 -0
  61. package/dist/3875.creaditor.bundle.js.gz +0 -0
  62. package/dist/3971.creaditor.bundle.js.gz +0 -0
  63. package/dist/4061.creaditor.bundle.js.gz +0 -0
  64. package/dist/407.creaditor.bundle.js.gz +0 -0
  65. package/dist/4074.creaditor.bundle.js.gz +0 -0
  66. package/dist/4100.creaditor.bundle.js.gz +0 -0
  67. package/dist/4109.creaditor.bundle.js.gz +0 -0
  68. package/dist/4114.creaditor.bundle.js.gz +0 -0
  69. package/dist/4161.creaditor.bundle.js.gz +0 -0
  70. package/dist/4186.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  71. package/dist/4186.creaditor.bundle.js.gz +0 -0
  72. package/dist/4288.creaditor.bundle.js.gz +0 -0
  73. package/dist/4413.creaditor.bundle.js.gz +0 -0
  74. package/dist/4475.creaditor.bundle.js.gz +0 -0
  75. package/dist/453.creaditor.bundle.js.gz +0 -0
  76. package/dist/4615.creaditor.bundle.js.gz +0 -0
  77. package/dist/4639.creaditor.bundle.js.gz +0 -0
  78. package/dist/467.creaditor.bundle.js.gz +0 -0
  79. package/dist/4762.creaditor.bundle.js.gz +0 -0
  80. package/dist/4770.creaditor.bundle.js.gz +0 -0
  81. package/dist/4819.creaditor.bundle.js +235 -198
  82. package/dist/4819.creaditor.bundle.js.gz +0 -0
  83. package/dist/4947.creaditor.bundle.js.gz +0 -0
  84. package/dist/4987.creaditor.bundle.js.gz +0 -0
  85. package/dist/4988.creaditor.bundle.js.gz +0 -0
  86. package/dist/5119.creaditor.bundle.js.gz +0 -0
  87. package/dist/5133.creaditor.bundle.js.gz +0 -0
  88. package/dist/5156.creaditor.bundle.js +1 -1
  89. package/dist/5156.creaditor.bundle.js.gz +0 -0
  90. package/dist/5284.creaditor.bundle.js.gz +0 -0
  91. package/dist/5379.creaditor.bundle.js.gz +0 -0
  92. package/dist/5391.creaditor.bundle.js.gz +0 -0
  93. package/dist/5411.creaditor.bundle.js.gz +0 -0
  94. package/dist/5501.creaditor.bundle.js.gz +0 -0
  95. package/dist/5530.creaditor.bundle.js.gz +0 -0
  96. package/dist/5666.creaditor.bundle.js.gz +0 -0
  97. package/dist/567.creaditor.bundle.js.gz +0 -0
  98. package/dist/5713.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  99. package/dist/5713.creaditor.bundle.js.gz +0 -0
  100. package/dist/574.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  101. package/dist/574.creaditor.bundle.js.gz +0 -0
  102. package/dist/578.creaditor.bundle.js.gz +0 -0
  103. package/dist/5791.creaditor.bundle.js.gz +0 -0
  104. package/dist/5839.creaditor.bundle.js.gz +0 -0
  105. package/dist/5849.creaditor.bundle.js.gz +0 -0
  106. package/dist/5850.creaditor.bundle.js.gz +0 -0
  107. package/dist/5884.creaditor.bundle.js.gz +0 -0
  108. package/dist/59.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  109. package/dist/59.creaditor.bundle.js.gz +0 -0
  110. package/dist/5909.creaditor.bundle.js +19 -19
  111. package/dist/5909.creaditor.bundle.js.gz +0 -0
  112. package/dist/5926.creaditor.bundle.js.gz +0 -0
  113. package/dist/6036.creaditor.bundle.js.gz +0 -0
  114. package/dist/6216.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  115. package/dist/6216.creaditor.bundle.js.gz +0 -0
  116. package/dist/638.creaditor.bundle.js.gz +0 -0
  117. package/dist/6442.creaditor.bundle.js.gz +0 -0
  118. package/dist/6496.creaditor.bundle.js.gz +0 -0
  119. package/dist/653.creaditor.bundle.js.gz +0 -0
  120. package/dist/6751.creaditor.bundle.js.gz +0 -0
  121. package/dist/6814.creaditor.bundle.js.gz +0 -0
  122. package/dist/6937.creaditor.bundle.js.gz +0 -0
  123. package/dist/7055.creaditor.bundle.js.gz +0 -0
  124. package/dist/715.creaditor.bundle.js +4 -4
  125. package/dist/715.creaditor.bundle.js.gz +0 -0
  126. package/dist/7155.creaditor.bundle.js.gz +0 -0
  127. package/dist/7209.creaditor.bundle.js +32 -30
  128. package/dist/7209.creaditor.bundle.js.gz +0 -0
  129. package/dist/7238.creaditor.bundle.js.gz +0 -0
  130. package/dist/7255.creaditor.bundle.js.gz +0 -0
  131. package/dist/738.creaditor.bundle.js.gz +0 -0
  132. package/dist/7380.creaditor.bundle.js.gz +0 -0
  133. package/dist/7463.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  134. package/dist/7463.creaditor.bundle.js.gz +0 -0
  135. package/dist/7466.creaditor.bundle.js.gz +0 -0
  136. package/dist/752.creaditor.bundle.js.gz +0 -0
  137. package/dist/7523.creaditor.bundle.js.gz +0 -0
  138. package/dist/7564.creaditor.bundle.js.gz +0 -0
  139. package/dist/7654.creaditor.bundle.js.gz +0 -0
  140. package/dist/767.creaditor.bundle.js +26 -70
  141. package/dist/767.creaditor.bundle.js.gz +0 -0
  142. package/dist/7789.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  143. package/dist/7789.creaditor.bundle.js.gz +0 -0
  144. package/dist/7838.creaditor.bundle.js.gz +0 -0
  145. package/dist/7918.creaditor.bundle.js.gz +0 -0
  146. package/dist/7937.creaditor.bundle.js.gz +0 -0
  147. package/dist/7997.creaditor.bundle.js.gz +0 -0
  148. package/dist/8042.creaditor.bundle.js.gz +0 -0
  149. package/dist/8064.creaditor.bundle.js.gz +0 -0
  150. package/dist/8141.creaditor.bundle.js.gz +0 -0
  151. package/dist/8173.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  152. package/dist/8173.creaditor.bundle.js.gz +0 -0
  153. package/dist/8196.creaditor.bundle.js.gz +0 -0
  154. package/dist/823.creaditor.bundle.js.gz +0 -0
  155. package/dist/8250.creaditor.bundle.js.gz +0 -0
  156. package/dist/8251.creaditor.bundle.js.gz +0 -0
  157. package/dist/8299.creaditor.bundle.js.gz +0 -0
  158. package/dist/8315.creaditor.bundle.js.gz +0 -0
  159. package/dist/8443.creaditor.bundle.js.gz +0 -0
  160. package/dist/8516.creaditor.bundle.js.gz +0 -0
  161. package/dist/8533.creaditor.bundle.js.gz +0 -0
  162. package/dist/8547.creaditor.bundle.js.gz +0 -0
  163. package/dist/8570.creaditor.bundle.js.gz +0 -0
  164. package/dist/8646.creaditor.bundle.js +36 -37
  165. package/dist/8646.creaditor.bundle.js.gz +0 -0
  166. package/dist/8654.creaditor.bundle.js.gz +0 -0
  167. package/dist/8854.creaditor.bundle.js.gz +0 -0
  168. package/dist/8878.creaditor.bundle.js.gz +0 -0
  169. package/dist/8916.creaditor.bundle.js.gz +0 -0
  170. package/dist/8921.creaditor.bundle.js.gz +0 -0
  171. package/dist/898.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  172. package/dist/898.creaditor.bundle.js.gz +0 -0
  173. package/dist/8983.creaditor.bundle.js.gz +0 -0
  174. package/dist/9041.creaditor.bundle.js.gz +0 -0
  175. package/dist/9158.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  176. package/dist/9158.creaditor.bundle.js.gz +0 -0
  177. package/dist/9250.creaditor.bundle.js.gz +0 -0
  178. package/dist/9386.creaditor.bundle.js.gz +0 -0
  179. package/dist/9431.creaditor.bundle.js.gz +0 -0
  180. package/dist/9453.creaditor.bundle.js.gz +0 -0
  181. package/dist/9570.creaditor.bundle.js.gz +0 -0
  182. package/dist/9694.creaditor.bundle.js.gz +0 -0
  183. package/dist/975.creaditor.bundle.js.gz +0 -0
  184. package/dist/976.creaditor.bundle.js.gz +0 -0
  185. package/dist/9986.creaditor.bundle.js.gz +0 -0
  186. package/dist/9990.creaditor.bundle.js.gz +0 -0
  187. package/dist/9994.creaditor.bundle.js.gz +0 -0
  188. package/dist/creaditor.bundle.js +203 -180
  189. package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
  190. package/dist/creaditor.bundle.js.gz +0 -0
  191. package/dist/index.html.gz +0 -0
  192. package/dist/service-worker.js +1 -1
  193. package/dist/service-worker.js.gz +0 -0
  194. package/dist/workbox-f3063069.js.gz +0 -0
  195. package/package.json +2 -2
  196. package/dist/1260.creaditor.bundle.js +0 -459
  197. package/dist/1260.creaditor.bundle.js.gz +0 -0
  198. package/dist/1393.creaditor.bundle.js +0 -1
  199. package/dist/1393.creaditor.bundle.js.gz +0 -0
  200. package/dist/1452.creaditor.bundle.js +0 -23
  201. package/dist/1452.creaditor.bundle.js.gz +0 -0
  202. package/dist/1565.creaditor.bundle.js +0 -1216
  203. package/dist/1565.creaditor.bundle.js.gz +0 -0
  204. package/dist/1756.creaditor.bundle.js +0 -1
  205. package/dist/1756.creaditor.bundle.js.gz +0 -0
  206. package/dist/1936.creaditor.bundle.js +0 -177
  207. package/dist/1936.creaditor.bundle.js.LICENSE.txt +0 -29
  208. package/dist/1936.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  209. package/dist/1936.creaditor.bundle.js.gz +0 -0
  210. package/dist/2438.creaditor.bundle.js +0 -67
  211. package/dist/2438.creaditor.bundle.js.gz +0 -0
  212. package/dist/2834.creaditor.bundle.js +0 -14
  213. package/dist/2834.creaditor.bundle.js.LICENSE.txt +0 -5
  214. package/dist/2834.creaditor.bundle.js.gz +0 -0
  215. package/dist/307.creaditor.bundle.js +0 -23
  216. package/dist/307.creaditor.bundle.js.gz +0 -0
  217. package/dist/3095.creaditor.bundle.js +0 -194
  218. package/dist/3095.creaditor.bundle.js.gz +0 -0
  219. package/dist/365.creaditor.bundle.js +0 -26
  220. package/dist/365.creaditor.bundle.js.gz +0 -0
  221. package/dist/3778.creaditor.bundle.js +0 -1
  222. package/dist/3778.creaditor.bundle.js.gz +0 -0
  223. package/dist/3932.creaditor.bundle.js +0 -30
  224. package/dist/3932.creaditor.bundle.js.gz +0 -0
  225. package/dist/4217.creaditor.bundle.js +0 -105
  226. package/dist/4217.creaditor.bundle.js.gz +0 -0
  227. package/dist/453.creaditor.bundle.js.LICENSE.txt +0 -5
  228. package/dist/4569.creaditor.bundle.js +0 -887
  229. package/dist/4569.creaditor.bundle.js.gz +0 -0
  230. package/dist/4739.creaditor.bundle.js +0 -1
  231. package/dist/4739.creaditor.bundle.js.gz +0 -0
  232. package/dist/4970.creaditor.bundle.js +0 -1316
  233. package/dist/4970.creaditor.bundle.js.gz +0 -0
  234. package/dist/5340.creaditor.bundle.js +0 -157
  235. package/dist/5340.creaditor.bundle.js.gz +0 -0
  236. package/dist/5428.creaditor.bundle.js +0 -23
  237. package/dist/5428.creaditor.bundle.js.gz +0 -0
  238. package/dist/5813.creaditor.bundle.js +0 -613
  239. package/dist/5813.creaditor.bundle.js.LICENSE.txt +0 -10
  240. package/dist/5813.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  241. package/dist/5813.creaditor.bundle.js.gz +0 -0
  242. package/dist/6151.creaditor.bundle.js +0 -1
  243. package/dist/6151.creaditor.bundle.js.gz +0 -0
  244. package/dist/6459.creaditor.bundle.js +0 -23
  245. package/dist/6459.creaditor.bundle.js.gz +0 -0
  246. package/dist/6713.creaditor.bundle.js +0 -151
  247. package/dist/6713.creaditor.bundle.js.gz +0 -0
  248. package/dist/7051.creaditor.bundle.js +0 -162
  249. package/dist/7051.creaditor.bundle.js.gz +0 -0
  250. package/dist/763.creaditor.bundle.js +0 -1
  251. package/dist/763.creaditor.bundle.js.gz +0 -0
  252. package/dist/7759.creaditor.bundle.js +0 -25
  253. package/dist/7759.creaditor.bundle.js.gz +0 -0
  254. package/dist/8141.creaditor.bundle.js.LICENSE.txt +0 -5
  255. package/dist/8303.creaditor.bundle.js +0 -57
  256. package/dist/8303.creaditor.bundle.js.LICENSE.txt +0 -10
  257. package/dist/8303.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  258. package/dist/8303.creaditor.bundle.js.gz +0 -0
  259. package/dist/8305.creaditor.bundle.js +0 -32
  260. package/dist/8305.creaditor.bundle.js.gz +0 -0
  261. package/dist/8386.creaditor.bundle.js +0 -1420
  262. package/dist/8386.creaditor.bundle.js.gz +0 -0
  263. package/dist/84702e107adede1a967468c78921d455.mp4 +0 -0
  264. package/dist/8478.creaditor.bundle.js +0 -1
  265. package/dist/8478.creaditor.bundle.js.gz +0 -0
  266. package/dist/8676.creaditor.bundle.js +0 -24
  267. package/dist/8676.creaditor.bundle.js.gz +0 -0
  268. package/dist/88.creaditor.bundle.js +0 -1
  269. package/dist/88.creaditor.bundle.js.gz +0 -0
  270. package/dist/8876.creaditor.bundle.js +0 -25
  271. package/dist/8876.creaditor.bundle.js.LICENSE.txt +0 -32
  272. package/dist/8876.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  273. package/dist/8876.creaditor.bundle.js.gz +0 -0
  274. package/dist/9089.creaditor.bundle.js +0 -21
  275. package/dist/9089.creaditor.bundle.js.gz +0 -0
  276. package/dist/9162.creaditor.bundle.js +0 -24
  277. package/dist/9162.creaditor.bundle.js.gz +0 -0
  278. package/dist/9184.creaditor.bundle.js +0 -23
  279. package/dist/9184.creaditor.bundle.js.gz +0 -0
  280. package/dist/9193.creaditor.bundle.js +0 -1
  281. package/dist/9193.creaditor.bundle.js.gz +0 -0
  282. package/dist/9338.creaditor.bundle.js +0 -1
  283. package/dist/9338.creaditor.bundle.js.gz +0 -0
  284. package/dist/951.creaditor.bundle.js +0 -1
  285. package/dist/951.creaditor.bundle.js.gz +0 -0
@@ -1,22 +1,14 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,i){i.r(e),i.d(e,{NameAndSubjectPlugin:()=>p});var o=i(59929),n=i(49410);i(78533);function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1,r(),r(),r(),r(),r();const s=r()?"http://localhost:8000/api/v1/prompt/subject":"https://agent.creaditor.ai/api/v1/prompt/subject",a=r()?"http://localhost:8000/api/v1/prompt/subtitle":"https://agent.creaditor.ai/api/v1/prompt/subtitle";var l=Object.defineProperty,c=(t,e,i,o)=>{for(var n,r=void 0,s=t.length-1;s>=0;s--)(n=t[s])&&(r=n(e,i,r)||r);return r&&l(e,i,r),r};typeof window<"u"&&!window.__polymerElementsLoaded&&(window.__polymerElementsLoaded=!0,(async()=>{try{const t=["paper-dropdown-menu","paper-item","paper-listbox"].filter(t=>customElements.get(t));if(t.length>0)return void console.warn(`Polymer elements already loaded: ${t.join(", ")}. Skipping imports to prevent conflicts.`);if(customElements.get("dom-module"))return void console.warn("dom-module already defined, skipping Polymer element imports to prevent conflicts");await Promise.all([Promise.all([i.e(59),i.e(9158),i.e(7789),i.e(574)]).then(i.bind(i,50574)),i.e(898).then(i.bind(i,90898)),Promise.all([i.e(6216),i.e(7463)]).then(i.bind(i,97463))]),console.log("Polymer elements loaded successfully")}catch(t){console.warn("Failed to load Polymer elements:",t)}})().catch(console.error));const d="cdtr-name-and-subject-plugin",u=class extends o.WF{constructor(){super(...arguments),this.bgColor="#000",this.textColor="#000000",this.headerText="Details",this.nameLabel="Name",this.subjectLabel="Subject",this.subtitleLabel="Subtitle",this.saveButtonText="Save",this.subjectPlaceholder="Enter subject",this.mergeTags=[],this.name="",this.subject="",this.subtitle="",this.save=()=>{},this.isGeneratingSubject=!1,this.isGeneratingSubtitle=!1}getTextDirection(t){return/[\u0590-\u05FF]/.test(t)?"rtl":"ltr"}getPlaceholderStyle(){const t=this.getTextDirection(this.subjectPlaceholder);return`direction: ${t}; text-align: ${"rtl"===t?"right":"left"};`}handleSave(){"string"!=typeof this.subtitle&&(this.subtitle=""),"string"!=typeof this.subject&&(this.subject=""),this.dispatchEvent(new CustomEvent("save",{detail:{name:this.name,subject:this.subject,subtitle:this.subtitle}})),this.save(),setTimeout(()=>{var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.close()},200)}handleFieldClick(t){this.subject+=t.value,this.requestUpdate()}handleEmojiSelect(t){const e=t.detail.unicode;this.subject=this.subject+e,this.requestUpdate()}open(){var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.open()}focusInputs(t){var e;this.open();const i=null==(e=this.shadowRoot)?void 0:e.querySelectorAll("input");if(i)if(i.forEach(t=>t.classList.remove("shake")),t){const e=Array.from(i).find(e=>{var i;const o=e.previousElementSibling;return null==(i=null==o?void 0:o.textContent)?void 0:i.toLowerCase().includes(t.toLowerCase())});e&&(e.focus(),e.classList.add("shake"))}else i.forEach(t=>{t.focus(),t.classList.add("shake")})}handleGenerateSubject(){if(this.isGeneratingSubject)return;const t=this.subject||"";this.subject="",this.isGeneratingSubject=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>500){const t=Math.floor(250);e=e.slice(0,t)+e.slice(-t)}try{const i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:"write my subject",context:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);if(!i.body)throw new Error("Response body is null");const o=i.body.getReader(),n=new TextDecoder;try{for(;;){const{done:e,value:i}=await o.read();if(e)break;const r=n.decode(i,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const i=JSON.parse(e);i.text&&t(i.text)}catch{}}}finally{o.releaseLock()}}catch(t){throw console.error("Error generating subject:",t),t}})(t=>{this.subject+=t,this.requestUpdate()}).catch(()=>{this.subject=t}).finally(()=>{this.isGeneratingSubject=!1,this.requestUpdate()})}handleGenerateSubtitle(){if(this.isGeneratingSubtitle)return;const t=this.subtitle||"";this.subtitle="",this.isGeneratingSubtitle=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>1400){const t=Math.floor(700);e=e.slice(0,t)+e.slice(-t)}try{const i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);if(!i.body)throw new Error("Response body is null");const o=i.body.getReader(),n=new TextDecoder;try{for(;;){const{done:e,value:i}=await o.read();if(e)break;const r=n.decode(i,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const i=JSON.parse(e);i.text&&t(i.text)}catch{}}}finally{o.releaseLock()}}catch(t){throw console.error("Error generating subtitle:",t),t}})(t=>{this.subtitle+=t,this.requestUpdate()}).catch(()=>{this.subtitle=t}).finally(()=>{this.isGeneratingSubtitle=!1,this.requestUpdate()})}renderSparkleIcon(){return o.qy`
2
- <svg
3
- xmlns="http://www.w3.org/2000/svg"
4
- width="16"
5
- height="16"
6
- viewBox="0 0 20.25 20.999999"
7
- fill="currentColor"
8
- aria-hidden="true"
9
- >
10
- <path
11
- d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z M 17.355469 5.480469 "
12
- fill-rule="evenodd"
13
- ></path>
14
- </svg>
15
- `}render(){return o.qy`
16
- <div class="field-shell subject-input">
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,o){o.r(e),o.d(e,{NameAndSubjectPlugin:()=>u});var i=o(59929),s=o(49410);o(78533);function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1,r(),r(),r(),r(),r();const n=r()?"http://localhost:8000/api/v1/prompt/subject":"https://agent.creaditor.ai/api/v1/prompt/subject",a=r()?"http://localhost:8000/api/v1/prompt/subtitle":"https://agent.creaditor.ai/api/v1/prompt/subtitle";var l=Object.defineProperty,p=(t,e,o,i)=>{for(var s,r=void 0,n=t.length-1;n>=0;n--)(s=t[n])&&(r=s(e,o,r)||r);return r&&l(e,o,r),r};typeof window<"u"&&!window.__polymerElementsLoaded&&(window.__polymerElementsLoaded=!0,(async()=>{try{const t=["paper-dropdown-menu","paper-item","paper-listbox"].filter(t=>customElements.get(t));if(t.length>0)return void console.warn(`Polymer elements already loaded: ${t.join(", ")}. Skipping imports to prevent conflicts.`);if(customElements.get("dom-module"))return void console.warn("dom-module already defined, skipping Polymer element imports to prevent conflicts");await Promise.all([Promise.all([o.e(59),o.e(9158),o.e(7789),o.e(574)]).then(o.bind(o,50574)),o.e(898).then(o.bind(o,90898)),Promise.all([o.e(6216),o.e(7463)]).then(o.bind(o,97463))]),console.log("Polymer elements loaded successfully")}catch(t){console.warn("Failed to load Polymer elements:",t)}})().catch(console.error));const d="cdtr-name-and-subject-plugin",c=class extends i.WF{constructor(){super(...arguments),this.bgColor="#000",this.textColor="#000000",this.headerText="Details",this.nameLabel="Name",this.subjectLabel="Subject",this.subtitleLabel="Subtitle",this.saveButtonText="Save",this.subjectPlaceholder="Enter subject",this.mergeTags=[],this.name="",this.subject="",this.subtitle="",this.save=()=>{},this.isGeneratingSubject=!1,this.isGeneratingSubtitle=!1}getTextDirection(t){return/[\u0590-\u05FF]/.test(t)?"rtl":"ltr"}getPlaceholderStyle(){const t=this.getTextDirection(this.subjectPlaceholder);return`direction: ${t}; text-align: ${"rtl"===t?"right":"left"};`}handleSave(){"string"!=typeof this.subtitle&&(this.subtitle=""),"string"!=typeof this.subject&&(this.subject=""),this.dispatchEvent(new CustomEvent("save",{detail:{name:this.name,subject:this.subject,subtitle:this.subtitle}})),this.save(),setTimeout(()=>{var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.close()},200)}handleFieldClick(t){this.subject+=t.value,this.requestUpdate()}handleEmojiSelect(t){const e=t.detail.unicode;this.subject=this.subject+e,this.requestUpdate()}open(){var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.open()}focusInputs(t){var e;this.open();const o=null==(e=this.shadowRoot)?void 0:e.querySelectorAll("input");if(o)if(o.forEach(t=>t.classList.remove("shake")),t){const e=Array.from(o).find(e=>{var o;const i=e.previousElementSibling;return null==(o=null==i?void 0:i.textContent)?void 0:o.toLowerCase().includes(t.toLowerCase())});e&&(e.focus(),e.classList.add("shake"))}else o.forEach(t=>{t.focus(),t.classList.add("shake")})}handleGenerateSubject(){if(this.isGeneratingSubject)return;const t=this.subject||"";this.subject="",this.isGeneratingSubject=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>500){const t=Math.floor(250);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:"write my subject",context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subject:",t),t}})(t=>{this.subject+=t,this.requestUpdate()}).catch(()=>{this.subject=t}).finally(()=>{this.isGeneratingSubject=!1,this.requestUpdate()})}handleGenerateSubtitle(){if(this.isGeneratingSubtitle)return;const t=this.subtitle||"";this.subtitle="",this.isGeneratingSubtitle=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>1400){const t=Math.floor(700);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subtitle:",t),t}})(t=>{this.subtitle+=t,this.requestUpdate()}).catch(()=>{this.subtitle=t}).finally(()=>{this.isGeneratingSubtitle=!1,this.requestUpdate()})}render(){return i.qy`
2
+ <div class="subject-input">
17
3
  <div class="subject-input-left">
18
4
  <cdtr-popover width="400px">
19
- <button class="icon-btn" slot="trigger" aria-label="Add emoji">
5
+ <paper-button
6
+ style=${`color:${this.textColor}`}
7
+ size="sm"
8
+ variant="text"
9
+ slot="trigger"
10
+ dir="auto"
11
+ >
20
12
  <svg
21
13
  width="15"
22
14
  xmlns="http://www.w3.org/2000/svg"
@@ -27,7 +19,7 @@
27
19
  d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM7 12H9C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12H17C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12Z"
28
20
  ></path>
29
21
  </svg>
30
- </button>
22
+ </paper-button>
31
23
 
32
24
  <div slot="content" class="popover-content" dir="auto">
33
25
  <emoji-picker
@@ -36,11 +28,13 @@
36
28
  </div>
37
29
  </cdtr-popover>
38
30
 
39
- ${this.mergeTags.length>0?o.qy` <cdtr-popover>
40
- <button
41
- class="icon-btn"
31
+ ${this.mergeTags.length>0?i.qy` <cdtr-popover>
32
+ <paper-button
33
+ style=${`color:${this.textColor}`}
34
+ size="sm"
35
+ variant="text"
42
36
  slot="trigger"
43
- aria-label="Insert personalization tag"
37
+ dir="auto"
44
38
  >
45
39
  <svg
46
40
  xmlns="http://www.w3.org/2000/svg"
@@ -53,12 +47,12 @@
53
47
  d="M20 22H18V20C18 18.3431 16.6569 17 15 17H9C7.34315 17 6 18.3431 6 20V22H4V20C4 17.2386 6.23858 15 9 15H15C17.7614 15 20 17.2386 20 20V22ZM12 13C8.68629 13 6 10.3137 6 7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7C18 10.3137 15.3137 13 12 13ZM12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z"
54
48
  ></path>
55
49
  </svg>
56
- </button>
50
+ </paper-button>
57
51
  <div slot="content" class="popover-content" dir="auto">
58
52
  <div class="popover-header">
59
53
  <h3 dir="auto">${this.headerText}</h3>
60
54
  </div>
61
- ${this.mergeTags.map(t=>o.qy`
55
+ ${this.mergeTags.map(t=>i.qy`
62
56
  <div
63
57
  class="field-item"
64
58
  @click=${()=>this.handleFieldClick(t)}
@@ -70,30 +64,38 @@
70
64
  </div>
71
65
  </cdtr-popover>`:""}
72
66
  </div>
67
+ <div class="divider"></div>
73
68
  <input
74
69
  name="subject"
75
70
  type="text"
76
- class=${this.isGeneratingSubject?"streaming":""}
77
71
  placeholder=${this.subjectPlaceholder}
78
72
  .value=${this.subject}
79
73
  @change=${this.handleSave}
80
74
  @input=${t=>{this.subject=t.target.value,"string"!=typeof this.subtitle&&(this.subtitle=""),0===this.subtitle.trim().length&&(this.subtitle=this.subject)}}
81
75
  dir="auto"
82
- style=${this.getPlaceholderStyle()}
76
+ style=${`${this.getPlaceholderStyle()}; border:none;`}
83
77
  />
78
+ <div class="divider"></div>
84
79
 
85
80
  <cdtr-popover width="500px" id="name-popover">
86
- <button class="icon-btn" slot="trigger" aria-label="Edit details">
81
+ <paper-button
82
+ style=${`color:${this.textColor}`}
83
+ size="sm"
84
+ variant="text"
85
+ slot="trigger"
86
+ dir="auto"
87
+ >
87
88
  <svg
88
89
  xmlns="http://www.w3.org/2000/svg"
89
90
  viewBox="0 0 24 24"
90
- width="18"
91
+ width="20"
92
+ fill="#000"
91
93
  >
92
94
  <path
93
95
  d="M3.33946 17.0002C2.90721 16.2515 2.58277 15.4702 2.36133 14.6741C3.3338 14.1779 3.99972 13.1668 3.99972 12.0002C3.99972 10.8345 3.3348 9.824 2.36353 9.32741C2.81025 7.71651 3.65857 6.21627 4.86474 4.99001C5.7807 5.58416 6.98935 5.65534 7.99972 5.072C9.01009 4.48866 9.55277 3.40635 9.4962 2.31604C11.1613 1.8846 12.8847 1.90004 14.5031 2.31862C14.4475 3.40806 14.9901 4.48912 15.9997 5.072C17.0101 5.65532 18.2187 5.58416 19.1346 4.99007C19.7133 5.57986 20.2277 6.25151 20.66 7.00021C21.0922 7.7489 21.4167 8.53025 21.6381 9.32628C20.6656 9.82247 19.9997 10.8336 19.9997 12.0002C19.9997 13.166 20.6646 14.1764 21.6359 14.673C21.1892 16.2839 20.3409 17.7841 19.1347 19.0104C18.2187 18.4163 17.0101 18.3451 15.9997 18.9284C14.9893 19.5117 14.4467 20.5941 14.5032 21.6844C12.8382 22.1158 11.1148 22.1004 9.49633 21.6818C9.55191 20.5923 9.00929 19.5113 7.99972 18.9284C6.98938 18.3451 5.78079 18.4162 4.86484 19.0103C4.28617 18.4205 3.77172 17.7489 3.33946 17.0002ZM8.99972 17.1964C10.0911 17.8265 10.8749 18.8227 11.2503 19.9659C11.7486 20.0133 12.2502 20.014 12.7486 19.9675C13.1238 18.8237 13.9078 17.8268 14.9997 17.1964C16.0916 16.5659 17.347 16.3855 18.5252 16.6324C18.8146 16.224 19.0648 15.7892 19.2729 15.334C18.4706 14.4373 17.9997 13.2604 17.9997 12.0002C17.9997 10.74 18.4706 9.5632 19.2729 8.6665C19.1688 8.4405 19.0538 8.21822 18.9279 8.00021C18.802 7.78219 18.667 7.57148 18.5233 7.36842C17.3457 7.61476 16.0911 7.43414 14.9997 6.80405C13.9083 6.17395 13.1246 5.17768 12.7491 4.03455C12.2509 3.98714 11.7492 3.98646 11.2509 4.03292C10.8756 5.17671 10.0916 6.17364 8.99972 6.80405C7.9078 7.43447 6.65245 7.61494 5.47428 7.36803C5.18485 7.77641 4.93463 8.21117 4.72656 8.66637C5.52881 9.56311 5.99972 10.74 5.99972 12.0002C5.99972 13.2604 5.52883 14.4372 4.72656 15.3339C4.83067 15.5599 4.94564 15.7822 5.07152 16.0002C5.19739 16.2182 5.3324 16.4289 5.47612 16.632C6.65377 16.3857 7.90838 16.5663 8.99972 17.1964ZM11.9997 15.0002C10.3429 15.0002 8.99972 13.6571 8.99972 12.0002C8.99972 10.3434 10.3429 9.00021 11.9997 9.00021C13.6566 9.00021 14.9997 10.3434 14.9997 12.0002C14.9997 13.6571 13.6566 15.0002 11.9997 15.0002ZM11.9997 13.0002C12.552 13.0002 12.9997 12.5525 12.9997 12.0002C12.9997 11.4479 12.552 11.0002 11.9997 11.0002C11.4474 11.0002 10.9997 11.4479 10.9997 12.0002C10.9997 12.5525 11.4474 13.0002 11.9997 13.0002Z"
94
96
  ></path>
95
97
  </svg>
96
- </button>
98
+ </paper-button>
97
99
 
98
100
  <div slot="content" class="popover-content" dir="auto">
99
101
  <div class="popover-header">
@@ -104,7 +106,6 @@
104
106
  <input
105
107
  name="name"
106
108
  type="text"
107
- class="text-input"
108
109
  .value=${this.name}
109
110
  @input=${t=>this.name=t.target.value}
110
111
  dir="auto"
@@ -112,250 +113,286 @@
112
113
  </div>
113
114
  <div class="input-group">
114
115
  <label dir="auto">${this.subjectLabel}</label>
115
- <div class="field-shell">
116
+ <div class="row">
117
+ <paper-button
118
+ @click=${this.handleGenerateSubject}
119
+ ?disabled=${this.isGeneratingSubject}
120
+ class="generate-button"
121
+ >
122
+ ${this.isGeneratingSubject?i.qy` <div class="loading-spinner"></div> `:i.qy`
123
+ <svg
124
+ xmlns="http://www.w3.org/2000/svg"
125
+ xmlnsXlink="http://www.w3.org/1999/xlink"
126
+ width="18"
127
+ zoomAndPan="magnify"
128
+ viewBox="0 0 20.25 20.999999"
129
+ height="18"
130
+ preserveAspectRatio="xMidYMid meet"
131
+ version="1.0"
132
+ >
133
+ <defs>
134
+ <clippath id="84a0f9f97b">
135
+ <path
136
+ d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z M 0 0.375 "
137
+ clip-rule="nonzero"
138
+ ></path>
139
+ </clippath>
140
+ </defs>
141
+ <g clip-path="url(#84a0f9f97b)">
142
+ <path
143
+ fill="#9747ff"
144
+ d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z M 17.355469 5.480469 "
145
+ fill-opacity="1"
146
+ fill-rule="evenodd"
147
+ ></path>
148
+ </g>
149
+ </svg>
150
+ `}
151
+ </paper-button>
116
152
  <input
117
153
  name="subject"
118
154
  type="text"
119
- class=${this.isGeneratingSubject?"streaming":""}
120
155
  .value=${this.subject}
121
156
  @input=${t=>this.subject=t.target.value}
122
157
  dir="auto"
123
158
  />
124
- <button
125
- @click=${this.handleGenerateSubject}
126
- ?disabled=${this.isGeneratingSubject}
127
- class="icon-btn generate-button ${this.isGeneratingSubject?"generating":""}"
128
- aria-label="Generate subject with AI"
129
- >
130
- ${this.renderSparkleIcon()}
131
- </button>
132
159
  </div>
133
160
  </div>
134
161
  <div class="input-group">
135
162
  <label dir="auto">${this.subtitleLabel}</label>
136
- <div class="field-shell">
163
+ <div class="row">
164
+ <paper-button
165
+ @click=${this.handleGenerateSubtitle}
166
+ ?disabled=${this.isGeneratingSubtitle}
167
+ class="generate-button"
168
+ >
169
+ ${this.isGeneratingSubtitle?i.qy` <div class="loading-spinner"></div> `:i.qy`
170
+ <svg
171
+ xmlns="http://www.w3.org/2000/svg"
172
+ xmlnsXlink="http://www.w3.org/1999/xlink"
173
+ width="18"
174
+ zoomAndPan="magnify"
175
+ viewBox="0 0 20.25 20.999999"
176
+ height="18"
177
+ preserveAspectRatio="xMidYMid meet"
178
+ version="1.0"
179
+ >
180
+ <defs>
181
+ <clippath id="84a0f9f97b">
182
+ <path
183
+ d="M 0 0.375 L 19.527344 0.375 L 19.527344 19.902344 L 0 19.902344 Z M 0 0.375 "
184
+ clip-rule="nonzero"
185
+ ></path>
186
+ </clippath>
187
+ </defs>
188
+ <g clip-path="url(#84a0f9f97b)">
189
+ <path
190
+ fill="#9747ff"
191
+ d="M 12.316406 0.679688 C 12.160156 0.382812 11.734375 0.382812 11.574219 0.679688 L 11.132812 1.507812 C 11.09375 1.582031 11.035156 1.640625 10.960938 1.679688 L 10.128906 2.117188 C 9.828125 2.277344 9.828125 2.699219 10.128906 2.855469 L 10.960938 3.296875 C 11.035156 3.335938 11.09375 3.394531 11.132812 3.46875 L 11.574219 4.296875 C 11.734375 4.59375 12.160156 4.59375 12.316406 4.296875 L 12.757812 3.46875 C 12.800781 3.394531 12.859375 3.335938 12.933594 3.296875 L 13.765625 2.855469 C 14.0625 2.699219 14.0625 2.277344 13.765625 2.117188 L 12.933594 1.679688 C 12.859375 1.640625 12.800781 1.582031 12.757812 1.507812 Z M 15.167969 16.96875 L 16.875 17.617188 L 16.226562 15.917969 Z M 16.882812 13.496094 L 5.136719 1.816406 C 4.15625 0.839844 2.558594 0.839844 1.574219 1.816406 L 0.984375 2.40625 C 0 3.382812 0 4.96875 0.984375 5.949219 L 12.730469 17.625 C 12.929688 17.824219 13.273438 18.039062 13.542969 18.140625 L 17.152344 19.507812 C 18.167969 19.890625 19.164062 18.902344 18.777344 17.890625 L 17.402344 14.300781 C 17.300781 14.035156 17.085938 13.695312 16.882812 13.496094 Z M 15.316406 14.296875 L 5.730469 4.769531 L 3.953125 6.535156 L 13.535156 16.066406 Z M 3.949219 3 L 4.542969 3.585938 L 2.765625 5.355469 L 2.171875 4.765625 C 1.84375 4.441406 1.84375 3.910156 2.171875 3.585938 L 2.761719 3 C 3.089844 2.671875 3.621094 2.671875 3.949219 3 Z M 4.550781 12.996094 C 4.390625 12.699219 3.964844 12.699219 3.808594 12.996094 L 3 14.503906 C 2.960938 14.578125 2.902344 14.640625 2.828125 14.679688 L 1.308594 15.480469 C 1.011719 15.636719 1.011719 16.058594 1.308594 16.214844 L 2.828125 17.015625 C 2.902344 17.054688 2.960938 17.117188 3 17.191406 L 3.808594 18.699219 C 3.964844 18.996094 4.390625 18.996094 4.550781 18.699219 L 5.355469 17.191406 C 5.394531 17.117188 5.453125 17.054688 5.527344 17.015625 L 7.046875 16.214844 C 7.34375 16.058594 7.34375 15.636719 7.046875 15.480469 L 5.527344 14.679688 C 5.453125 14.640625 5.394531 14.578125 5.355469 14.503906 Z M 17.355469 5.480469 C 17.199219 5.183594 16.773438 5.183594 16.613281 5.480469 L 16.027344 6.582031 C 15.988281 6.65625 15.929688 6.714844 15.855469 6.753906 L 14.746094 7.335938 C 14.449219 7.496094 14.449219 7.917969 14.746094 8.074219 L 15.855469 8.660156 C 15.929688 8.699219 15.988281 8.757812 16.027344 8.832031 L 16.613281 9.933594 C 16.773438 10.230469 17.199219 10.230469 17.355469 9.933594 L 17.945312 8.832031 C 17.984375 8.757812 18.042969 8.699219 18.117188 8.660156 L 19.226562 8.074219 C 19.523438 7.917969 19.523438 7.496094 19.226562 7.335938 L 18.117188 6.753906 C 18.042969 6.714844 17.984375 6.65625 17.945312 6.582031 Z M 17.355469 5.480469 "
192
+ fill-opacity="1"
193
+ fill-rule="evenodd"
194
+ ></path>
195
+ </g>
196
+ </svg>
197
+ `}
198
+ </paper-button>
137
199
  <input
138
200
  name="subtitle"
139
201
  type="text"
140
- class=${this.isGeneratingSubtitle?"streaming":""}
141
202
  .value=${this.subtitle}
142
203
  @input=${t=>this.subtitle=t.target.value}
143
204
  dir="auto"
144
205
  />
145
- <button
146
- @click=${this.handleGenerateSubtitle}
147
- ?disabled=${this.isGeneratingSubtitle}
148
- class="icon-btn generate-button ${this.isGeneratingSubtitle?"generating":""}"
149
- aria-label="Generate subtitle with AI"
150
- >
151
- ${this.renderSparkleIcon()}
152
- </button>
153
206
  </div>
154
207
  </div>
155
- <button class="save-button" @click=${this.handleSave} dir="auto">
208
+ <paper-button
209
+ style=${`color:${this.textColor}; background:${this.bgColor};width:100%;`}
210
+ fullwidth
211
+ class="save-button"
212
+ @click=${this.handleSave}
213
+ dir="auto"
214
+ >
156
215
  ${this.saveButtonText}
157
- </button>
216
+ </paper-button>
158
217
  </div>
159
218
  </cdtr-popover>
160
219
  </div>
161
- `}};u.styles=o.AH`
220
+ `}};c.styles=i.AH`
162
221
  * {
163
222
  box-sizing: border-box;
164
223
  }
165
- :host {
166
- font-family: var(
167
- --font-family,
168
- -apple-system,
169
- BlinkMacSystemFont,
170
- "Segoe UI",
171
- Roboto,
172
- sans-serif
173
- );
174
- }
175
- @keyframes ring-pulse {
176
- 0% {
177
- box-shadow: 0 0 0 0
178
- color-mix(in srgb, var(--accent, #5b5fc7) 45%, transparent);
179
- }
224
+ @keyframes shake {
225
+ 0%,
180
226
  100% {
181
- box-shadow: 0 0 0 6px transparent;
227
+ transform: translateX(0);
228
+ }
229
+ 10%,
230
+ 30%,
231
+ 50%,
232
+ 70%,
233
+ 90% {
234
+ transform: translateX(-5px);
235
+ }
236
+ 20%,
237
+ 40%,
238
+ 60%,
239
+ 80% {
240
+ transform: translateX(5px);
182
241
  }
183
242
  }
184
243
  .shake {
185
- border-radius: 8px;
186
- animation: ring-pulse 0.6s ease-out 2;
244
+ animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
187
245
  }
188
246
  .popover-content {
189
247
  padding: 20px;
190
248
  min-width: 320px;
249
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
250
+ Ubuntu, Cantarell, sans-serif;
191
251
  font-size: 14px;
192
252
  }
253
+ .popover-header {
254
+ margin-bottom: 20px;
255
+ }
193
256
  .popover-header h3 {
194
- font-size: 15px;
257
+ font-size: 1.25rem;
195
258
  font-weight: 600;
196
259
  color: #1a1a1a;
197
- margin: 0 0 16px;
260
+ margin: 0;
261
+ }
262
+ paper-button {
263
+ min-width: 10px;
198
264
  }
199
265
  .input-group {
200
- margin-bottom: 16px;
266
+ margin-bottom: 12px;
201
267
  }
202
268
  .input-group label {
203
269
  display: block;
204
- margin-bottom: 6px;
270
+ margin-bottom: 4px;
205
271
  font-weight: 500;
206
- font-size: 13px;
207
- color: #6b7280;
208
- }
209
- .icon-btn {
210
- display: inline-flex;
211
- align-items: center;
212
- justify-content: center;
213
- flex: none;
214
- width: 28px;
215
- height: 28px;
216
- padding: 0;
217
- border: none;
218
- border-radius: 6px;
219
- background: transparent;
220
- color: var(--icon-muted, #666);
221
- cursor: pointer;
222
- transition: color 0.15s, background-color 0.15s;
223
- }
224
- .icon-btn:hover {
225
- color: var(--accent, #5b5fc7);
226
- background: color-mix(in srgb, var(--accent, #5b5fc7) 8%, transparent);
227
- }
228
- .icon-btn:focus-visible {
229
- outline: 2px solid var(--accent, #5b5fc7);
230
- outline-offset: 1px;
272
+ font-size: 14px;
273
+ color: #4a4a4a;
231
274
  }
232
- .icon-btn svg {
233
- fill: currentColor;
275
+ svg {
276
+ fill: #000;
234
277
  }
235
- .generate-button {
236
- color: var(--accent, #5b5fc7);
237
- }
238
- .generate-button:disabled {
239
- cursor: default;
240
- pointer-events: none;
278
+ .row {
279
+ display: flex;
280
+ align-items: center;
281
+ gap: 8px;
241
282
  }
242
- .generate-button.generating svg {
243
- animation: sparkle-pulse 1s ease-in-out infinite;
283
+ .input-group input {
284
+ width: 100%;
285
+ padding: 8px 12px;
286
+ border: 1px solid #d1d1d1;
287
+ border-radius: 4px;
288
+ font-size: 14px;
289
+ background-color: #ffffff;
290
+ transition: border-color 0.2s, box-shadow 0.2s;
244
291
  }
245
- @keyframes sparkle-pulse {
246
- 0%,
292
+ .input-group input:focus {
293
+ outline: none;
294
+ border-color: #3b82f6;
295
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
296
+ }
297
+ .loading-spinner {
298
+ width: 16px;
299
+ height: 16px;
300
+ border: 2px solid rgba(0, 0, 0, 0.3);
301
+ border-top: 2px solid #000000;
302
+ border-radius: 50%;
303
+ animation: spin 1s linear infinite;
304
+ display: inline-block;
305
+ margin-right: 8px;
306
+ }
307
+ @keyframes spin {
308
+ 0% {
309
+ transform: rotate(0deg);
310
+ }
247
311
  100% {
312
+ transform: rotate(360deg);
313
+ }
314
+ }
315
+ @keyframes pulse {
316
+ 0% {
317
+ transform: scale(1);
248
318
  opacity: 1;
249
319
  }
250
320
  50% {
251
- opacity: 0.35;
252
- }
253
- }
254
- @keyframes shimmer {
255
- from {
256
- background-position: 200% 0;
321
+ transform: scale(1.05);
322
+ opacity: 0.8;
257
323
  }
258
- to {
259
- background-position: -200% 0;
324
+ 100% {
325
+ transform: scale(1);
326
+ opacity: 1;
260
327
  }
261
328
  }
262
- input.streaming {
263
- background-image: linear-gradient(
264
- 90deg,
265
- transparent 0%,
266
- color-mix(in srgb, var(--accent, #5b5fc7) 10%, transparent) 50%,
267
- transparent 100%
268
- );
269
- background-size: 200% 100%;
270
- animation: shimmer 1.4s linear infinite;
329
+ .generate-button {
330
+ padding: 0;
271
331
  }
272
- .text-input,
273
- .field-shell {
274
- width: 100%;
275
- height: 36px;
276
- border: 1px solid var(--divider-color, #e5e7eb);
277
- border-radius: 8px;
278
- background: #fff;
279
- transition: border-color 0.15s, box-shadow 0.15s;
332
+ .generate-button:disabled {
333
+ opacity: 0.6;
334
+ cursor: not-allowed;
335
+ pointer-events: none;
280
336
  }
281
- .text-input {
282
- padding: 0 10px;
283
- font-size: 14px;
284
- font-family: inherit;
285
- color: inherit;
337
+ .pulse-button {
338
+ animation: pulse 2s ease-in-out infinite;
339
+ background-color: #3b82f6;
340
+ color: white;
341
+ border: none;
342
+ border-radius: 4px;
343
+ padding: 4px 8px;
344
+ font-size: 12px;
345
+ font-weight: 500;
346
+ cursor: pointer;
347
+ transition: background-color 0.2s;
286
348
  }
287
- .text-input:focus,
288
- .field-shell:focus-within {
289
- outline: none;
290
- border-color: var(--accent, #5b5fc7);
291
- box-shadow: 0 0 0 3px
292
- color-mix(in srgb, var(--accent, #5b5fc7) 12%, transparent);
349
+ .pulse-button:hover {
350
+ background-color: #2563eb;
351
+ animation: none;
293
352
  }
294
- .field-shell {
353
+ .subject-input-left {
295
354
  display: flex;
296
355
  align-items: center;
297
356
  gap: 2px;
298
- padding: 0 4px;
299
357
  }
300
- .field-shell > input {
358
+ .subject-input {
359
+ max-height: 36px;
360
+ display: flex;
361
+ align-items: center;
362
+ gap: 8px;
363
+ background: #ffffff;
364
+ border: 1px solid #d1d1d1;
365
+ border-radius: 6px;
366
+ max-width: 400px;
367
+ overflow: hidden;
368
+ }
369
+ .subject-input input {
301
370
  flex: 1;
302
- min-width: 0;
303
- height: 100%;
304
- border: none;
305
- background: transparent;
306
- padding: 0 6px;
371
+ padding: 8px 12px;
372
+ border-radius: 4px;
307
373
  font-size: 14px;
308
- font-family: inherit;
309
- color: inherit;
310
374
  }
311
- .field-shell > input:focus {
375
+ .subject-input input:focus {
312
376
  outline: none;
313
377
  }
314
- .subject-input {
315
- max-width: 400px;
316
- }
317
- .subject-input-left {
318
- display: flex;
319
- align-items: center;
320
- gap: 2px;
321
- }
322
378
  .field-item {
323
- padding: 8px 10px;
324
- border-radius: 6px;
379
+ padding: 10px 12px;
325
380
  cursor: pointer;
381
+ border-bottom: 1px solid #f0f0f0;
326
382
  font-size: 14px;
327
- transition: background-color 0.15s;
383
+ transition: background-color 0.2s;
328
384
  }
329
385
  .field-item:hover {
330
- background-color: #f5f5f7;
331
- }
332
- .save-button {
333
- width: 100%;
334
- height: 36px;
335
- margin-top: 4px;
336
- border: none;
337
- border-radius: 8px;
338
- background: var(--accent, #5b5fc7);
339
- color: #fff;
340
- font-size: 14px;
341
- font-weight: 500;
342
- font-family: inherit;
343
- cursor: pointer;
344
- transition: filter 0.15s;
386
+ background-color: #f8f9fa;
345
387
  }
346
- .save-button:hover {
347
- filter: brightness(0.94);
388
+ .field-item:last-child {
389
+ border-bottom: none;
348
390
  }
349
- .save-button:focus-visible {
350
- outline: 2px solid var(--accent, #5b5fc7);
351
- outline-offset: 2px;
352
- }
353
- @media (prefers-reduced-motion: reduce) {
354
- .shake,
355
- .generate-button.generating svg,
356
- input.streaming {
357
- animation: none;
358
- }
391
+ .divider {
392
+ height: 20px;
393
+ width: 1px;
394
+ background-color: #d5d5d5;
395
+ position: absolute;
359
396
  }
360
397
  emoji-picker {
361
398
  --emoji-size: 1.75rem;
@@ -367,4 +404,4 @@
367
404
  --button-active-background: #f1f3f5;
368
405
  --font-size: 14px;
369
406
  }
370
- `;let p=u;c([(0,n.MZ)({type:String})],p.prototype,"bgColor"),c([(0,n.MZ)({type:String})],p.prototype,"textColor"),c([(0,n.MZ)({type:String})],p.prototype,"headerText"),c([(0,n.MZ)({type:String})],p.prototype,"nameLabel"),c([(0,n.MZ)({type:String})],p.prototype,"subjectLabel"),c([(0,n.MZ)({type:String})],p.prototype,"subtitleLabel"),c([(0,n.MZ)({type:String})],p.prototype,"saveButtonText"),c([(0,n.MZ)({type:String})],p.prototype,"subjectPlaceholder"),c([(0,n.MZ)({type:Array})],p.prototype,"mergeTags"),c([(0,n.MZ)({type:String})],p.prototype,"name"),c([(0,n.MZ)({type:String})],p.prototype,"subject"),c([(0,n.MZ)({type:String})],p.prototype,"subtitle"),c([(0,n.MZ)({attribute:!1})],p.prototype,"save"),c([(0,n.MZ)({type:Boolean})],p.prototype,"isGeneratingSubject"),c([(0,n.MZ)({type:Boolean})],p.prototype,"isGeneratingSubtitle"),customElements.get(d)||customElements.define(d,p)}}]);
407
+ `;let u=c;p([(0,s.MZ)({type:String})],u.prototype,"bgColor"),p([(0,s.MZ)({type:String})],u.prototype,"textColor"),p([(0,s.MZ)({type:String})],u.prototype,"headerText"),p([(0,s.MZ)({type:String})],u.prototype,"nameLabel"),p([(0,s.MZ)({type:String})],u.prototype,"subjectLabel"),p([(0,s.MZ)({type:String})],u.prototype,"subtitleLabel"),p([(0,s.MZ)({type:String})],u.prototype,"saveButtonText"),p([(0,s.MZ)({type:String})],u.prototype,"subjectPlaceholder"),p([(0,s.MZ)({type:Array})],u.prototype,"mergeTags"),p([(0,s.MZ)({type:String})],u.prototype,"name"),p([(0,s.MZ)({type:String})],u.prototype,"subject"),p([(0,s.MZ)({type:String})],u.prototype,"subtitle"),p([(0,s.MZ)({attribute:!1})],u.prototype,"save"),p([(0,s.MZ)({type:Boolean})],u.prototype,"isGeneratingSubject"),p([(0,s.MZ)({type:Boolean})],u.prototype,"isGeneratingSubtitle"),customElements.get(d)||customElements.define(d,u)}}]);
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -51,7 +51,7 @@
51
51
  opacity: 0;
52
52
  position: absolute;
53
53
  top: 0;
54
- left: 0;
54
+ inset-inline-start: 0;
55
55
  display: flex;
56
56
  z-index: 3;
57
57
  }
Binary file
Binary file
Binary file