@ckeditor/ckeditor5-ai 46.0.1-alpha.6 → 46.0.1-alpha.8

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 (170) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +9 -9
  150. package/src/adapters/aiadapter.js +1 -1
  151. package/src/adapters/aitextadapter.js +1 -1
  152. package/src/adapters/awstextadapter.js +1 -1
  153. package/src/adapters/openaitextadapter.js +1 -1
  154. package/src/aiassistant.js +1 -1
  155. package/src/aiassistantediting.js +1 -1
  156. package/src/aiassistantui.js +1 -1
  157. package/src/index.js +1 -1
  158. package/src/legacyerrors.js +1 -1
  159. package/src/ui/aiassistantcontroller.js +2 -2
  160. package/src/ui/form/aiformcontentarea.js +1 -1
  161. package/src/ui/form/aiformerrorview.js +1 -1
  162. package/src/ui/form/aiformpromptview.js +1 -1
  163. package/src/ui/form/aiformtoolbarview.js +1 -1
  164. package/src/ui/form/aiformview.js +1 -1
  165. package/src/ui/form/aihistorylistitemview.js +1 -1
  166. package/src/ui/form/aihistorylistview.js +1 -1
  167. package/src/ui/form/prompthistory.js +1 -1
  168. package/src/ui/showaiassistantcommand.js +1 -1
  169. package/src/utils/common-translations.js +1 -1
  170. package/src/utils/normalizecommandsconfig.js +1 -1
package/build/ai.js CHANGED
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=o},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)}),r>0){var o=Object.keys(n),c=a.default.find(o,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>w,AIAssistant:()=>He,AIAssistantUI:()=>$e,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>ac,OpenAITextAdapter:()=>Xe,ShowAIAssistantCommand:()=>E,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=d;function d(e,t){const n=l();return(d=function(e,t){return n[e-=394]})(e,t)}function l(){const e=["join","href","_resetContentOfSelectedTableCells","element","getColumnIndexes","getLastMatchingPosition","schema","has","createUIElement","ck-fake-ai-selection_collapsed","58648ajvFiH","fire","getSelectedTableCells","deleteContent","createSelection","getRange","AIAssistantEditing","conversion","length","end","getSelectedBlocks","lowest","resultRange","push","getChild","table","insertRows","from","getLastPosition","model","markerToHighlight","markerRange","paste","get","afterInit","34316505eRXZXX","markers","removeMarker","_prepareTableInsertBelowPosition","getFirstRange","map","canEditAt","isPremiumPlugin","getRows","span","start","TableUtils","markerToElement","editing","114630HiuKwO","_createEmptyTableRows","createRange","_getDefaultInsertBelowPosition","for","selection","setData","_pasteHTMLUsingClipboard","off","config","editingDowncast","showFakeVisualSelection","document","last","insertContent","getChildren","first","createPositionAt","once","ck-ai-assistant-ui_theme","687160GJXgSn","1277951rLnyKp","pluginName","ai-ui","isContent","data","setSelection","contentInsertion","1083270vyDysc","348UhxXZA","isCollapsed","_getAISelection","ck-fake-ai-selection","DataTransfer","getRanges","findAncestor","plugins","change","filter","ai.useTheme","parse","getMarkersGroup","_getTableRowCountFromContent","2149011wzSNSK","updateMarker","addClass","editor","init","createPositionAfter","getRowIndexes","text/html","isOfficialPlugin","pop","hideFakeVisualSelection","861GPRHZv","fromCharCode","isAtEnd","forEach","addMarker","insertContentBelow"];return(l=function(){return e})()}!function(e){const t=d,n=e();for(;;)try{if(782609===parseInt(t(464))/1+parseInt(t(471))/2+parseInt(t(486))/3+-parseInt(t(463))/4+-parseInt(t(443))/5*(-parseInt(t(472))/6)+-parseInt(t(497))/7*(-parseInt(t(404))/8)+-parseInt(t(429))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(l);const h=globalThis[u(476)],f=u(466);class p extends e.Plugin{static get[u(465)](){return u(410)}static get[u(494)](){return!0}static get[u(436)](){return!0}[u(490)](){const e=u,{editor:t}=this,n=[e(475)];t[e(452)][e(427)](e(482))&&n[e(417)](e(462)),t[e(411)][e(447)](e(453))[e(424)]({model:f,view:{classes:n,priority:12}}),t[e(411)][e(447)](e(453))[e(441)]({model:f,view:(t,{writer:n})=>{const r=e;if(!t[r(425)][r(473)])return null;const i=n[r(402)](r(438));return n[r(488)]([r(475),r(403)],i),i}})}[u(428)](){!async function(e){const t=g([118,75,69,86,111,100,70,97,114,83,112,56,66,119,109,107,72,73,67,110,121,105,106,51,57,55,50,115,108,53,101,78,76,99,79,82,85,117,122,104,68,84,103,65,71,87,81,90,54,88,49,113,52,74,89,80,120,98,102,48,77,116]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],s=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),o={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),s[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](l(e)):null}function l(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=d;return e[t(434)](e=>String[t(498)](e))[t(394)]("")}!function(e){const n=function(){const e=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let n=g([118]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await s,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(o())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(s(),e),()=>{const e=o();return null==e?(s(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function o(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),s[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function o(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,s,o]=r;return t(i),await n(i,s,o),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](l(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),o,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,s)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1754352e3;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=d,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(395)]);if(n[g([105,110,99,108,117,100,101,115])](r))return!0;const i=r[g([115,112,108,105,116])](g([46]));return n[g([102,105,108,116,101,114])](e=>e[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](e=>e[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](e=>e[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](e=>Array(i[g([108,101,110,103,116,104])]-e[g([108,101,110,103,116,104])])[g([102,105,108,108])](e[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](e))[g([115,111,109,101])](e=>i[g([101,118,101,114,121])]((t,n)=>e[n]===t||e[n]===g([42])))}()?(e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(t=c(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(t=c(g([84,114,105,97,108,76,105,109,105,116]))),await(t&&m?new(window[g([80,114,111,109,105,115,101])])((e,n)=>{t[g([116,104,101,110])](e,n),m[g([116,104,101,110])](t=>{t!=g([86,97,108,105,100])&&e(t)},n)}):t||m||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[u(454)](){const e=u,t=this[e(489)][e(423)];t[e(480)](n=>{const r=e,i=t[r(455)][r(448)][r(477)]();let s=0;for(const e of i){const i=f+":"+s;if(t[r(430)][r(401)](i))n[r(487)](i,{range:e});else if(e[r(439)][r(499)]){const s=e[r(439)][r(399)](({item:e})=>!t[r(400)][r(467)](e),{boundaries:e});n[r(501)](i,{usingOperation:!1,affectsData:!1,range:n[r(445)](s,e[r(413)])})}else n[r(501)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(496)](){const e=u,t=this[e(489)][e(423)],n=Array[e(421)](this[e(489)][e(423)][e(430)][e(484)](f));n[e(412)]&&t[e(480)](t=>{const r=e;n[r(500)](e=>{t[r(431)](e)})})}[u(457)](e,t){const n=u,r=this[n(474)](),i=t||r[n(433)]();this[n(489)][n(423)][n(435)](i)&&this[n(489)][n(423)][n(480)](s=>{const o=n;this[o(496)](),t||this[o(396)](s,r),this[o(450)]({insertAt:i,writer:s,html:e})})}[u(502)](e){const t=u,{model:n}=this[t(489)],r=this[t(474)]();n[t(480)](()=>{const n=t,i=this[n(432)](e,r)||this[n(446)](r);this[n(457)](e,i)})}[u(474)](){const e=u,t=this[e(489)][e(423)],n=Array[e(421)](t[e(430)][e(484)](f))[e(434)](t=>t[e(409)]());return t[e(408)](n)}[u(450)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(489)][r(442)],s=this[r(489)][r(479)][r(427)](a.ClipboardPipeline),o=new h;o[r(449)](r(493),t);const d=new ClipboardEvent(r(426),{clipboardData:o}),l=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(469)](n);const f=(t,n)=>{const i=r;n[i(416)]&&e[i(469)](n[i(416)])};s[r(461)](r(470),f,{priority:r(415)}),i[r(455)][r(405)](r(426),l),s[r(451)](r(470),f)}[u(446)](e){const t=u,{model:n}=this[t(489)],r=Array[t(421)](e[t(414)]());return r[t(412)]?n[t(491)](r[t(495)]()):e[t(422)]()}[u(432)](e,t){const n=u,{model:r,plugins:i}=this[n(489)];if(i[n(401)](n(440))){const s=i[n(427)](n(440))[n(406)](t);if(s[n(412)]){const t=this[n(485)](e),i=this[n(444)](s,t);return r[n(460)](i,0)}}return null}[u(485)](e){const t=u,n=this[t(489)][t(479)][t(427)](t(440)),r=this[t(489)][t(468)][t(483)](e),i=Array[t(421)](r[t(458)]())[t(481)](e=>e.is(t(397),t(419)));let s=0;return i[t(500)](e=>{s+=n[t(437)](e)}),s}[u(444)](e,t){const n=u,r=this[n(489)][n(479)][n(427)](n(440)),i=r[n(492)](e),s=r[n(398)](e),o=i[n(456)]+1,a=s[n(459)],c=e[0][n(478)](n(419));for(let e=0;e<t;e++)r[n(420)](c,{at:o});return c[n(418)](o)[n(418)](a)}[u(396)](e,t){const n=u,{plugins:r}=this[n(489)],{model:i}=e;r[n(401)](n(440))&&r[n(427)](n(440))[n(406)](t)[n(412)]&&i[n(407)](t)}}var m=y;function g(){var e=["1320976HGFQJM","135443XYSAbg","afterInit","aiadapter-text-adapter-not-set","33230TRTFcd","isOfficialPlugin","isPremiumPlugin","AIAdapter","pluginName","18rvcLFU","AIRequestError","66748XOEjyB","1756RBKmrk","textAdapter","1Djxsig","398346xkAmsR","2067111RkUUUD","name","1155sTjFYP","2570NYQweA"];return(g=function(){return e})()}function y(e,t){var n=g();return(y=function(e,t){return n[e-=419]})(e,t)}!function(e){for(var t=y,n=e();;)try{if(166821===parseInt(t(423))/1*(parseInt(t(420))/2)+parseInt(t(424))/3+parseInt(t(421))/4*(-parseInt(t(428))/5)+parseInt(t(438))/6*(-parseInt(t(430))/7)+parseInt(t(429))/8+-parseInt(t(425))/9+parseInt(t(433))/10*(parseInt(t(427))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(g);class w extends e.Plugin{static get[m(437)](){return m(436)}static get[m(434)](){return!0}static get[m(435)](){return!0}[m(431)](){var e=m;if(!this[e(422)])throw new i.CKEditorError(e(432),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(426)]=t(419)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=A;function S(){const e=["change:isEnabled","values","model","2814327qGJnit","length","get","showUI","selection","plugins","editor","execute","custom","isEnabled","set","hasContent","_hasContext","element","change:_hasContext","1360006EdkdON","7212fGPmkU","1eqRUge","31060720xCRTeG","requiresContent","3672zQShon","refresh","name","isCollapsed","_commandDefinitions","from","document","ai.aiAssistant.disabledElements","getFirstRange","getSelectedBlocks","config","isEmpty","enabledCommandsIds","9062755JRURzI","3027sEBNkw","add","getItems","getRanges","3059jgIhMk","includes","1814488IDsVxi"];return(S=function(){return e})()}function A(e,t){const n=S();return(A=function(e,t){return n[e-=431]})(e,t)}!function(e){const t=A,n=e();for(;;)try{if(933639===parseInt(t(445))/1*(parseInt(t(443))/2)+-parseInt(t(462))/3*(-parseInt(t(444))/4)+parseInt(t(461))/5+-parseInt(t(448))/6*(-parseInt(t(466))/7)+-parseInt(t(468))/8+-parseInt(t(472))/9+-parseInt(t(446))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(S);class E extends e.Command{[k(452)];constructor(e,t){const n=k;super(e),this[n(452)]=t,this[n(438)](n(460),[]),this.on(n(442),(e,t,r)=>{const i=n;this[i(437)]&&(this[i(460)]=I(this[i(452)],r))}),this[n(438)](n(440),!1),this.on(n(469),(e,t,r)=>{const i=n;this[i(460)]=r?I(this[i(452)],this[i(440)]):[]})}[k(449)](){const e=k,t=this[e(434)][e(471)];this[e(440)]=function(t){const n=e,r=t[n(454)][n(432)];return r[n(451)]?0!==[...r[n(457)]()][n(473)]&&![...r[n(457)]()][0][n(459)]:!!t[n(439)](r[n(456)]())}(t);const n=t[e(454)][e(432)],r=this[e(434)][e(458)][e(474)](e(455));for(const t of n[e(465)]())for(const n of t[e(464)]())if(n.is(e(441))&&r[e(467)](n[e(450)]))return void(this[e(437)]=!1);this[e(437)]=!0}[k(435)](e="",t="",n=k(436)){const r=k;this[r(434)][r(433)][r(474)]($e)[r(431)](e,t,n)}}function I(e,t){const n=k,r=new Set;for(const i of e[n(470)]())(t||!1===i[n(447)])&&r[n(463)](i.id);return Array[n(453)](r)}const _=x;function x(e,t){const n=R();return(x=function(e,t){return n[e-=439]})(e,t)}function R(){const e=["listenTo","querySelector","stopListening","startsWith","mainAction","currentContext","previousContext","view","serializeToString","initialContext","_sanitizeHTML","editor","959650KpxCGo","tryAgainEvent","isRendered","213012JUVgZp","_domParser","setContentOf","_handleQuery","push","innerHTML","markers","exec","updateView","abort","length","stopProcessing","previousLabel","from","13221kMlaXI","set:currentContext","reverse","ai.aiAssistant.preserveComments","344ICBtAJ","div","isProcessing","handleError","trim","htmlProcessor","viewToDom","prompt","clear","name","stringify","then","toModel","```","```html","finishProcessing","remove","text/html","_normalizeResponseHeadings","previousQuery","2CGzIFn","_xmlSerializer","_parseAndNormalizeContent","finally","_isH1TagSupportEnabled","createElement","message","catch","once","113777ZqAqvF","previousActionId","<h1></h1>","submitPrompt","ELEMENT_NODE","parseFromString","currentResponse","271077NpSKGy","760935qqOOyZ","domConverter","childNodes","rename","editing","substring","endsWith","30855LCNXQL","makeRequest","render","custom","_sanitizationContainer","destroy","data","set","config","4OeZfaV","textAdapter","processor","match","nodeType","reset","toView","660vLzXDE","get","_stripMarkdownSyntax","value","body","element","document","startProcessing"];return(R=function(){return e})()}!function(e){const t=x,n=e();for(;;)try{if(116296===-parseInt(t(472))/1*(-parseInt(t(463))/2)+-parseInt(t(479))/3*(-parseInt(t(496))/4)+-parseInt(t(523))/5+-parseInt(t(526))/6+-parseInt(t(480))/7+-parseInt(t(443))/8*(-parseInt(t(439))/9)+parseInt(t(503))/10*(parseInt(t(487))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(R);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(522)];[_(497)];[_(518)];[_(491)];[_(527)];[_(464)];constructor(e,t,n){const r=_;super(),this[r(522)]=e,this[r(497)]=t,this[r(491)]=document[r(468)](r(444)),this[r(527)]=new DOMParser,this[r(464)]=new XMLSerializer,this[r(518)]=n,this[r(494)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(440),(e,t,n)=>{const i=r;this[i(518)][i(506)]=this[i(521)](n)}),this[r(511)](this[r(518)],r(475),(e,t)=>{const n=r,i=this[n(516)]||this[n(520)];this[n(529)](t,i,n(490))}),this[r(511)](this[r(518)],r(524),()=>{const e=r;this[e(518)][e(450)]=this[e(538)],this[e(529)](this[e(462)],this[e(517)],this[e(473)],this[e(538)])}),this[r(511)](this[r(518)],r(537),()=>{this[r(537)]()})}[_(492)](){this[_(513)]()}async[_(534)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(518)][s(450)]=r,this[s(518)][s(515)]=i,this[s(520)]=n,t&&(this[s(518)][s(525)]?this[s(529)](t,n,e,r):this[s(518)][s(471)](s(489),()=>{this[s(529)](t,n,e,r)}))}[_(537)](){const e=_;this[e(445)]&&(this[e(445)]=!1,this[e(518)][e(458)](),this[e(497)][e(535)]())}[_(501)](){const e=_;this[e(520)]="",this[e(516)]="",this[e(478)]="",this[e(517)]="",this[e(462)]="",this[e(538)]="",this[e(473)]=void 0,this[e(518)][e(501)](),this[e(537)]()}async[_(529)](e,t,n,r){const i=_;return this[i(445)]=!0,this[i(518)][i(510)](),this[i(517)]=t,this[i(462)]=e,this[i(538)]=r||e,this[i(473)]=n,new Promise(r=>{const s=i;this[s(497)][s(488)]({query:e,context:t,onData:e=>{const t=s;this[t(478)]=e,this[t(516)]=this[t(465)](this[t(478)])},actionId:n})[s(454)](()=>{const e=s;!this[e(516)]&&this[e(478)]&&(this[e(516)]=this[e(465)](this[e(478)],!0))})[s(470)](e=>{const t=s;e instanceof b?this[t(518)][t(446)](e[t(469)]):this[t(518)][t(446)](),r()})[s(466)](()=>{this[s(537)](),r()})})}[_(465)](e,t=!1){const n=_,r=C[n(533)](e);e=r?e[n(485)](r[1][n(536)]):e[n(536)]<100&&!t?"":this[n(505)](e);const i=this[n(527)][n(477)](e,n(460));if(r){const e=Array[n(539)](i[n(507)][n(482)]);e[n(441)]();for(const t of e){if(t[n(500)]==Node[n(476)])break;t[n(459)]()}}const s=this[n(522)][n(493)][n(498)][n(502)](this[n(464)][n(519)](i[n(507)]));this[n(467)]()||this[n(461)](s);const o=this[n(522)][n(495)][n(504)](n(442)),a=this[n(522)][n(493)][n(455)](s);return o||a[n(532)][n(451)](),this[n(522)][n(493)][n(453)](a)}[_(461)](e){const t=_,n=new c.ViewUpcastWriter(this[t(522)][t(484)][t(518)][t(509)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(508))&&r[t(499)](n)&&(i[t(530)](n),"h1"==n[t(452)]&&(s=!0));if(s)for(const e of i)n[t(483)]("h"+(parseInt(e[t(452)][1])+1),e)}[_(467)](){const e=_,{data:t,editing:n}=this[e(522)],r=t[e(448)][e(502)](e(474)),i=t[e(502)](t[e(455)](r));return!!n[e(518)][e(481)][e(449)](i)[e(512)]("h1")}[_(521)](e){const t=_;return this[t(522)][t(484)][t(518)][t(481)][t(528)](this[t(491)],e),this[t(491)][t(531)]}[_(505)](e){const t=_,n=e[t(447)]();return n[t(514)](t(457))?n[t(486)](t(456))?n[t(485)](7,n[t(536)]-3):n[t(485)](7):e}}const T=O;function M(){const e=["Try again","set","50WGikUA","ck-hidden","36bOLplb","ck-ai-form__toolbar","259773wmUIep","mainAction","Insert below","75999GeecDd","insertButton","toUpperCase","insert","bind","62916oHItkC","extendTemplate","replaceButton","addMany","AI_","locale","label","items","isVisible","_CONTENT","432sBJfsW","REPLACE","3585463xighkT","_createButton","bindTemplate","376cjgvzO","270747fkvgWJ","replace","stopButton","Stop","tryAgainButton","ck-button-action","212988iFXwRB","12gmTNCN","7359280Eirffg"];return(M=function(){return e})()}function O(e,t){const n=M();return(O=function(e,t){return n[e-=213]})(e,t)}!function(e){const t=O,n=e();for(;;)try{if(907771===-parseInt(t(221))/1+-parseInt(t(228))/2*(-parseInt(t(230))/3)+-parseInt(t(238))/4*(-parseInt(t(226))/5)+-parseInt(t(222))/6*(parseInt(t(250))/7)+parseInt(t(214))/8*(parseInt(t(215))/9)+-parseInt(t(223))/10+-parseInt(t(233))/11*(parseInt(t(248))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(M);const L={REPLACE:T(216),INSERT:T(236)};class $ extends s.ToolbarView{constructor(e){const t=T;super(e),this[t(225)](t(246),!1),this[t(225)](t(231),L[t(249)]),this[t(240)]=this[t(251)]("",t(220)),this[t(240)][t(237)](t(244)).to(this,t(231),n=>v(e,t(242)+n[t(235)]()+t(247))),this[t(234)]=this[t(251)](v(e,t(232))),this[t(219)]=this[t(251)](v(e,t(224))),this[t(217)]=this[t(251)](v(e,t(218)));const n=this[t(213)];this[t(239)]({attributes:{class:[t(229),n.if(t(246),t(227),e=>!e)]}}),this[t(245)][t(241)]([this[t(240)],this[t(234)],this[t(219)],this[t(217)]])}[T(251)](e,t){const n=T,r=new s.ButtonView(this[n(243)]);return r[n(225)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const N=D;function D(e,t){const n=U();return(D=function(e,t){return n[e-=234]})(e,t)}function U(){const e=["value","appendLoader","86133aNmykG","listenTo","ClipboardItem","setContent","textContent","class","<span>[</span>","37165lHKtoB","2149jXpTQj","wheel","ck-ai-form__content-area--processing","focus","copyButtonView","render","bind","bindTemplate","_createCopyButton","clipboard","write","scrollTo","Copy","body","querySelector","596XZfJsf","ck-ai-form__copy-button-wrapper","style","element"," ck-ai-form__copy-button--copied","809342NSnagi","getSelection","locale","lastElementChild","3438312XAHQsg","62MAIjKM","setEndBefore","copy","scrollHeight","change:value","ck-content","appendChild","setTemplate","addRange","8856254uTnlNJ","ck-reset_all-excluded","ck-ai-form__content-area","position","execute","remove","createRange","text/plain","absolute","ck-hidden","ck-ai-form__content-area-wrapper","ck-ai-form__loader","13168DlGBnv","setStartAfter","firstElementChild","<span>]</span>","40IznIiN","ck-ai-form__copy-button","ck-ai-form__content-field","contentFieldView","set","isVisible","_copyHTMLToClipboard","smooth","left","isProcessing","445887ehqaIM","createElement","_createLoader","removeAllRanges","execCommand","change:isProcessing","mousedown",".ck-ai-form__loader","AI is writing...","div","loaderView","icon","-9999px","isEnabled","text/html","innerHTML"];return(U=function(){return e})()}!function(e){const t=D,n=e();for(;;)try{if(615275===parseInt(t(308))/1+parseInt(t(313))/2*(parseInt(t(280))/3)+-parseInt(t(303))/4*(-parseInt(t(287))/5)+parseInt(t(312))/6+-parseInt(t(288))/7*(-parseInt(t(248))/8)+-parseInt(t(262))/9+parseInt(t(252))/10*(-parseInt(t(236))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(U);class F extends s.View{[N(255)];[N(292)];constructor(e,t=""){const n=N;super(e),this[n(256)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(295)];this[n(255)]=new B(e,t),this[n(292)]=this[n(296)](),this[n(234)]({tag:n(271),attributes:{class:["ck",n(246),r.if(n(257),n(245),e=>!e)],tabindex:"-1"},children:[{tag:n(271),attributes:{class:["ck",n(238),r.if(n(261),n(290))]},children:[this[n(255)],{tag:n(271),attributes:{class:["ck",n(304)]},children:[this[n(292)]]}]}]})}[N(293)](){const e=N;super[e(293)](),this[e(278)]&&this[e(255)][e(283)](this[e(278)]);let t=!1;this.on(e(317),(n,r,i)=>{const s=e,o=!this[s(255)][s(306)][s(302)](s(269));this[s(255)][s(283)](i),this[s(261)]&&o&&!t&&this[s(306)][s(299)]({top:this[s(306)][s(316)],behavior:s(259)})}),this.on(e(267),(n,r,i)=>{const s=e;t=!1,i?(this[s(278)]=null,this[s(255)][s(279)]()):this[s(278)]||this[s(255)][s(283)]("")}),this[e(281)](this[e(306)],e(289),()=>{t=!0}),this[e(281)](this[e(306)],e(268),()=>{t=!0})}[N(291)](){const e=N;this[e(306)][e(291)]()}[N(296)](){const e=N,n=this[e(310)],r=new s.ButtonView(this[e(310)]),i=e(253);return r[e(256)]({label:v(n,e(300)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(294)](e(257)).to(this,e(278),e=>!!e),r[e(294)](e(275)).to(this,e(261),e=>!e),r.on(e(240),()=>{const n=e;this[n(258)](this[n(255)][n(306)]),r[n(273)]=t.IconCheck,r[n(285)]=i+n(307),this[n(291)](),setTimeout(()=>{const e=n;r[e(273)]=t.IconCopy,r[e(285)]=i},1e3)}),r}[N(258)](e){const t=N,{window:n,document:r}=i.global;if(n[t(282)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(277)]],{type:t(276)}),"text/plain":new r([e[t(284)]||""],{type:t(243)})})];navigator[t(297)][t(298)](s)}else{const i=r[t(263)](t(271));i[t(305)][t(239)]=t(244),i[t(305)][t(260)]=t(274),i[t(277)]=t(286)+e[t(277)]+t(251),r[t(301)][t(319)](i);const s=r[t(242)]();s[t(249)](i[t(250)]),s[t(314)](i[t(311)]);const o=n[t(309)]();o[t(265)](),o[t(235)](s),r[t(266)](t(315)),i[t(241)]()}}}class B extends s.View{constructor(e,t=""){const n=N;super(e),this[n(272)]=this[n(264)](),this[n(234)]({tag:n(271),attributes:{class:["ck",n(318),t,n(237),n(254)]}})}[N(283)](e){const t=N;this[t(306)][t(277)]=e}[N(279)](){const e=N;this[e(306)][e(319)](this[e(272)][e(306)])}[N(264)](){const e=N,t=new s.View,n=this[e(310)],r=new s.SpinnerView;return r[e(257)]=!0,t[e(234)]({tag:e(271),attributes:{class:["ck",e(247)]},children:[r,{text:v(n,e(270))}]}),t[e(293)](),t}}function j(e,t){const n=q();return(j=function(e,t){return n[e-=442]})(e,t)}!function(e){const t=j,n=e();for(;;)try{if(929271===-parseInt(t(448))/1+parseInt(t(449))/2*(-parseInt(t(446))/3)+parseInt(t(450))/4*(-parseInt(t(453))/5)+parseInt(t(458))/6*(-parseInt(t(454))/7)+parseInt(t(459))/8+parseInt(t(456))/9*(-parseInt(t(443))/10)+parseInt(t(457))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q);class H extends s.View{constructor(e,n=""){const r=j;super(e);const i=new s.IconView,o=this[r(444)];this[r(451)](r(445),n),i[r(447)]=t.IconError,this[r(442)]({tag:r(452),attributes:{class:["ck",r(455)]},children:[i,{text:o.to(r(445))}]})}}function q(){const e=["bindTemplate","text","1077Fjpxcq","content","1346286hUtbat","7114DlYfbA","4LQelJb","set","div","6515940ajcfLG","14eILkDx","ck-ai-form__error","9BHidAS","48689190oHwsTg","447582MGppds","7723128TgXMiO","setTemplate","3867790JQxKhH"];return(q=function(){return e})()}function V(e,t){const n=G();return(V=function(e,t){return n[e-=165]})(e,t)}const z=V;function G(){const e=["focus","1414388UzUkqr","8763174tAMViS","isVisible","execute","submit","resultsView","uiLanguageDirection","add","locale","fieldWrapperChildren","rtl","filteredView","showHistoryButtonView","ck-ai-form__submit","keystrokes","element","focusFirst","isEmpty","_createSubmitButton","11QLFSuW","excludeScrollbarsAndBorders","Submit","66390pTtiXd","requestAnimationFrame","value","update","bind","target","54153DYCsXs","2157135ReHFQe","_createShowHistoryButton","ck-ai-form__toggle-history","set","focusCycler","maxRows","style","focusLast","18SDegNE","2335525jtUvIA","isOn","History","focusableChildren","fire","fieldView","width","26168wzyVvH","enter","window","render","queryView","submitButtonView","left","right","2212QhzpsI","isEnabled","530eqdPjV","minRows","children"];return(G=function(){return e})()}!function(e){const t=V,n=e();for(;;)try{if(867229===-parseInt(t(216))/1*(parseInt(t(219))/2)+parseInt(t(167))/3+-parseInt(t(197))/4+-parseInt(t(176))/5*(parseInt(t(175))/6)+parseInt(t(191))/7*(parseInt(t(183))/8)+parseInt(t(198))/9+parseInt(t(193))/10*(parseInt(t(166))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[z(188)];[z(209)];constructor(e,t){const n=z;super(e,t),this[n(187)][n(181)][n(194)]=1,this[n(187)][n(181)][n(172)]=3,this[n(188)]=this[n(215)](),this[n(209)]=this[n(168)](),this[n(179)][n(204)](this[n(209)],1),this[n(179)][n(204)](this[n(188)])}[z(186)](){const e=z;super[e(186)](),this[e(187)][e(206)][e(204)](this[e(209)]),this[e(195)][e(204)](this[e(188)]),this[e(211)][e(170)](e(184),(t,n)=>{const r=e;t[r(165)]==this[r(187)][r(181)][r(212)]&&(this[r(201)](),n())})}[z(215)](){const e=z,n=new s.ButtonView(this[e(205)]),r=this[e(205)];return n[e(170)]({icon:t.IconSubmit,label:v(r,e(218)),isVisible:!0,tooltip:!0,class:e(210)}),n.on(e(200),()=>{this[e(201)]()}),n[e(223)](e(192)).to(this[e(187)][e(181)],e(214),this,e(192),(e,t)=>!e&&t),n}[z(168)](){const e=z,n=new s.ButtonView(this[e(205)]),r=this[e(202)],o=this[e(205)];n[e(170)]({label:v(o,e(178)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(169)}),n[e(223)](e(177)).to(r,e(199)),n[e(223)](e(192)).to(this,e(192)),n.on(e(200),()=>{const t=e;r[t(199)]=!r[t(199)],r[t(199)]?this[t(208)][t(196)]():this[t(196)]()});const a=()=>{const t=e;i.global[t(185)][t(220)](()=>{const e=t;if((0,i.isVisible)(this[e(212)])){const t=new i.Rect(this[e(187)][e(181)][e(212)]),r=t[e(182)],s=e(207)===o[e(203)]?e(189):e(190);t[e(217)](),n[e(212)][e(173)][s]=r-t[e(182)]+1+"px"}})};return this[e(187)][e(181)].on(e(222),a),this.on(e(186),a),n}[z(201)](){const e=z,t=this[e(187)][e(181)][e(212)][e(221)];this[e(180)](e(201),t)}[z(196)](e){const t=z;-1===e?this[t(171)][t(174)]():this[t(171)][t(213)]()}}const K=J;function J(e,t){const n=Q();return(J=function(e,t){return n[e-=362]})(e,t)}function Q(){const e=["set","27736BABZZn","633IoVnFv","clearHistory","3370810XuoiwA","9ukzqfX","children","length","clearHistoryButton","226SmMNiG","delegate","Clear","15KOhmHm","9550702KLXtzk","add","items","5859890BkgkkJ","_createClearHistoryButton","7663638baqsuB","filter","label","historyGroupView","fire","execute","locale","Prompt history","5211784JRkNyH"];return(Q=function(){return e})()}!function(e){const t=J,n=e();for(;;)try{if(765588===parseInt(t(371))/1*(-parseInt(t(368))/2)+-parseInt(t(388))/3*(-parseInt(t(387))/4)+-parseInt(t(363))/5+parseInt(t(377))/6+-parseInt(t(372))/7+parseInt(t(385))/8*(parseInt(t(364))/9)+-parseInt(t(375))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Q);class X extends s.ListView{[K(380)];[K(367)];constructor(e){const t=K;super(e),this[t(367)]=this[t(376)](),this[t(380)]=new s.ListItemGroupView,this[t(380)][t(365)][t(373)](this[t(367)],1),this[t(380)][t(379)]=v(e,t(384)),this[t(380)][t(374)][t(369)](t(382)).to(this),this[t(374)][t(373)](this[t(380)])}[K(378)](){const e=K;let t=0;for(const n of this[e(374)])t+=n[e(374)][e(366)];return{resultsCount:t,totalItemsCount:t}}[K(376)](){const e=K,t=this[e(383)],n=new s.ButtonView(this[e(383)]);return n[e(386)]({label:"("+v(t,e(370))+")",withText:!0}),n.on(e(382),()=>this[e(381)](e(362))),n}}const Y={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function Z(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(Z).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Y[e]||"'")}(Z(e))}!function(e){const t=ne,n=e();for(;;)try{if(207779===-parseInt(t(271))/1+parseInt(t(269))/2*(parseInt(t(270))/3)+parseInt(t(274))/4+parseInt(t(280))/5+-parseInt(t(273))/6+-parseInt(t(278))/7+-parseInt(t(265))/8*(parseInt(t(268))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(re);class te extends s.ListItemView{constructor(e){const t=ne;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(266)],n);this[t(267)][t(276)](r),r[t(275)]({label:e[t(272)],withText:!0}),r.on(t(279),()=>{const n=t;this[n(277)](n(279),{value:ee(e[n(272)])})})}}function ne(e,t){const n=re();return(ne=function(e,t){return n[e-=265]})(e,t)}function re(){const e=["1439228wvzEQX","execute","1231910hJBMBp","1971392MDTOyM","locale","children","9fQVkwc","2hbZPwb","858633tRyEhb","19042epoRMQ","prompt","1314078ngfHKJ","1461076IiSVDy","set","add","fire"];return(re=function(){return e})()}const ie=ae;!function(e){const t=ae,n=e();for(;;)try{if(904837===-parseInt(t(232))/1*(parseInt(t(220))/2)+parseInt(t(229))/3+parseInt(t(219))/4+parseInt(t(218))/5+parseInt(t(221))/6+parseInt(t(230))/7*(parseInt(t(236))/8)+-parseInt(t(238))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);const se=ie(228);class oe extends i.Collection{constructor(){const e=ie;super(),this[e(231)](),this.on(e(235),(t,n)=>{const r=e,i=ue(n[r(217)]);for(const e of this)if(e!=n&&ue(e[r(217)])===i){this[r(225)](e);break}this[r(216)]>20&&this[r(225)](this[r(223)]),this[r(234)]()}),this.on(e(225),()=>{this[e(234)]()})}[ie(231)](){const e=ie,t=sessionStorage[e(233)](se)||"[]";this[e(226)](JSON[e(240)](t))}[ie(234)](){const e=ie;sessionStorage[e(227)](se,JSON[e(237)](this[e(222)](e=>e)))}}function ae(e,t){const n=ce();return(ae=function(e,t){return n[e-=216]})(e,t)}function ce(){const e=["24krgzDc","stringify","42501033gPaXHZ","trim","parse","length","prompt","1576065aRUZTZ","3379456DacPVY","6SBPMdW","10668282OAAewp","map","last","toLowerCase","remove","addMany","setItem","CKEditor/AIFormView/PromptHistory","4194657RcOvGp","3804773CaMXVO","_loadFromSessionStorage","113262IiNGVs","getItem","_saveToSessionStorage","add"];return(ce=function(){return e})()}function ue(e){const t=ie;return e[t(224)]()[t(239)]()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return Z(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["div","replaceContent","tryAgainButton","12eFWjXd","bind","prompt","keystrokes","search","isVisible","copyButtonView","isProcessing","25891050imihyU","24128eISLTi","focusFirst","focus","label","submit","Ask AI to edit or generate","items","mainAction","isEnabled","_createHistoryView","AI_ERROR_FAILED","promptView","_createPromptView","replaceButton","ck-hidden","startProcessing","set","execute","REPLACE","trim","stopButton","tryAgainEvent","bindTo","_focusables","submitPrompt","ck-ai-form","isError","insertContentBelow","errorView","add","ck-ai-form-content","render","Ask AI to improve generated text","historyGroupView","clearHistory","32CJbdji","toolbar","element","createCollection","insertButton","clear","focusTracker","queryView","_promptHistory","finishProcessing","2918652XcCUbo","value","Ask AI and your prompts will be listed here for you to use later.","delegate","1494sCFXxR","bindTemplate","focusCycler","1631970vTKIyU","locale","handleError","setTemplate","tab","listenTo","Empty history","high","reset","text","contentArea","fieldView","16237rQoRSr","7980175IeRExy","_createToolbar","stopProcessing","3179296HsFIaP","fire","chain","focusLast","shift + tab"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=171]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(730552===-parseInt(t(213))/1*(-parseInt(t(184))/2)+parseInt(t(194))/3+parseInt(t(217))/4+-parseInt(t(201))/5*(-parseInt(t(225))/6)+parseInt(t(214))/7+-parseInt(t(234))/8*(parseInt(t(198))/9)+-parseInt(t(233))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(190)];[he(228)];[he(211)];[he(185)];[he(245)];[he(177)];[he(172)];[he(200)];[he(192)];constructor(e,t,n=""){const r=he;super(e),this[r(250)](r(242),!0),this[r(250)](r(232),!1),this[r(250)](r(227),""),this[r(250)](r(195),""),this[r(250)](r(175),!1),this[r(250)](r(241),L[r(252)]),this[r(192)]=new oe,this[r(177)]=new H(e),this[r(211)]=new F(e,n),this[r(211)][r(226)](r(232)).to(this),this[r(211)][r(226)](r(195)).to(this),this[r(185)]=this[r(215)](),this[r(185)][r(226)](r(241)).to(this),this[r(245)]=this[r(246)](),this[r(190)]=new i.FocusTracker,this[r(228)]=new i.KeystrokeHandler,this[r(172)]=this[r(187)]([this[r(211)],this[r(211)][r(231)],this[r(185)],this[r(245)]]),this[r(200)]=new s.FocusCycler({focusables:this[r(172)],focusTracker:this[r(190)],keystrokeHandler:this[r(228)],actions:{focusPrevious:r(221),focusNext:r(205)}}),this[r(200)][r(219)](this[r(245)][r(200)]),this[r(245)][r(191)][r(212)][r(226)](r(195)).to(this,r(227));const o=this[r(199)];this[r(204)]({tag:r(222),attributes:{class:["ck",r(174),t],tabindex:"-1"},children:[{tag:r(222),attributes:{class:["ck",r(179)]},children:[{tag:r(222),attributes:{class:[o.if(r(175),r(248),e=>!e)]},children:[this[r(177)]]},this[r(211)],this[r(185)],this[r(245)]]}]})}[he(180)](){const e=he;super[e(180)](),this[e(190)][e(178)](this[e(211)][e(186)]),this[e(190)][e(178)](this[e(211)][e(231)][e(186)]),this[e(190)][e(178)](this[e(185)][e(186)]),this[e(190)][e(178)](this[e(245)][e(186)]),this[e(228)][e(206)](this[e(186)])}[he(236)](e=1){const t=he;-1===e?this[t(200)][t(220)]():this[t(200)][t(235)]()}[he(209)](){const e=he;this[e(227)]="",this[e(195)]="",this[e(175)]=!1,this[e(245)][e(209)](),this[e(211)][e(230)]=!1,this[e(185)][e(230)]=!1}[he(246)](){const e=he,t=this[e(202)],n=new W(t,{queryView:{label:v(t,e(239)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(207)),secondary:v(t,e(196))}}},filteredView:this[e(243)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(226)](e(242)).to(this,e(242),this,e(232),(e,t)=>e&&!t),this[e(206)](n,e(238),(t,n)=>{const r=e;this[r(227)]=n;const i=le(n);this[r(218)](r(173),i),n[r(253)]()&&this[r(192)][r(178)]({prompt:i},0)},{priority:e(208)}),n}[he(243)](){const e=he,t=new X(this[e(202)]);return t[e(182)][e(240)][e(171)](this[e(192)]).as(te),t.on(e(183),()=>{const t=e;this[t(192)][t(189)](),this[t(245)][t(229)](""),this[t(245)][t(236)]()}),t}[he(215)](){const e=he,t=new $(this[e(202)]);return t[e(247)][e(226)](e(242)).to(this,e(242),this,e(232),this,e(195),(e,t,n)=>e&&!t&&!!n),t[e(247)][e(197)](e(251)).to(this,e(223)),t[e(188)][e(226)](e(242)).to(this,e(242),this,e(232),this,e(195),(e,t,n)=>e&&!t&&!!n),t[e(188)][e(197)](e(251)).to(this,e(176)),t[e(224)][e(226)](e(242)).to(this,e(242),this,e(232),(e,t)=>e&&!t),t[e(224)][e(197)](e(251)).to(this,e(255)),t[e(254)][e(226)](e(242)).to(this,e(232)),t[e(254)][e(197)](e(251)).to(this,e(216)),t}[he(249)](){const e=he;this[e(195)]="",this[e(175)]=!1,this[e(232)]=!0,this[e(211)][e(230)]=!0,this[e(185)][e(230)]=!0,this[e(211)][e(236)]()}[he(193)](){const e=he,t=this[e(202)];this[e(232)]=!1,this[e(227)]="",this[e(245)][e(209)](),this[e(195)]&&(this[e(245)][e(191)][e(237)]=v(t,e(181)))}[he(203)](e){const t=he,n=this[t(202)];this[t(193)](),this[t(175)]=!0,this[t(177)][t(210)]=e||v(n,t(244)),this[t(195)]||(this[t(211)][t(230)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ae=n.n(Se),Ee=n(357),Ie=n.n(Ee),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ae(),xe.insert=ke().bind(null,"head"),xe.domAPI=be(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ae(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Te={attributes:{"data-cke":!0}};Te.setAttributes=Ae(),Te.insert=ke().bind(null,"head"),Te.domAPI=be(),Te.insertStyleElement=Ie();ye()(Pe.A,Te);Pe.A&&Pe.A.locals&&Pe.A.locals;const Me=Ne;function Oe(){const e=["usageLimit","plugins","_dialog","469hasEnJ","evaluationLimit","view","_formView","media","isEnabled","commands","selection","_aiAdapter","hideFakeVisualSelection","ai.aiAssistant.disabledElements","render","prompt","replace","text/html","trim","ck-ai-assistant-button ","</p>","ck-ai-assistant-ui","errorView","602dCTFhs","copy","includes","promptView","show","13599201bYhMHl","componentFactory","setSelection","tableOfContents","announce","change","focus","bind","aiLicenseKeyDomainLimit","aiLicenseKeyExpired","expired","menuView","<p>","add","isOfficialPlugin","map","3209552xSPdwW","AI Assistant","_forceMarkersCopy","showFakeVisualSelection","invalid","127164QnfYJx","change:isProcessing","source","set","_uiCssClasses","hideUI","filter","menuPanelClass","document","change:enabledCommandsIds","insertContentBelow","values","locale","Generated content: %0","aiLicenseKeyNotAllowed","aiCommands","groupLabel","29898ToMfyp","getSelectedBlocks","Error during AI content generation: %0","isFlat","init","AI Commands","INSERT","once","body","menuBar:aiAssistant","execute","2617779LuKoDq","aiLicenseKeyTrialLimit","ai.aiAssistant.commands","isCollapsed","queryView","buttons","1594OWcdTA","comment","ai-commands-config-order-collision","getLimitElement","updateView","aiLicenseKeyEvaluationLimit","get","_createAIAssistantUIButton","isOn","_getResolvedCommandsDefinitions","editor","panelView","currentContext","trialLimit","schema","aiLicenseKeyUsageLimit","groupId","delegate","from","textAdapter","aiLicenseKeyValid","pluginName","menuBar:aiCommands","splice","order","forEach","command:","112092bnTwEi","ai.aiAssistant.contentAreaCssClass","_onExecute","change:value","EDITOR_TOP_SIDE","aiLicenseKeyInvalid"," ck-ai-assistant-ui_theme","rawHtml","contentArea","editing","insertContent","95FAZPpB","fire","AIAssistant","change:isError","custom","menuitemcheckbox","_showLicenseError","showUI","DataTransfer","children","_initView","length","destroy","licenseKey","getRanges","requires","text","_initAriaAiStatusChangeAnnouncements","reset","featureNotAllowed","_commandDefinitions","updatePosition","getSelectedElement","_licenseKeyCheckInterval","listenTo","getData","fieldView","ai.useTheme","define","AIAssistantUI","hide","isPremiumPlugin","model","replaceContent","enabledCommandsIds","update","polite","aiAssistant","sort","push","label","requiresContent","showAIAssistant","AI is writing","_aiAssistantController","items","_populateMenuBarMenu","wasMoved","domainLimit","addMany","_getMenuBarGroupButtons","1430mLyLNJ","REPLACE","buttonView","config","ck-ai-commands-dropdown "];return(Oe=function(){return e})()}!function(e){const t=Ne,n=e();for(;;)try{if(659103===parseInt(t(448))/1*(parseInt(t(508))/2)+parseInt(t(502))/3+parseInt(t(474))/4*(-parseInt(t(546))/5)+-parseInt(t(535))/6*(parseInt(t(605))/7)+parseInt(t(469))/8+-parseInt(t(491))/9*(parseInt(t(597))/10)+parseInt(t(453))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const Le=globalThis[Me(554)];class $e extends e.Plugin{[Me(559)];[Me(569)];[Me(604)];[Me(608)];[Me(613)];[Me(590)];[Me(478)]="";static get[Me(529)](){return Me(575)}static get[Me(467)](){return!0}static get[Me(577)](){return!0}static get[Me(561)](){return[a.ClipboardMarkersUtils,p,w,s.Dialog]}constructor(e){const t=Me;super(e),e[t(600)][t(574)](t(615),[t(609),t(542),t(456)]),e[t(600)][t(574)](t(536),""),e[t(600)][t(574)](t(573),!0),this[t(478)]=t(623)+(e[t(600)][t(514)](t(573))?t(541):"")}[Me(495)](){const e=Me,{editor:n}=this;this[e(613)]=n[e(603)][e(514)](w),this[e(604)]=n[e(603)][e(514)](s.Dialog),this[e(608)]=null,this[e(566)]=this[e(517)]();const r=new E(n,Array[e(526)](this[e(566)][e(485)]()));n[e(611)][e(466)](e(588),r),n.ui[e(454)][e(466)](e(489),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(477)]({class:a(601)+this[a(478)]}),c[a(599)][a(477)]({label:v(i,a(496)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(501),e=>this[a(537)](e[a(476)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(607)][a(499)],function(e){const t=a,n=o(e[t(600)][t(514)](t(504)),e[t(486)]),r=Ue(e,n)[t(480)](e=>e[t(611)][t(557)]);return 1===r[t(557)]?Ue(e,r[0][t(611)])[t(468)](e=>({id:e.id,label:e[t(586)]})):r[t(468)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(468)](e=>({id:e.id,label:e[r(586)]}))}})}(n),{ariaLabel:v(i,a(496))}),c[a(464)][a(481)]=a(601)+this[a(478)],r.on(a(483),u),c[a(464)][a(498)](a(616),u),c;function u(){const e=a;c[e(610)]=r[e(580)][e(557)]>0;for(const t of c[e(464)][e(507)])t[e(610)]=r[e(580)][e(450)](t.id)}}),n.ui[e(454)][e(466)](e(530),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(599)][a(477)]({label:v(i,a(496)),icon:t.IconMagicWand}),c[a(460)](a(610)).to(r,a(580),e=>e[a(557)]>0);const u=o(n[a(600)][a(514)](a(504)),i);return this[a(592)](r,c,u,e=>this[a(537)](e)),c}),n.ui[e(454)][e(466)](e(583),()=>{const t=e,n=this[t(515)](s.ButtonView);return n[t(477)]({tooltip:!0,class:t(621)+this[t(478)]}),n}),n.ui[e(454)][e(466)](e(500),()=>{const t=e,n=this[t(515)](s.MenuBarMenuListItemButtonView);return n[t(477)]({role:t(551)}),n}),this[e(559)]=this[e(518)][e(600)][e(514)](e(559));const i=this[e(518)];this[e(569)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(528)==s||t(540)==s||t(462)==s||t(461)==s||t(488)==s||t(513)==s||t(503)==s||t(523)==s){delete i[r],n=s,clearInterval(this[t(569)]),this[t(569)]=void 0;break}}t(540)==n&&i[t(552)](t(473)),t(462)==n&&i[t(552)](t(463)),t(461)==n&&i[t(552)](t(594)),t(488)==n&&i[t(552)](t(565),t(548)),t(513)==n&&i[t(552)](t(606)),t(503)==n&&i[t(552)](t(521)),t(523)==n&&i[t(552)](t(602))},1e3)}[Me(558)](){const e=Me;super[e(558)](),this[e(569)]&&clearInterval(this[e(569)])}[Me(553)](e="",n="",r=Me(550)){const i=Me,o=this[i(518)],u=o[i(544)][i(607)],d=o[i(603)][i(514)](p),l=o[i(603)][i(514)](a.ClipboardMarkersUtils);d[i(472)]();const h=new Le,f=new ClipboardEvent(i(449),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(471)](i(509),()=>{const e=i;u[e(482)][e(547)](e(449),g)}),this[i(608)]||(this[i(556)](),this[i(590)]=new P(o,this[i(613)][i(527)],this[i(608)]));let y=m[i(571)](i(619));const w=o[i(578)][i(482)][i(612)],b=Array[i(526)](w[i(560)]());1===b[i(557)]&&b[0][i(494)]&&!w[i(568)]()&&""!==y[i(618)](/&nbsp;/g,"")[i(620)]()&&(y=i(465)+y+i(622)),this[i(590)][i(512)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:L[o[i(578)][i(482)][i(612)][i(505)]?i(497):i(598)]}),i(583)!==this[i(604)].id?this[i(604)][i(452)]({id:i(583),icon:t.IconRobotPencil,title:v(this[i(518)][i(486)],i(470)),content:this[i(608)],position:s.DialogViewPosition[i(539)],onShow:()=>{const e=i;this[e(608)][e(459)]()},onHide:()=>{const e=i;this[e(590)][e(564)](),d[e(614)]()}}):this[i(604)][i(607)][i(593)]||this[i(604)][i(607)][i(567)]()}[Me(479)](){const e=Me;this[e(604)][e(576)]()}[Me(517)](){const e=Me,t=new Map,n=o(this[e(518)][e(600)][e(514)](e(504)),this[e(518)][e(486)]);for(const r of n)for(const n of r[e(611)])t[e(477)](n.id,{...n,groupId:r[e(524)],groupLabel:r[e(490)]||r[e(524)]});return t}[Me(515)](e){const n=Me,r=this[n(518)],i=r[n(611)][n(514)](n(588)),s=new e(r[n(486)]);return s[n(477)]({label:v(r[n(486)],n(470)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(460)](n(610)).to(i),s[n(460)](n(516)).to(this[n(604)],"id",e=>n(583)===e),this[n(570)](s,n(501),()=>{const e=n;s[e(516)]?this[e(479)]():i[e(501)]()}),s}[Me(556)](){const e=Me,t=this[e(518)][e(603)][e(514)](p);this[e(608)]=new me(this[e(518)][e(486)],this[e(478)],this[e(518)][e(600)][e(514)](e(536))),this[e(608)].on(e(538),()=>{const t=e;this[t(604)][t(607)][t(593)]||this[t(604)][t(607)][t(567)]()}),this[e(608)][e(451)][e(506)][e(572)].on(e(581),()=>{const t=e;this[t(604)][t(607)][t(593)]||this[t(604)][t(607)][t(567)]()}),this[e(570)](this[e(608)],e(579),()=>{const n=e;t[n(545)](this[n(590)][n(520)]),this[n(479)]()}),this[e(570)](this[e(608)],e(484),()=>{const n=e;t[n(484)](this[n(590)][n(520)]),this[n(479)]()}),this[e(563)]()}[Me(563)](){const e=Me,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(518)];this[e(608)][e(543)].on(e(475),(r,i,s)=>{const o=e,a=this[o(590)][o(520)];s?n[o(457)](v(t,o(589))):a&&n[o(457)](v(t,o(487),a),{politeness:o(582),isUnsafeHTML:!0})}),this[e(608)].on(e(549),(r,i,s)=>{const o=e;if(s){const e=this[o(608)][o(624)][o(562)];n[o(457)](v(t,o(493),e))}})}[Me(537)](e){const t=Me,n=this[t(566)][t(514)](e),r=this[t(518)],s=r[t(578)][t(482)][t(612)],o=r[t(611)][t(514)](t(588)),a=r[t(603)][t(514)](p),c=("_ungrouppedCommands"!==n[t(524)]?n[t(490)]+": ":"")+n[t(586)];if(!1!==n[t(587)]&&s[t(505)]){const e=(0,i.first)(s[t(492)]())||r[t(578)][t(522)][t(511)](s);r[t(578)][t(458)](n=>{n[t(455)](e,"in")})}a[t(472)](),o[t(501)](n[t(617)],c,t(534)+e)}[Me(592)](e,t,n,r){const i=Me,o=this[i(518)],a=o[i(486)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(480)](e=>e[i(611)][i(557)]);1===u[i(557)]?this[i(596)]({command:e,commands:u[0][i(611)],parentMenuView:t,onExecute:r})[i(533)](e=>c[i(591)][i(466)](e)):u[i(533)](({groupId:n,groupLabel:o,commands:u})=>{const d=i,l=new s.MenuBarMenuListItemView(a,t),h=new s.MenuBarMenuView(a),f=new s.MenuBarMenuListView(a),p=this[d(596)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(599)][d(477)]({label:o||n}),h[d(525)](d(501)).to(t),f[d(591)][d(595)](p),h[d(519)][d(555)][d(466)](f),l[d(555)][d(466)](h),c[d(591)][d(466)](l)}),t[i(519)][i(555)][i(466)](c)}[Me(596)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Me,o=this[i(518)],a=o[i(486)];return Ue(o,t)[i(468)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(477)]({label:t[o(586)]}),u[o(525)](o(501)).to(n),u.on(o(501),()=>r(t.id)),u[o(460)](o(610)).to(e,o(580),e=>e[o(450)](t.id)),c[o(555)][o(466)](u),c})}}function Ne(e,t){const n=Oe();return(Ne=function(e,t){return n[e-=448]})(e,t)}function De(e,t){const n=Me;return void 0!==e[n(532)]&&void 0===t[n(532)]?1:void 0===e[n(532)]&&void 0!==t[n(532)]?-1:void 0!==e[n(532)]&&void 0!==t[n(532)]?e[n(532)]-t[n(532)]:0}function Ue(e,t){const n=Me;t[n(584)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(532)]){if(o[n(532)]in r)throw new i.CKEditorError(n(510),e,{conflictingDefinitions:[o,r[o[n(532)]]]});r[o[n(532)]]=o,s[n(531)](o[n(532)],0,o)}else s[n(585)](o);return s}const Fe=Be;function Be(e,t){const n=je();return(Be=function(e,t){return n[e-=467]})(e,t)}function je(){const e=["simplifyLanguage","40707GHsrqd","Arabic","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Confident","Translate the content to Simplified Chinese language.","Rewrite this content as a journalist using engaging language to convey the importance of the information.","locale","Rewrite this content as a business professional with formal language.","changeStyle","filter","Simplify language","344usdDTD","Spanish","English","Translate","1340zWzLZp","set","push","isPremiumPlugin","German","includes","French","Generate from selection","translateFrench","Translate the content to Portuguese language.","405520asizIt","Direct","forEach","Improve this content by using descriptive language and inserting more information and more detailed explanations.","Change style","385716TIFgMR","Journalism","Portuguese","2522755lLVUvO","translateSpanish","AIAssistant","Translate the content to German language.","professional","Poetic","define","Continue","generate","Hindi","changeTone","confident","ai.aiAssistant.preserveComments","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","friendly","requires","98219QJSiOT","translatePortuguese","get","config","Improve using compelling, optimistic language to convey confidence in the writing.","205437QgQYoI","commands","concat","makeLonger","Friendly","Rewrite this content as a legal professional using valid legal terminology.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Professional","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Translate the content to Spanish language.","Simplified Chinese","business","Rewrite this content as a poem using poetic techniques without losing the original meaning.","ai.aiAssistant.removeCommands","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","translateHindi","Business","Translate the content to English language.","translateArabic","casual","translateChinese","Legal","Translate the content to Arabic language.","70SEsGLW","translateGerman","ai.aiAssistant.extraCommandGroups","groupId","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","502749eQScUb","Improve writing","Summarize","makeShorter","find","direct","ai.aiAssistant.commands","continue","translateEnglish","Translate the content to Hindi language.","Make longer","Make shorter","Improve using direct language, using only the essential information.","Improve using friendly, comforting language, to convey understanding and empathy.","translate","Improve using casual, informal language to convey a casual conversation with a real person.","Casual","legal","journalism","editOrReview","Edit or review","summarize","pluginName","poetic","improveWriting","Translate the content to French language.","isOfficialPlugin","Change tone","4UjOVwc"];return(je=function(){return e})()}!function(e){const t=Be,n=e();for(;;)try{if(413824===parseInt(t(472))/1+-parseInt(t(555))/2+parseInt(t(500))/3*(parseInt(t(528))/4)+-parseInt(t(563))/5+parseInt(t(560))/6*(-parseInt(t(495))/7)+parseInt(t(541))/8*(parseInt(t(530))/9)+parseInt(t(545))/10*(parseInt(t(467))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class He extends e.Plugin{static get[Fe(578)](){return[$e,p]}static get[Fe(522)](){return Fe(565)}static get[Fe(526)](){return!0}static get[Fe(548)](){return!0}constructor(e){const t=Fe;super(e);const n=e[t(470)],r=e[t(536)];n[t(569)](t(575),!0),n[t(569)](t(506),qe(r)),n[t(569)](t(497),[]),n[t(569)](t(485),[]);let i=o(n[t(469)](t(506)),r);const s=n[t(469)](t(497)),a=n[t(469)](t(485));s[t(557)](e=>{const n=t,r=i[n(504)](t=>t[n(498)]===e[n(498)]);r?r[n(473)]=r[n(473)][n(474)](e[n(473)]):i[n(547)](e)}),i=i[t(539)](e=>!a[t(550)](e[t(498)])),i[t(557)](e=>{const n=t;e[n(473)]=e[n(473)][n(539)](e=>!a[n(550)](e.id))}),n[t(546)](t(506),i)}}function qe(e){const t=Fe;return[{groupId:t(519),groupLabel:v(e,t(520)),commands:[{id:t(524),label:v(e,t(501)),prompt:t(486)},{id:t(503),label:v(e,t(511)),prompt:t(499)},{id:t(475),label:v(e,t(510)),prompt:t(558)},{id:t(529),label:v(e,t(540)),prompt:t(480)}]},{groupId:t(571),groupLabel:v(e,t(552)),commands:[{id:t(521),label:v(e,t(502)),prompt:t(576)},{id:t(507),label:v(e,t(570)),prompt:t(532)}]},{groupId:t(573),groupLabel:v(e,t(527)),commands:[{id:t(567),label:v(e,t(479)),prompt:t(478)},{id:t(491),label:v(e,t(516)),prompt:t(515)},{id:t(505),label:v(e,t(556)),prompt:t(512)},{id:t(574),label:v(e,t(533)),prompt:t(471)},{id:t(577),label:v(e,t(476)),prompt:t(513)}]},{groupId:t(538),groupLabel:v(e,t(559)),commands:[{id:t(483),label:v(e,t(488)),prompt:t(537)},{id:t(517),label:v(e,t(493)),prompt:t(477)},{id:t(518),label:v(e,t(561)),prompt:t(535)},{id:t(523),label:v(e,t(568)),prompt:t(484)}]},{groupId:t(514),groupLabel:v(e,t(544)),commands:[{id:t(508),label:v(e,t(543)),prompt:t(489)},{id:t(564),label:v(e,t(542)),prompt:t(481)},{id:t(468),label:v(e,t(562)),prompt:t(554)},{id:t(496),label:v(e,t(549)),prompt:t(566)},{id:t(553),label:v(e,t(551)),prompt:t(525)},{id:t(492),label:v(e,t(482)),prompt:t(534)},{id:t(487),label:v(e,t(572)),prompt:t(509)},{id:t(490),label:v(e,t(531)),prompt:t(494)}]}]}function Ve(e,t){const n=Ge();return(Ve=function(e,t){return n[e-=264]})(e,t)}const ze=Ve;function Ge(){const e=["AI_ERROR_GET_HEADERS","locale","_prepareRequestHeaders","makeRequest","reject","AbortError","11QfQdCi","534405kFHipo","517820WIFnCz","140536rIXuqO","signal","75282wKgMGq","error","175wKtLLH","sendRequest","1SkhRVf","AI_ERROR_GET_PARAMETERS","1478896CXgKkK","8MgmcQa","_prepareRequestParameters","requires","abortController","aborted","get","1724690GGYPoM","editor","aitextadapter-send-request-failed","init","resolve","catch","5203332VZVGpG","abort","textAdapter","application/json","plugins","assign","object","name"];return(Ge=function(){return e})()}!function(e){const t=Ve,n=e();for(;;)try{if(296708===parseInt(t(301))/1*(-parseInt(t(295))/2)+-parseInt(t(293))/3*(-parseInt(t(266))/4)+parseInt(t(294))/5+parseInt(t(297))/6*(-parseInt(t(299))/7)+-parseInt(t(265))/8+parseInt(t(278))/9+-parseInt(t(272))/10*(parseInt(t(292))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[ze(269)];static get[ze(268)](){return[w]}constructor(e){const t=ze;super(e),this[t(269)]=new AbortController}[ze(275)](){const e=ze;this[e(273)][e(282)][e(271)](w)[e(280)]=this}[ze(279)](){const e=ze;this[e(269)][e(296)][e(270)]||(this[e(269)][e(279)](),this[e(269)]=new AbortController)}async[ze(289)](e){const t=ze;return this[t(300)](e)[t(277)](e=>{const n=t;if(e instanceof b)return Promise[n(290)](e);if(n(291)==e[n(285)])return Promise[n(276)]();throw console[n(298)](e),new i.CKEditorError(n(274),null)})}async[ze(288)](e,t){const n=ze,r=this[n(273)][n(287)],i={"Content-Type":n(281)};if(n(284)==typeof e)Object[n(283)](i,e);else if(e)try{const r=await e(t);Object[n(283)](i,r)}catch{return Promise[n(290)](new b(v(r,n(286))))}return i}async[ze(267)](e,t){const n=ze,r=this[n(273)][n(287)];if(n(284)==typeof e)return e;try{return await e(t)}catch{return Promise[n(290)](new b(v(r,n(264))))}}}const Ke=Je;function Je(e,t){const n=Qe();return(Je=function(e,t){return n[e-=266]})(e,t)}function Qe(){const e=["stream","3033173tCoSKy","_apiUrl","_prepareRequestHeaders","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","abortController","prepareMessages","signal","choices","stringify","ai.openAI.apiUrl","parse","pluginName","reject","locale","\nYou must keep the text formatting.\n\nContent:\n","resolve","2YTjguG","28104wWOyTB","config","10wxCzIL","POST","ai.openAI.requestParameters","48luaYUH","_cleanUpData","Instruction:\n","includes","content","data: ","read","_prepareRequestParameters","https://api.openai.com/v1/chat/completions","633813wHARBx","2662829SVatVG","AI_ERROR_CONTEXT_LENGTH","[DONE]","ai.openAI.requestHeaders","9MobnqA","11742VcAucb","248894XBPibS","message","body","_requestParameters","581bAnDeN","decode","get","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","_readStreamableResponse","length","delta","AI_ERROR_MODERATION","_isBufferIncomplete","context_length_exceeded","replace","editor","split","user","filter","map","Moderation","join","sendRequest","text","35ALcTwY","system","_readStaticResponse","gpt-4o","getReader","_requestHeaders","json","OpenAITextAdapter","4186376AhnlFN","define"];return(Qe=function(){return e})()}!function(e){const t=Je,n=e();for(;;)try{if(323226===-parseInt(t(317))/1+parseInt(t(295))/2*(-parseInt(t(310))/3)+parseInt(t(296))/4*(parseInt(t(268))/5)+-parseInt(t(316))/6*(-parseInt(t(321))/7)+-parseInt(t(276))/8*(parseInt(t(315))/9)+parseInt(t(298))/10*(parseInt(t(279))/11)+-parseInt(t(301))/12*(-parseInt(t(311))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qe);class Xe extends We{[Ke(280)];[Ke(273)];[Ke(320)];static get[Ke(290)](){return Ke(275)}constructor(e){const t=Ke;super(e),e[t(297)][t(277)](t(288),t(309)),e[t(297)][t(323)](t(300))||e[t(297)][t(277)](t(300),{model:t(271),temperature:1,top_p:1,stream:!0}),this[t(280)]=e[t(297)][t(323)](t(288)),this[t(273)]=e[t(297)][t(323)](t(314))||{},this[t(320)]=e[t(297)][t(323)](t(300))}async[Ke(266)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(332)][i(292)],o=await this[i(284)](e,t,r),a=await this[i(281)](this[i(273)],r),c=await this[i(308)](this[i(320)],r),u={messages:o,...c},d={method:i(299),headers:a,body:JSON[i(287)](u),signal:this[i(283)][i(285)]},l=await fetch(this[i(280)],d);if(l.ok)return c[i(278)]?await this[i(325)](l,n):await this[i(270)](l,n),Promise[i(294)]();{const e=await l[i(267)]();return e[i(304)](i(330))?Promise[i(291)](new b(v(s,i(312)))):e[i(304)](i(337))?Promise[i(291)](new b(v(s,i(328)))):Promise[i(291)](new Error(e))}}async[Ke(284)](e,t,n){const r=Ke;let i,s;return t?(i=r(282),s=r(303)+e+r(293)+t):(i=r(324),s=e),[{role:r(269),content:i},{role:r(334),content:s}]}async[Ke(325)](e,t){const n=Ke,r=e[n(319)][n(272)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(307)](),d=s+i[n(322)](u);let l="";c=e;try{l=this[n(302)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(329)](o)||o&&(a+=o,o="",t(a))}return Promise[n(294)]()}async[Ke(270)](e,t){const n=Ke;return t((await e[n(274)]())[n(286)][0][n(318)][n(305)]),Promise[n(294)]()}[Ke(329)](e){const t=Ke,n=e[t(333)]("<")[t(326)]!==e[t(333)](">")[t(326)],r=e[t(326)]<30;return n&&r}[Ke(302)](e){const t=Ke;return e[t(333)](/\n(?![^{]*\})/g)[t(336)](e=>e[t(331)](t(306),""))[t(335)](e=>e&&e[t(326)]>0&&t(313)!==e)[t(336)](e=>{const n=t,{choices:r}=JSON[n(289)](e);if(r[0]?.[n(327)]?.[n(305)])return r[0][n(327)][n(305)]})[t(335)](e=>e)[t(338)]("")}}var Ye,Ze,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Ye||(Ye={})),function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,st;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(st||(st={}));class ot{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new ot({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return ot.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!ot.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!ot.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[lt]=o),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),wt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!wt(e))return!1;return!0},bt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const At=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),Et={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:At,isSet:e=>null!=e,isValidHostLabel:wt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map(([e,t])=>`${e}=${t}`).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${Et[c]}`)||"string"==typeof e&&e.includes(`${r}:${Et[c]}`)?`:${Et[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(At(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in bt&&null!=i[1]?bt[i[0]][i[1]](...r):It[e](...r)},Ct=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new St(`'${e}' is already defined in Reference Record.`);const r=Rt(t,n);return n.logger?.debug?.(`${vt} evaluateCondition: ${kt(t)} = ${kt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Ct(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Mt=(e,t)=>{if(Array.isArray(e))return e.map(e=>Mt(e,t));switch(typeof e){case"string":return _t(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Mt(r,t)}),{}),Lt=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new St("Endpoint URL must be a string, got "+typeof n)},$t=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Tt(u,o)},...null!=c&&{properties:Ot(c,o)},url:Lt(a,o)}},Nt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Dt=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=$t(n,t);if(e)return e}else if("error"===n.type)Nt(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=Dt(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Ft=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ft(t))return!1;return!0}return!!wt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Bt=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const Ht={isVirtualHostableS3Bucket:Ft,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=Bt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function qt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}bt.aws=Ht;const Vt=/\d{12}\.ddb/;const zt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Jt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Qt)||[],a=(await e.defaultUserAgentProvider()).map(Qt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&qt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?qt(e,"RETRY_MODE_ADAPTIVE","F"):qt(e,"RETRY_MODE_STANDARD","E"):qt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Vt)&&qt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":qt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":qt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":qt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&qt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))qt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Qt)||[],d=await e.userAgentAppId();d&&a.push(Qt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[Gt]=s[Gt]?`${s[zt]} ${h}`:h),s[zt]=l):s[Gt]=l,t({...r,request:i})},Qt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Xt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Yt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Yt||(Yt={}));const Zt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Zt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},sn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class on{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Zt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||an)(i));return(o.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(ot.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),wn=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},bn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),An=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await bn(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),wn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},En=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await An(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Zt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),xn)}}}const Cn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Pn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(En({config:e,instructions:t}),Cn)}});var Tn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Tn||(Tn={}));const Mn=Tn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Ln=["TimeoutError","RequestTimeout","RequestTimeoutException"],$n=[500,502,503,504],Nn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Dn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Fn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Ln.includes(e.name)||Nn.includes(e?.code||"")||Dn.includes(e?.code||"")||$n.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Fn(e.cause,t+1);class Bn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Bn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Bn.setTimeoutFn=setTimeout;const jn=100,Hn=2e4,qn="amz-sdk-invocation-id",Vn="amz-sdk-request",zn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Hn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Tn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Hn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return zn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,zn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Tn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Bn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Jn;const Qn=new Uint8Array(16);function Xn(){if(!Jn&&(Jn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Jn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jn(Qn)}const Yn=[];for(let e=0;e<256;++e)Yn.push((e+256).toString(16).slice(1));function Zn(e,t=0){return Yn[e[t+0]]+Yn[e[t+1]]+Yn[e[t+2]]+Yn[e[t+3]]+"-"+Yn[e[t+4]]+Yn[e[t+5]]+"-"+Yn[e[t+6]]+Yn[e[t+7]]+"-"+Yn[e[t+8]]+Yn[e[t+9]]+"-"+Yn[e[t+10]]+Yn[e[t+11]]+Yn[e[t+12]]+Yn[e[t+13]]+Yn[e[t+14]]+Yn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Xn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Zn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>sr[t.step]-sr[e.step]||or[t.priority||"normal"]-or[e.priority||"normal"])).map(s).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=nr(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},sr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},or={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function wr(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const br={supported:void 0};class vr{static create(e){return"function"==typeof e?.handle?e:new vr(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===br.supported&&(br.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),br.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=yr(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),wr(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const Sr={},Ar={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Ar[t]=e}function Er(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Ar))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Ar[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)};class xr{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Rr}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Rr{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends xr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Cr="***SensitiveInformation***";class Pr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Pr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Pr?Pr.isInstance(e):!!Pr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Tr=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Mr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Or=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Lr=e=>Object.assign((e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),$r=e=>null!=e;class Nr{trace(){}debug(){}info(){}warn(){}error(){}}function Dr(e,t,n){let r,i,s;if(void 0===t&&void 0===n)r={},s=e;else{if(r=e,"function"==typeof t)return i=t,s=n,Fr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Br(r,null,s,e):r[e]=s[e];return r}const Ur=(e,t)=>{const n={};for(const r in t)Br(n,e,t,r);return n},Fr=(e,t,n)=>Dr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Br=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=jr,o=Hr,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},jr=e=>null!=e,Hr=e=>e,qr=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),Vr=e=>zr(e,32),zr=(e,t)=>{const n=qr(e);if(void 0!==n&&Gr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Gr=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Wr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Jr.warn(Kr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Kr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Jr={warn:console.warn},Qr=e=>e?.body instanceof ReadableStream,Xr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Yr=e=>{const t={error:e,errorType:Zr(e)},n=ni(e.$response);return n&&(t.retryAfterHint=n),t},Zr=e=>Un(e)?"THROTTLING":Fn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Fn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",ei={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ti=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Xr(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[qn]=er());;)try{d&&(u.headers[Vn]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=Yr(t);if(o=tr(t),d&&Qr(u))throw(n.logger instanceof Nr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise(e=>setTimeout(e,s))}}})(e),ei)}}),ni=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)};const ri=(ii=3e5,e=>si(e)&&e.expiration.getTime()-Date.now()<ii);var ii;const si=e=>void 0!==e.expiration,oi=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ai="X-Amz-Date",ci="X-Amz-Signature",ui="X-Amz-Security-Token",di="authorization",li=ai.toLowerCase(),hi=[di,li,"date"],fi=ci.toLowerCase(),pi="x-amz-content-sha256",mi=ui.toLowerCase(),gi={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},yi=/^proxy-/,wi=/^sec-/,bi="AWS4-HMAC-SHA256",vi="AWS4-HMAC-SHA256-PAYLOAD",ki="aws4_request",Si={},Ai=[],Ei=(e,t,n)=>`${e}/${t}/${n}/${ki}`,Ii=(e,t,n)=>{const r=new e(t);return r.update(oi(n)),r.digest()},_i=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in gi||t?.has(s)||yi.test(s)||wi.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},xi=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===pi)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(oi(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ri{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=lr(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Ti.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Pi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Er(e.value.replace(/\-/g,"")),1),d}}}var Ci;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ci||(Ci={}));const Pi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ti{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Mi(t),new Ti(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Mi(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Mi(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Oi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))hi.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Li=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===fi)continue;const i=mr(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${mr(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(oi(n));return`${r}\n${e}\n${t}\n${Ir(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return mr(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,Li(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Ni extends $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s}),this.headerFormatter=new Ri}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Ei(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=ot.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Oi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[ui]=d.sessionToken),m.query["X-Amz-Algorithm"]=bi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[ai]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=_i(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[ci]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await xi(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Ei(a,o,s??this.service),d=await xi({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[vi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(oi(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=Oi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ei(d,a,s??this.service);c.headers[li]=u,o.sessionToken&&(c.headers[mi]=o.sessionToken);const h=await xi(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(pi,c.headers)&&this.applyChecksum&&(c.headers[pi]=h);const f=_i(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[di]=`${bi} Credential=${o.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,bi),s=new this.sha256(await n);return s.update(oi(i)),Ir(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Ir(await Ii(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Si)return Si[s];for(Ai.push(s);Ai.length>50;)delete Si[Ai.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,ki])o=await Ii(e,o,t);return Si[s]=o})(this.sha256,e,n,t,r||this.service)}}const Di=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,ri,si):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Ni)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Ni)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const Ui=async(e,t,n)=>({operation:Zt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Fi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Bi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ji="3.823.0";var Hi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function qi(e){return e instanceof Uint8Array?e:"string"==typeof e?Hi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Vi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var zi={name:"SHA-256"},Gi={name:"HMAC",hash:zi},Wi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Ki={};function Ji(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Ki}var Qi=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Vi(e)){var t=qi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return Ji().crypto.subtle.sign(Gi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):Vi(this.toHash)?Promise.resolve(Wi):Promise.resolve().then(function(){return Ji().crypto.subtle.digest(zi,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){Ji().crypto.subtle.importKey("raw",qi(e.secret),Gi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function Xi(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,a)}c((r=r.apply(e,t||[])).next())})}function Yi(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Zi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var es=64,ts=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ns=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],rs=Math.pow(2,53)-1,is=function(){function e(){this.state=Int32Array.from(ns),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>rs)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===es&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%es>=56){for(var r=this.bufferLength;r<es;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],d=0;d<es;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(ts[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+p|0,s=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),ss=function(){function e(e){this.secret=e,this.hash=new is,this.reset()}return e.prototype.update=function(e){if(!Vi(e)&&!this.error)try{this.hash.update(qi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Xi(this,void 0,void 0,function(){return Yi(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new is,this.secret){this.outer=new is;var e=function(e){var t=qi(e);if(t.byteLength>es){var n=new is;n.update(t),t=n.digest()}var r=new Uint8Array(es);return r.set(t),r}(this.secret),t=new Uint8Array(es);t.set(e);for(var n=0;n<es;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var os=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function as(e){return e&&os.every(function(t){return"function"==typeof e[t]})}var cs=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&as(e.crypto.subtle)}(Ji())?this.hash=new ss(e):this.hash=new Qi(e)}return e.prototype.update=function(e,t){this.hash.update(qi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),us=n(369),ds=n.n(us);const ls=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?ds().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};!function(){function e(){this.crc32=new fs}e.prototype.update=function(e){Vi(e)||this.crc32.update(qi(e))},e.prototype.digest=function(){return Xi(this,void 0,void 0,function(){return Yi(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new fs}}();var hs,fs=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Zi(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^ps[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),ps=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class ms{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&gs(t),new ms(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&gs(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function gs(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class ys{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ms.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!xs.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Er(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:ws,value:!0};break;case 1:t[i]={type:ws,value:!1};break;case 2:t[i]={type:bs,value:e.getInt8(n++)};break;case 3:t[i]={type:vs,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:ks,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Ss,value:new ms(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:As,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const s=e.getUint16(n,!1);n+=2,t[i]={type:Es,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Is,value:new Date(new ms(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:_s,value:`${Ir(o.subarray(0,4))}-${Ir(o.subarray(4,6))}-${Ir(o.subarray(6,8))}-${Ir(o.subarray(8,10))}-${Ir(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(hs||(hs={}));const ws="boolean",bs="byte",vs="short",ks="integer",Ss="long",As="binary",Es="string",Is="timestamp",_s="uuid",xs=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Rs{constructor(e,t){this.headerMarshaller=new ys(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),s=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new fs;return s.setUint32(0,r,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),s.setUint32(r-4,o.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=r.getUint32(4,!1),o=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new fs).update(new Uint8Array(n,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,s),body:new Uint8Array(n,t+8+4+s,i-s-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Cs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Ps{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Ts{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Ms{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Os(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},s=await e(i);if(s.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw s[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class Ls{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Rs(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const s=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const o=Math.min(t-n,c-u);r.set(e.slice(u,u+o),n),n+=o,u+=o,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new Ts({messageStream:new Cs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Os(t,this.utfEncoder)})}serialize(e,t){return new Ps({messageStream:new Ms({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class $s{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Ls({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Ns(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const Ns=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Ds=e=>new $s(e),Us="function"==typeof TextEncoder?new TextEncoder:null,Fs=e=>{if("string"==typeof e){if(Us)return Us.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Bs=e=>new Date(Date.now()+e),js=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Hs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Bs(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},qs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Vs{async sign(e,t,n){if(!ot.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=qs("context",e.context),n=qs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=qs("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:Bs(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??js(t.$response);if(n){const r=qs("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Hs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=js(e);if(n){const e=qs("config",t.config);e.systemClockOffset=Hs(n,e.systemClockOffset)}}}const zs="required",Gs="fn",Ws="argv",Ks="ref",Js=!0,Qs="isSet",Xs="booleanEquals",Ys="error",Zs="endpoint",eo="tree",to="PartitionResult",no={[zs]:!1,type:"String"},ro={[zs]:!0,default:!1,type:"Boolean"},io={[Ks]:"Endpoint"},so={[Gs]:Xs,[Ws]:[{[Ks]:"UseFIPS"},!0]},oo={[Gs]:Xs,[Ws]:[{[Ks]:"UseDualStack"},!0]},ao={},co={[Gs]:"getAttr",[Ws]:[{[Ks]:to},"supportsFIPS"]},uo={[Gs]:Xs,[Ws]:[!0,{[Gs]:"getAttr",[Ws]:[{[Ks]:to},"supportsDualStack"]}]},lo=[so],ho=[oo],fo=[{[Ks]:"Region"}],po={version:"1.0",parameters:{Region:no,UseDualStack:ro,UseFIPS:ro,Endpoint:no},rules:[{conditions:[{[Gs]:Qs,[Ws]:[io]}],rules:[{conditions:lo,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Ys},{rules:[{conditions:ho,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Ys},{endpoint:{url:io,properties:ao,headers:ao},type:Zs}],type:eo}],type:eo},{rules:[{conditions:[{[Gs]:Qs,[Ws]:fo}],rules:[{conditions:[{[Gs]:"aws.partition",[Ws]:fo,assign:to}],rules:[{conditions:[so,oo],rules:[{conditions:[{[Gs]:Xs,[Ws]:[Js,co]},uo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ao,headers:ao},type:Zs}],type:eo}],type:eo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Ys}],type:eo},{conditions:lo,rules:[{conditions:[{[Gs]:Xs,[Ws]:[co,Js]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ao,headers:ao},type:Zs}],type:eo}],type:eo},{error:"FIPS is enabled but this partition does not support FIPS",type:Ys}],type:eo},{conditions:ho,rules:[{conditions:[uo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ao,headers:ao},type:Zs}],type:eo}],type:eo},{error:"DualStack is enabled but this partition does not support DualStack",type:Ys}],type:eo},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:ao,headers:ao},type:Zs}],type:eo}],type:eo}],type:eo},{error:"Invalid Configuration: Missing Region",type:Ys}],type:eo}]},mo=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),go=(e,t={})=>mo.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const o=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(po,{endpointParams:e,logger:t.logger}));bt.aws=Ht;Error;const yo=["in-region","cross-region","mobile","standard","legacy"],wo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?ds().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bo=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await a()),r):async e=>(s&&!e?.forceRefresh||(r=await a()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(wo()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${yo.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Or),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??go,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Vs}],logger:e?.logger??new Nr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??kn,utf8Decoder:e?.utf8Decoder??lr,utf8Encoder:e?.utf8Encoder??fr}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Fs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ls({serviceId:r.serviceId,clientVersion:ji}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Ds,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Mn),sha256:e?.sha256??cs,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},vo=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Lr(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class ko extends ar{config;constructor(...[e]){const t=bo(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Tn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>Sn(await en(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=Di(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=vo(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Jt(l),Xt)}})),this.middlewareStack.use(ti(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),sn)}}))(this.config,{httpAuthSchemeParametersProvider:Ui,identityProviderConfigProvider:async e=>new on({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class So extends Pr{constructor(e){super(e),Object.setPrototypeOf(this,So.prototype)}}class Ao extends So{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ao.prototype)}}var Eo;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(Eo||(Eo={}));class Io extends So{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Io.prototype)}}class _o extends So{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,_o.prototype)}}class xo extends So{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,xo.prototype)}}class Ro extends So{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Ro.prototype)}}class Co extends So{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Co.prototype)}}class Po extends So{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Po.prototype)}}class To extends So{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,To.prototype)}}var Mo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Mo||(Mo={}));var Oo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Oo||(Oo={}));var Lo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Lo||(Lo={}));var $o;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($o||($o={}));var No;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));var Do,Uo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Uo||(Uo={}));var Fo,Bo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Fo||(Fo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={}));var jo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={}));var Ho,qo,Vo,zo,Go,Wo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(qo||(qo={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(Vo||(Vo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(zo||(zo={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Go||(Go={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Wo||(Wo={}));class Ko extends So{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Ko.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Jo extends So{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,Jo.prototype)}}class Qo extends So{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,Qo.prototype)}}var Xo,Yo,Zo,ea;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(Xo||(Xo={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Yo||(Yo={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Zo||(Zo={}));class ta extends So{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ta.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ea||(ea={}));var na,ra,ia;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ia||(ia={}));const sa=e=>({...e,...e.body&&{body:Cr}}),oa=e=>({...e,...e.body&&{body:Cr}}),aa=e=>({...e,...e.body&&{body:Cr}}),ca=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ua=(e,t)=>((e,t)=>_r(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),da=async(e,t)=>{const n=await ua(e,t);return n.message=n.message??n.Message,n};function la(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function ha(e,t){return new fa(e,t)}class fa{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new ot({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map(e=>la(e)).join("/"):la(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const pa=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[za]:e[Va]||"application/octet-stream",[qa]:e[qa],[tc]:e[Ja],[Ya]:e[Ga],[Za]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ma=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[za]:e[Va]||"application/octet-stream",[Qa]:e[qa],[tc]:e[Ja],[Ya]:e[Ga],[Za]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ga=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:Ha(e),[Va]:[,e.headers[za]],[Ka]:[,e.headers[ec]]}),r=await _r(e.body,t);return n.body=r,n},ya=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:Ha(e),[Va]:[,e.headers[Xa]],[Ka]:[,e.headers[ec]]}),r=e.body;return n.body=Oa(r,t),n},wa=async(e,t)=>{const n={...e,body:await da(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ka(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Aa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ra(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ca(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Ta(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ma(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Ea(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await Ia(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await xa(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Pa(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await _a(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Sa(n,t);default:const i=n.body;return ba({output:e,parsedBody:i,errorCode:r})}},ba=(va=So,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Mr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw Tr(o,t)})({output:e,parsedBody:t,exceptionCtor:va,errorCode:n})});var va;const ka=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new Ao({$metadata:Ha(e),...n});return Tr(s,e.body)},Sa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new Ro({$metadata:Ha(e),...n});return Tr(s,e.body)},Aa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new Io({$metadata:Ha(e),...n});return Tr(s,e.body)},Ea=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalStatusCode:Vr,resourceName:Wr});Object.assign(n,i);const s=new Ko({$metadata:Ha(e),...n});return Tr(s,e.body)},Ia=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new Jo({$metadata:Ha(e),...n});return Tr(s,e.body)},_a=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalMessage:Wr,originalStatusCode:Vr});Object.assign(n,i);const s=new ta({$metadata:Ha(e),...n});return Tr(s,e.body)},xa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new Qo({$metadata:Ha(e),...n});return Tr(s,e.body)},Ra=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new Co({$metadata:Ha(e),...n});return Tr(s,e.body)},Ca=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new Po({$metadata:Ha(e),...n});return Tr(s,e.body)},Pa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new To({$metadata:Ha(e),...n});return Tr(s,e.body)},Ta=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new _o({$metadata:Ha(e),...n});return Tr(s,e.body)},Ma=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const s=new xo({$metadata:Ha(e),...n});return Tr(s,e.body)},Oa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Da(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await La(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await $a(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ba(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Fa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Na(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ua(n.serviceUnavailableException,t)}:{$unknown:e}),La=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Aa(n,t)},$a=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return _a(n,t)},Na=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return xa(n,t)},Da=async(e,t)=>{const n={},r=await ua(e.body,t);return Object.assign(n,ja(r,t)),n},Ua=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Pa(n,t)},Fa=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ta(n,t)},Ba=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ma(n,t)},ja=(e,t)=>Ur(e,{bytes:t.base64Decoder}),Ha=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),qa="accept",Va="contentType",za="content-type",Ga="guardrailIdentifier",Wa="guardrailVersion",Ka="performanceConfigLatency",Ja="trace",Qa="x-amzn-bedrock-accept",Xa="x-amzn-bedrock-content-type",Ya="x-amzn-bedrock-guardrailidentifier",Za="x-amzn-bedrock-guardrailversion",ec="x-amzn-bedrock-performanceconfig-latency",tc="x-amzn-bedrock-trace";class nc extends(xr.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(aa,ca).ser(ma).de(ya).build()){}class rc extends(xr.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(sa,oa).ser(pa).de(ga).build()){}const ic=sc;function sc(e,t){const n=oc();return(sc=function(e,t){return n[e-=311]})(e,t)}function oc(){const e=["json","application/json","ai21.j2","pluginName","generation","anthropic.claude-v2","\n<</SYS>>\n[INST]\n","filter","config","split","getReader","map","_prepareRequestParameters","Human:\n","stringify","ai.aws.requestParameters","ai.aws.bedrockClientConfig","_requestParameters","get","2778cPdTms","text","anthropic.claude","preparePrompt","_requestHeaders","_bedrockClientConfig","generations","editor","<<SYS>>\n","body","abortController","\nYou must keep the text formatting.\n\nContent:\n","parse","test","36UpUJVZ","Instruction:\n","_readStreamableResponse","POST","1253396rxvhRk","AI_ERROR_UNSUPPORTED_MODEL","sendRequest","64307419AcoxDy","locale","\n\nAssistant:","3516668MFqqDD","bytes","ai.aws.apiUrl","bedrock-2023-05-31","17269JeMfqx","meta.llama","10291580VFUmQU","_processProxyRequest","AWSTextAdapter","1259052cXOoJY","_readStaticResponse","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","completion","_getGeneratedText","signal","5irIelx","resolve","data","utf-8","completions","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","define","2uIErgu","decode","send","\n[/INST]","ai.aws.requestHeaders","cohere.command","660776nTeSNf","chunk","join","_prepareRequestHeaders","_processAWSRequest","read","_readAsyncIterableResponse","getModelFamily","length","_apiUrl"];return(oc=function(){return e})()}!function(e){const t=sc,n=e();for(;;)try{if(792115===parseInt(t(370))/1*(-parseInt(t(317))/2)+-parseInt(t(385))/3+-parseInt(t(376))/4*(parseInt(t(391))/5)+parseInt(t(352))/6*(-parseInt(t(380))/7)+-parseInt(t(323))/8*(parseInt(t(366))/9)+-parseInt(t(382))/10+parseInt(t(373))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oc);class ac extends We{[ic(332)];[ic(356)];[ic(357)];[ic(350)];static get[ic(336)](){return ic(384)}constructor(e){const t=ic;super(e),e[t(341)][t(351)](t(348))||e[t(341)][t(316)](t(348),{model:t(338),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(379),stream:!0}),this[t(332)]=e[t(341)][t(351)](t(378)),this[t(357)]=e[t(341)][t(351)](t(349)),this[t(356)]=e[t(341)][t(351)](t(321)),this[t(350)]=e[t(341)][t(351)](t(348))}async[ic(372)]({query:e,context:t,onData:n,actionId:r}){const i=ic,{model:s,stream:o,...a}=await this[i(345)](this[i(350)],r),c={prompt:await this[i(355)](e,t,s,r),...a};this[i(332)]?await this[i(383)](c,s,o,n,r):await this[i(327)](c,s,o,n)}async[ic(355)](e,t,n,r){const i=ic;let s,o;return t?(s=i(315),o=i(367)+e+i(363)+t):(s=i(387),o=e),i(381)==this[i(330)](n)?i(360)+s+i(339)+o+i(320):i(346)+s+"\n"+o+i(375)}[ic(330)](e){const t=ic;if(/^anthropic\.claude/[t(365)](e))return t(354);if(/^ai21\.j2/[t(365)](e))return t(335);if(/^cohere\.command/[t(365)](e))return t(322);if(/^meta\.llama/[t(365)](e))return t(381);throw new b(v(this[t(359)][t(374)],t(371),e))}async[ic(383)](e,t,n,r,i){const s=ic,o={method:s(369),headers:await this[s(326)](this[s(356)],i),body:JSON[s(347)]({...e,model:t,stream:n}),signal:this[s(362)][s(390)]},a=await fetch(this[s(332)],o);n?await this[s(368)](a,t,r):await this[s(386)](a,t,r)}async[ic(327)](e,t,n,r){const i=ic,s=new ko(this[i(357)]),o={body:JSON[i(347)](e),contentType:i(334),accept:i(334),modelId:t};let a;if(n){const e=new nc(o);a=await s[i(319)](e,{abortSignal:this[i(362)][i(390)]}),await this[i(329)](a,t,r)}else{const e=new rc(o);a=await s[i(319)](e,{abortSignal:this[i(362)][i(390)]}),await this[i(386)](a,t,r)}}async[ic(329)](e,t,n){const r=ic,i=e[r(361)],s=new TextDecoder(r(313));let o="";for await(const e of i)if(e[r(324)]){const i=s[r(318)](e[r(324)][r(377)]),a=JSON[r(364)](i);o+=this[r(389)](a,t),n(o)}return Promise[r(311)]()}async[ic(368)](e,t,n){const r=ic,i=e[r(361)],s=new TextDecoder(r(313)),o=i[r(343)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(328)]();if(u=e,u)break;const d=(a+s[r(318)](i))[r(342)]("\n")[r(344)](e=>{const t=r;try{return a="",JSON[t(364)](e)}catch{return a=e,null}})[r(340)](e=>null!==e);d[r(331)]&&(c+=d[r(344)](e=>this[r(389)](e,t))[r(325)](""),n(c))}return Promise[r(311)]()}async[ic(386)](e,t,n){const r=ic;let i;return i=e instanceof Response?await e[r(333)]():JSON[r(364)](new TextDecoder(r(313))[r(318)](e[r(361)])),n(this[r(389)](i,t)),Promise[r(311)]()}[ic(389)](e,t){const n=ic;switch(this[n(330)](t)){case n(354):return e[n(388)];case n(335):return e[n(314)][0][n(312)][n(353)];case n(322):return e[n(358)][0][n(353)];case n(381):return e[n(337)]}}}function cc(e,t){var n=uc();return(cc=function(e,t){return n[e-=416]})(e,t)}function uc(){var e=["154mwLWlq","2JMYhuf","530GvykKD","15669lvXNSy","109445sHptbV","980049QZtQWM","57990enaFuj","6868zMcdMU","152xJJdcW","1880410uDDaYe","18293CXlRMl","708qvtenK"];return(uc=function(){return e})()}!function(e){for(var t=cc,n=e();;)try{if(164499===parseInt(t(420))/1+parseInt(t(417))/2*(parseInt(t(421))/3)+parseInt(t(423))/4*(-parseInt(t(418))/5)+-parseInt(t(422))/6*(parseInt(t(416))/7)+parseInt(t(424))/8*(parseInt(t(419))/9)+parseInt(t(425))/10+-parseInt(t(426))/11*(parseInt(t(427))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(uc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
5
+ */(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=s},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)}),r>0){var s=Object.keys(n),c=a.default.find(s,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(s,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(o>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=s},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&s[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var o;if(r)o="";else{o="",i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,s&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,o);else{var a=document.createTextNode(o),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}s.push(l)}return s}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var c=r(e,i),u=0;u<o.length;u++){var d=n(o[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}o=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=s},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>w,AIAssistant:()=>He,AIAssistantUI:()=>De,AIRequestError:()=>b,AITextAdapter:()=>Ge,AWSTextAdapter:()=>ac,OpenAITextAdapter:()=>Je,ShowAIAssistantCommand:()=>S,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),o=n(311);function s(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=l;function d(){const e=["insertContent","addMarker","64zBiqij","join","isPremiumPlugin","getChildren","TableUtils","fromCharCode","ai.useTheme","showFakeVisualSelection","once","getRows","_prepareTableInsertBelowPosition","getSelectedTableCells","deleteContent","1281945HYhKSq","createSelection","schema","last","get","getColumnIndexes","_getDefaultInsertBelowPosition","parse","isContent","removeMarker","getRanges","1PZDlNv","editor","_pasteHTMLUsingClipboard","conversion","href","_getAISelection","pop","insertRows","table","_resetContentOfSelectedTableCells","start","DataTransfer","AIAssistantEditing","130506mdVXjZ","map","setData","editingDowncast","markerRange","setSelection","_createEmptyTableRows","for","editing","ai-ui","hideFakeVisualSelection","1042284stGrVy","text/html","markerToHighlight","data","document","getSelectedBlocks","getMarkersGroup","element","2740fGosDj","afterInit","getLastPosition","change","init","createUIElement","push","config","getRange","findAncestor","paste","off","ck-fake-ai-selection","from","isAtEnd","pluginName","77238QefRJq","updateMarker","3TyRLyV","isOfficialPlugin","createPositionAt","524524slqOHK","ck-ai-assistant-ui_theme","addClass","canEditAt","423042bpeYIx","isCollapsed","getRowIndexes","_getTableRowCountFromContent","createRange","1422ChrgTd","plugins","insertContentBelow","first","filter","span","lowest","model","markerToElement","fire","end","length","markers","getFirstRange","contentInsertion","ck-fake-ai-selection_collapsed","getChild","getLastMatchingPosition","has","selection","forEach","resultRange","createPositionAfter"];return(d=function(){return e})()}function l(e,t){const n=d();return(l=function(e,t){return n[e-=325]})(e,t)}!function(e){const t=l,n=e();for(;;)try{if(136426===-parseInt(t(424))/1*(-parseInt(t(370))/2)+-parseInt(t(363))/3*(parseInt(t(337))/4)+parseInt(t(413))/5+parseInt(t(326))/6+-parseInt(t(361))/7*(parseInt(t(400))/8)+parseInt(t(375))/9*(parseInt(t(345))/10)+-parseInt(t(366))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const h=globalThis[u(435)],f=u(335);class p extends e.Plugin{static get[u(360)](){return u(325)}static get[u(364)](){return!0}static get[u(402)](){return!0}[u(349)](){const e=u,{editor:t}=this,n=[e(357)];t[e(352)][e(417)](e(406))&&n[e(351)](e(367)),t[e(427)][e(333)](e(329))[e(339)]({model:f,view:{classes:n,priority:12}}),t[e(427)][e(333)](e(329))[e(383)]({model:f,view:(t,{writer:n})=>{const r=e;if(!t[r(330)][r(371)])return null;const i=n[r(350)](r(380));return n[r(368)]([r(357),r(390)],i),i}})}[u(346)](){!async function(e){const t=g([100,50,120,101,97,122,55,121,75,51,104,117,81,70,66,112,54,77,107,116,72,68,56,115,78,113,49,108,99,110,74,52,106,98,119,86,57,105,82,69,80,83,102,65,118,111,67,79,53,103,87,48,114,88,85,109,73,89,84,76,90,71]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],o=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),s={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),o[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](d(e)):null}function d(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=l;return e[t(327)](e=>String[t(405)](e))[t(401)]("")}!function(e){const n=function(){const e=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let n=g([100]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await o,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(s())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(o(),e),()=>{const e=s();return null==e?(o(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function o(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function s(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),o[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function s(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,o,s]=r;return t(i),await n(i,o,s),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](d(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),o=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),s,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,o)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1754438400;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=l,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(428)]);if(n[g([105,110,99,108,117,100,101,115])](r))return!0;const i=r[g([115,112,108,105,116])](g([46]));return n[g([102,105,108,116,101,114])](e=>e[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](e=>e[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](e=>e[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](e=>Array(i[g([108,101,110,103,116,104])]-e[g([108,101,110,103,116,104])])[g([102,105,108,108])](e[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](e))[g([115,111,109,101])](e=>i[g([101,118,101,114,121])]((t,n)=>e[n]===t||e[n]===g([42])))}()?(e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(t=c(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(t=c(g([84,114,105,97,108,76,105,109,105,116]))),await(t&&m?new(window[g([80,114,111,109,105,115,101])])((e,n)=>{t[g([116,104,101,110])](e,n),m[g([116,104,101,110])](t=>{t!=g([86,97,108,105,100])&&e(t)},n)}):t||m||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[u(407)](){const e=u,t=this[e(425)][e(382)];t[e(348)](n=>{const r=e,i=t[r(341)][r(394)][r(423)]();let o=0;for(const e of i){const i=f+":"+o;if(t[r(387)][r(393)](i))n[r(362)](i,{range:e});else if(e[r(434)][r(359)]){const o=e[r(434)][r(392)](({item:e})=>!t[r(415)][r(421)](e),{boundaries:e});n[r(399)](i,{usingOperation:!1,affectsData:!1,range:n[r(374)](o,e[r(385)])})}else n[r(399)](i,{usingOperation:!1,affectsData:!1,range:e});o++}})}[u(336)](){const e=u,t=this[e(425)][e(382)],n=Array[e(358)](this[e(425)][e(382)][e(387)][e(343)](f));n[e(386)]&&t[e(348)](t=>{const r=e;n[r(395)](e=>{t[r(422)](e)})})}[u(398)](e,t){const n=u,r=this[n(429)](),i=t||r[n(388)]();this[n(425)][n(382)][n(369)](i)&&this[n(425)][n(382)][n(348)](o=>{const s=n;this[s(336)](),t||this[s(433)](o,r),this[s(426)]({insertAt:i,writer:o,html:e})})}[u(377)](e){const t=u,{model:n}=this[t(425)],r=this[t(429)]();n[t(348)](()=>{const n=t,i=this[n(410)](e,r)||this[n(419)](r);this[n(398)](e,i)})}[u(429)](){const e=u,t=this[e(425)][e(382)],n=Array[e(358)](t[e(387)][e(343)](f))[e(327)](t=>t[e(353)]());return t[e(414)](n)}[u(426)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(425)][r(334)],o=this[r(425)][r(376)][r(417)](a.ClipboardPipeline),s=new h;s[r(328)](r(338),t);const d=new ClipboardEvent(r(355),{clipboardData:s}),l=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(s)});e[r(331)](n);const f=(t,n)=>{const i=r;n[i(396)]&&e[i(331)](n[i(396)])};o[r(408)](r(389),f,{priority:r(381)}),i[r(341)][r(384)](r(355),l),o[r(356)](r(389),f)}[u(419)](e){const t=u,{model:n}=this[t(425)],r=Array[t(358)](e[t(342)]());return r[t(386)]?n[t(397)](r[t(430)]()):e[t(347)]()}[u(410)](e,t){const n=u,{model:r,plugins:i}=this[n(425)];if(i[n(393)](n(404))){const o=i[n(417)](n(404))[n(411)](t);if(o[n(386)]){const t=this[n(373)](e),i=this[n(332)](o,t);return r[n(365)](i,0)}}return null}[u(373)](e){const t=u,n=this[t(425)][t(376)][t(417)](t(404)),r=this[t(425)][t(340)][t(420)](e),i=Array[t(358)](r[t(403)]())[t(379)](e=>e.is(t(344),t(432)));let o=0;return i[t(395)](e=>{o+=n[t(409)](e)}),o}[u(332)](e,t){const n=u,r=this[n(425)][n(376)][n(417)](n(404)),i=r[n(372)](e),o=r[n(418)](e),s=i[n(416)]+1,a=o[n(378)],c=e[0][n(354)](n(432));for(let e=0;e<t;e++)r[n(431)](c,{at:s});return c[n(391)](s)[n(391)](a)}[u(433)](e,t){const n=u,{plugins:r}=this[n(425)],{model:i}=e;r[n(393)](n(404))&&r[n(417)](n(404))[n(411)](t)[n(386)]&&i[n(412)](t)}}function m(e,t){var n=y();return(m=function(e,t){return n[e-=260]})(e,t)}var g=m;function y(){var e=["isOfficialPlugin","pluginName","40IdtKMY","178589AWvEFl","aiadapter-text-adapter-not-set","119772cvGoQZ","1578wMhmYD","2120aniGvR","textAdapter","1343184tLRluu","512866PSBSqQ","AIRequestError","isPremiumPlugin","21vqBalh","afterInit","AIAdapter","2476565spaBKS","3538242fIDtkc","name"];return(y=function(){return e})()}!function(e){for(var t=m,n=e();;)try{if(255425===-parseInt(t(276))/1+-parseInt(t(264))/2+-parseInt(t(260))/3*(parseInt(t(261))/4)+-parseInt(t(270))/5+-parseInt(t(278))/6*(-parseInt(t(267))/7)+-parseInt(t(263))/8+-parseInt(t(271))/9*(-parseInt(t(275))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(y);class w extends e.Plugin{static get[g(274)](){return g(269)}static get[g(273)](){return!0}static get[g(266)](){return!0}[g(268)](){var e=g;if(!this[e(262)])throw new i.CKEditorError(e(277),null)}}class b extends Error{constructor(e){var t=g;super(e),this[t(272)]=t(265)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=A;!function(e){const t=A,n=e();for(;;)try{if(716637===-parseInt(t(443))/1+parseInt(t(468))/2+parseInt(t(441))/3+parseInt(t(447))/4*(parseInt(t(439))/5)+-parseInt(t(456))/6+-parseInt(t(463))/7+-parseInt(t(467))/8*(-parseInt(t(454))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(E);class S extends e.Command{[k(435)];constructor(e,t){const n=k;super(e),this[n(435)]=t,this[n(451)](n(460),[]),this.on(n(448),(e,t,r)=>{const i=n;this[i(433)]&&(this[i(460)]=I(this[i(435)],r))}),this[n(451)](n(449),!1),this.on(n(438),(e,t,r)=>{const i=n;this[i(460)]=r?I(this[i(435)],this[i(449)]):[]})}[k(455)](){const e=k,t=this[e(453)][e(429)];this[e(449)]=function(t){const n=e,r=t[n(457)][n(430)];return r[n(471)]?0!==[...r[n(458)]()][n(444)]&&![...r[n(458)]()][0][n(464)]:!!t[n(461)](r[n(437)]())}(t);const n=t[e(457)][e(430)],r=this[e(453)][e(462)][e(445)](e(446));for(const t of n[e(450)]())for(const n of t[e(465)]())if(n.is(e(436))&&r[e(440)](n[e(452)]))return void(this[e(433)]=!1);this[e(433)]=!0}[k(469)](e="",t="",n=k(431)){const r=k;this[r(453)][r(459)][r(445)](De)[r(442)](e,t,n)}}function E(){const e=["_commandDefinitions","element","getFirstRange","change:isEnabled","5sDDUGQ","includes","1449933idBkUI","showUI","1303148EKweAq","length","get","ai.aiAssistant.disabledElements","5192048EYPins","change:_hasContext","_hasContext","getRanges","set","name","editor","72svLxxw","refresh","3980904CpDnNa","document","getSelectedBlocks","plugins","enabledCommandsIds","hasContent","config","7827813xbDkjr","isEmpty","getItems","from","1534096NnKOgN","972218iKwQFf","execute","requiresContent","isCollapsed","model","selection","custom","values","isEnabled","add"];return(E=function(){return e})()}function A(e,t){const n=E();return(A=function(e,t){return n[e-=429]})(e,t)}function I(e,t){const n=k,r=new Set;for(const i of e[n(432)]())(t||!1===i[n(470)])&&r[n(434)](i.id);return Array[n(466)](r)}const _=x;function x(e,t){const n=R();return(x=function(e,t){return n[e-=352]})(e,t)}function R(){const e=["startsWith","stringify","querySelector","catch","length","1095591AdErjq","previousQuery","submitPrompt","endsWith","5751490tOURHy","_parseAndNormalizeContent","ELEMENT_NODE","clear","textAdapter","handleError","_normalizeResponseHeadings","_domParser","reset","message","rename","ai.aiAssistant.preserveComments","1663618wrkfWa","mainAction","render","nodeType","51maDXGm","isRendered","stopListening","custom","value","trim","prompt","1442417MOMDYp","destroy","finally","substring","editor","set:currentContext","toView","text/html","_xmlSerializer","startProcessing","exec","domConverter","stopProcessing","<h1></h1>","2637070wUrrTG","abort","document","updateView","config","```","isProcessing","1893654KovQtu","previousActionId","viewToDom","```html","toModel","setContentOf","element","_isH1TagSupportEnabled","45FglLOT","previousLabel","reverse","282404tcZzPC","once","match","push","initialContext","processor","listenTo","parseFromString","childNodes","div","htmlProcessor","get","_handleQuery","view","finishProcessing","body","remove","_stripMarkdownSyntax","_sanitizeHTML","8sBkoNy","markers","data","set","from","previousContext","then","name","currentContext","tryAgainEvent","serializeToString","createElement","_sanitizationContainer","editing","innerHTML","currentResponse","makeRequest"];return(R=function(){return e})()}!function(e){const t=x,n=e();for(;;)try{if(746676===parseInt(t(448))/1+parseInt(t(437))/2+-parseInt(t(441))/3*(parseInt(t(380))/4)+parseInt(t(425))/5+-parseInt(t(369))/6+parseInt(t(421))/7*(parseInt(t(399))/8)+parseInt(t(377))/9*(-parseInt(t(362))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(R);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(352)];[_(429)];[_(393)];[_(411)];[_(432)];[_(356)];constructor(e,t,n){const r=_;super(),this[r(352)]=e,this[r(429)]=t,this[r(411)]=document[r(410)](r(389)),this[r(432)]=new DOMParser,this[r(356)]=new XMLSerializer,this[r(393)]=n,this[r(402)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(353),(e,t,n)=>{const i=r;this[i(393)][i(445)]=this[i(398)](n)}),this[r(386)](this[r(393)],r(423),(e,t)=>{const n=r,i=this[n(407)]||this[n(384)];this[n(392)](t,i,n(444))}),this[r(386)](this[r(393)],r(408),()=>{const e=r;this[e(393)][e(447)]=this[e(378)],this[e(392)](this[e(422)],this[e(404)],this[e(370)],this[e(378)])}),this[r(386)](this[r(393)],r(360),()=>{this[r(360)]()})}[_(449)](){this[_(443)]()}async[_(365)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const o=_;this[o(393)][o(447)]=r,this[o(393)][o(438)]=i,this[o(384)]=n,t&&(this[o(393)][o(442)]?this[o(392)](t,n,e,r):this[o(393)][o(381)](o(439),()=>{this[o(392)](t,n,e,r)}))}[_(360)](){const e=_;this[e(368)]&&(this[e(368)]=!1,this[e(393)][e(394)](),this[e(429)][e(363)]())}[_(433)](){const e=_;this[e(384)]="",this[e(407)]="",this[e(414)]="",this[e(404)]="",this[e(422)]="",this[e(378)]="",this[e(370)]=void 0,this[e(393)][e(433)](),this[e(360)]()}async[_(392)](e,t,n,r){const i=_;return this[i(368)]=!0,this[i(393)][i(357)](),this[i(404)]=t,this[i(422)]=e,this[i(378)]=r||e,this[i(370)]=n,new Promise(r=>{const o=i;this[o(429)][o(415)]({query:e,context:t,onData:e=>{const t=o;this[t(414)]=e,this[t(407)]=this[t(426)](this[t(414)])},actionId:n})[o(405)](()=>{const e=o;!this[e(407)]&&this[e(414)]&&(this[e(407)]=this[e(426)](this[e(414)],!0))})[o(419)](e=>{const t=o;e instanceof b?this[t(393)][t(430)](e[t(434)]):this[t(393)][t(430)](),r()})[o(450)](()=>{this[o(360)](),r()})})}[_(426)](e,t=!1){const n=_,r=C[n(358)](e);e=r?e[n(451)](r[1][n(420)]):e[n(420)]<100&&!t?"":this[n(397)](e);const i=this[n(432)][n(387)](e,n(355));if(r){const e=Array[n(403)](i[n(395)][n(388)]);e[n(379)]();for(const t of e){if(t[n(440)]==Node[n(427)])break;t[n(396)]()}}const o=this[n(352)][n(401)][n(385)][n(354)](this[n(356)][n(409)](i[n(395)]));this[n(376)]()||this[n(431)](o);const s=this[n(352)][n(366)][n(391)](n(436)),a=this[n(352)][n(401)][n(373)](o);return s||a[n(400)][n(428)](),this[n(352)][n(401)][n(417)](a)}[_(431)](e){const t=_,n=new c.ViewUpcastWriter(this[t(352)][t(412)][t(393)][t(364)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let o=!1;for(const n of e)n.is(t(375))&&r[t(382)](n)&&(i[t(383)](n),"h1"==n[t(406)]&&(o=!0));if(o)for(const e of i)n[t(435)]("h"+(parseInt(e[t(406)][1])+1),e)}[_(376)](){const e=_,{data:t,editing:n}=this[e(352)],r=t[e(390)][e(354)](e(361)),i=t[e(354)](t[e(373)](r));return!!n[e(393)][e(359)][e(371)](i)[e(418)]("h1")}[_(398)](e){const t=_;return this[t(352)][t(412)][t(393)][t(359)][t(374)](this[t(411)],e),this[t(411)][t(413)]}[_(397)](e){const t=_,n=e[t(446)]();return n[t(416)](t(372))?n[t(424)](t(367))?n[t(451)](7,n[t(420)]-3):n[t(451)](7):e}}const T=M;function M(e,t){const n=O();return(M=function(e,t){return n[e-=171]})(e,t)}function O(){const e=["replaceButton","toUpperCase","ck-hidden","label","318rEbjek","2819677ggGmBU","items","440YBbtZV","8086400jbhGjQ","AI_","bind","tryAgainButton","Stop","4934aSzbop","locale","19528prAgDA","bindTemplate","174pbhDNN","ck-ai-form__toolbar","stopButton","insertButton","extendTemplate","Insert below","_CONTENT","2666970FIOojg","Try again","_createButton","ck-button-action","isVisible","insert","41845xFYInj","6860450ravarh","REPLACE","set","mainAction","replace","addMany"];return(O=function(){return e})()}!function(e){const t=M,n=e();for(;;)try{if(557445===-parseInt(t(175))/1*(parseInt(t(181))/2)+-parseInt(t(185))/3*(-parseInt(t(183))/4)+-parseInt(t(198))/5*(parseInt(t(172))/6)+parseInt(t(173))/7+parseInt(t(176))/8+-parseInt(t(192))/9+parseInt(t(199))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(O);const L={REPLACE:T(203),INSERT:T(197)};class $ extends o.ToolbarView{constructor(e){const t=T;super(e),this[t(201)](t(196),!1),this[t(201)](t(202),L[t(200)]),this[t(205)]=this[t(194)]("",t(195)),this[t(205)][t(178)](t(171)).to(this,t(202),n=>v(e,t(177)+n[t(206)]()+t(191))),this[t(188)]=this[t(194)](v(e,t(190))),this[t(179)]=this[t(194)](v(e,t(193))),this[t(187)]=this[t(194)](v(e,t(180)));const n=this[t(184)];this[t(189)]({attributes:{class:[t(186),n.if(t(196),t(207),e=>!e)]}}),this[t(174)][t(204)]([this[t(205)],this[t(188)],this[t(179)],this[t(187)]])}[T(194)](e,t){const n=T,r=new o.ButtonView(this[n(182)]);return r[n(201)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const D=N;function N(e,t){const n=F();return(N=function(e,t){return n[e-=291]})(e,t)}!function(e){const t=N,n=e();for(;;)try{if(792122===-parseInt(t(302))/1*(-parseInt(t(336))/2)+-parseInt(t(345))/3+parseInt(t(375))/4*(-parseInt(t(335))/5)+parseInt(t(331))/6+-parseInt(t(334))/7*(parseInt(t(355))/8)+parseInt(t(326))/9*(-parseInt(t(362))/10)+-parseInt(t(361))/11*(-parseInt(t(321))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(F);class U extends o.View{[D(327)];[D(360)];constructor(e,t=""){const n=D;super(e),this[n(322)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(306)];this[n(327)]=new B(e,t),this[n(360)]=this[n(374)](),this[n(363)]({tag:n(347),attributes:{class:["ck",n(297),r.if(n(295),n(304),e=>!e)],tabindex:"-1"},children:[{tag:n(347),attributes:{class:["ck",n(377),r.if(n(312),n(324))]},children:[this[n(327)],{tag:n(347),attributes:{class:["ck",n(315)]},children:[this[n(360)]]}]}]})}[D(296)](){const e=D;super[e(296)](),this[e(299)]&&this[e(327)][e(376)](this[e(299)]);let t=!1;this.on(e(337),(n,r,i)=>{const o=e,s=!this[o(327)][o(369)][o(350)](o(329));this[o(327)][o(376)](i),this[o(312)]&&s&&!t&&this[o(369)][o(356)]({top:this[o(369)][o(332)],behavior:o(367)})}),this.on(e(364),(n,r,i)=>{const o=e;t=!1,i?(this[o(299)]=null,this[o(327)][o(370)]()):this[o(299)]||this[o(327)][o(376)]("")}),this[e(318)](this[e(369)],e(357),()=>{t=!0}),this[e(318)](this[e(369)],e(305),()=>{t=!0})}[D(351)](){const e=D;this[e(369)][e(351)]()}[D(374)](){const e=D,n=this[e(307)],r=new o.ButtonView(this[e(307)]),i=e(344);return r[e(322)]({label:v(n,e(354)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(314)](e(295)).to(this,e(299),e=>!!e),r[e(314)](e(340)).to(this,e(312),e=>!e),r.on(e(310),()=>{const n=e;this[n(359)](this[n(327)][n(369)]),r[n(293)]=t.IconCheck,r[n(371)]=i+n(300),this[n(351)](),setTimeout(()=>{const e=n;r[e(293)]=t.IconCopy,r[e(371)]=i},1e3)}),r}[D(359)](e){const t=D,{window:n,document:r}=i.global;if(n[t(343)]){const{Blob:r,ClipboardItem:i}=n,o=[new i({"text/html":new r([e[t(342)]],{type:t(316)}),"text/plain":new r([e[t(346)]||""],{type:t(353)})})];navigator[t(292)][t(311)](o)}else{const i=r[t(319)](t(347));i[t(358)][t(294)]=t(303),i[t(358)][t(341)]=t(338),i[t(342)]=t(330)+e[t(342)]+t(308),r[t(349)][t(333)](i);const o=r[t(328)]();o[t(368)](i[t(365)]),o[t(348)](i[t(298)]);const s=n[t(366)]();s[t(373)](),s[t(317)](o),r[t(339)](t(313)),i[t(291)]()}}}class B extends o.View{constructor(e,t=""){const n=D;super(e),this[n(325)]=this[n(323)](),this[n(363)]({tag:n(347),attributes:{class:["ck",n(301),t,n(309),n(372)]}})}[D(376)](e){const t=D;this[t(369)][t(342)]=e}[D(370)](){const e=D;this[e(369)][e(333)](this[e(325)][e(369)])}[D(323)](){const e=D,t=new o.View,n=this[e(307)],r=new o.SpinnerView;return r[e(295)]=!0,t[e(363)]({tag:e(347),attributes:{class:["ck",e(352)]},children:[r,{text:v(n,e(320))}]}),t[e(296)](),t}}function F(){const e=["5DbjWnC","2556376CDHKXr","change:value","-9999px","execCommand","isEnabled","left","innerHTML","ClipboardItem","ck-ai-form__copy-button","2061255yMoacj","textContent","div","setEndBefore","body","querySelector","focus","ck-ai-form__loader","text/plain","Copy","260552BtOkaa","scrollTo","wheel","style","_copyHTMLToClipboard","copyButtonView","201674UbgMHD","8455830FQnbsG","setTemplate","change:isProcessing","firstElementChild","getSelection","smooth","setStartAfter","element","appendLoader","class","ck-ai-form__content-field","removeAllRanges","_createCopyButton","1683548rNGNqx","setContent","ck-ai-form__content-area","remove","clipboard","icon","position","isVisible","render","ck-ai-form__content-area-wrapper","lastElementChild","value"," ck-ai-form__copy-button--copied","ck-content","1CuHqEH","absolute","ck-hidden","mousedown","bindTemplate","locale","<span>]</span>","ck-reset_all-excluded","execute","write","isProcessing","copy","bind","ck-ai-form__copy-button-wrapper","text/html","addRange","listenTo","createElement","AI is writing...","600eUYBpE","set","_createLoader","ck-ai-form__content-area--processing","loaderView","9UflYUp","contentFieldView","createRange",".ck-ai-form__loader","<span>[</span>","3500148FCikiq","scrollHeight","appendChild","7lkSsmE"];return(F=function(){return e})()}function j(e,t){const n=H();return(j=function(e,t){return n[e-=381]})(e,t)}function H(){const e=["401151XVHZlz","1247183CnjVVf","18EIFRkV","set","text","42572mxvlOe","setTemplate","5420835mDLlHk","content","div","3208768gPSakr","bindTemplate","ck-ai-form__error","2498445QDCmLQ","16DhMvtx","1249420LfdOgO"];return(H=function(){return e})()}!function(e){const t=j,n=e();for(;;)try{if(283177===-parseInt(t(385))/1*(-parseInt(t(392))/2)+-parseInt(t(387))/3+parseInt(t(386))/4+parseInt(t(384))/5+parseInt(t(389))/6*(-parseInt(t(388))/7)+parseInt(t(381))/8+-parseInt(t(394))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(H);class q extends o.View{constructor(e,n=""){const r=j;super(e);const i=new o.IconView,s=this[r(382)];this[r(390)](r(391),n),i[r(395)]=t.IconError,this[r(393)]({tag:r(396),attributes:{class:["ck",r(383)]},children:[i,{text:s.to(r(391))}]})}}const z=G;function V(){const e=["enter","408963Egjucg","_createSubmitButton","focus","focusableChildren","_createShowHistoryButton","fire","style","Submit","requestAnimationFrame","resultsView","queryView","198006QJTkIt","submitButtonView","fieldWrapperChildren","ck-ai-form__submit","rtl","16672yjzNBd","children","665560DXWCyJ","filteredView","left","bind","focusFirst","keystrokes","set","1269UijaZf","History","excludeScrollbarsAndBorders","maxRows","execute","update","render","isOn","right","element","ck-ai-form__toggle-history","565792YoNCvo","focusLast","width","isEnabled","2088099FjiHLo","target","value","isEmpty","add","focusCycler","917052buYFgn","submit","fieldView","showHistoryButtonView","minRows","7LjXOgH","locale","isVisible","window","uiLanguageDirection"];return(V=function(){return e})()}function G(e,t){const n=V();return(G=function(e,t){return n[e-=431]})(e,t)}!function(e){const t=G,n=e();for(;;)try{if(377291===parseInt(t(484))/1+-parseInt(t(473))/2+parseInt(t(467))/3+-parseInt(t(463))/4+parseInt(t(445))/5+parseInt(t(438))/6*(parseInt(t(478))/7)+-parseInt(t(443))/8*(parseInt(t(452))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(V);class W extends o.AutocompleteView{[z(439)];[z(476)];constructor(e,t){const n=z;super(e,t),this[n(437)][n(475)][n(477)]=1,this[n(437)][n(475)][n(455)]=3,this[n(439)]=this[n(485)](),this[n(476)]=this[n(431)](),this[n(487)][n(471)](this[n(476)],1),this[n(487)][n(471)](this[n(439)])}[z(458)](){const e=z;super[e(458)](),this[e(437)][e(440)][e(471)](this[e(476)]),this[e(444)][e(471)](this[e(439)]),this[e(450)][e(451)](e(483),(t,n)=>{const r=e;t[r(468)]==this[r(437)][r(475)][r(461)]&&(this[r(474)](),n())})}[z(485)](){const e=z,n=new o.ButtonView(this[e(479)]),r=this[e(479)];return n[e(451)]({icon:t.IconSubmit,label:v(r,e(434)),isVisible:!0,tooltip:!0,class:e(441)}),n.on(e(456),()=>{this[e(474)]()}),n[e(448)](e(466)).to(this[e(437)][e(475)],e(470),this,e(466),(e,t)=>!e&&t),n}[z(431)](){const e=z,n=new o.ButtonView(this[e(479)]),r=this[e(436)],s=this[e(479)];n[e(451)]({label:v(s,e(453)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(462)}),n[e(448)](e(459)).to(r,e(480)),n[e(448)](e(466)).to(this,e(466)),n.on(e(456),()=>{const t=e;r[t(480)]=!r[t(480)],r[t(480)]?this[t(446)][t(486)]():this[t(486)]()});const a=()=>{const t=e;i.global[t(481)][t(435)](()=>{const e=t;if((0,i.isVisible)(this[e(461)])){const t=new i.Rect(this[e(437)][e(475)][e(461)]),r=t[e(465)],o=e(442)===s[e(482)]?e(447):e(460);t[e(454)](),n[e(461)][e(433)][o]=r-t[e(465)]+1+"px"}})};return this[e(437)][e(475)].on(e(457),a),this.on(e(458),a),n}[z(474)](){const e=z,t=this[e(437)][e(475)][e(461)][e(469)];this[e(432)](e(474),t)}[z(486)](e){const t=z;-1===e?this[t(472)][t(464)]():this[t(472)][t(449)]()}}const K=Y;function Y(e,t){const n=J();return(Y=function(e,t){return n[e-=251]})(e,t)}!function(e){const t=Y,n=e();for(;;)try{if(356334===parseInt(t(268))/1*(-parseInt(t(264))/2)+-parseInt(t(262))/3*(-parseInt(t(258))/4)+-parseInt(t(255))/5*(-parseInt(t(274))/6)+-parseInt(t(257))/7+-parseInt(t(270))/8+-parseInt(t(254))/9+-parseInt(t(277))/10*(-parseInt(t(273))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Q extends o.ListView{[K(269)];[K(271)];constructor(e){const t=K;super(e),this[t(271)]=this[t(265)](),this[t(269)]=new o.ListItemGroupView,this[t(269)][t(260)][t(267)](this[t(271)],1),this[t(269)][t(263)]=v(e,t(256)),this[t(269)][t(251)][t(266)](t(253)).to(this),this[t(251)][t(267)](this[t(269)])}[K(272)](){const e=K;let t=0;for(const n of this[e(251)])t+=n[e(251)][e(278)];return{resultsCount:t,totalItemsCount:t}}[K(265)](){const e=K,t=this[e(275)],n=new o.ButtonView(this[e(275)]);return n[e(276)]({label:"("+v(t,e(261))+")",withText:!0}),n.on(e(253),()=>this[e(252)](e(259))),n}}function J(){const e=["_createClearHistoryButton","delegate","add","2197NPODzh","historyGroupView","5212520ccuJUg","clearHistoryButton","filter","1111BzQSwP","42EwgkRe","locale","set","154010IwmjGR","length","items","fire","execute","5759721JrhdFF","299695pBzMsk","Prompt history","1552425OADUkb","1146884vgNQCp","clearHistory","children","Clear","6qoAhEq","label","618qAopaM"];return(J=function(){return e})()}const X={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function Z(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(Z).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>X[e]||"'")}(Z(e))}function te(){const e=["25396MKdFnw","fire","3916428XsGprr","10826376FZujwf","134455aegUEO","prompt","1302gLosGD","1140084jklaQv","locale","511830Pkgcdj","116nyNElM","add","set","children","execute","21973545cAtvAx"];return(te=function(){return e})()}function ne(e,t){const n=te();return(ne=function(e,t){return n[e-=496]})(e,t)}!function(e){const t=ne,n=e();for(;;)try{if(863999===parseInt(t(500))/1+-parseInt(t(498))/2+-parseInt(t(509))/3+parseInt(t(501))/4*(-parseInt(t(511))/5)+-parseInt(t(497))/6*(parseInt(t(507))/7)+parseInt(t(510))/8+parseInt(t(506))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(te);class re extends o.ListItemView{constructor(e){const t=ne;super();const n=new o.ButtonLabelView,r=new o.ButtonView(this[t(499)],n);this[t(504)][t(502)](r),r[t(503)]({label:e[t(496)],withText:!0}),r.on(t(505),()=>{const n=t;this[n(508)](n(505),{value:ee(e[n(496)])})})}}const ie=oe;function oe(e,t){const n=ue();return(oe=function(e,t){return n[e-=495]})(e,t)}!function(e){const t=oe,n=e();for(;;)try{if(578356===parseInt(t(502))/1*(-parseInt(t(508))/2)+-parseInt(t(509))/3+parseInt(t(503))/4+parseInt(t(511))/5+-parseInt(t(512))/6+parseInt(t(516))/7+parseInt(t(517))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ue);const se=ie(499);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(497)](),this.on(e(514),(t,n)=>{const r=e,i=ce(n[r(495)]);for(const e of this)if(e!=n&&ce(e[r(495)])===i){this[r(515)](e);break}this[r(498)]>20&&this[r(515)](this[r(513)]),this[r(501)]()}),this.on(e(515),()=>{this[e(501)]()})}[ie(497)](){const e=ie,t=sessionStorage[e(507)](se)||"[]";this[e(504)](JSON[e(506)](t))}[ie(501)](){const e=ie;sessionStorage[e(518)](se,JSON[e(496)](this[e(510)](e=>e)))}}function ce(e){const t=ie;return e[t(500)]()[t(505)]()}function ue(){const e=["695429jGOVlU","18706792xHYoZs","setItem","prompt","stringify","_loadFromSessionStorage","length","CKEditor/AIFormView/PromptHistory","toLowerCase","_saveToSessionStorage","963707nUWabW","1184516vlPyUx","addMany","trim","parse","getItem","2YHDXKo","1638444pQzOpc","map","2150060WvGmoY","6453756QpxlVl","last","add","remove"];return(ue=function(){return e})()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return Z(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["Ask AI and your prompts will be listed here for you to use later.","mainAction","element","isEnabled","tryAgainEvent","handleError","_focusables","274781XSNTok","REPLACE","value","1025122QshyXR","ck-ai-form-content","30KlhljO","delegate","_createToolbar","replaceButton","isProcessing","set","isVisible","historyGroupView","toolbar","locale","execute","678444sewTwT","search","clearHistory","focus","insertButton","label","Ask AI to improve generated text","submitPrompt","64878sagUxY","ck-hidden","items","bindTemplate","AI_ERROR_FAILED","div","copyButtonView","stopProcessing","shift + tab","focusLast","_createPromptView","fire","clear","Empty history","prompt","ck-ai-form","567436zCJClV","startProcessing","_createHistoryView","fieldView","finishProcessing","9hCsjDi","promptView","errorView","high","isError","contentArea","focusFirst","createCollection","bindTo","keystrokes","154RUVGpF","300312agxlRI","Ask AI to edit or generate","1463230PvfrEK","stopButton","tab","setTemplate","reset","trim","12HhhRuh","focusCycler","chain","add","listenTo","queryView","bind","focusTracker","submit","27RuiCgz","render","88HaKinF","tryAgainButton","16hBHxSB","insertContentBelow","text","replaceContent","_promptHistory"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=108]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(284277===-parseInt(t(164))/1*(-parseInt(t(124))/2)+parseInt(t(145))/3*(parseInt(t(140))/4)+parseInt(t(194))/5*(parseInt(t(156))/6)+-parseInt(t(192))/7*(-parseInt(t(177))/8)+-parseInt(t(173))/9*(parseInt(t(158))/10)+-parseInt(t(175))/11*(parseInt(t(116))/12)+parseInt(t(189))/13*(-parseInt(t(155))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends o.View{[he(171)];[he(154)];[he(150)];[he(113)];[he(146)];[he(147)];[he(188)];[he(165)];[he(181)];constructor(e,t,n=""){const r=he;super(e),this[r(110)](r(185),!0),this[r(110)](r(109),!1),this[r(110)](r(138),""),this[r(110)](r(191),""),this[r(110)](r(149),!1),this[r(110)](r(183),L[r(190)]),this[r(181)]=new ae,this[r(147)]=new q(e),this[r(150)]=new U(e,n),this[r(150)][r(170)](r(109)).to(this),this[r(150)][r(170)](r(191)).to(this),this[r(113)]=this[r(196)](),this[r(113)][r(170)](r(183)).to(this),this[r(146)]=this[r(134)](),this[r(171)]=new i.FocusTracker,this[r(154)]=new i.KeystrokeHandler,this[r(188)]=this[r(152)]([this[r(150)],this[r(150)][r(130)],this[r(113)],this[r(146)]]),this[r(165)]=new o.FocusCycler({focusables:this[r(188)],focusTracker:this[r(171)],keystrokeHandler:this[r(154)],actions:{focusPrevious:r(132),focusNext:r(160)}}),this[r(165)][r(166)](this[r(146)][r(165)]),this[r(146)][r(169)][r(143)][r(170)](r(191)).to(this,r(138));const s=this[r(127)];this[r(161)]({tag:r(129),attributes:{class:["ck",r(139),t],tabindex:"-1"},children:[{tag:r(129),attributes:{class:["ck",r(193)]},children:[{tag:r(129),attributes:{class:[s.if(r(149),r(125),e=>!e)]},children:[this[r(147)]]},this[r(150)],this[r(113)],this[r(146)]]}]})}[he(174)](){const e=he;super[e(174)](),this[e(171)][e(167)](this[e(150)][e(184)]),this[e(171)][e(167)](this[e(150)][e(130)][e(184)]),this[e(171)][e(167)](this[e(113)][e(184)]),this[e(171)][e(167)](this[e(146)][e(184)]),this[e(154)][e(168)](this[e(184)])}[he(119)](e=1){const t=he;-1===e?this[t(165)][t(133)]():this[t(165)][t(151)]()}[he(162)](){const e=he;this[e(138)]="",this[e(191)]="",this[e(149)]=!1,this[e(146)][e(162)](),this[e(150)][e(111)]=!1,this[e(113)][e(111)]=!1}[he(134)](){const e=he,t=this[e(114)],n=new W(t,{queryView:{label:v(t,e(157)),creator:o.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(137)),secondary:v(t,e(182))}}},filteredView:this[e(142)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(170)](e(185)).to(this,e(185),this,e(109),(e,t)=>e&&!t),this[e(168)](n,e(172),(t,n)=>{const r=e;this[r(138)]=n;const i=le(n);this[r(135)](r(123),i),n[r(163)]()&&this[r(181)][r(167)]({prompt:i},0)},{priority:e(148)}),n}[he(142)](){const e=he,t=new Q(this[e(114)]);return t[e(112)][e(126)][e(153)](this[e(181)]).as(re),t.on(e(118),()=>{const t=e;this[t(181)][t(136)](),this[t(146)][t(117)](""),this[t(146)][t(119)]()}),t}[he(196)](){const e=he,t=new $(this[e(114)]);return t[e(108)][e(170)](e(185)).to(this,e(185),this,e(109),this,e(191),(e,t,n)=>e&&!t&&!!n),t[e(108)][e(195)](e(115)).to(this,e(180)),t[e(120)][e(170)](e(185)).to(this,e(185),this,e(109),this,e(191),(e,t,n)=>e&&!t&&!!n),t[e(120)][e(195)](e(115)).to(this,e(178)),t[e(176)][e(170)](e(185)).to(this,e(185),this,e(109),(e,t)=>e&&!t),t[e(176)][e(195)](e(115)).to(this,e(186)),t[e(159)][e(170)](e(185)).to(this,e(109)),t[e(159)][e(195)](e(115)).to(this,e(131)),t}[he(141)](){const e=he;this[e(191)]="",this[e(149)]=!1,this[e(109)]=!0,this[e(150)][e(111)]=!0,this[e(113)][e(111)]=!0,this[e(150)][e(119)]()}[he(144)](){const e=he,t=this[e(114)];this[e(109)]=!1,this[e(138)]="",this[e(146)][e(162)](),this[e(191)]&&(this[e(146)][e(169)][e(121)]=v(t,e(122)))}[he(187)](e){const t=he,n=this[t(114)];this[t(144)](),this[t(149)]=!0,this[t(147)][t(179)]=e||v(n,t(128)),this[t(191)]||(this[t(150)][t(111)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ee(),xe.insert=ke().bind(null,"head"),xe.domAPI=be(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Te={attributes:{"data-cke":!0}};Te.setAttributes=Ee(),Te.insert=ke().bind(null,"head"),Te.domAPI=be(),Te.insertStyleElement=Ie();ye()(Pe.A,Te);Pe.A&&Pe.A.locals&&Pe.A.locals;const Me=Oe;function Oe(e,t){const n=Le();return(Oe=function(e,t){return n[e-=400]})(e,t)}function Le(){const e=["INSERT","AI Commands","label","custom","isOfficialPlugin","evaluationLimit","AIAssistant","aiCommands","ai.aiAssistant.contentAreaCssClass","destroy","change:isProcessing","ai-commands-config-order-collision","children","domainLimit","queryView","errorView","document","_onExecute","aiLicenseKeyExpired","promptView","groupLabel","getLimitElement","updateView","ai.aiAssistant.commands","licenseKey","trim","getSelectedElement","menuView","AI Assistant","hideFakeVisualSelection","announce","2167040RkjBop","invalid","usageLimit","REPLACE","focus","source","currentContext","_aiAssistantController","init","aiLicenseKeyEvaluationLimit","_initView","polite","ck-ai-commands-dropdown ","copy","_initAriaAiStatusChangeAnnouncements","hideUI","locale","tableOfContents","aiLicenseKeyTrialLimit","Error during AI content generation: %0","hide","requiresContent","<p>","Generated content: %0","aiLicenseKeyNotAllowed","7WIEESO","6brtmwi","2868858WfFfzU","body","DataTransfer","values","menuitemcheckbox","show","isOn","sort","set","_populateMenuBarMenu","7460Rkazhv","push","plugins","featureNotAllowed","_aiAdapter","_getMenuBarGroupButtons","AI is writing","groupId","_forceMarkersCopy","schema","selection","setSelection","enabledCommandsIds","get","editor","requires","aiLicenseKeyUsageLimit","menuBar:aiCommands","isEnabled","_formView","expired","fieldView","define","showUI","showAIAssistant","editing","4064sukTpV","ck-ai-assistant-ui","panelView","replace","delegate","textAdapter","_dialog","execute","text","wasMoved","455932piEYEQ","pluginName","contentArea","listenTo","from","insertContent","ai.aiAssistant.disabledElements","rawHtml","</p>","menuPanelClass","media","menuBar:aiAssistant","config","_getResolvedCommandsDefinitions","addMany","30140sowUzz","AIAssistantUI","EDITOR_TOP_SIDE","componentFactory","map","change:value","insertContentBelow","getData"," ck-ai-assistant-ui_theme","replaceContent","_showLicenseError","1745ozQAEa","5970285FchoAv","getSelectedBlocks","prompt","view","getRanges","ai.useTheme","bind","order","commands","filter","comment","aiLicenseKeyDomainLimit","isCollapsed","436164PVYClp","items","_uiCssClasses","once","_createAIAssistantUIButton","isFlat","render","isPremiumPlugin","trialLimit","change:isError","update","length","change:enabledCommandsIds","includes","forEach","text/html","showFakeVisualSelection","command:","aiAssistant","buttons","aiLicenseKeyValid","updatePosition","aiLicenseKeyInvalid","_commandDefinitions","_licenseKeyCheckInterval","change","model","buttonView","ck-ai-assistant-button ","fire","reset","splice","add"];return(Le=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(341258===-parseInt(t(536))/1+-parseInt(t(496))/2*(parseInt(t(449))/3)+-parseInt(t(486))/4*(parseInt(t(522))/5)+-parseInt(t(450))/6*(-parseInt(t(448))/7)+-parseInt(t(423))/8+-parseInt(t(523))/9+-parseInt(t(460))/10*(-parseInt(t(511))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Le);const $e=globalThis[Me(452)];class De extends e.Plugin{[Me(416)];[Me(560)];[Me(492)];[Me(479)];[Me(464)];[Me(430)];[Me(538)]="";static get[Me(497)](){return Me(512)}static get[Me(573)](){return!0}static get[Me(543)](){return!0}static get[Me(475)](){return[a.ClipboardMarkersUtils,p,w,o.Dialog]}constructor(e){const t=Me;super(e),e[t(508)][t(482)](t(502),[t(506),t(503),t(440)]),e[t(508)][t(482)](t(400),""),e[t(508)][t(482)](t(528),!0),this[t(538)]=t(487)+(e[t(508)][t(473)](t(528))?t(519):"")}[Me(431)](){const e=Me,{editor:n}=this;this[e(464)]=n[e(462)][e(473)](w),this[e(492)]=n[e(462)][e(473)](o.Dialog),this[e(479)]=null,this[e(559)]=this[e(509)]();const r=new S(n,Array[e(500)](this[e(559)][e(453)]()));n[e(531)][e(568)](e(484),r),n.ui[e(514)][e(568)](e(576),i=>{const a=e,c=(0,o.createDropdown)(i);return c[a(458)]({class:a(435)+this[a(538)]}),c[a(563)][a(458)]({label:v(i,a(570)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(493),e=>this[a(409)](e[a(428)].id)),(0,o.addMenuToDropdown)(c,n.ui[a(526)][a(451)],function(e){const t=a,n=s(e[t(508)][t(473)](t(415)),e[t(439)]),r=Ue(e,n)[t(532)](e=>e[t(531)][t(547)]);return 1===r[t(547)]?Ue(e,r[0][t(531)])[t(515)](e=>({id:e.id,label:e[t(571)]})):r[t(515)](n=>{const r=t,{groupId:i,groupLabel:o,commands:s}=n;return{id:i,menu:o||i,children:Ue(e,s)[r(515)](e=>({id:e.id,label:e[r(571)]}))}})}(n),{ariaLabel:v(i,a(570))}),c[a(419)][a(505)]=a(435)+this[a(538)],r.on(a(548),u),c[a(419)][a(539)](a(542),u),c;function u(){const e=a;c[e(478)]=r[e(472)][e(547)]>0;for(const t of c[e(419)][e(555)])t[e(478)]=r[e(472)][e(549)](t.id)}}),n.ui[e(514)][e(568)](e(477),i=>{const a=e,c=new o.MenuBarMenuView(i);c[a(563)][a(458)]({label:v(i,a(570)),icon:t.IconMagicWand}),c[a(529)](a(478)).to(r,a(472),e=>e[a(547)]>0);const u=s(n[a(508)][a(473)](a(415)),i);return this[a(459)](r,c,u,e=>this[a(409)](e)),c}),n.ui[e(514)][e(568)](e(554),()=>{const t=e,n=this[t(540)](o.ButtonView);return n[t(458)]({tooltip:!0,class:t(564)+this[t(538)]}),n}),n.ui[e(514)][e(568)](e(507),()=>{const t=e,n=this[t(540)](o.MenuBarMenuListItemButtonView);return n[t(458)]({role:t(454)}),n}),this[e(416)]=this[e(474)][e(508)][e(473)](e(416));const i=this[e(474)];this[e(560)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,o=i[r];if(t(556)==o||t(558)==o||t(410)==o||t(534)==o||t(447)==o||t(432)==o||t(441)==o||t(476)==o){delete i[r],n=o,clearInterval(this[t(560)]),this[t(560)]=void 0;break}}t(558)==n&&i[t(521)](t(424)),t(410)==n&&i[t(521)](t(480)),t(534)==n&&i[t(521)](t(405)),t(447)==n&&i[t(521)](t(463),t(575)),t(432)==n&&i[t(521)](t(574)),t(441)==n&&i[t(521)](t(544)),t(476)==n&&i[t(521)](t(425))},1e3)}[Me(401)](){const e=Me;super[e(401)](),this[e(560)]&&clearInterval(this[e(560)])}[Me(483)](e="",n="",r=Me(572)){const i=Me,s=this[i(474)],u=s[i(485)][i(526)],d=s[i(462)][i(473)](p),l=s[i(462)][i(473)](a.ClipboardMarkersUtils);d[i(552)]();const h=new $e,f=new ClipboardEvent(i(436),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(468)](i(533),()=>{const e=i;u[e(408)][e(565)](e(436),g)}),this[i(479)]||(this[i(433)](),this[i(430)]=new P(s,this[i(464)][i(491)],this[i(479)]));let y=m[i(518)](i(551));const w=s[i(562)][i(408)][i(470)],b=Array[i(500)](w[i(527)]());1===b[i(547)]&&b[0][i(541)]&&!w[i(418)]()&&""!==y[i(489)](/&nbsp;/g,"")[i(417)]()&&(y=i(445)+y+i(504)),this[i(430)][i(414)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:L[s[i(562)][i(408)][i(470)][i(535)]?i(569):i(426)]}),i(554)!==this[i(492)].id?this[i(492)][i(455)]({id:i(554),icon:t.IconRobotPencil,title:v(this[i(474)][i(439)],i(420)),content:this[i(479)],position:o.DialogViewPosition[i(513)],onShow:()=>{const e=i;this[e(479)][e(427)]()},onHide:()=>{const e=i;this[e(430)][e(566)](),d[e(421)]()}}):this[i(492)][i(526)][i(495)]||this[i(492)][i(526)][i(557)]()}[Me(438)](){const e=Me;this[e(492)][e(443)]()}[Me(509)](){const e=Me,t=new Map,n=s(this[e(474)][e(508)][e(473)](e(415)),this[e(474)][e(439)]);for(const r of n)for(const n of r[e(531)])t[e(458)](n.id,{...n,groupId:r[e(467)],groupLabel:r[e(412)]||r[e(467)]});return t}[Me(540)](e){const n=Me,r=this[n(474)],i=r[n(531)][n(473)](n(484)),o=new e(r[n(439)]);return o[n(458)]({label:v(r[n(439)],n(420)),icon:t.IconRobotPencil,isToggleable:!0}),o[n(529)](n(478)).to(i),o[n(529)](n(456)).to(this[n(492)],"id",e=>n(554)===e),this[n(499)](o,n(493),()=>{const e=n;o[e(456)]?this[e(438)]():i[e(493)]()}),o}[Me(433)](){const e=Me,t=this[e(474)][e(462)][e(473)](p);this[e(479)]=new me(this[e(474)][e(439)],this[e(538)],this[e(474)][e(508)][e(473)](e(400))),this[e(479)].on(e(516),()=>{const t=e;this[t(492)][t(526)][t(495)]||this[t(492)][t(526)][t(557)]()}),this[e(479)][e(411)][e(406)][e(481)].on(e(546),()=>{const t=e;this[t(492)][t(526)][t(495)]||this[t(492)][t(526)][t(557)]()}),this[e(499)](this[e(479)],e(520),()=>{const n=e;t[n(501)](this[n(430)][n(429)]),this[n(438)]()}),this[e(499)](this[e(479)],e(517),()=>{const n=e;t[n(517)](this[n(430)][n(429)]),this[n(438)]()}),this[e(437)]()}[Me(437)](){const e=Me,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(474)];this[e(479)][e(498)].on(e(402),(r,i,o)=>{const s=e,a=this[s(430)][s(429)];o?n[s(422)](v(t,s(466))):a&&n[s(422)](v(t,s(446),a),{politeness:s(434),isUnsafeHTML:!0})}),this[e(479)].on(e(545),(r,i,o)=>{const s=e;if(o){const e=this[s(479)][s(407)][s(494)];n[s(422)](v(t,s(442),e))}})}[Me(409)](e){const t=Me,n=this[t(559)][t(473)](e),r=this[t(474)],o=r[t(562)][t(408)][t(470)],s=r[t(531)][t(473)](t(484)),a=r[t(462)][t(473)](p),c=("_ungrouppedCommands"!==n[t(467)]?n[t(412)]+": ":"")+n[t(571)];if(!1!==n[t(444)]&&o[t(535)]){const e=(0,i.first)(o[t(524)]())||r[t(562)][t(469)][t(413)](o);r[t(562)][t(561)](n=>{n[t(471)](e,"in")})}a[t(552)](),s[t(493)](n[t(525)],c,t(553)+e)}[Me(459)](e,t,n,r){const i=Me,s=this[i(474)],a=s[i(439)],c=new o.MenuBarMenuListView(a),u=Ue(s,n)[i(532)](e=>e[i(531)][i(547)]);1===u[i(547)]?this[i(465)]({command:e,commands:u[0][i(531)],parentMenuView:t,onExecute:r})[i(550)](e=>c[i(537)][i(568)](e)):u[i(550)](({groupId:n,groupLabel:s,commands:u})=>{const d=i,l=new o.MenuBarMenuListItemView(a,t),h=new o.MenuBarMenuView(a),f=new o.MenuBarMenuListView(a),p=this[d(465)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(563)][d(458)]({label:s||n}),h[d(490)](d(493)).to(t),f[d(537)][d(510)](p),h[d(488)][d(404)][d(568)](f),l[d(404)][d(568)](h),c[d(537)][d(568)](l)}),t[i(488)][i(404)][i(568)](c)}[Me(465)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Me,s=this[i(474)],a=s[i(439)];return Ue(s,t)[i(515)](t=>{const s=i,c=new o.MenuBarMenuListItemView(a,n),u=new o.MenuBarMenuListItemButtonView(a);return u[s(458)]({label:t[s(571)]}),u[s(490)](s(493)).to(n),u.on(s(493),()=>r(t.id)),u[s(529)](s(478)).to(e,s(472),e=>e[s(549)](t.id)),c[s(404)][s(568)](u),c})}}function Ne(e,t){const n=Me;return void 0!==e[n(530)]&&void 0===t[n(530)]?1:void 0===e[n(530)]&&void 0!==t[n(530)]?-1:void 0!==e[n(530)]&&void 0!==t[n(530)]?e[n(530)]-t[n(530)]:0}function Ue(e,t){const n=Me;t[n(457)](Ne);const r={},o=[];for(const s of t)if(void 0!==s[n(530)]){if(s[n(530)]in r)throw new i.CKEditorError(n(403),e,{conflictingDefinitions:[s,r[s[n(530)]]]});r[s[n(530)]]=s,o[n(567)](s[n(530)],0,s)}else o[n(461)](s);return o}const Be=je;function Fe(){const e=["locale","Business","ai.aiAssistant.removeCommands","AIAssistant","makeLonger","Summarize","ai.aiAssistant.extraCommandGroups","Improve using compelling, optimistic language to convey confidence in the writing.","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","requires","Make longer","Change tone","isOfficialPlugin","582549NgozAy","Translate the content to Portuguese language.","improveWriting","legal","editOrReview","generate","Improve using direct language, using only the essential information.","changeStyle","Translate the content to Simplified Chinese language.","Rewrite this content as a journalist using engaging language to convey the importance of the information.","find","4lgIkqp","Casual","friendly","ai.aiAssistant.preserveComments","Hindi","Improve using casual, informal language to convey a casual conversation with a real person.","business","6081292uNkQwB","Translate the content to German language.","journalism","config","Make shorter","Rewrite this content as a legal professional using valid legal terminology.","9032PXLudk","includes","push","Translate the content to Arabic language.","ai.aiAssistant.commands","filter","translateArabic","Simplified Chinese","Continue","Confident","poetic","German","concat","Portuguese","Translate the content to English language.","translateHindi","isPremiumPlugin","pluginName","Rewrite this content as a business professional with formal language.","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","translateGerman","Improve writing","Translate the content to Hindi language.","translateChinese","Arabic","Improve this content by using descriptive language and inserting more information and more detailed explanations.","Generate from selection","Edit or review","get","Poetic","Journalism","professional","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","2427805AzQgsA","makeShorter","8351fklfPS","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Translate the content to French language.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","direct","translateEnglish","confident","commands","23688036zKBmYl","579973vzzrlG","Translate","define","Direct","English","translateSpanish","Improve using polished, formal, and respectful language to convey professional expertise and competence.","French","summarize","simplifyLanguage","903228vcsExs","continue","Improve using friendly, comforting language, to convey understanding and empathy.","Professional","groupId","changeTone","translatePortuguese","Translate the content to Spanish language.","set","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","translateFrench","Simplify language","Friendly","casual","Spanish","translate","forEach","Legal","Change style"];return(Fe=function(){return e})()}function je(e,t){const n=Fe();return(je=function(e,t){return n[e-=294]})(e,t)}!function(e){const t=je,n=e();for(;;)try{if(769426===parseInt(t(358))/1*(-parseInt(t(301))/2)+-parseInt(t(400))/3+-parseInt(t(308))/4+-parseInt(t(347))/5+parseInt(t(368))/6+parseInt(t(349))/7*(parseInt(t(314))/8)+parseInt(t(357))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Fe);class He extends e.Plugin{static get[Be(396)](){return[De,p]}static get[Be(331)](){return Be(390)}static get[Be(399)](){return!0}static get[Be(330)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(311)],r=e[t(387)];n[t(360)](t(304),!0),n[t(360)](t(318),qe(r)),n[t(360)](t(393),[]),n[t(360)](t(389),[]);let i=s(n[t(342)](t(318)),r);const o=n[t(342)](t(393)),a=n[t(342)](t(389));o[t(384)](e=>{const n=t,r=i[n(300)](t=>t[n(372)]===e[n(372)]);r?r[n(356)]=r[n(356)][n(326)](e[n(356)]):i[n(316)](e)}),i=i[t(319)](e=>!a[t(315)](e[t(372)])),i[t(384)](e=>{const n=t;e[n(356)]=e[n(356)][n(319)](e=>!a[n(315)](e.id))}),n[t(376)](t(318),i)}}function qe(e){const t=Be;return[{groupId:t(294),groupLabel:v(e,t(341)),commands:[{id:t(402),label:v(e,t(335)),prompt:t(395)},{id:t(348),label:v(e,t(312)),prompt:t(352)},{id:t(391),label:v(e,t(397)),prompt:t(339)},{id:t(367),label:v(e,t(379)),prompt:t(333)}]},{groupId:t(295),groupLabel:v(e,t(340)),commands:[{id:t(366),label:v(e,t(392)),prompt:t(346)},{id:t(369),label:v(e,t(322)),prompt:t(377)}]},{groupId:t(373),groupLabel:v(e,t(398)),commands:[{id:t(345),label:v(e,t(371)),prompt:t(364)},{id:t(381),label:v(e,t(302)),prompt:t(306)},{id:t(353),label:v(e,t(361)),prompt:t(296)},{id:t(355),label:v(e,t(323)),prompt:t(394)},{id:t(303),label:v(e,t(380)),prompt:t(370)}]},{groupId:t(297),groupLabel:v(e,t(386)),commands:[{id:t(307),label:v(e,t(388)),prompt:t(332)},{id:t(403),label:v(e,t(385)),prompt:t(313)},{id:t(310),label:v(e,t(344)),prompt:t(299)},{id:t(324),label:v(e,t(343)),prompt:t(350)}]},{groupId:t(383),groupLabel:v(e,t(359)),commands:[{id:t(354),label:v(e,t(362)),prompt:t(328)},{id:t(363),label:v(e,t(382)),prompt:t(375)},{id:t(374),label:v(e,t(327)),prompt:t(401)},{id:t(334),label:v(e,t(325)),prompt:t(309)},{id:t(378),label:v(e,t(365)),prompt:t(351)},{id:t(337),label:v(e,t(321)),prompt:t(298)},{id:t(329),label:v(e,t(305)),prompt:t(336)},{id:t(320),label:v(e,t(338)),prompt:t(317)}]}]}const ze=Ve;function Ve(e,t){const n=We();return(Ve=function(e,t){return n[e-=419]})(e,t)}!function(e){const t=Ve,n=e();for(;;)try{if(881084===parseInt(t(434))/1+parseInt(t(437))/2+parseInt(t(440))/3*(parseInt(t(426))/4)+-parseInt(t(419))/5+parseInt(t(442))/6*(-parseInt(t(450))/7)+parseInt(t(445))/8+parseInt(t(439))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(We);class Ge extends e.Plugin{[ze(425)];static get[ze(453)](){return[w]}constructor(e){const t=ze;super(e),this[t(425)]=new AbortController}[ze(427)](){const e=ze;this[e(436)][e(435)][e(424)](w)[e(422)]=this}[ze(447)](){const e=ze;this[e(425)][e(443)][e(421)]||(this[e(425)][e(447)](),this[e(425)]=new AbortController)}async[ze(444)](e){const t=ze;return this[t(446)](e)[t(449)](e=>{const n=t;if(e instanceof b)return Promise[n(451)](e);if(n(441)==e[n(423)])return Promise[n(430)]();throw console[n(431)](e),new i.CKEditorError(n(432),null)})}async[ze(448)](e,t){const n=ze,r=this[n(436)][n(433)],i={"Content-Type":n(429)};if(n(438)==typeof e)Object[n(452)](i,e);else if(e)try{const r=await e(t);Object[n(452)](i,r)}catch{return Promise[n(451)](new b(v(r,n(454))))}return i}async[ze(428)](e,t){const n=ze,r=this[n(436)][n(433)];if(n(438)==typeof e)return e;try{return await e(t)}catch{return Promise[n(451)](new b(v(r,n(420))))}}}function We(){const e=["plugins","editor","3325094YeQfxR","object","4841991UsoDpi","163239yGEjQY","AbortError","6JvLSHJ","signal","makeRequest","291472BPrHXf","sendRequest","abort","_prepareRequestHeaders","catch","11466133DSOCOq","reject","assign","requires","AI_ERROR_GET_HEADERS","845395dCcjvO","AI_ERROR_GET_PARAMETERS","aborted","textAdapter","name","get","abortController","20tgcebI","init","_prepareRequestParameters","application/json","resolve","error","aitextadapter-send-request-failed","locale","179137ttIPeT"];return(We=function(){return e})()}function Ke(){const e=["prepareMessages","4834696uHOvQZ","read","system","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","OpenAITextAdapter","context_length_exceeded","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","user","signal","369463tEKxMP","_prepareRequestHeaders","_prepareRequestParameters","ai.openAI.apiUrl","gpt-4o","content","delta","join","config","resolve","get","_isBufferIncomplete","pluginName","ai.openAI.requestHeaders","replace","body","sendRequest","filter","locale","stream","split","_requestParameters","message","text","decode","reject","_apiUrl","14890QGjKxZ","8913656VbwRpQ","editor","POST","includes","_readStreamableResponse","5486173YemDVk","getReader","30FjYYAl","_readStaticResponse","AI_ERROR_CONTEXT_LENGTH","19712BNmPeH","ai.openAI.requestParameters","98782gfjhIS","_cleanUpData","json","parse","[DONE]","_requestHeaders","length","data: ","stringify","map","define","9TdteSX","Moderation","https://api.openai.com/v1/chat/completions","AI_ERROR_MODERATION","\nYou must keep the text formatting.\n\nContent:\n","choices","Instruction:\n","1931508OOfvjh","15vBAXtp","abortController"];return(Ke=function(){return e})()}const Ye=Qe;function Qe(e,t){const n=Ke();return(Qe=function(e,t){return n[e-=129]})(e,t)}!function(e){const t=Qe,n=e();for(;;)try{if(699981===parseInt(t(177))/1+parseInt(t(146))/2*(parseInt(t(141))/3)+parseInt(t(168))/4+parseInt(t(165))/5*(parseInt(t(164))/6)+-parseInt(t(139))/7+-parseInt(t(134))/8*(-parseInt(t(157))/9)+parseInt(t(133))/10*(-parseInt(t(144))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ke);class Je extends Ge{[Ye(132)];[Ye(151)];[Ye(198)];static get[Ye(189)](){return Ye(172)}constructor(e){const t=Ye;super(e),e[t(185)][t(156)](t(180),t(159)),e[t(185)][t(187)](t(145))||e[t(185)][t(156)](t(145),{model:t(181),temperature:1,top_p:1,stream:!0}),this[t(132)]=e[t(185)][t(187)](t(180)),this[t(151)]=e[t(185)][t(187)](t(190))||{},this[t(198)]=e[t(185)][t(187)](t(145))}async[Ye(193)]({query:e,context:t,onData:n,actionId:r}){const i=Ye,o=this[i(135)][i(195)],s=await this[i(167)](e,t,r),a=await this[i(178)](this[i(151)],r),c=await this[i(179)](this[i(198)],r),u={messages:s,...c},d={method:i(136),headers:a,body:JSON[i(154)](u),signal:this[i(166)][i(176)]},l=await fetch(this[i(132)],d);if(l.ok)return c[i(196)]?await this[i(138)](l,n):await this[i(142)](l,n),Promise[i(186)]();{const e=await l[i(129)]();return e[i(137)](i(173))?Promise[i(131)](new b(v(o,i(143)))):e[i(137)](i(158))?Promise[i(131)](new b(v(o,i(160)))):Promise[i(131)](new Error(e))}}async[Ye(167)](e,t,n){const r=Ye;let i,o;return t?(i=r(174),o=r(163)+e+r(161)+t):(i=r(171),o=e),[{role:r(170),content:i},{role:r(175),content:o}]}async[Ye(138)](e,t){const n=Ye,r=e[n(192)][n(140)](),i=new TextDecoder;let o="",s="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(169)](),d=o+i[n(130)](u);let l="";c=e;try{l=this[n(147)](d),o=""}catch{o=d;continue}s+=l,!c&&this[n(188)](s)||s&&(a+=s,s="",t(a))}return Promise[n(186)]()}async[Ye(142)](e,t){const n=Ye;return t((await e[n(148)]())[n(162)][0][n(199)][n(182)]),Promise[n(186)]()}[Ye(188)](e){const t=Ye,n=e[t(197)]("<")[t(152)]!==e[t(197)](">")[t(152)],r=e[t(152)]<30;return n&&r}[Ye(147)](e){const t=Ye;return e[t(197)](/\n(?![^{]*\})/g)[t(155)](e=>e[t(191)](t(153),""))[t(194)](e=>e&&e[t(152)]>0&&t(150)!==e)[t(155)](e=>{const n=t,{choices:r}=JSON[n(149)](e);if(r[0]?.[n(183)]?.[n(182)])return r[0][n(183)][n(182)]})[t(194)](e=>e)[t(184)]("")}}var Xe,Ze,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,ot;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(ot||(ot={}));class st{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new st({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return st.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!st.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!st.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(o)&&a(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),wt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!wt(e))return!1;return!0},bt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const Et=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),At={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:Et,isSet:e=>null!=e,isValidHostLabel:wt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:o={}}=e,s=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return s.search=Object.entries(o).map(([e,t])=>`${e}=${t}`).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),i=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(Et(r[e],t))}else n.push(r[s]);i=o+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in bt&&null!=i[1]?bt[i[0]][i[1]](...r):It[e](...r)},Ct=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new St(`'${e}' is already defined in Reference Record.`);const r=Rt(t,n);return n.logger?.debug?.(`${vt} evaluateCondition: ${kt(t)} = ${kt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Ct(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Mt=(e,t)=>{if(Array.isArray(e))return e.map(e=>Mt(e,t));switch(typeof e){case"string":return _t(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Mt(r,t)}),{}),Lt=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new St("Endpoint URL must be a string, got "+typeof n)},$t=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(!i)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Tt(u,s)},...null!=c&&{properties:Ot(c,s)},url:Lt(a,s)}},Dt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Nt=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...o}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=$t(n,t);if(e)return e}else if("error"===n.type)Dt(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=Nt(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Bt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Bt(t))return!1;return!0}return!!wt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Ft=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const Ht={isVirtualHostableS3Bucket:Bt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,o,s,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:o,accountId:s,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=Ft;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function qt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}bt.aws=Ht;const zt=/\d{12}\.ddb/;const Vt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Yt=e=>(t,n)=>async r=>{const{request:i}=r;if(!st.isInstance(i))return t(r);const{headers:o}=i,s=n?.userAgent?.map(Qt)||[],a=(await e.defaultUserAgentProvider()).map(Qt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&qt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?qt(e,"RETRY_MODE_ADAPTIVE","F"):qt(e,"RETRY_MODE_STANDARD","E"):qt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(zt)&&qt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":qt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":qt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":qt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&qt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))qt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Qt)||[],d=await e.userAgentAppId();d&&a.push(Qt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...s,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(o[Gt]=o[Gt]?`${o[Vt]} ${h}`:h),o[Vt]=l):o[Gt]=l,t({...r,request:i})},Qt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let o=t.substring(r+1);return"api"===i&&(o=o.toLowerCase()),[i,o,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Jt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Xt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Xt||(Xt={}));const Zt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const o=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Zt(r),c=[];for(const n of o){const i=s.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=i.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},on={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class sn{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!st.isInstance(n.request))return e(n);const r=Zt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:s}=r,a=await e({...n,request:await s.sign(n.request,o,i)}).catch((s.errorHandler||an)(i));return(s.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(st.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),wn=e=>{const[t,n,r,,,i]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&r&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},bn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(o)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:s}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),En=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":r[t]=o.value;break;case"contextParams":r[t]=e[o.name];break;case"clientContextParams":case"builtInParams":r[t]=await bn(o.name,t,n)();break;case"operationContextParams":r[t]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),wn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},An=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const o=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await En(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=o,r.authSchemes=o.properties?.authSchemes;const s=r.authSchemes?.[0];if(s){r.signing_region=s.signingRegion,r.signing_service=s.signingName;const e=Zt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:o}=await n(i);try{return{response:o,output:await t(o,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:o}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(o)){const{headers:t={}}=o,n=Object.entries(t);e.$metadata={httpStatusCode:o.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const o=e,s=r.endpointV2?.url&&o.urlParser?async()=>o.urlParser(r.endpointV2.url):o.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:s});return n({...i,request:a})})(e,t),xn)}}}const Cn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Pn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(An({config:e,instructions:t}),Cn)}});var Tn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Tn||(Tn={}));const Mn=Tn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Ln=["TimeoutError","RequestTimeout","RequestTimeoutException"],$n=[500,502,503,504],Dn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Nn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Bn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Ln.includes(e.name)||Dn.includes(e?.code||"")||Nn.includes(e?.code||"")||$n.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Bn(e.cause,t+1);class Fn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Fn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Fn.setTimeoutFn=setTimeout;const jn=100,Hn=2e4,qn="amz-sdk-invocation-id",zn="amz-sdk-request",Vn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Hn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Tn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Hn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Vn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,o=this.getCapacityCost(n);return this.capacity-=o,Vn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Tn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Fn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Yn;const Qn=new Uint8Array(16);function Jn(){if(!Yn&&(Yn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yn(Qn)}const Xn=[];for(let e=0;e<256;++e)Xn.push((e+256).toString(16).slice(1));function Zn(e,t=0){return Xn[e[t+0]]+Xn[e[t+1]]+Xn[e[t+2]]+Xn[e[t+3]]+"-"+Xn[e[t+4]]+Xn[e[t+5]]+"-"+Xn[e[t+6]]+Xn[e[t+7]]+"-"+Xn[e[t+8]]+Xn[e[t+9]]+"-"+Xn[e[t+10]]+Xn[e[t+11]]+Xn[e[t+12]]+Xn[e[t+13]]+Xn[e[t+14]]+Xn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Jn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Zn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t},s=(n=!1)=>{const r=[],i=[],s={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>or[t.step]-or[e.step]||sr[t.priority||"normal"]-sr[e.priority||"normal"])).map(o).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:o,aliases:s}=n,a={middleware:e,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const o=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n):(n=>{let i=!1;const o=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n),removeByTag:n=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=nr(o,s);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>s(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},or={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},sr={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let o;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return o(e).then(e=>e.output);o(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,o=t+3;r<=o;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(o-r),i+=6}else n>>=6;const o=t/4*3;n>>=i%8;const s=Math.floor(i/8);for(let e=0;e<s;e++){const t=8*(s-e-1);r.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,o=Math.min(e+3,t.length);i<o;i++)n|=t[i]<<8*(o-i-1),r+=8;const o=Math.ceil(r/6);n<<=6*o-r;for(let e=1;e<=o;e++){const t=6*(o-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-o)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function wr(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const br={supported:void 0};class vr{static create(e){return"function"==typeof e?.handle?e:new vr(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===br.supported&&(br.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,o=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(s+=`?${a}`),e.fragment&&(s+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${s}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:o};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),br.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=yr(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),wr(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),o=i>-1?i+1:e.length;t(e.substring(o))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:o}=await n.read();o&&(t.push(o),i+=o.length),r=e}const o=new Uint8Array(i);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const Sr={},Er={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Er[t]=e}function Ar(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Er))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Er[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)};class xr{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Rr}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Rr{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends xr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Cr="***SensitiveInformation***";class Pr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Pr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Pr?Pr.isInstance(e):!!Pr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Tr=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Mr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Or=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Lr=e=>Object.assign((e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),$r=e=>null!=e;class Dr{trace(){}debug(){}info(){}warn(){}error(){}}function Nr(e,t,n){let r,i,o;if(void 0===t&&void 0===n)r={},o=e;else{if(r=e,"function"==typeof t)return i=t,o=n,Br(r,i,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?Fr(r,null,o,e):r[e]=o[e];return r}const Ur=(e,t)=>{const n={};for(const r in t)Fr(n,e,t,r);return n},Br=(e,t,n)=>Nr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Fr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[o=jr,s=Hr,a=r]=i;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[r]=s(t[a])))}let[i,o]=n[r];if("function"==typeof o){let t;const n=void 0===i&&null!=(t=o()),s="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:s&&(e[r]=o())}else{const t=void 0===i&&null!=o,n="function"==typeof i&&!!i(o)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=o)}},jr=e=>null!=e,Hr=e=>e,qr=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),zr=e=>Vr(e,32),Vr=(e,t)=>{const n=qr(e);if(void 0!==n&&Gr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Gr=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Wr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Yr.warn(Kr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Kr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Yr={warn:console.warn},Qr=e=>e?.body instanceof ReadableStream,Jr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Xr=e=>{const t={error:e,errorType:Zr(e)},n=ni(e.$response);return n&&(t.retryAfterHint=n),t},Zr=e=>Un(e)?"THROTTLING":Bn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Bn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",ei={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ti=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(!Jr(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),s=new Error,a=0,c=0;const{request:u}=r,d=st.isInstance(u);for(d&&(u.headers[qn]=er());;)try{d&&(u.headers[zn]=`attempt=${a+1}; max=${o}`);const{response:n,output:s}=await t(r);return i.recordSuccess(e),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,{response:n,output:s}}catch(t){const r=Xr(t);if(s=tr(t),d&&Qr(u))throw(n.logger instanceof Dr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw s.$metadata||(s.$metadata={}),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,s}a=e.getRetryCount();const o=e.getRetryDelay();c+=o,await new Promise(e=>setTimeout(e,o))}}})(e),ei)}}),ni=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)};const ri=(ii=3e5,e=>oi(e)&&e.expiration.getTime()-Date.now()<ii);var ii;const oi=e=>void 0!==e.expiration,si=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ai="X-Amz-Date",ci="X-Amz-Signature",ui="X-Amz-Security-Token",di="authorization",li=ai.toLowerCase(),hi=[di,li,"date"],fi=ci.toLowerCase(),pi="x-amz-content-sha256",mi=ui.toLowerCase(),gi={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},yi=/^proxy-/,wi=/^sec-/,bi="AWS4-HMAC-SHA256",vi="AWS4-HMAC-SHA256-PAYLOAD",ki="aws4_request",Si={},Ei=[],Ai=(e,t,n)=>`${e}/${t}/${n}/${ki}`,Ii=(e,t,n)=>{const r=new e(t);return r.update(si(n)),r.digest()},_i=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const o=i.toLowerCase();(o in gi||t?.has(o)||yi.test(o)||wi.test(o))&&(!n||n&&!n.has(o))||(r[o]=e[i].trim().replace(/\s+/g," "))}return r},xi=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===pi)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(si(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ri{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=lr(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Ti.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Pi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}}var Ci;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ci||(Ci={}));const Pi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ti{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Mi(t),new Ti(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Mi(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Mi(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Oi=e=>{e=st.clone(e);for(const t of Object.keys(e.headers))hi.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Li=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){this.service=r,this.sha256=i,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===fi)continue;const i=mr(r);t.push(i);const o=e[r];"string"==typeof o?n[i]=`${i}=${mr(o)}`:Array.isArray(o)&&(n[i]=o.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(si(n));return`${r}\n${e}\n${t}\n${Ir(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return mr(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,Li(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Di extends $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o}),this.headerFormatter=new Ri}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Ai(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=st.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Oi(e),{unhoistableHeaders:o,hoistableHeaders:a});d.sessionToken&&(m.query[ui]=d.sessionToken),m.query["X-Amz-Algorithm"]=bi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[ai]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=_i(m,i,s);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[ci]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await xi(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:o}){const s=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Ai(a,s,o??this.service),d=await xi({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[vi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:s}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,o,s,r));return a.update(si(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),c=Oi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ai(d,a,o??this.service);c.headers[li]=u,s.sessionToken&&(c.headers[mi]=s.sessionToken);const h=await xi(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(pi,c.headers)&&this.applyChecksum&&(c.headers[pi]=h);const f=_i(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(s,a,d,o),this.createCanonicalRequest(c,f,h));return c.headers[di]=`${bi} Credential=${s.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,bi),o=new this.sha256(await n);return o.update(si(i)),Ir(await o.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const o=`${n}:${r}:${i}:${Ir(await Ii(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Si)return Si[o];for(Ei.push(o);Ei.length>50;)delete Si[Ei.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,ki])s=await Ii(e,s,t);return Si[o]=s})(this.sha256,e,n,t,r||this.service)}}const Ni=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const o=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const c=async e=>{o||(o=r(e));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return void 0===t?async e=>(s&&!e?.forceRefresh||(i=await c(e)),i):async e=>(s&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,ri,oi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),s=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,o);r&&!s.attributed?(t=async e=>s(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=s.memoized,t.configBound=s.configBound,t.attributed=!0):t=s},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:s}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:o}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Di)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const o={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Di)(o)};return Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:a})};const Ui=async(e,t,n)=>({operation:Zt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Bi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Fi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ji="3.823.0";var Hi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function qi(e){return e instanceof Uint8Array?e:"string"==typeof e?Hi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function zi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Vi={name:"SHA-256"},Gi={name:"HMAC",hash:Vi},Wi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Ki={};function Yi(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Ki}var Qi=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!zi(e)){var t=qi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return Yi().crypto.subtle.sign(Gi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):zi(this.toHash)?Promise.resolve(Wi):Promise.resolve().then(function(){return Yi().crypto.subtle.digest(Vi,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){Yi().crypto.subtle.importKey("raw",qi(e.secret),Gi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function Ji(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function Xi(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Zi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var eo=64,to=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),no=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ro=Math.pow(2,53)-1,io=function(){function e(){this.state=Int32Array.from(no),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ro)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===eo&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%eo>=56){for(var r=this.bufferLength;r<eo;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],c=t[6],u=t[7],d=0;d<eo;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(u+(to[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=s,s=o+p|0,o=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=u},e}(),oo=function(){function e(e){this.secret=e,this.hash=new io,this.reset()}return e.prototype.update=function(e){if(!zi(e)&&!this.error)try{this.hash.update(qi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Ji(this,void 0,void 0,function(){return Xi(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new io,this.secret){this.outer=new io;var e=function(e){var t=qi(e);if(t.byteLength>eo){var n=new io;n.update(t),t=n.digest()}var r=new Uint8Array(eo);return r.set(t),r}(this.secret),t=new Uint8Array(eo);t.set(e);for(var n=0;n<eo;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var so=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ao(e){return e&&so.every(function(t){return"function"==typeof e[t]})}var co=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&ao(e.crypto.subtle)}(Yi())?this.hash=new oo(e):this.hash=new Qi(e)}return e.prototype.update=function(e,t){this.hash.update(qi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),uo=n(369),lo=n.n(uo);const ho=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&i.push([`app/${o}`]),i};!function(){function e(){this.crc32=new po}e.prototype.update=function(e){zi(e)||this.crc32.update(qi(e))},e.prototype.digest=function(){return Ji(this,void 0,void 0,function(){return Xi(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new po}}();var fo,po=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Zi(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.checksum=this.checksum>>>8^mo[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),mo=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class go{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&yo(t),new go(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&yo(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function yo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class wo{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(go.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ro.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:bo,value:!0};break;case 1:t[i]={type:bo,value:!1};break;case 2:t[i]={type:vo,value:e.getInt8(n++)};break;case 3:t[i]={type:ko,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:So,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Eo,value:new go(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Ao,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const o=e.getUint16(n,!1);n+=2,t[i]={type:Io,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[i]={type:_o,value:new Date(new go(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:xo,value:`${Ir(s.subarray(0,4))}-${Ir(s.subarray(4,6))}-${Ir(s.subarray(6,8))}-${Ir(s.subarray(8,10))}-${Ir(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(fo||(fo={}));const bo="boolean",vo="byte",ko="short",So="integer",Eo="long",Ao="binary",Io="string",_o="timestamp",xo="uuid",Ro=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Co{constructor(e,t){this.headerMarshaller=new wo(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),o=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new po;return o.setUint32(0,r,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),o.setUint32(r-4,s.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const o=r.getUint32(4,!1),s=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new po).update(new Uint8Array(n,t,8));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,i-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Po{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class To{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Mo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Oo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Lo(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},o=await e(i);if(o.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw o[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class $o{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Co(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;o(new DataView(i.buffer).getUint32(0,!1)),i=null}const s=Math.min(t-n,c-u);r.set(e.slice(u,u+s),n),n+=s,u+=s,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new Mo({messageStream:new Po({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Lo(t,this.utfEncoder)})}serialize(e,t){return new To({messageStream:new Oo({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Do{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new $o({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=No(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const No=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Uo=e=>new Do(e),Bo="function"==typeof TextEncoder?new TextEncoder:null,Fo=e=>{if("string"==typeof e){if(Bo)return Bo.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},jo=e=>new Date(Date.now()+e),Ho=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,qo=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(jo(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},zo=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Vo{async sign(e,t,n){if(!st.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=zo("context",e.context),n=zo("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=zo("signer",n.signer),o=await i(r),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:i,signer:o}=r;let{signingRegion:s,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:jo(i.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Ho(t.$response);if(n){const r=zo("config",e.config),i=r.systemClockOffset;r.systemClockOffset=qo(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Ho(e);if(n){const e=zo("config",t.config);e.systemClockOffset=qo(n,e.systemClockOffset)}}}const Go="required",Wo="fn",Ko="argv",Yo="ref",Qo=!0,Jo="isSet",Xo="booleanEquals",Zo="error",es="endpoint",ts="tree",ns="PartitionResult",rs={[Go]:!1,type:"String"},is={[Go]:!0,default:!1,type:"Boolean"},os={[Yo]:"Endpoint"},ss={[Wo]:Xo,[Ko]:[{[Yo]:"UseFIPS"},!0]},as={[Wo]:Xo,[Ko]:[{[Yo]:"UseDualStack"},!0]},cs={},us={[Wo]:"getAttr",[Ko]:[{[Yo]:ns},"supportsFIPS"]},ds={[Wo]:Xo,[Ko]:[!0,{[Wo]:"getAttr",[Ko]:[{[Yo]:ns},"supportsDualStack"]}]},ls=[ss],hs=[as],fs=[{[Yo]:"Region"}],ps={version:"1.0",parameters:{Region:rs,UseDualStack:is,UseFIPS:is,Endpoint:rs},rules:[{conditions:[{[Wo]:Jo,[Ko]:[os]}],rules:[{conditions:ls,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Zo},{rules:[{conditions:hs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Zo},{endpoint:{url:os,properties:cs,headers:cs},type:es}],type:ts}],type:ts},{rules:[{conditions:[{[Wo]:Jo,[Ko]:fs}],rules:[{conditions:[{[Wo]:"aws.partition",[Ko]:fs,assign:ns}],rules:[{conditions:[ss,as],rules:[{conditions:[{[Wo]:Xo,[Ko]:[Qo,us]},ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Zo}],type:ts},{conditions:ls,rules:[{conditions:[{[Wo]:Xo,[Ko]:[us,Qo]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS is enabled but this partition does not support FIPS",type:Zo}],type:ts},{conditions:hs,rules:[{conditions:[ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"DualStack is enabled but this partition does not support DualStack",type:Zo}],type:ts},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts}],type:ts},{error:"Invalid Configuration: Missing Region",type:Zo}],type:ts}]},ms=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),gs=(e,t={})=>ms.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:o}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const s=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(o,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(ps,{endpointParams:e,logger:t.logger}));bt.aws=Ht;Error;const ys=["in-region","cross-region","mobile","standard","legacy"],ws=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bs=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,o,s=!1;const a=async()=>{i||(i=e());try{r=await i,o=!0,s=!1}finally{i=void 0}return r};return void 0===t?async e=>(o&&!e?.forceRefresh||(r=await a()),r):async e=>(o&&!e?.forceRefresh||(r=await a()),s?r:n&&!n(r)?(s=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(ws()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${ys.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Or),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??gs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Bi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Vo}],logger:e?.logger??new Dr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??kn,utf8Decoder:e?.utf8Decoder??lr,utf8Encoder:e?.utf8Encoder??fr}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Fo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ho({serviceId:r.serviceId,clientVersion:ji}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Uo,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Mn),sha256:e?.sha256??co,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},vs=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Lr(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class ks extends ar{config;constructor(...[e]){const t=bs(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Tn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),o=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),s=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,o=null!=n?async()=>Sn(await en(n)()):void 0,s=!!n,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(o);var a;const c=(e=>{const t=Ni(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=s,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=vs(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Yt(l),Jt)}})),this.middlewareStack.use(ti(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return s?.info?.({clientName:i,commandName:o,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),on)}}))(this.config,{httpAuthSchemeParametersProvider:Ui,identityProviderConfigProvider:async e=>new sn({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Ss extends Pr{constructor(e){super(e),Object.setPrototypeOf(this,Ss.prototype)}}class Es extends Ss{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Es.prototype)}}var As;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(As||(As={}));class Is extends Ss{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Is.prototype)}}class _s extends Ss{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,_s.prototype)}}class xs extends Ss{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,xs.prototype)}}class Rs extends Ss{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Rs.prototype)}}class Cs extends Ss{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Cs.prototype)}}class Ps extends Ss{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Ps.prototype)}}class Ts extends Ss{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,Ts.prototype)}}var Ms;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ms||(Ms={}));var Os;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Os||(Os={}));var Ls;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ls||(Ls={}));var $s;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($s||($s={}));var Ds;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Ds||(Ds={}));var Ns,Us;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ns||(Ns={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Us||(Us={}));var Bs,Fs;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Bs||(Bs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Fs||(Fs={}));var js;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(js||(js={}));var Hs,qs,zs,Vs,Gs,Ws;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Hs||(Hs={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(qs||(qs={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(zs||(zs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Vs||(Vs={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Gs||(Gs={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Ws||(Ws={}));class Ks extends Ss{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Ks.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Ys extends Ss{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,Ys.prototype)}}class Qs extends Ss{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,Qs.prototype)}}var Js,Xs,Zs,ea;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(Js||(Js={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Xs||(Xs={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Zs||(Zs={}));class ta extends Ss{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ta.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ea||(ea={}));var na,ra,ia;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ia||(ia={}));const oa=e=>({...e,...e.body&&{body:Cr}}),sa=e=>({...e,...e.body&&{body:Cr}}),aa=e=>({...e,...e.body&&{body:Cr}}),ca=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ua=(e,t)=>((e,t)=>_r(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),da=async(e,t)=>{const n=await ua(e,t);return n.message=n.message??n.Message,n};function la(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function ha(e,t){return new fa(e,t)}class fa{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new st({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,o?t.split("/").map(e=>la(e)).join("/"):la(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const pa=async(e,t)=>{const n=ha(e,t),r=Nr({},$r,{[Va]:e[za]||"application/octet-stream",[qa]:e[qa],[tc]:e[Ya],[Xa]:e[Ga],[Za]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ma=async(e,t)=>{const n=ha(e,t),r=Nr({},$r,{[Va]:e[za]||"application/octet-stream",[Qa]:e[qa],[tc]:e[Ya],[Xa]:e[Ga],[Za]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ga=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Nr({$metadata:Ha(e),[za]:[,e.headers[Va]],[Ka]:[,e.headers[ec]]}),r=await _r(e.body,t);return n.body=r,n},ya=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Nr({$metadata:Ha(e),[za]:[,e.headers[Ja]],[Ka]:[,e.headers[ec]]}),r=e.body;return n.body=Oa(r,t),n},wa=async(e,t)=>{const n={...e,body:await da(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ka(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Ea(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ra(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ca(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Ta(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ma(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Aa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await Ia(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await xa(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Pa(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await _a(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Sa(n,t);default:const i=n.body;return ba({output:e,parsedBody:i,errorCode:r})}},ba=(va=Ss,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Mr(e),o=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||r||o||"UnknownError",$fault:"client",$metadata:i});throw Tr(s,t)})({output:e,parsedBody:t,exceptionCtor:va,errorCode:n})});var va;const ka=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Es({$metadata:Ha(e),...n});return Tr(o,e.body)},Sa=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Rs({$metadata:Ha(e),...n});return Tr(o,e.body)},Ea=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Is({$metadata:Ha(e),...n});return Tr(o,e.body)},Aa=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr,originalStatusCode:zr,resourceName:Wr});Object.assign(n,i);const o=new Ks({$metadata:Ha(e),...n});return Tr(o,e.body)},Ia=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ys({$metadata:Ha(e),...n});return Tr(o,e.body)},_a=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr,originalMessage:Wr,originalStatusCode:zr});Object.assign(n,i);const o=new ta({$metadata:Ha(e),...n});return Tr(o,e.body)},xa=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Qs({$metadata:Ha(e),...n});return Tr(o,e.body)},Ra=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Cs({$metadata:Ha(e),...n});return Tr(o,e.body)},Ca=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ps({$metadata:Ha(e),...n});return Tr(o,e.body)},Pa=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ts({$metadata:Ha(e),...n});return Tr(o,e.body)},Ta=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new _s({$metadata:Ha(e),...n});return Tr(o,e.body)},Ma=async(e,t)=>{const n=Nr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new xs({$metadata:Ha(e),...n});return Tr(o,e.body)},Oa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Na(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await La(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await $a(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Fa(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Ba(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Da(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ua(n.serviceUnavailableException,t)}:{$unknown:e}),La=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ea(n,t)},$a=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return _a(n,t)},Da=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return xa(n,t)},Na=async(e,t)=>{const n={},r=await ua(e.body,t);return Object.assign(n,ja(r,t)),n},Ua=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Pa(n,t)},Ba=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ta(n,t)},Fa=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ma(n,t)},ja=(e,t)=>Ur(e,{bytes:t.base64Decoder}),Ha=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),qa="accept",za="contentType",Va="content-type",Ga="guardrailIdentifier",Wa="guardrailVersion",Ka="performanceConfigLatency",Ya="trace",Qa="x-amzn-bedrock-accept",Ja="x-amzn-bedrock-content-type",Xa="x-amzn-bedrock-guardrailidentifier",Za="x-amzn-bedrock-guardrailversion",ec="x-amzn-bedrock-performanceconfig-latency",tc="x-amzn-bedrock-trace";class nc extends(xr.classBuilder().ep(Fi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(aa,ca).ser(ma).de(ya).build()){}class rc extends(xr.classBuilder().ep(Fi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(oa,sa).ser(pa).de(ga).build()){}const ic=oc;function oc(e,t){const n=sc();return(oc=function(e,t){return n[e-=398]})(e,t)}function sc(){const e=["4798125HNoOSn","stringify","AWSTextAdapter","decode","ai.aws.requestHeaders","ai.aws.bedrockClientConfig","join","8897108eRzzlW","completion","getReader","_apiUrl","_readStaticResponse","getModelFamily","_readStreamableResponse","test","body","_requestHeaders","_getGeneratedText","33564wjWhXE","define","_bedrockClientConfig","data","ai21.j2","_readAsyncIterableResponse","get","_prepareRequestParameters","chunk","resolve","bedrock-2023-05-31","Human:\n","generations","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","cohere.command","anthropic.claude-v2","20XgDIlT","meta.llama","760lIGDJH","pluginName","anthropic.claude","_processAWSRequest","sendRequest","_processProxyRequest","map","2vIslJV","completions","_prepareRequestHeaders","_requestParameters","config","1379310XqBJGo","ai.aws.apiUrl","locale","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","4148811CcwtDS","length","143253kYILZk","Instruction:\n","generation","filter","847JXIwUe","editor","parse","preparePrompt","json","read","signal","AI_ERROR_UNSUPPORTED_MODEL","1031672SXLsaD","POST","split","ai.aws.requestParameters","<<SYS>>\n","text","\n<</SYS>>\n[INST]\n","\nYou must keep the text formatting.\n\nContent:\n","\n[/INST]","send","\n\nAssistant:","abortController","bytes","application/json","utf-8"];return(sc=function(){return e})()}!function(e){const t=oc,n=e();for(;;)try{if(762289===-parseInt(t(410))/1*(-parseInt(t(405))/2)+parseInt(t(414))/3+-parseInt(t(428))/4+-parseInt(t(443))/5+parseInt(t(461))/6*(-parseInt(t(420))/7)+-parseInt(t(398))/8*(-parseInt(t(416))/9)+parseInt(t(477))/10*(-parseInt(t(450))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(sc);class ac extends Ge{[ic(453)];[ic(459)];[ic(463)];[ic(408)];static get[ic(399)](){return ic(445)}constructor(e){const t=ic;super(e),e[t(409)][t(467)](t(431))||e[t(409)][t(462)](t(431),{model:t(476),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(471),stream:!0}),this[t(453)]=e[t(409)][t(467)](t(411)),this[t(463)]=e[t(409)][t(467)](t(448)),this[t(459)]=e[t(409)][t(467)](t(447)),this[t(408)]=e[t(409)][t(467)](t(431))}async[ic(402)]({query:e,context:t,onData:n,actionId:r}){const i=ic,{model:o,stream:s,...a}=await this[i(468)](this[i(408)],r),c={prompt:await this[i(423)](e,t,o,r),...a};this[i(453)]?await this[i(403)](c,o,s,n,r):await this[i(401)](c,o,s,n)}async[ic(423)](e,t,n,r){const i=ic;let o,s;return t?(o=i(413),s=i(417)+e+i(435)+t):(o=i(474),s=e),i(478)==this[i(455)](n)?i(432)+o+i(434)+s+i(436):i(472)+o+"\n"+s+i(438)}[ic(455)](e){const t=ic;if(/^anthropic\.claude/[t(457)](e))return t(400);if(/^ai21\.j2/[t(457)](e))return t(465);if(/^cohere\.command/[t(457)](e))return t(475);if(/^meta\.llama/[t(457)](e))return t(478);throw new b(v(this[t(421)][t(412)],t(427),e))}async[ic(403)](e,t,n,r,i){const o=ic,s={method:o(429),headers:await this[o(407)](this[o(459)],i),body:JSON[o(444)]({...e,model:t,stream:n}),signal:this[o(439)][o(426)]},a=await fetch(this[o(453)],s);n?await this[o(456)](a,t,r):await this[o(454)](a,t,r)}async[ic(401)](e,t,n,r){const i=ic,o=new ks(this[i(463)]),s={body:JSON[i(444)](e),contentType:i(441),accept:i(441),modelId:t};let a;if(n){const e=new nc(s);a=await o[i(437)](e,{abortSignal:this[i(439)][i(426)]}),await this[i(466)](a,t,r)}else{const e=new rc(s);a=await o[i(437)](e,{abortSignal:this[i(439)][i(426)]}),await this[i(454)](a,t,r)}}async[ic(466)](e,t,n){const r=ic,i=e[r(458)],o=new TextDecoder(r(442));let s="";for await(const e of i)if(e[r(469)]){const i=o[r(446)](e[r(469)][r(440)]),a=JSON[r(422)](i);s+=this[r(460)](a,t),n(s)}return Promise[r(470)]()}async[ic(456)](e,t,n){const r=ic,i=e[r(458)],o=new TextDecoder(r(442)),s=i[r(452)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await s[r(425)]();if(u=e,u)break;const d=(a+o[r(446)](i))[r(430)]("\n")[r(404)](e=>{const t=r;try{return a="",JSON[t(422)](e)}catch{return a=e,null}})[r(419)](e=>null!==e);d[r(415)]&&(c+=d[r(404)](e=>this[r(460)](e,t))[r(449)](""),n(c))}return Promise[r(470)]()}async[ic(454)](e,t,n){const r=ic;let i;return i=e instanceof Response?await e[r(424)]():JSON[r(422)](new TextDecoder(r(442))[r(446)](e[r(458)])),n(this[r(460)](i,t)),Promise[r(470)]()}[ic(460)](e,t){const n=ic;switch(this[n(455)](t)){case n(400):return e[n(451)];case n(465):return e[n(406)][0][n(464)][n(433)];case n(475):return e[n(473)][0][n(433)];case n(478):return e[n(418)]}}}function cc(){var e=["111365JoPLgL","1253600dHHNGf","1EBmgcZ","1842862eNemOe","742674YaoBxi","188162upINnY","1100CUivvw","48940qcVNPc","599528iDisxz","24KlxCqK","9fEbhvS"];return(cc=function(){return e})()}function uc(e,t){var n=cc();return(uc=function(e,t){return n[e-=292]})(e,t)}!function(e){for(var t=uc,n=e();;)try{if(154931===parseInt(t(293))/1*(parseInt(t(296))/2)+-parseInt(t(295))/3+parseInt(t(299))/4+parseInt(t(302))/5*(parseInt(t(300))/6)+-parseInt(t(294))/7+parseInt(t(292))/8*(-parseInt(t(301))/9)+-parseInt(t(298))/10*(-parseInt(t(297))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();