@ckeditor/ckeditor5-ai 45.2.1 → 45.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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:()=>y,AIAssistant:()=>qe,AIAssistantUI:()=>$e,AIRequestError:()=>b,AITextAdapter:()=>Ge,AWSTextAdapter:()=>Ja,OpenAITextAdapter:()=>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-=497]})(e,t)}function l(){const e=["fromCharCode","createSelection","data","paste","findAncestor","6272064hIIsOj","DataTransfer","ck-fake-ai-selection_collapsed","markerToElement","insertContentBelow","isAtEnd","model","push","pluginName","pop","has","894698eagArU","lowest","isContent","1519862WZcNDN","createRange","getSelectedTableCells","getRanges","span","change","insertRows","ai-ui","addClass","createUIElement","markers","isCollapsed","canEditAt","href","element","getRows","for","ck-ai-assistant-ui_theme","getSelectedBlocks","afterInit","setData","once","markerToHighlight","editing","isOfficialPlugin","removeMarker","updateMarker","fire","insertContent","348XfqBPq","21005LdZhDs","getChild","table","hideFakeVisualSelection","last","2670656GZzkEB","schema","ai.useTheme","30ecCIuo","map","text/html","4150580DbWXAS","length","conversion","forEach","markerRange","getLastPosition","getRange","_pasteHTMLUsingClipboard","_prepareTableInsertBelowPosition","parse","getLastMatchingPosition","_getTableRowCountFromContent","_getAISelection","join","createPositionAfter","addMarker","showFakeVisualSelection","start","document","config","_createEmptyTableRows","first","init","plugins","232khqdzh","resultRange","end","ck-fake-ai-selection","from","AIAssistantEditing","getColumnIndexes","deleteContent","getFirstRange","getMarkersGroup","getRowIndexes","off","_getDefaultInsertBelowPosition","TableUtils","getChildren","get","createPositionAt","48588fjQxvi","editingDowncast","editor","selection","_resetContentOfSelectedTableCells","isPremiumPlugin","filter","setSelection","contentInsertion"];return(l=function(){return e})()}!function(e){const t=d,n=e();for(;;)try{if(692313===-parseInt(t(602))/1+-parseInt(t(605))/2+parseInt(t(577))/3*(parseInt(t(560))/4)+parseInt(t(525))/5*(parseInt(t(524))/6)+-parseInt(t(536))/7+-parseInt(t(530))/8+-parseInt(t(591))/9*(-parseInt(t(533))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(l);const h=globalThis[u(592)],f=u(502);class p extends e.Plugin{static get[u(599)](){return u(565)}static get[u(519)](){return!0}static get[u(582)](){return!0}[u(558)](){const e=u,{editor:t}=this,n=[e(563)];t[e(555)][e(575)](e(532))&&n[e(598)](e(512)),t[e(538)][e(511)](e(578))[e(517)]({model:f,view:{classes:n,priority:12}}),t[e(538)][e(511)](e(578))[e(594)]({model:f,view:(t,{writer:n})=>{const r=e;if(!t[r(540)][r(506)])return null;const i=n[r(504)](r(499));return n[r(503)]([r(563),r(593)],i),i}})}[u(514)](){!async function(e){const t=g([57,114,88,50,65,48,102,69,86,54,73,77,121,115,110,49,53,109,122,113,104,103,52,89,118,111,75,51,82,99,80,84,101,76,67,81,119,120,71,116,55,85,98,79,87,105,72,74,107,66,56,97,117,78,68,106,112,108,90,70,100,83]),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(534)](e=>String[t(586)](e))[t(549)]("")}!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([114]);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:1750723200;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(508)]);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(552)](){const e=u,t=this[e(579)][e(597)];t[e(500)](n=>{const r=e,i=t[r(554)][r(580)][r(498)]();let s=0;for(const e of i){const i=f+":"+s;if(t[r(505)][r(601)](i))n[r(521)](i,{range:e});else if(e[r(553)][r(596)]){const s=e[r(553)][r(546)](({item:e})=>!t[r(531)][r(604)](e),{boundaries:e});n[r(551)](i,{usingOperation:!1,affectsData:!1,range:n[r(606)](s,e[r(562)])})}else n[r(551)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(528)](){const e=u,t=this[e(579)][e(597)],n=Array[e(564)](this[e(579)][e(597)][e(505)][e(569)](f));n[e(537)]&&t[e(500)](t=>{const r=e;n[r(539)](e=>{t[r(520)](e)})})}[u(523)](e,t){const n=u,r=this[n(548)](),i=t||r[n(568)]();this[n(579)][n(597)][n(507)](i)&&this[n(579)][n(597)][n(500)](s=>{const o=n;this[o(528)](),t||this[o(581)](s,r),this[o(543)]({insertAt:i,writer:s,html:e})})}[u(595)](e){const t=u,{model:n}=this[t(579)],r=this[t(548)]();n[t(500)](()=>{const n=t,i=this[n(544)](e,r)||this[n(572)](r);this[n(523)](e,i)})}[u(548)](){const e=u,t=this[e(579)][e(597)],n=Array[e(564)](t[e(505)][e(569)](f))[e(534)](t=>t[e(542)]());return t[e(587)](n)}[u(543)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(579)][r(518)],s=this[r(579)][r(559)][r(575)](a.ClipboardPipeline),o=new h;o[r(515)](r(535),t);const d=new ClipboardEvent(r(589),{clipboardData:o}),l=new c.DomEventData(i,d,{dataTransfer:new c.DataTransfer(o)});e[r(584)](n);const f=(t,n)=>{const i=r;n[i(561)]&&e[i(584)](n[i(561)])};s[r(516)](r(585),f,{priority:r(603)}),i[r(554)][r(522)](r(589),l),s[r(571)](r(585),f)}[u(572)](e){const t=u,{model:n}=this[t(579)],r=Array[t(564)](e[t(513)]());return r[t(537)]?n[t(550)](r[t(600)]()):e[t(541)]()}[u(544)](e,t){const n=u,{model:r,plugins:i}=this[n(579)];if(i[n(601)](n(573))){const s=i[n(575)](n(573))[n(497)](t);if(s[n(537)]){const t=this[n(547)](e),i=this[n(556)](s,t);return r[n(576)](i,0)}}return null}[u(547)](e){const t=u,n=this[t(579)][t(559)][t(575)](t(573)),r=this[t(579)][t(588)][t(545)](e),i=Array[t(564)](r[t(574)]())[t(583)](e=>e.is(t(509),t(527)));let s=0;return i[t(539)](e=>{s+=n[t(510)](e)}),s}[u(556)](e,t){const n=u,r=this[n(579)][n(559)][n(575)](n(573)),i=r[n(570)](e),s=r[n(566)](e),o=i[n(529)]+1,a=s[n(557)],c=e[0][n(590)](n(527));for(let e=0;e<t;e++)r[n(501)](c,{at:o});return c[n(526)](o)[n(526)](a)}[u(581)](e,t){const n=u,{plugins:r}=this[n(579)],{model:i}=e;r[n(601)](n(573))&&r[n(575)](n(573))[n(497)](t)[n(537)]&&i[n(567)](t)}}var m=w;function g(){var e=["276057rfuPCe","name","aiadapter-text-adapter-not-set","textAdapter","648019jiiLRd","AIRequestError","isOfficialPlugin","afterInit","3432926DFLIQV","AIAdapter","891042SQVTLx","55RuhxBR","1612416DEoVfP","1489998KKxuSo","8vPveAZ","isPremiumPlugin","pluginName","242526BohAlk"];return(g=function(){return e})()}!function(e){for(var t=w,n=e();;)try{if(923518===parseInt(t(388))/1+parseInt(t(394))/2+-parseInt(t(379))/3+parseInt(t(378))/4+parseInt(t(395))/5*(parseInt(t(383))/6)+-parseInt(t(392))/7+parseInt(t(380))/8*(-parseInt(t(384))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(g);class y extends e.Plugin{static get[m(382)](){return m(393)}static get[m(390)](){return!0}static get[m(381)](){return!0}[m(391)](){var e=m;if(!this[e(387)])throw new i.CKEditorError(e(386),null)}}function w(e,t){var n=g();return(w=function(e,t){return n[e-=378]})(e,t)}class b extends Error{constructor(e){var t=m;super(e),this[t(385)]=t(389)}}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=S;function S(e,t){const n=A();return(S=function(e,t){return n[e-=177]})(e,t)}function A(){const e=["_commandDefinitions","execute","getItems","editor","values","88589aoRlFa","selection","custom","1280700CPGqvM","16IseHAP","refresh","add","getSelectedBlocks","_hasContext","hasContent","438232XxqCMB","name","length","279635FJpzeZ","get","plugins","document","element","set","enabledCommandsIds","change:_hasContext","requiresContent","ai.aiAssistant.disabledElements","config","showUI","change:isEnabled","1197216mvaEju","isEnabled","isCollapsed","getRanges","getFirstRange","includes","1070993oJbPAh","from","model","438855TitmYQ","isEmpty"];return(A=function(){return e})()}!function(e){const t=S,n=e();for(;;)try{if(141081===parseInt(t(201))/1+parseInt(t(211))/2+parseInt(t(194))/3+-parseInt(t(205))/4*(parseInt(t(214))/5)+parseInt(t(204))/6+-parseInt(t(191))/7+-parseInt(t(185))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class E extends e.Command{[k(196)];constructor(e,t){const n=k;super(e),this[n(196)]=t,this[n(177)](n(178),[]),this.on(n(179),(e,t,r)=>{const i=n;this[i(186)]&&(this[i(178)]=I(this[i(196)],r))}),this[n(177)](n(209),!1),this.on(n(184),(e,t,r)=>{const i=n;this[i(178)]=r?I(this[i(196)],this[i(209)]):[]})}[k(206)](){const e=k,t=this[e(199)][e(193)];this[e(209)]=function(t){const n=e,r=t[n(217)][n(202)];return r[n(187)]?0!==[...r[n(208)]()][n(213)]&&![...r[n(208)]()][0][n(195)]:!!t[n(210)](r[n(189)]())}(t);const n=t[e(217)][e(202)],r=this[e(199)][e(182)][e(215)](e(181));for(const t of n[e(188)]())for(const n of t[e(198)]())if(n.is(e(218))&&r[e(190)](n[e(212)]))return void(this[e(186)]=!1);this[e(186)]=!0}[k(197)](e="",t="",n=k(203)){const r=k;this[r(199)][r(216)][r(215)]($e)[r(183)](e,t,n)}}function I(e,t){const n=k,r=new Set;for(const i of e[n(200)]())(t||!1===i[n(180)])&&r[n(207)](i.id);return Array[n(192)](r)}const x=R;function _(){const e=["clear","tryAgainEvent","div","8756CAcpAP","htmlProcessor","initialContext","<h1></h1>","custom","createElement","from","endsWith","previousQuery","abort","522726fJdPxb","set:currentContext","_isH1TagSupportEnabled","reverse","render","text/html","substring","element","```html","makeRequest","stopListening","isRendered","name","innerHTML","serializeToString","startsWith","exec","rename","toModel","remove","_domParser","push","currentResponse","50xwcfbH","ai.aiAssistant.preserveComments","currentContext","_parseAndNormalizeContent","destroy","reset","_handleQuery","nodeType","get","once","toView","markers","body","processor","parseFromString","isProcessing","trim","length","view","prompt","25872MinaWh","editing","previousContext","previousActionId","value","879785cIWbkk","viewToDom","550weIXFI","setContentOf","_sanitizeHTML","catch","querySelector","domConverter","24740IgMFtI","finishProcessing","textAdapter","332616xvevMV","editor","data","config","startProcessing","finally","_sanitizationContainer","stringify","match","childNodes","previousLabel","updateView","listenTo","_normalizeResponseHeadings","6ROivfL","set","message","_stripMarkdownSyntax","stopProcessing","submitPrompt","handleError","_xmlSerializer","mainAction","then","585zouMyC","document","```","ELEMENT_NODE","1080065XAlJYR"];return(_=function(){return e})()}function R(e,t){const n=_();return(R=function(e,t){return n[e-=279]})(e,t)}!function(e){const t=R,n=e();for(;;)try{if(120724===-parseInt(t(327))/1*(-parseInt(t(360))/2)+parseInt(t(337))/3+parseInt(t(295))/4+-parseInt(t(284))/5+parseInt(t(309))/6*(parseInt(t(323))/7)+-parseInt(t(279))/8*(parseInt(t(319))/9)+parseInt(t(292))/10*(-parseInt(t(286))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_);const P=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class C extends((0,i.ObservableMixin)()){[x(296)];[x(294)];[x(378)];[x(301)];[x(357)];[x(316)];constructor(e,t,n){const r=x;super(),this[r(296)]=e,this[r(294)]=t,this[r(301)]=document[r(332)](r(326)),this[r(357)]=new DOMParser,this[r(316)]=new XMLSerializer,this[r(378)]=n,this[r(310)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(338),(e,t,n)=>{const i=r;this[i(378)][i(283)]=this[i(288)](n)}),this[r(307)](this[r(378)],r(314),(e,t)=>{const n=r,i=this[n(362)]||this[n(329)];this[n(366)](t,i,n(331))}),this[r(307)](this[r(378)],r(325),()=>{const e=r;this[e(378)][e(379)]=this[e(305)],this[e(366)](this[e(335)],this[e(281)],this[e(282)],this[e(305)])}),this[r(307)](this[r(378)],r(313),()=>{this[r(313)]()})}[x(364)](){this[x(347)]()}async[x(306)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=x;this[s(378)][s(379)]=r,this[s(378)][s(317)]=i,this[s(329)]=n,t&&(this[s(378)][s(348)]?this[s(366)](t,n,e,r):this[s(378)][s(369)](s(341),()=>{this[s(366)](t,n,e,r)}))}[x(313)](){const e=x;this[e(375)]&&(this[e(375)]=!1,this[e(378)][e(293)](),this[e(294)][e(336)]())}[x(365)](){const e=x;this[e(329)]="",this[e(362)]="",this[e(359)]="",this[e(281)]="",this[e(335)]="",this[e(305)]="",this[e(282)]=void 0,this[e(378)][e(365)](),this[e(313)]()}async[x(366)](e,t,n,r){const i=x;return this[i(375)]=!0,this[i(378)][i(299)](),this[i(281)]=t,this[i(335)]=e,this[i(305)]=r||e,this[i(282)]=n,new Promise(r=>{const s=i;this[s(294)][s(346)]({query:e,context:t,onData:e=>{const t=s;this[t(359)]=e,this[t(362)]=this[t(363)](this[t(359)])},actionId:n})[s(318)](()=>{const e=s;!this[e(362)]&&this[e(359)]&&(this[e(362)]=this[e(363)](this[e(359)],!0))})[s(289)](e=>{const t=s;e instanceof b?this[t(378)][t(315)](e[t(311)]):this[t(378)][t(315)](),r()})[s(300)](()=>{this[s(313)](),r()})})}[x(363)](e,t=!1){const n=x,r=P[n(353)](e);e=r?e[n(343)](r[1][n(377)]):e[n(377)]<100&&!t?"":this[n(312)](e);const i=this[n(357)][n(374)](e,n(342));if(r){const e=Array[n(333)](i[n(372)][n(304)]);e[n(340)]();for(const t of e){if(t[n(367)]==Node[n(322)])break;t[n(356)]()}}const s=this[n(296)][n(297)][n(373)][n(370)](this[n(316)][n(351)](i[n(372)]));this[n(339)]()||this[n(308)](s);const o=this[n(296)][n(298)][n(368)](n(361)),a=this[n(296)][n(297)][n(355)](s);return o||a[n(371)][n(324)](),this[n(296)][n(297)][n(302)](a)}[x(308)](e){const t=x,n=new c.UpcastWriter(this[t(296)][t(280)][t(378)][t(320)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(344))&&r[t(303)](n)&&(i[t(358)](n),"h1"==n[t(349)]&&(s=!0));if(s)for(const e of i)n[t(354)]("h"+(parseInt(e[t(349)][1])+1),e)}[x(339)](){const e=x,{data:t,editing:n}=this[e(296)],r=t[e(328)][e(370)](e(330)),i=t[e(370)](t[e(355)](r));return!!n[e(378)][e(291)][e(285)](i)[e(290)]("h1")}[x(288)](e){const t=x;return this[t(296)][t(280)][t(378)][t(291)][t(287)](this[t(301)],e),this[t(301)][t(350)]}[x(312)](e){const t=x,n=e[t(376)]();return n[t(352)](t(345))?n[t(334)](t(321))?n[t(343)](7,n[t(377)]-3):n[t(343)](7):e}}const M=O;function T(){const e=["2gqbdOy","insert","7452879oQxmms","mainAction","stopButton","items","isVisible","insertButton","Insert below","AI_","_createButton","extendTemplate","toUpperCase","2006523xrKqgZ","REPLACE","label","ck-hidden","94811gvueJh","set","bindTemplate","722124OzndUM","Try again","bind","addMany","ck-ai-form__toolbar","308MeAaDx","replace","2120360DCQueX","_CONTENT","28365JszGkB","Stop","tryAgainButton","locale","replaceButton","ck-button-action","4243032cXbPWr"];return(T=function(){return e})()}function O(e,t){const n=T();return(O=function(e,t){return n[e-=147]})(e,t)}!function(e){const t=O,n=e();for(;;)try{if(576209===parseInt(t(149))/1+parseInt(t(168))/2*(-parseInt(t(181))/3)+parseInt(t(157))/4*(-parseInt(t(161))/5)+parseInt(t(167))/6+parseInt(t(170))/7+-parseInt(t(159))/8+parseInt(t(152))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(T);const L={REPLACE:M(158),INSERT:M(169)};class N extends s.ToolbarView{constructor(e){const t=M;super(e),this[t(150)](t(174),!1),this[t(150)](t(171),L[t(182)]),this[t(165)]=this[t(178)]("",t(166)),this[t(165)][t(154)](t(147)).to(this,t(171),n=>v(e,t(177)+n[t(180)]()+t(160))),this[t(175)]=this[t(178)](v(e,t(176))),this[t(163)]=this[t(178)](v(e,t(153))),this[t(172)]=this[t(178)](v(e,t(162)));const n=this[t(151)];this[t(179)]({attributes:{class:[t(156),n.if(t(174),t(148),e=>!e)]}}),this[t(173)][t(155)]([this[t(165)],this[t(175)],this[t(163)],this[t(172)]])}[M(178)](e,t){const n=M,r=new s.ButtonView(this[n(164)]);return r[n(150)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const $=B;function U(){const e=["clipboard","_createLoader","692956lSsQtY","ck-ai-form__content-field","<span>]</span>","copy","isEnabled","position","setTemplate","lastElementChild","22mbkric","removeAllRanges","AI is writing...","setEndBefore","ClipboardItem","set","185631hvgtac","text/plain","9wRpYQh","addRange","ck-hidden",".ck-ai-form__loader","write","appendLoader","querySelector","ck-ai-form__content-area--processing","icon","render","ck-content","innerHTML","execCommand","isVisible","scrollTo","5295787IpjolZ","listenTo","focus","locale","execute","ck-ai-form__content-area-wrapper","bindTemplate","5hqrEgR","ck-ai-form__loader","3985690tuNUuj","getSelection","class","-9999px","ck-ai-form__copy-button","bind","remove","6780592PMSpEU","appendChild","div","copyButtonView","element","absolute","left","change:isProcessing","textContent","createElement","ck-ai-form__copy-button-wrapper","firstElementChild","167880AFXCEZ","1946788kfwDFg","<span>[</span>","_createCopyButton","style","Copy","ck-ai-form__content-area","text/html","isProcessing","contentFieldView","setStartAfter","change:value"," ck-ai-form__copy-button--copied","value","smooth","setContent","createRange","scrollHeight","body","loaderView","wheel","ck-reset_all-excluded","_copyHTMLToClipboard","mousedown"];return(U=function(){return e})()}function B(e,t){const n=U();return(B=function(e,t){return n[e-=483]})(e,t)}!function(e){const t=B,n=e();for(;;)try{if(425284===parseInt(t(483))/1+-parseInt(t(491))/2*(-parseInt(t(497))/3)+parseInt(t(543))/4*(-parseInt(t(521))/5)+parseInt(t(542))/6+parseInt(t(514))/7+-parseInt(t(530))/8+parseInt(t(499))/9*(-parseInt(t(523))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(U);class D extends s.View{[$(551)];[$(533)];constructor(e,t=""){const n=$;super(e),this[n(496)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(520)];this[n(551)]=new F(e,t),this[n(533)]=this[n(545)](),this[n(489)]({tag:n(532),attributes:{class:["ck",n(519),r.if(n(512),n(501),e=>!e)],tabindex:"-1"},children:[{tag:n(532),attributes:{class:["ck",n(548),r.if(n(550),n(506))]},children:[this[n(551)],{tag:n(532),attributes:{class:["ck",n(540)]},children:[this[n(533)]]}]}]})}[$(508)](){const e=$;super[e(508)](),this[e(555)]&&this[e(551)][e(557)](this[e(555)]);let t=!1;this.on(e(553),(n,r,i)=>{const s=e,o=!this[s(551)][s(534)][s(505)](s(502));this[s(551)][s(557)](i),this[s(550)]&&o&&!t&&this[s(534)][s(513)]({top:this[s(534)][s(559)],behavior:s(556)})}),this.on(e(537),(n,r,i)=>{const s=e;t=!1,i?(this[s(555)]=null,this[s(551)][s(504)]()):this[s(555)]||this[s(551)][s(557)]("")}),this[e(515)](this[e(534)],e(562),()=>{t=!0}),this[e(515)](this[e(534)],e(565),()=>{t=!0})}[$(516)](){const e=$;this[e(534)][e(516)]()}[$(545)](){const e=$,n=this[e(517)],r=new s.ButtonView(this[e(517)]),i=e(527);return r[e(496)]({label:v(n,e(547)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(528)](e(512)).to(this,e(555),e=>!!e),r[e(528)](e(487)).to(this,e(550),e=>!e),r.on(e(518),()=>{const n=e;this[n(564)](this[n(551)][n(534)]),r[n(507)]=t.IconCheck,r[n(525)]=i+n(554),this[n(516)](),setTimeout(()=>{const e=n;r[e(507)]=t.IconCopy,r[e(525)]=i},1e3)}),r}[$(564)](e){const t=$,{window:n,document:r}=i.global;if(n[t(495)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(510)]],{type:t(549)}),"text/plain":new r([e[t(538)]||""],{type:t(498)})})];navigator[t(566)][t(503)](s)}else{const i=r[t(539)](t(532));i[t(546)][t(488)]=t(535),i[t(546)][t(536)]=t(526),i[t(510)]=t(544)+e[t(510)]+t(485),r[t(560)][t(531)](i);const s=r[t(558)]();s[t(552)](i[t(541)]),s[t(494)](i[t(490)]);const o=n[t(524)]();o[t(492)](),o[t(500)](s),r[t(511)](t(486)),i[t(529)]()}}}class F extends s.View{constructor(e,t=""){const n=$;super(e),this[n(561)]=this[n(567)](),this[n(489)]({tag:n(532),attributes:{class:["ck",n(509),t,n(563),n(484)]}})}[$(557)](e){const t=$;this[t(534)][t(510)]=e}[$(504)](){const e=$;this[e(534)][e(531)](this[e(561)][e(534)])}[$(567)](){const e=$,t=new s.View,n=this[e(517)],r=new s.SpinnerView;return r[e(512)]=!0,t[e(489)]({tag:e(532),attributes:{class:["ck",e(522)]},children:[r,{text:v(n,e(493))}]}),t[e(508)](),t}}function j(){const e=["text","setTemplate","div","3864872ScxTpd","4MzaOfY","content","202ecbmGd","668125ZUVLJh","3304152ouoKZr","ck-ai-form__error","3723LBKfSs","10ViCiIj","set","271348dUWBze","10645623hIKhOU","830553DhJOOp","bindTemplate"];return(j=function(){return e})()}function q(e,t){const n=j();return(q=function(e,t){return n[e-=461]})(e,t)}!function(e){const t=q,n=e();for(;;)try{if(367529===-parseInt(t(465))/1*(parseInt(t(461))/2)+-parseInt(t(470))/3*(parseInt(t(476))/4)+-parseInt(t(462))/5+-parseInt(t(463))/6+parseInt(t(468))/7+parseInt(t(475))/8+-parseInt(t(469))/9*(-parseInt(t(466))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(j);class H extends s.View{constructor(e,n=""){const r=q;super(e);const i=new s.IconView,o=this[r(471)];this[r(467)](r(472),n),i[r(477)]=t.IconError,this[r(473)]({tag:r(474),attributes:{class:["ck",r(464)]},children:[i,{text:o.to(r(472))}]})}}const z=V;function V(e,t){const n=G();return(V=function(e,t){return n[e-=242]})(e,t)}function G(){const e=["locale","style","render","left","maxRows","execute","262834DxQCkn","3SgCTNS","keystrokes","isVisible","requestAnimationFrame","focusFirst","rtl","enter","Submit","submit","ck-ai-form__submit","bind","children","add","4101028wFqQBr","fire","uiLanguageDirection","isOn","isEnabled","resultsView","excludeScrollbarsAndBorders","11wnTiwI","right","submitButtonView","1029438PTflrB","History","value","focusableChildren","408285ctDyxO","20929030DATeLI","set","_createShowHistoryButton","78108CNvjbn","target","filteredView","isEmpty","259lsESFM","showHistoryButtonView","focusCycler","ck-ai-form__toggle-history","update","fieldView","window","1072guKtIL","queryView","_createSubmitButton","75771vSuMQB","focus","fieldWrapperChildren","minRows","focusLast","width","element"];return(G=function(){return e})()}!function(e){const t=V,n=e();for(;;)try{if(712394===-parseInt(t(247))/1+parseInt(t(271))/2+parseInt(t(248))/3*(parseInt(t(261))/4)+-parseInt(t(275))/5+-parseInt(t(279))/6*(-parseInt(t(283))/7)+parseInt(t(290))/8*(parseInt(t(293))/9)+-parseInt(t(276))/10*(parseInt(t(268))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[z(270)];[z(284)];constructor(e,t){const n=z;super(e,t),this[n(291)][n(288)][n(296)]=1,this[n(291)][n(288)][n(245)]=3,this[n(270)]=this[n(292)](),this[n(284)]=this[n(278)](),this[n(274)][n(260)](this[n(284)],1),this[n(274)][n(260)](this[n(270)])}[z(243)](){const e=z;super[e(243)](),this[e(291)][e(295)][e(260)](this[e(284)]),this[e(259)][e(260)](this[e(270)]),this[e(249)][e(277)](e(254),(t,n)=>{const r=e;t[r(280)]==this[r(291)][r(288)][r(299)]&&(this[r(256)](),n())})}[z(292)](){const e=z,n=new s.ButtonView(this[e(300)]),r=this[e(300)];return n[e(277)]({icon:t.IconSubmit,label:v(r,e(255)),isVisible:!0,tooltip:!0,class:e(257)}),n.on(e(246),()=>{this[e(256)]()}),n[e(258)](e(265)).to(this[e(291)][e(288)],e(282),this,e(265),(e,t)=>!e&&t),n}[z(278)](){const e=z,n=new s.ButtonView(this[e(300)]),r=this[e(266)],o=this[e(300)];n[e(277)]({label:v(o,e(272)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(286)}),n[e(258)](e(264)).to(r,e(250)),n[e(258)](e(265)).to(this,e(265)),n.on(e(246),()=>{const t=e;r[t(250)]=!r[t(250)],r[t(250)]?this[t(281)][t(294)]():this[t(294)]()});const a=()=>{const t=e;i.global[t(289)][t(251)](()=>{const e=t;if((0,i.isVisible)(this[e(299)])){const t=new i.Rect(this[e(291)][e(288)][e(299)]),r=t[e(298)],s=e(253)===o[e(263)]?e(244):e(269);t[e(267)](),n[e(299)][e(242)][s]=r-t[e(298)]+1+"px"}})};return this[e(291)][e(288)].on(e(287),a),this.on(e(243),a),n}[z(256)](){const e=z,t=this[e(291)][e(288)][e(299)][e(273)];this[e(262)](e(256),t)}[z(294)](e){const t=z;-1===e?this[t(285)][t(297)]():this[t(285)][t(252)]()}}const K=Q;function J(){const e=["fire","children","delegate","40560IQBtFe","set","label","items","Clear","2382aJAcVl","locale","clearHistoryButton","252586DCHlAr","add","729DasBEw","Prompt history","length","2636172ghaBaN","_createClearHistoryButton","historyGroupView","6069WnHcZX","execute","1385392vNblll","1790028WjtlhG","clearHistory","4381455nKmHOt","filter"];return(J=function(){return e})()}function Q(e,t){const n=J();return(Q=function(e,t){return n[e-=349]})(e,t)}!function(e){const t=Q,n=e();for(;;)try{if(461222===parseInt(t(349))/1+-parseInt(t(360))/2+parseInt(t(354))/3+parseInt(t(359))/4+-parseInt(t(362))/5+parseInt(t(372))/6*(parseInt(t(357))/7)+-parseInt(t(367))/8*(-parseInt(t(351))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Z extends s.ListView{[K(356)];[K(374)];constructor(e){const t=K;super(e),this[t(374)]=this[t(355)](),this[t(356)]=new s.ListItemGroupView,this[t(356)][t(365)][t(350)](this[t(374)],1),this[t(356)][t(369)]=v(e,t(352)),this[t(356)][t(370)][t(366)](t(358)).to(this),this[t(370)][t(350)](this[t(356)])}[K(363)](){const e=K;let t=0;for(const n of this[e(370)])t+=n[e(370)][e(353)];return{resultsCount:t,totalItemsCount:t}}[K(355)](){const e=K,t=this[e(373)],n=new s.ButtonView(this[e(373)]);return n[e(368)]({label:"("+v(t,e(371))+")",withText:!0}),n.on(e(358),()=>this[e(364)](e(361))),n}}const X={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function Y(e){if(null==e)return"";if(Array.isArray(e))return e.map(Y).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]||"'")}(Y(e))}function te(){const e=["5119900gUGxRi","391254bQSneS","5hwCZsJ","1065680hOBdzj","children","prompt","8JfkZCS","1765360uAdrAF","14KXQTCO","fire","507450onqyvP","set","909099CAHhOh","locale","execute","170870fTGiAD","add"];return(te=function(){return e})()}function ne(e,t){const n=te();return(ne=function(e,t){return n[e-=122]})(e,t)}!function(e){const t=ne,n=e();for(;;)try{if(250740===-parseInt(t(137))/1*(parseInt(t(133))/2)+parseInt(t(128))/3+parseInt(t(125))/4+-parseInt(t(138))/5+-parseInt(t(136))/6*(parseInt(t(126))/7)+-parseInt(t(124))/8*(parseInt(t(130))/9)+parseInt(t(135))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(te);class re extends s.ListItemView{constructor(e){const t=ne;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(131)],n);this[t(122)][t(134)](r),r[t(129)]({label:e[t(123)],withText:!0}),r.on(t(132),()=>{const n=t;this[n(127)](n(132),{value:ee(e[n(123)])})})}}const ie=se;function se(e,t){const n=ue();return(se=function(e,t){return n[e-=302]})(e,t)}!function(e){const t=se,n=e();for(;;)try{if(958575===parseInt(t(324))/1*(parseInt(t(311))/2)+-parseInt(t(314))/3+parseInt(t(303))/4+-parseInt(t(319))/5*(parseInt(t(316))/6)+parseInt(t(325))/7+parseInt(t(326))/8+parseInt(t(308))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ue);const oe=ie(307);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(312)](),this.on(e(321),(t,n)=>{const r=e,i=ce(n[r(304)]);for(const e of this)if(e!=n&&ce(e[r(304)])===i){this[r(320)](e);break}this[r(306)]>20&&this[r(320)](this[r(305)]),this[r(313)]()}),this.on(e(320),()=>{this[e(313)]()})}[ie(312)](){const e=ie,t=sessionStorage[e(302)](oe)||"[]";this[e(323)](JSON[e(310)](t))}[ie(313)](){const e=ie;sessionStorage[e(317)](oe,JSON[e(318)](this[e(315)](e=>e)))}}function ce(e){const t=ie;return e[t(322)]()[t(309)]()}function ue(){const e=["3085698LEbsCR","setItem","stringify","10fPcCmv","remove","add","toLowerCase","addMany","18UeNJVu","3219034hcGYuJ","7157704jFsuKr","getItem","2740176zExxFY","prompt","last","length","CKEditor/AIFormView/PromptHistory","8780337enYZsX","trim","parse","4838qxNnrS","_loadFromSessionStorage","_saveToSessionStorage","3214839OXWnSa","map"];return(ue=function(){return e})()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return Y(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["fire","1363300BmjkzA","tab","_createPromptView","clear","4924287PRATqT","focusTracker","shift + tab","4519816bvyqvN","add","mainAction","_createToolbar","focusFirst","high","ck-ai-form-content","items","historyGroupView","text","locale","render","submit","listenTo","promptView","handleError","prompt","focusLast","startProcessing","set","insertContentBelow","_focusables","contentArea","_createHistoryView","isVisible","ck-hidden","Ask AI and your prompts will be listed here for you to use later.","search","bindTemplate","replaceContent","6guDYuj","insertButton","_promptHistory","stopButton","tryAgainButton","errorView","queryView","focusCycler","stopProcessing","reset","execute","submitPrompt","chain","label","fieldView","value","Ask AI to edit or generate","focus","createCollection","toolbar","3616500fQECuF","bindTo","294847pszwVi","keystrokes","isProcessing","bind","AI_ERROR_FAILED","delegate","ck-ai-form","copyButtonView","Empty history","finishProcessing","Ask AI to improve generated text","1cOtFMf","401684NyNSyM","element","setTemplate","tryAgainEvent","isEnabled","2928455JsOgGs","REPLACE","trim","replaceButton","div","isError","6BMnjPW","clearHistory"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=380]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(406578===parseInt(t(461))/1*(parseInt(t(462))/2)+-parseInt(t(388))/3*(parseInt(t(391))/4)+parseInt(t(382))/5*(parseInt(t(428))/6)+-parseInt(t(450))/7+-parseInt(t(398))/8+parseInt(t(395))/9+parseInt(t(448))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(396)];[he(451)];[he(420)];[he(447)];[he(412)];[he(433)];[he(419)];[he(435)];[he(430)];constructor(e,t,n=""){const r=he;super(e),this[r(417)](r(381),!0),this[r(417)](r(452),!1),this[r(417)](r(414),""),this[r(417)](r(443),""),this[r(417)](r(387),!1),this[r(417)](r(400),L[r(383)]),this[r(430)]=new ae,this[r(433)]=new H(e),this[r(420)]=new D(e,n),this[r(420)][r(453)](r(452)).to(this),this[r(420)][r(453)](r(443)).to(this),this[r(447)]=this[r(401)](),this[r(447)][r(453)](r(400)).to(this),this[r(412)]=this[r(393)](),this[r(396)]=new i.FocusTracker,this[r(451)]=new i.KeystrokeHandler,this[r(419)]=this[r(446)]([this[r(420)],this[r(420)][r(457)],this[r(447)],this[r(412)]]),this[r(435)]=new s.FocusCycler({focusables:this[r(419)],focusTracker:this[r(396)],keystrokeHandler:this[r(451)],actions:{focusPrevious:r(397),focusNext:r(392)}}),this[r(435)][r(440)](this[r(412)][r(435)]),this[r(412)][r(434)][r(442)][r(453)](r(443)).to(this,r(414));const o=this[r(426)];this[r(464)]({tag:r(386),attributes:{class:["ck",r(456),t],tabindex:"-1"},children:[{tag:r(386),attributes:{class:["ck",r(404)]},children:[{tag:r(386),attributes:{class:[o.if(r(387),r(423),e=>!e)]},children:[this[r(433)]]},this[r(420)],this[r(447)],this[r(412)]]}]})}[he(409)](){const e=he;super[e(409)](),this[e(396)][e(399)](this[e(420)][e(463)]),this[e(396)][e(399)](this[e(420)][e(457)][e(463)]),this[e(396)][e(399)](this[e(447)][e(463)]),this[e(396)][e(399)](this[e(412)][e(463)]),this[e(451)][e(411)](this[e(463)])}[he(445)](e=1){const t=he;-1===e?this[t(435)][t(415)]():this[t(435)][t(402)]()}[he(437)](){const e=he;this[e(414)]="",this[e(443)]="",this[e(387)]=!1,this[e(412)][e(437)](),this[e(420)][e(422)]=!1,this[e(447)][e(422)]=!1}[he(393)](){const e=he,t=this[e(408)],n=new W(t,{queryView:{label:v(t,e(444)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(458)),secondary:v(t,e(424))}}},filteredView:this[e(421)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(453)](e(381)).to(this,e(381),this,e(452),(e,t)=>e&&!t),this[e(411)](n,e(410),(t,n)=>{const r=e;this[r(414)]=n;const i=le(n);this[r(390)](r(439),i),n[r(384)]()&&this[r(430)][r(399)]({prompt:i},0)},{priority:e(403)}),n}[he(421)](){const e=he,t=new Z(this[e(408)]);return t[e(406)][e(405)][e(449)](this[e(430)]).as(re),t.on(e(389),()=>{const t=e;this[t(430)][t(394)](),this[t(412)][t(425)](""),this[t(412)][t(445)]()}),t}[he(401)](){const e=he,t=new N(this[e(408)]);return t[e(385)][e(453)](e(381)).to(this,e(381),this,e(452),this,e(443),(e,t,n)=>e&&!t&&!!n),t[e(385)][e(455)](e(438)).to(this,e(427)),t[e(429)][e(453)](e(381)).to(this,e(381),this,e(452),this,e(443),(e,t,n)=>e&&!t&&!!n),t[e(429)][e(455)](e(438)).to(this,e(418)),t[e(432)][e(453)](e(381)).to(this,e(381),this,e(452),(e,t)=>e&&!t),t[e(432)][e(455)](e(438)).to(this,e(380)),t[e(431)][e(453)](e(381)).to(this,e(452)),t[e(431)][e(455)](e(438)).to(this,e(436)),t}[he(416)](){const e=he;this[e(443)]="",this[e(387)]=!1,this[e(452)]=!0,this[e(420)][e(422)]=!0,this[e(447)][e(422)]=!0,this[e(420)][e(445)]()}[he(459)](){const e=he,t=this[e(408)];this[e(452)]=!1,this[e(414)]="",this[e(412)][e(437)](),this[e(443)]&&(this[e(412)][e(434)][e(441)]=v(t,e(460)))}[he(413)](e){const t=he,n=this[t(408)];this[t(459)](),this[t(387)]=!0,this[t(433)][t(407)]=e||v(n,t(454)),this[t(443)]||(this[t(420)][t(422)]=!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),xe=n(379),_e={attributes:{"data-cke":!0}};_e.setAttributes=Ae(),_e.insert=ke().bind(null,"head"),_e.domAPI=be(),_e.insertStyleElement=Ie();ye()(xe.A,_e);xe.A&&xe.A.locals&&xe.A.locals;var Re=n(181),Pe={attributes:{"data-cke":!0}};Pe.setAttributes=Ae(),Pe.insert=ke().bind(null,"head"),Pe.domAPI=be(),Pe.insertStyleElement=Ie();ye()(Re.A,Pe);Re.A&&Re.A.locals&&Re.A.locals;var Ce=n(676),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ae(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Ce.A,Me);Ce.A&&Ce.A.locals&&Ce.A.locals;const Te=Oe;function Oe(e,t){const n=Le();return(Oe=function(e,t){return n[e-=257]})(e,t)}function Le(){const e=["change:value","315240saqbKR","4066038HsPToF","28216hkpfYa","setSelection","promptView","componentFactory","buttonView","DataTransfer","aiLicenseKeyUsageLimit","prompt","_getMenuBarGroupButtons","_createAIAssistantUIButton","replace","schema","source","sort","_forceMarkersCopy","ck-ai-assistant-ui","_initView","getRanges","isFlat","values","_aiAdapter","errorView","usageLimit","domainLimit","ai.useTheme","_getResolvedCommandsDefinitions","updateView","invalid","evaluationLimit","fire","ai.aiAssistant.disabledElements","push","INSERT","ai-commands-config-order-collision","requiresContent","polite","trialLimit","hide","getSelectedElement","editing","24mjZMjy","insertContentBelow","selection","copy","editor","filter","_showLicenseError","label","AI is writing","904tItsuo","5059260hsbfSt","plugins","isOfficialPlugin","_licenseKeyCheckInterval","map","order","aiLicenseKeyDomainLimit","AIAssistantUI","ai.aiAssistant.contentAreaCssClass","_onExecute","menuPanelClass","isPremiumPlugin","aiLicenseKeyInvalid","hideFakeVisualSelection","change","focus","change:isProcessing","render","wasMoved","body","media","enabledCommandsIds","queryView","change:enabledCommandsIds","delegate","groupId","trim","_aiAssistantController","command:","config","_populateMenuBarMenu","reset","ck-ai-assistant-button ","text/html","174755wmAOHC","comment","items","aiLicenseKeyExpired","custom","_commandDefinitions","showUI","currentContext","_initAriaAiStatusChangeAnnouncements","hideUI","bind","_formView","menuBar:aiAssistant","getSelectedBlocks","set"," ck-ai-assistant-ui_theme","ck-ai-commands-dropdown ","ai.aiAssistant.commands","insertContent","showFakeVisualSelection","expired","buttons","951YDZetM","get","add","text","tableOfContents","once","showAIAssistant","364711tQhGGd","aiLicenseKeyEvaluationLimit","aiLicenseKeyValid","change:isError","define","show","commands","init","model","menuBar:aiCommands","fieldView","forEach","aiLicenseKeyNotAllowed","view","pluginName","isEnabled","AI Commands","Error during AI content generation: %0","textAdapter","REPLACE","679aIbkAF","splice","update","addMany","_uiCssClasses","getData","document","EDITOR_TOP_SIDE","destroy","getLimitElement","isOn","Generated content: %0","groupLabel","rawHtml","licenseKey","aiCommands","panelView","children","includes","locale","AI Assistant","from","</p>","execute","replaceContent","menuView","length","requires","contentArea","AIAssistant","isCollapsed","listenTo","aiAssistant","_dialog","featureNotAllowed","menuitemcheckbox","aiLicenseKeyTrialLimit","<p>","updatePosition","announce"];return(Le=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(340336===-parseInt(t(354))/1+parseInt(t(415))/2+-parseInt(t(347))/3*(-parseInt(t(290))/4)+-parseInt(t(325))/5*(parseInt(t(281))/6)+parseInt(t(374))/7*(-parseInt(t(417))/8)+parseInt(t(416))/9+parseInt(t(291))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Le);const Ne=globalThis[Te(422)];class $e extends e.Plugin{[Te(388)];[Te(294)];[Te(407)];[Te(336)];[Te(261)];[Te(318)];[Te(378)]="";static get[Te(368)](){return Te(298)}static get[Te(293)](){return!0}static get[Te(302)](){return!0}static get[Te(401)](){return[a.ClipboardMarkersUtils,p,y,s.Dialog]}constructor(e){const t=Te;super(e),e[t(320)][t(358)](t(271),[t(311),t(387),t(351)]),e[t(320)][t(358)](t(299),""),e[t(320)][t(358)](t(265),!0),this[t(378)]=t(432)+(e[t(320)][t(348)](t(265))?t(340):"")}[Te(361)](){const e=Te,{editor:n}=this;this[e(261)]=n[e(292)][e(348)](y),this[e(407)]=n[e(292)][e(348)](s.Dialog),this[e(336)]=null,this[e(330)]=this[e(266)]();const r=new E(n,Array[e(395)](this[e(330)][e(260)]()));n[e(360)][e(349)](e(353),r),n.ui[e(420)][e(349)](e(389),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(339)]({class:a(341)+this[a(378)]}),c[a(421)][a(339)]({label:v(i,a(370)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(397),e=>this[a(300)](e[a(429)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(367)][a(310)],function(e){const t=a,n=o(e[t(320)][t(348)](t(342)),e[t(393)]),r=Be(e,n)[t(286)](e=>e[t(360)][t(400)]);return 1===r[t(400)]?Be(e,r[0][t(360)])[t(295)](e=>({id:e.id,label:e[t(288)]})):r[t(295)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Be(e,o)[r(295)](e=>({id:e.id,label:e[r(288)]}))}})}(n),{ariaLabel:v(i,a(370))}),c[a(399)][a(301)]=a(341)+this[a(378)],r.on(a(314),u),c[a(399)][a(352)](a(308),u),c;function u(){const e=a;c[e(369)]=r[e(312)][e(400)]>0;for(const t of c[e(399)][e(346)])t[e(369)]=r[e(312)][e(392)](t.id)}}),n.ui[e(420)][e(349)](e(363),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(421)][a(339)]({label:v(i,a(370)),icon:t.IconMagicWand}),c[a(335)](a(369)).to(r,a(312),e=>e[a(400)]>0);const u=o(n[a(320)][a(348)](a(342)),i);return this[a(321)](r,c,u,e=>this[a(300)](e)),c}),n.ui[e(420)][e(349)](e(406),()=>{const t=e,n=this[t(426)](s.ButtonView);return n[t(339)]({tooltip:!0,class:t(323)+this[t(378)]}),n}),n.ui[e(420)][e(349)](e(337),()=>{const t=e,n=this[t(426)](s.MenuBarMenuListItemButtonView);return n[t(339)]({role:t(409)}),n}),this[e(388)]=this[e(285)][e(320)][e(348)](e(388));const i=this[e(285)];this[e(294)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(356)==s||t(303)==s||t(328)==s||t(297)==s||t(366)==s||t(355)==s||t(410)==s||t(423)==s){delete i[r],n=s,clearInterval(this[t(294)]),this[t(294)]=void 0;break}}t(303)==n&&i[t(287)](t(268)),t(328)==n&&i[t(287)](t(345)),t(297)==n&&i[t(287)](t(264)),t(366)==n&&i[t(287)](t(408),t(403)),t(355)==n&&i[t(287)](t(269)),t(410)==n&&i[t(287)](t(277)),t(423)==n&&i[t(287)](t(263))},1e3)}[Te(382)](){const e=Te;super[e(382)](),this[e(294)]&&clearInterval(this[e(294)])}[Te(331)](e="",n="",r=Te(329)){const i=Te,o=this[i(285)],u=o[i(280)][i(367)],d=o[i(292)][i(348)](p),l=o[i(292)][i(348)](a.ClipboardMarkersUtils);d[i(344)]();const h=new Ne,f=new ClipboardEvent(i(284),{clipboardData:h}),m=new c.DataTransfer(h),g=new c.DomEventData(u,f,{dataTransfer:m});l[i(431)](i(326),()=>{const e=i;u[e(380)][e(270)](e(284),g)}),this[i(336)]||(this[i(257)](),this[i(318)]=new C(o,this[i(261)][i(372)],this[i(336)]));let y=m[i(379)](i(324));const w=o[i(362)][i(380)][i(283)],b=Array[i(395)](w[i(258)]());1===b[i(400)]&&b[0][i(259)]&&!w[i(279)]()&&""!==y[i(427)](/&nbsp;/g,"")[i(317)]()&&(y=i(411)+y+i(396)),this[i(318)][i(267)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:L[o[i(362)][i(380)][i(283)][i(404)]?i(273):i(373)]}),i(406)!==this[i(407)].id?this[i(407)][i(359)]({id:i(406),icon:t.IconRobotPencil,title:v(this[i(285)][i(393)],i(394)),content:this[i(336)],position:s.DialogViewPosition[i(381)],onShow:()=>{const e=i;this[e(336)][e(306)]()},onHide:()=>{const e=i;this[e(318)][e(322)](),d[e(304)]()}}):this[i(407)][i(367)][i(309)]||this[i(407)][i(367)][i(412)]()}[Te(334)](){const e=Te;this[e(407)][e(278)]()}[Te(266)](){const e=Te,t=new Map,n=o(this[e(285)][e(320)][e(348)](e(342)),this[e(285)][e(393)]);for(const r of n)for(const n of r[e(360)])t[e(339)](n.id,{...n,groupId:r[e(316)],groupLabel:r[e(386)]||r[e(316)]});return t}[Te(426)](e){const n=Te,r=this[n(285)],i=r[n(360)][n(348)](n(353)),s=new e(r[n(393)]);return s[n(339)]({label:v(r[n(393)],n(394)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(335)](n(369)).to(i),s[n(335)](n(384)).to(this[n(407)],"id",e=>n(406)===e),this[n(405)](s,n(397),()=>{const e=n;s[e(384)]?this[e(334)]():i[e(397)]()}),s}[Te(257)](){const e=Te,t=this[e(285)][e(292)][e(348)](p);this[e(336)]=new me(this[e(285)][e(393)],this[e(378)],this[e(285)][e(320)][e(348)](e(299))),this[e(336)].on(e(414),()=>{const t=e;this[t(407)][t(367)][t(309)]||this[t(407)][t(367)][t(412)]()}),this[e(336)][e(419)][e(313)][e(364)].on(e(376),()=>{const t=e;this[t(407)][t(367)][t(309)]||this[t(407)][t(367)][t(412)]()}),this[e(405)](this[e(336)],e(398),()=>{const n=e;t[n(343)](this[n(318)][n(332)]),this[n(334)]()}),this[e(405)](this[e(336)],e(282),()=>{const n=e;t[n(282)](this[n(318)][n(332)]),this[n(334)]()}),this[e(333)]()}[Te(333)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(285)];this[e(336)][e(402)].on(e(307),(r,i,s)=>{const o=e,a=this[o(318)][o(332)];s?n[o(413)](v(t,o(289))):a&&n[o(413)](v(t,o(385),a),{politeness:o(276),isUnsafeHTML:!0})}),this[e(336)].on(e(357),(r,i,s)=>{const o=e;if(s){const e=this[o(336)][o(262)][o(350)];n[o(413)](v(t,o(371),e))}})}[Te(300)](e){const t=Te,n=this[t(330)][t(348)](e),r=this[t(285)],s=r[t(362)][t(380)][t(283)],o=r[t(360)][t(348)](t(353)),a=r[t(292)][t(348)](p),c=("_ungrouppedCommands"!==n[t(316)]?n[t(386)]+": ":"")+n[t(288)];if(!1!==n[t(275)]&&s[t(404)]){const e=(0,i.first)(s[t(338)]())||r[t(362)][t(428)][t(383)](s);r[t(362)][t(305)](n=>{n[t(418)](e,"in")})}a[t(344)](),o[t(397)](n[t(424)],c,t(319)+e)}[Te(321)](e,t,n,r){const i=Te,o=this[i(285)],a=o[i(393)],c=new s.MenuBarMenuListView(a),u=Be(o,n)[i(286)](e=>e[i(360)][i(400)]);1===u[i(400)]?this[i(425)]({command:e,commands:u[0][i(360)],parentMenuView:t,onExecute:r})[i(365)](e=>c[i(327)][i(349)](e)):u[i(365)](({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(425)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(421)][d(339)]({label:o||n}),h[d(315)](d(397)).to(t),f[d(327)][d(377)](p),h[d(390)][d(391)][d(349)](f),l[d(391)][d(349)](h),c[d(327)][d(349)](l)}),t[i(390)][i(391)][i(349)](c)}[Te(425)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(285)],a=o[i(393)];return Be(o,t)[i(295)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(339)]({label:t[o(288)]}),u[o(315)](o(397)).to(n),u.on(o(397),()=>r(t.id)),u[o(335)](o(369)).to(e,o(312),e=>e[o(392)](t.id)),c[o(391)][o(349)](u),c})}}function Ue(e,t){const n=Te;return void 0!==e[n(296)]&&void 0===t[n(296)]?1:void 0===e[n(296)]&&void 0!==t[n(296)]?-1:void 0!==e[n(296)]&&void 0!==t[n(296)]?e[n(296)]-t[n(296)]:0}function Be(e,t){const n=Te;t[n(430)](Ue);const r={},s=[];for(const o of t)if(void 0!==o[n(296)]){if(o[n(296)]in r)throw new i.CKEditorError(n(274),e,{conflictingDefinitions:[o,r[o[n(296)]]]});r[o[n(296)]]=o,s[n(375)](o[n(296)],0,o)}else s[n(272)](o);return s}const De=Fe;function Fe(e,t){const n=je();return(Fe=function(e,t){return n[e-=152]})(e,t)}function je(){const e=["5vTZHsh","locale","552987GnjNOG","get","Translate the content to French language.","config","Business","303851KhArFd","requires","translate","German","Improve using friendly, comforting language, to convey understanding and empathy.","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","groupId","Friendly","casual","AIAssistant","generate","translateFrench","Generate from selection","840504unMqBM","Translate the content to German language.","includes","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Hindi","Continue","isPremiumPlugin","commands","translateChinese","1184267BOlpSE","Rewrite this content as a legal professional using valid legal terminology.","1546011CUzkgC","direct","simplifyLanguage","translateSpanish","define","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","friendly","Poetic","translateEnglish","concat","editOrReview","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","makeLonger","Journalism","Translate the content to Portuguese language.","Translate the content to Arabic language.","changeTone","ai.aiAssistant.preserveComments","isOfficialPlugin","Spanish","Summarize","makeShorter","8gLUGfF","find","Translate the content to English language.","Legal","poetic","Simplified Chinese","confident","Make shorter","Rewrite this content as a business professional with formal language.","Make longer","4pLFOnK","Improve using compelling, optimistic language to convey confidence in the writing.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","Simplify language","Change style","legal","ai.aiAssistant.extraCommandGroups","Portuguese","translateGerman","Professional","10bXzqUP","pluginName","Arabic","Improve writing","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Edit or review","Direct","Confident","business","Translate the content to Spanish language.","414512JyAqAS","professional","Change tone","Translate the content to Hindi language.","changeStyle","translateHindi","6775956RMTmgD","improveWriting","Rewrite this content as a journalist using engaging language to convey the importance of the information.","translatePortuguese","push","set","French","forEach","continue","English","Translate","Translate the content to Simplified Chinese language.","Improve this content by using descriptive language and inserting more information and more detailed explanations.","filter","summarize","ai.aiAssistant.commands","Improve using direct language, using only the essential information.","Casual","ai.aiAssistant.removeCommands","Improve using casual, informal language to convey a casual conversation with a real person.","journalism","translateArabic"];return(je=function(){return e})()}!function(e){const t=Fe,n=e();for(;;)try{if(246685===parseInt(t(174))/1+parseInt(t(231))/2*(-parseInt(t(169))/3)+-parseInt(t(251))/4*(parseInt(t(167))/5)+parseInt(t(187))/6+-parseInt(t(196))/7*(parseInt(t(221))/8)+-parseInt(t(198))/9*(parseInt(t(241))/10)+parseInt(t(257))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class qe extends e.Plugin{static get[De(175)](){return[$e,p]}static get[De(242)](){return De(183)}static get[De(217)](){return!0}static get[De(193)](){return!0}constructor(e){const t=De;super(e);const n=e[t(172)],r=e[t(168)];n[t(202)](t(216),!0),n[t(202)](t(160),function(e){const t=De;return[{groupId:t(209),groupLabel:v(e,t(246)),commands:[{id:t(258),label:v(e,t(244)),prompt:t(204)},{id:t(220),label:v(e,t(228)),prompt:t(233)},{id:t(211),label:v(e,t(230)),prompt:t(157)},{id:t(200),label:v(e,t(234)),prompt:t(245)}]},{groupId:t(184),groupLabel:v(e,t(186)),commands:[{id:t(159),label:v(e,t(219)),prompt:t(179)},{id:t(153),label:v(e,t(192)),prompt:t(210)}]},{groupId:t(215),groupLabel:v(e,t(253)),commands:[{id:t(252),label:v(e,t(240)),prompt:t(203)},{id:t(182),label:v(e,t(162)),prompt:t(164)},{id:t(199),label:v(e,t(247)),prompt:t(161)},{id:t(227),label:v(e,t(248)),prompt:t(232)},{id:t(205),label:v(e,t(181)),prompt:t(178)}]},{groupId:t(255),groupLabel:v(e,t(235)),commands:[{id:t(249),label:v(e,t(173)),prompt:t(229)},{id:t(236),label:v(e,t(224)),prompt:t(197)},{id:t(165),label:v(e,t(212)),prompt:t(259)},{id:t(225),label:v(e,t(206)),prompt:t(190)}]},{groupId:t(176),groupLabel:v(e,t(155)),commands:[{id:t(207),label:v(e,t(154)),prompt:t(223)},{id:t(201),label:v(e,t(218)),prompt:t(250)},{id:t(260),label:v(e,t(238)),prompt:t(213)},{id:t(239),label:v(e,t(177)),prompt:t(188)},{id:t(185),label:v(e,t(263)),prompt:t(171)},{id:t(195),label:v(e,t(226)),prompt:t(156)},{id:t(256),label:v(e,t(191)),prompt:t(254)},{id:t(166),label:v(e,t(243)),prompt:t(214)}]}]}(r)),n[t(202)](t(237),[]),n[t(202)](t(163),[]);let i=o(n[t(170)](t(160)),r);const s=n[t(170)](t(237)),a=n[t(170)](t(163));s[t(152)](e=>{const n=t,r=i[n(222)](t=>t[n(180)]===e[n(180)]);r?r[n(194)]=r[n(194)][n(208)](e[n(194)]):i[n(261)](e)}),i=i[t(158)](e=>!a[t(189)](e[t(180)])),i[t(152)](e=>{const n=t;e[n(194)]=e[n(194)][n(158)](e=>!a[n(189)](e.id))}),n[t(262)](t(160),i)}}const He=Ve;function ze(){const e=["AI_ERROR_GET_HEADERS","requires","42dBDoRJ","5cRXqKy","aitextadapter-send-request-failed","abort","init","editor","_prepareRequestParameters","6725508kfHoqM","20qMRMnX","AbortError","abortController","object","name","68700516ufkCnm","textAdapter","8WvPnzo","signal","246cvNmne","77160YQGCiU","resolve","application/json","get","5500TpJzcO","plugins","reject","error","5300307twPoAi","12487926KBPXqR","locale","12854639bOCObW","_prepareRequestHeaders","aborted","makeRequest","AI_ERROR_GET_PARAMETERS","assign","catch","sendRequest"];return(ze=function(){return e})()}function Ve(e,t){const n=ze();return(Ve=function(e,t){return n[e-=243]})(e,t)}!function(e){const t=Ve,n=e();for(;;)try{if(992058===parseInt(t(268))/1*(-parseInt(t(247))/2)+-parseInt(t(246))/3*(parseInt(t(251))/4)+-parseInt(t(269))/5*(parseInt(t(275))/6)+-parseInt(t(258))/7*(parseInt(t(244))/8)+-parseInt(t(255))/9*(parseInt(t(276))/10)+parseInt(t(256))/11+parseInt(t(281))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ze);class Ge extends e.Plugin{[He(278)];static get[He(267)](){return[y]}constructor(e){const t=He;super(e),this[t(278)]=new AbortController}[He(272)](){const e=He;this[e(273)][e(252)][e(250)](y)[e(243)]=this}[He(271)](){const e=He;this[e(278)][e(245)][e(260)]||(this[e(278)][e(271)](),this[e(278)]=new AbortController)}async[He(261)](e){const t=He;return this[t(265)](e)[t(264)](e=>{const n=t;if(e instanceof b)return Promise[n(253)](e);if(n(277)==e[n(280)])return Promise[n(248)]();throw console[n(254)](e),new i.CKEditorError(n(270),null)})}async[He(259)](e,t){const n=He,r=this[n(273)][n(257)],i={"Content-Type":n(249)};if(n(279)==typeof e)Object[n(263)](i,e);else if(e)try{const r=await e(t);Object[n(263)](i,r)}catch{return Promise[n(253)](new b(v(r,n(266))))}return i}async[He(274)](e,t){const n=He,r=this[n(273)][n(257)];if(n(279)==typeof e)return e;try{return await e(t)}catch{return Promise[n(253)](new b(v(r,n(262))))}}}const We=Ke;function Ke(e,t){const n=Je();return(Ke=function(e,t){return n[e-=340]})(e,t)}function Je(){const e=["prepareMessages","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.","data: ","sendRequest","map","parse","length","\nYou must keep the text formatting.\n\nContent:\n","config","_prepareRequestHeaders","reject","_prepareRequestParameters","OpenAITextAdapter","POST","system","_isBufferIncomplete","Instruction:\n","ai.openAI.apiUrl","context_length_exceeded","_requestHeaders","json","gpt-3.5-turbo","signal","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.","filter","join","AI_ERROR_MODERATION","abortController","AI_ERROR_CONTEXT_LENGTH","resolve","https://api.openai.com/v1/chat/completions","_readStreamableResponse","content","122610CQtrUV","409503NgnyTo","define","148798brNZlv","_apiUrl","text","328762rcppmN","delta","1827VUswyG","7xhWnWn","includes","editor","ai.openAI.requestHeaders","[DONE]","locale","user","_requestParameters","replace","_cleanUpData","read","split","72VqXKSo","decode","stringify","get","message","body","pluginName","getReader","7385iowypK","stream","choices","Moderation","ai.openAI.requestParameters","8488eJZlHV","936600gJbdWd","_readStaticResponse"];return(Je=function(){return e})()}!function(e){const t=Ke,n=e();for(;;)try{if(226786===-parseInt(t(354))/1+parseInt(t(357))/2+parseInt(t(352))/3+parseInt(t(372))/4*(-parseInt(t(380))/5)+parseInt(t(351))/6*(-parseInt(t(360))/7)+-parseInt(t(385))/8*(-parseInt(t(359))/9)+-parseInt(t(386))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Je);class Qe extends Ge{[We(355)];[We(407)];[We(367)];static get[We(378)](){return We(400)}constructor(e){const t=We;super(e),e[t(396)][t(353)](t(405),t(348)),e[t(396)][t(375)](t(384))||e[t(396)][t(353)](t(384),{model:t(409),max_tokens:2e3,temperature:1,top_p:1,stream:!0}),this[t(355)]=e[t(396)][t(375)](t(405)),this[t(407)]=e[t(396)][t(375)](t(363))||{},this[t(367)]=e[t(396)][t(375)](t(384))}async[We(391)]({query:e,context:t,onData:n,actionId:r}){const i=We,s=this[i(362)][i(365)],o=await this[i(388)](e,t,r),a=await this[i(397)](this[i(407)],r),c=await this[i(399)](this[i(367)],r),u={messages:o,...c},d={method:i(401),headers:a,body:JSON[i(374)](u),signal:this[i(345)][i(340)]},l=await fetch(this[i(355)],d);if(l.ok)return c[i(381)]?await this[i(349)](l,n):await this[i(387)](l,n),Promise[i(347)]();{const e=await l[i(356)]();return e[i(361)](i(406))?Promise[i(398)](new b(v(s,i(346)))):e[i(361)](i(383))?Promise[i(398)](new b(v(s,i(344)))):Promise[i(398)](new Error(e))}}async[We(388)](e,t,n){const r=We;let i,s;return t?(i=r(389),s=r(404)+e+r(395)+t):(i=r(341),s=e),[{role:r(402),content:i},{role:r(366),content:s}]}async[We(349)](e,t){const n=We,r=e[n(377)][n(379)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(370)](),d=s+i[n(373)](u);let l="";c=e;try{l=this[n(369)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(403)](o)||o&&(a+=o,o="",t(a))}return Promise[n(347)]()}async[We(387)](e,t){const n=We;return t((await e[n(408)]())[n(382)][0][n(376)][n(350)]),Promise[n(347)]()}[We(403)](e){const t=We,n=e[t(371)]("<")[t(394)]!==e[t(371)](">")[t(394)],r=e[t(394)]<30;return n&&r}[We(369)](e){const t=We;return e[t(371)](/\n(?![^{]*\})/g)[t(392)](e=>e[t(368)](t(390),""))[t(342)](e=>e&&e[t(394)]>0&&t(364)!==e)[t(392)](e=>{const n=t,{choices:r}=JSON[n(393)](e);if(r[0]?.[n(358)]?.[n(350)])return r[0][n(358)][n(350)]})[t(342)](e=>e)[t(343)]("")}}const Ze=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}};var Xe,Ye,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HEADER="header",e.QUERY="query"}(Ye||(Ye={})),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||r.headers.hasOwnProperty(lt))return t(n);const i=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o(i)&&o(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}});const pt=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}$"),mt=e=>pt.test(e)||e.startsWith("[")&&e.endsWith("]"),gt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),yt=(e,t=!1)=>{if(!t)return gt.test(e);const n=e.split(".");for(const e of n)if(!yt(e))return!1;return!0},wt={},bt="endpoints";function vt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${vt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(vt).join(", ")})`:JSON.stringify(e,null,2)}class kt extends Error{constructor(e){super(e),this.name="EndpointError"}}const St=(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 kt(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new kt(`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 kt(`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},Et={booleanEquals:(e,t)=>e===t,getAttr:St,isSet:e=>null!=e,isValidHostLabel:yt,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=mt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[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()}`)},It=(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(St(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return It(e,n);if(e.fn)return _t(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new kt(`'${t}': ${String(e)} is not a string, function or reference.`)},_t=({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 wt&&null!=i[1]?wt[i[0]][i[1]](...r):Et[e](...r)},Rt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new kt(`'${e}' is already defined in Reference Record.`);const r=_t(t,n);return n.logger?.debug?.(`${bt} evaluateCondition: ${vt(t)} = ${vt(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}=Rt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${bt} assign: ${i.name} := ${vt(i.value)}`))}return{result:!0,referenceRecord:n}},Ct=(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 kt(`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 It(e,t);case"object":if(null===e)throw new kt(`Unexpected endpoint property: ${e}`);return Tt(e,t);case"boolean":return e;default:throw new kt("Unexpected endpoint property type: "+typeof e)}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Mt(r,t)}),{}),Ot=(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 kt("Endpoint URL must be a string, got "+typeof n)},Lt=(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?.(`${bt} Resolving endpoint from template: ${vt(r)}`),{...null!=u&&{headers:Ct(u,o)},...null!=c&&{properties:Tt(c,o)},url:Ot(a,o)}},Nt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)throw new kt(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},$t=(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=Lt(n,t);if(e)return e}else if("error"===n.type)Nt(n,t);else{if("tree"!==n.type)throw new kt(`Unknown endpoint rule: ${n}`);{const e=$t(n,t);if(e)return e}}throw new kt("Rules evaluation failed")},Bt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Bt(t))return!1;return!0}return!!yt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!mt(e)))};let Dt=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)\\\\-\\\\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)"},"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)"},"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":{"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":{}}],"version":"1.1"}'),Ft="";const jt={isVirtualHostableS3Bucket:Bt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;return"arn"!==n||""===r||""===i||""===a[0]?null:{partition:r,service:i,region:s,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},partition:e=>{const{partitions:t}=Dt;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}}};wt.aws=jt;const qt="user-agent",Ht="x-amz-user-agent",zt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Gt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Wt)||[],a=(await e.defaultUserAgentProvider()).map(Wt),c=e?.customUserAgent?.map(Wt)||[],u=(Ft?[Ft]:[]).concat([...a,...o,...c]).join(" "),d=[...a.filter(e=>e.startsWith("aws-sdk-")),...c].join(" ");return"browser"!==e.runtime?(d&&(s[Ht]=s[Ht]?`${s[qt]} ${d}`:d),s[qt]=u):s[Ht]=u,t({...r,request:i})},Wt=e=>{const t=e[0].split("/").map(e=>e.replace(zt,"-")).join("/"),n=e[1]?.replace(Vt,"-"),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}`}},"")},Kt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Jt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Jt||(Jt={}));const Qt=e=>e[rt]||(e[rt]={}),Zt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Xt=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Yt=e=>Xt(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const en=(e,t)=>(n,r)=>async i=>{const s=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Qt(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)},tn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},nn={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},rn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function sn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>n=>async r=>{const{response:i}=await n(r);try{return{response:i,output:await t(i,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:i}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,n),nn),r.add(((e,t)=>(n,r)=>async i=>{const s=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:s});return n({...i,request:o})})(e,t),rn)}}}const on=e=>e=>{throw e},an=(e,t)=>{},cn={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},un=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Qt(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||on)(i));return(o.successHandler||an)(a.response,i),a},cn)}}),dn=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},ln={},hn=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);ln[n]=e,hn[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;ln[n]=r,hn[r]=n}for(let e=0;e<10;e++){ln[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;ln[t]=n,hn[n]=t}ln["+"]=62,hn[62]="+",ln["/"]=63,hn[63]="/";const fn=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 ln))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=ln[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)},pn=e=>(new TextEncoder).encode(e);function mn(e){let t;t="string"==typeof e?pn(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+=hn[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const gn=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 yn extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?yn.mutate(fn(e)):yn.mutate(pn(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,yn.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?mn(e):gn(e)}(this,e)}}const wn={},bn={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),wn[e]=t,bn[t]=e}function vn(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 bn))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=bn[r]}return t}function kn(e){let t="";for(let n=0;n<e.byteLength;n++)t+=wn[e[n]];return t}"function"==typeof ReadableStream&&ReadableStream;const Sn=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return yn.mutate(e);if(!e)return yn.mutate(new Uint8Array);const n=t.streamCollector(e);return yn.mutate(await n)};function An(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function En(e,t){return new In(e,t)}class In{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=>An(e)).join("/"):An(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}}class xn{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 _n=(Rn=3e5,e=>Pn(e)&&e.expiration.getTime()-Date.now()<Rn);var Rn;const Pn=e=>void 0!==e.expiration,Cn="content-length";const Mn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Tn=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(Cn))try{const t=n(e);r.headers={...r.headers,[Cn]:String(t)}}catch(e){}}return e({...t,request:r})}),Mn)}}),On=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ln=/(\d+\.){3}\d+/,Nn=/\.\./,$n=e=>On.test(e)&&!Ln.test(e)&&!Nn.test(e),Un=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()=>{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},Dn=async e=>{};const Fn=e=>{if("string"==typeof e)return Fn(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}},jn=e=>"object"==typeof e?"url"in e?Fn(e.url):e:Fn(e),qn=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("?"))),Un(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!$n(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},Hn=({config:e,instructions:t})=>(n,r)=>async i=>{e.endpoint&&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.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Dn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(jn(e)))}const i=await qn(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=Qt(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})},zn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:rn.name},Vn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(Hn({config:e,instructions:t}),zn)}});var Gn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Gn||(Gn={}));const Wn=Gn.STANDARD,Kn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Jn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Qn=[500,502,503,504],Zn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Xn=e=>429===e.$metadata?.httpStatusCode||Kn.includes(e.name)||1==e.$retryable?.throttling,Yn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Jn.includes(e.name)||Zn.includes(e?.code||"")||Qn.includes(e.$metadata?.httpStatusCode||0)||void 0!==e.cause&&t<=10&&Yn(e.cause,t+1);class er{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=>er.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(),Xn(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))}}er.setTimeoutFn=setTimeout;const tr=100,nr=2e4,rr="amz-sdk-invocation-id",ir="amz-sdk-request",sr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(nr,e),getRetryCost:()=>n});class or{constructor(e){this.maxAttempts=e,this.mode=Gn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=tr;return{computeNextBackoffDelay:t=>Math.floor(Math.min(nr,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return sr({retryDelay:tr,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:tr);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,sr({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 ar{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Gn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new er,this.standardRetryStrategy=new or(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 cr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ur;const dr=new Uint8Array(16);function lr(){if(!ur&&(ur="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ur))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ur(dr)}const hr=[];for(let e=0;e<256;++e)hr.push((e+256).toString(16).slice(1));function fr(e,t=0){return hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]}const pr=function(e,t,n){if(cr.randomUUID&&!t&&!e)return cr.randomUUID();const r=(e=e||{}).random||(e.rng||lr)();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 fr(r)},mr=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 gr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},yr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,wr=()=>{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 gr(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of gr(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 ${yr(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)=>br[t.step]-br[e.step]||vr[t.priority||"normal"]-vr[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=gr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${yr(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(`"${yr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${yr(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=gr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${yr(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(`"${yr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${yr(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(wr()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=gr(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 gr(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=gr(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(wr());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 yr(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},br={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},vr={high:3,normal:2,low:1};class kr{constructor(e){this.config=e,this.middlewareStack=wr()}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}}class Sr{constructor(){this.middlewareStack=wr()}static classBuilder(){return new Ar}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 Ar{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}build(){const e=this;let t;return t=class extends Sr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}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 Er="***SensitiveInformation***",Ir=(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}`)}}),xr=e=>_r(e,32),_r=(e,t)=>{const n=Ir(e);if(void 0!==n&&Rr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Rr=(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]}},Pr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Mr.warn(Cr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Cr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Mr={warn:console.warn};class Tr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Tr.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}}const Or=(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},Lr=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"]}),Nr=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{}}},$r=e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Ur=e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t},Br=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},Dr=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Fr=e=>({...$r(e),...Br(e)}),jr=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};jr.from=e=>e&&"object"==typeof e&&(e instanceof jr||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?jr(String(e)):jr(JSON.stringify(e)),jr.fromObject=jr.from;class qr{trace(){}debug(){}info(){}warn(){}error(){}}function Hr(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,Vr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Gr(r,null,s,e):r[e]=s[e];return r}const zr=(e,t)=>{const n={};for(const r in t)Gr(n,e,t,r);return n},Vr=(e,t,n)=>Hr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Gr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Wr,o=Kr,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)}},Wr=e=>null!=e,Kr=e=>e,Jr=e=>e?.body instanceof ReadableStream,Qr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Zr=e=>{const t={error:e,errorType:Xr(e)},n=ti(e.$response);return n&&(t.retryAfterHint=n),t},Xr=e=>Xn(e)?"THROTTLING":Yn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Yn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Yr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ei=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Qr(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[rr]=pr());;)try{d&&(u.headers[ir]=`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=Zr(t);if(o=mr(t),d&&Jr(u))throw(n.logger instanceof qr?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),Yr)}}),ti=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)},ni=e=>encodeURIComponent(e).replace(/[!'()*]/g,ri),ri=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ii=e=>"string"==typeof e?pn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),si="X-Amz-Date",oi="X-Amz-Signature",ai="X-Amz-Security-Token",ci="authorization",ui=si.toLowerCase(),di=[ci,ui,"date"],li=oi.toLowerCase(),hi="x-amz-content-sha256",fi=ai.toLowerCase(),pi={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},mi=/^proxy-/,gi=/^sec-/,yi="AWS4-HMAC-SHA256",wi="AWS4-HMAC-SHA256-PAYLOAD",bi="aws4_request",vi={},ki=[],Si=(e,t,n)=>`${e}/${t}/${n}/${bi}`,Ai=(e,t,n)=>{const r=new e(t);return r.update(ii(n)),r.digest()},Ei=({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 pi||t?.has(s)||mi.test(s)||gi.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Ii=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===hi)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(ii(t)),kn(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class xi{format(e){const t=[];for(const n of Object.keys(e)){const r=pn(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=pn(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(Pi.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(vn(e.value.replace(/\-/g,"")),1),d}}}var _i;!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"}(_i||(_i={}));const Ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Pi{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&&Ci(t),new Pi(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Ci(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Ci(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Mi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))di.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Ti=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Oi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.headerFormatter=new xi,this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=Zt(n),this.credentialProvider=Zt(t)}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}=Li(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=Si(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}})(Mi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[ai]=d.sessionToken),m.query["X-Amz-Algorithm"]=yi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[si]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Ei(m,i,o);return m.query["X-Amz-SignedHeaders"]=Ni(g),m.query[oi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Ii(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}=Li(n),u=Si(a,o,s??this.service),d=await Ii({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=kn(await l.digest()),f=[wi,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}=Li(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(ii(e)),kn(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=Mi(e),{longDate:u,shortDate:d}=Li(t),l=Si(d,a,s??this.service);c.headers[ui]=u,o.sessionToken&&(c.headers[fi]=o.sessionToken);const h=await Ii(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(hi,c.headers)&&this.applyChecksum&&(c.headers[hi]=h);const f=Ei(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[ci]=`${yi} Credential=${o.accessKeyId}/${l}, SignedHeaders=${Ni(f)}, Signature=${p}`,c}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()===li)continue;const i=ni(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${ni(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${ni(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){const r=new this.sha256;r.update(ii(n));const i=await r.digest();return`${yi}\n${e}\n${t}\n${kn(i)}`}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 ni(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r),s=new this.sha256(await n);return s.update(ii(i)),kn(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${kn(await Ai(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in vi)return vi[s];for(ki.push(s);ki.length>50;)delete vi[ki.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,bi])o=await Ai(e,o,t);return vi[s]=o})(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const Li=e=>{const t=(n=e,Ti(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Ni=e=>Object.keys(e).sort().join(";"),$i=e=>{let t;e.credentials&&(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))})(e.credentials,_n,Pn)),t||(t=e.credentialDefaultProvider?dn(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:i}=e;let s;return s=e.signer?dn(e.signer):e.regionInfoProvider?()=>dn(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([r,s])=>{const{signingRegion:o,signingService:a}=r;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(c)}):async r=>{const s=(r=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await dn(e.region)(),properties:{}},r)).signingRegion,o=r.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(a)},{...e,systemClockOffset:r,signingEscapePath:n,credentials:t,signer:s}},Ui=async(e,t,n)=>({operation:Qt(t).operation,region:await Zt(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},Di={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Fi="3.621.0";var ji="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?ji(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Hi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var zi={name:"SHA-256"},Vi={name:"HMAC",hash:zi},Gi=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 Wi={};function Ki(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Wi}var Ji=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Hi(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 Ki().crypto.subtle.sign(Vi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):Hi(this.toHash)?Promise.resolve(Gi):Promise.resolve().then(function(){return Ki().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){Ki().crypto.subtle.importKey("raw",qi(e.secret),Vi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function Qi(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 Zi(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 Xi(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 Yi=64,es=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]),ts=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ns=Math.pow(2,53)-1,rs=function(){function e(){this.state=Int32Array.from(ts),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>ns)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Yi&&(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%Yi>=56){for(var r=this.bufferLength;r<Yi;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<Yi;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+(es[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}(),is=function(){function e(e){this.secret=e,this.hash=new rs,this.reset()}return e.prototype.update=function(e){if(!Hi(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 Qi(this,void 0,void 0,function(){return Zi(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new rs,this.secret){this.outer=new rs;var e=function(e){var t=qi(e);if(t.byteLength>Yi){var n=new rs;n.update(t),t=n.digest()}var r=new Uint8Array(Yi);return r.set(t),r}(this.secret),t=new Uint8Array(Yi);t.set(e);for(var n=0;n<Yi;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 ss=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function os(e){return e&&ss.every(function(t){return"function"==typeof e[t]})}var as=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)&&os(e.crypto.subtle)}(Ki())?this.hash=new is(e):this.hash=new Ji(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}(),cs=n(369),us=n.n(cs);const ds=({serviceId:e,clientVersion:t})=>async()=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r};!function(){function e(){this.crc32=new hs}e.prototype.update=function(e){Hi(e)||this.crc32.update(qi(e))},e.prototype.digest=function(){return Qi(this,void 0,void 0,function(){return Zi(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 hs}}();var ls,hs=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Xi(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^fs[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}(),fs=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 ps{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&&ms(t),new ps(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&ms(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function ms(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class gs{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(ps.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(vn(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:ys,value:!0};break;case 1:t[i]={type:ys,value:!1};break;case 2:t[i]={type:ws,value:e.getInt8(n++)};break;case 3:t[i]={type:bs,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:vs,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:ks,value:new ps(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Ss,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:As,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Es,value:new Date(new ps(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:Is,value:`${kn(o.subarray(0,4))}-${kn(o.subarray(4,6))}-${kn(o.subarray(6,8))}-${kn(o.subarray(8,10))}-${kn(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"}(ls||(ls={}));const ys="boolean",ws="byte",bs="short",vs="integer",ks="long",Ss="binary",As="string",Es="timestamp",Is="uuid",xs=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class _s{constructor(e,t){this.headerMarshaller=new gs(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 hs;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 hs).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 Rs{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 Cs{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 Ts(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 Os{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new _s(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 Cs({messageStream:new Rs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Ts(t,this.utfEncoder)})}serialize(e,t){return new Ps({messageStream:new Ms({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Ls{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Os({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,$s=e=>new Ls(e);function Us(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 Bs={supported:void 0};class Ds{static create(e){return"function"==typeof e?.handle?e:new Ds(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Bs.supported&&(Bs.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ni(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${ni(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${ni(r)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:u}=e,d=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,l="GET"===u||"HEAD"===u?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(h.cache=this.config.cache),l&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),Bs.supported&&(h.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let f=()=>{};const p=new Request(d,h),m=[fetch(p).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})}))}),Us(n)];return t&&m.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}),f=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(m).finally(f)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const Fs=e=>"function"==typeof Blob&&e instanceof Blob?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=fn(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 js="function"==typeof TextEncoder?new TextEncoder:null,qs=e=>{if("string"==typeof e){if(js)return js.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}`)},Hs=e=>new Date(Date.now()+e),zs=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Vs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Hs(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Gs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Ws{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{config:r,signer:i,signingRegion:s,signingName:o}=await(async e=>{const t=Gs("context",e.context),n=Gs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Gs("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingName;return{config:n,signer:s,signingRegion:o,signingName:a}})(n);return await i.sign(e,{signingDate:Hs(r.systemClockOffset),signingRegion:s,signingService:o})}errorHandler(e){return t=>{const n=t.ServerTime??zs(t.$response);if(n){const r=Gs("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Vs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=zs(e);if(n){const e=Gs("config",t.config);e.systemClockOffset=Vs(n,e.systemClockOffset)}}}const Ks="required",Js="fn",Qs="argv",Zs="ref",Xs=!0,Ys="isSet",eo="booleanEquals",to="error",no="endpoint",ro="tree",io="PartitionResult",so={[Ks]:!1,type:"String"},oo={[Ks]:!0,default:!1,type:"Boolean"},ao={[Zs]:"Endpoint"},co={[Js]:eo,[Qs]:[{[Zs]:"UseFIPS"},!0]},uo={[Js]:eo,[Qs]:[{[Zs]:"UseDualStack"},!0]},lo={},ho={[Js]:"getAttr",[Qs]:[{[Zs]:io},"supportsFIPS"]},fo={[Js]:eo,[Qs]:[!0,{[Js]:"getAttr",[Qs]:[{[Zs]:io},"supportsDualStack"]}]},po=[co],mo=[uo],go=[{[Zs]:"Region"}],yo={version:"1.0",parameters:{Region:so,UseDualStack:oo,UseFIPS:oo,Endpoint:so},rules:[{conditions:[{[Js]:Ys,[Qs]:[ao]}],rules:[{conditions:po,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:to},{rules:[{conditions:mo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:to},{endpoint:{url:ao,properties:lo,headers:lo},type:no}],type:ro}],type:ro},{rules:[{conditions:[{[Js]:Ys,[Qs]:go}],rules:[{conditions:[{[Js]:"aws.partition",[Qs]:go,assign:io}],rules:[{conditions:[co,uo],rules:[{conditions:[{[Js]:eo,[Qs]:[Xs,ho]},fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:to}],type:ro},{conditions:po,rules:[{conditions:[{[Js]:eo,[Qs]:[ho,Xs]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS is enabled but this partition does not support FIPS",type:to}],type:ro},{conditions:mo,rules:[{conditions:[fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"DualStack is enabled but this partition does not support DualStack",type:to}],type:ro},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro}],type:ro},{error:"Invalid Configuration: Missing Region",type:to}],type:ro}]},wo=(e,t={})=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${bt} Initial EndpointParams: ${vt(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 kt(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${bt} Resolved endpoint: ${vt(c)}`),c})(yo,{endpointParams:e,logger:t.logger});wt.aws=jt;Error;const bo=["in-region","cross-region","mobile","standard","legacy"],vo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},ko=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(vo()?"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 ${bo.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Nr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??fn,base64Encoder:e?.base64Encoder??mn,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??wo,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Bi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ws}],logger:e?.logger??new qr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Fn,utf8Decoder:e?.utf8Decoder??pn,utf8Encoder:e?.utf8Encoder??gn}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ds({serviceId:r.serviceId,clientVersion:Fi}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??$s,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:Ds.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Wn),sha256:e?.sha256??as,streamCollector:e?.streamCollector??Fs,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},So=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Ao=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}},Eo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class Io extends kr{constructor(...[e]){const t=(e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(ko(e||{})),n=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Yt(t);const e=await t();return Yt(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Xt(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}})(t),r=(e=>{const t=e.tls??!0,{endpoint:n}=e,r=null!=n?async()=>jn(await Zt(n)()):void 0,i=!!n,s={...e,endpoint:r,tls:t,isCustomEndpoint:i,useDualstackEndpoint:Zt(e.useDualstackEndpoint??!1),useFipsEndpoint:Zt(e.useFipsEndpoint??!1)};let o;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!o&&(o=Dn(e.serviceId)),o),s})(n);var i;const s=(e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)}))((e=>{const{retryStrategy:t}=e,n=Zt(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await Zt(e.retryMode)()===Gn.ADAPTIVE?new ar(n):new or(n))}})((i=r,{...i,customUserAgent:"string"==typeof i.customUserAgent?[[i.customUserAgent]]:i.customUserAgent})));const o=((e,t)=>{const n={...So(e),...Fr(e),...Ze(e),...Ao(e)};return t.forEach(e=>e.configure(n)),{...e,...(s=n,{region:s.region()}),...(i=n,{...Ur(i),...Dr(i)}),...(r=n,{httpHandler:r.httpHandler()}),...Eo(n)};var r,i,s})({...$i(s)},e?.extensions||[]);super(o),this.config=o,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=>({applyToStack:t=>{t.add(Gt(e),Kt)}}))(this.config)),this.middlewareStack.use(ei(this.config)),this.middlewareStack.use(Tn(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(en(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),tn)}}))(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use(un(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return Ui}getIdentityProviderConfigProvider(){return async e=>new xn({"aws.auth#sigv4":e.credentials})}}class xo extends Tr{constructor(e){super(e),Object.setPrototypeOf(this,xo.prototype)}}class _o extends xo{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,_o.prototype)}}var Ro;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Ro||(Ro={}));class Po extends xo{constructor(e){super({name:"InternalServerException",$fault:"server",...e}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,Po.prototype)}}class Co extends xo{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Co.prototype)}}class Mo extends xo{constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,Mo.prototype)}}class To extends xo{constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,To.prototype)}}class Oo extends xo{constructor(e){super({name:"ValidationException",$fault:"client",...e}),this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype)}}var Lo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Lo||(Lo={}));var No;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));var $o,Uo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($o||($o={})),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):t._(e.$unknown[0],e.$unknown[1])}(Uo||(Uo={}));var Bo;!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.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={}));var Do,Fo,jo,qo,Ho;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={})),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])}(Fo||(Fo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):t._(e.$unknown[0],e.$unknown[1])}(qo||(qo={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));class zo extends xo{constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),this.name="ModelErrorException",this.$fault="client",Object.setPrototypeOf(this,zo.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Vo extends xo{constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),this.name="ModelNotReadyException",this.$fault="client",Object.setPrototypeOf(this,Vo.prototype)}}class Go extends xo{constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),this.name="ModelTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Go.prototype)}}class Wo extends xo{constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),this.name="ServiceUnavailableException",this.$fault="server",Object.setPrototypeOf(this,Wo.prototype)}}var Ko,Jo,Qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Ko||(Ko={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));class Zo extends xo{constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),this.name="ModelStreamErrorException",this.$fault="client",Object.setPrototypeOf(this,Zo.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])}(Qo||(Qo={}));var Xo;!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])}(Xo||(Xo={}));const Yo=e=>({...e,...e.body&&{body:Er}}),ea=e=>({...e,...e.body&&{body:Er}}),ta=e=>({...e,...e.body&&{body:Er}}),na=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ra=(e,t)=>((e,t)=>Sn(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{}}),ia=async(e,t)=>{const n=await ra(e,t);return n.message=n.message??n.Message,n},sa=async(e,t)=>{const n=En(e,t),r=Hr({},Oa,{[$a]:e[Na]||"application/octet-stream",[La]:e[La],[za]:e[Da],[qa]:e[Ua],[Ha]:e[Ba]});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()},oa=async(e,t)=>{const n=En(e,t),r=Hr({},Oa,{[$a]:e[Na]||"application/octet-stream",[Fa]:e[La],[za]:e[Da],[qa]:e[Ua],[Ha]:e[Ba]});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()},aa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=Hr({$metadata:Ta(e),[Na]:[,e.headers[$a]]}),r=await Sn(e.body,t);return n.body=r,n},ca=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=Hr({$metadata:Ta(e),[Na]:[,e.headers[ja]]}),r=e.body;return n.body=Aa(r,t),n},ua=async(e,t)=>{const n={...e,body:await ia(e.body,t)},r=((e,t)=>{const n=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},r=(i=e.headers,s="x-amzn-errortype",Object.keys(i).find(e=>e.toLowerCase()===s.toLowerCase()));var i,s;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ha(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await fa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await wa(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await ba(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ka(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Sa(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await pa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await ma(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await ya(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await va(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await ga(n,t);default:const i=n.body;return da({output:e,parsedBody:i,errorCode:r})}},da=(la=xo,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Lr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw Or(o,t)})({output:e,parsedBody:t,exceptionCtor:la,errorCode:n})});var la;const ha=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new _o({$metadata:Ta(e),...n});return Or(s,e.body)},fa=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Po({$metadata:Ta(e),...n});return Or(s,e.body)},pa=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr,originalStatusCode:xr,resourceName:Pr});Object.assign(n,i);const s=new zo({$metadata:Ta(e),...n});return Or(s,e.body)},ma=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Vo({$metadata:Ta(e),...n});return Or(s,e.body)},ga=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr,originalMessage:Pr,originalStatusCode:xr});Object.assign(n,i);const s=new Zo({$metadata:Ta(e),...n});return Or(s,e.body)},ya=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Go({$metadata:Ta(e),...n});return Or(s,e.body)},wa=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Co({$metadata:Ta(e),...n});return Or(s,e.body)},ba=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Mo({$metadata:Ta(e),...n});return Or(s,e.body)},va=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Wo({$metadata:Ta(e),...n});return Or(s,e.body)},ka=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new To({$metadata:Ta(e),...n});return Or(s,e.body)},Sa=async(e,t)=>{const n=Hr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Oo({$metadata:Ta(e),...n});return Or(s,e.body)},Aa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await _a(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Ea(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Ia(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ca(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Pa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await xa(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ra(n.serviceUnavailableException,t)}:{$unknown:e}),Ea=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return fa(n,t)},Ia=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ga(n,t)},xa=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ya(n,t)},_a=async(e,t)=>{const n={},r=await ra(e.body,t);return Object.assign(n,Ma(r,t)),n},Ra=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return va(n,t)},Pa=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ka(n,t)},Ca=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return Sa(n,t)},Ma=(e,t)=>zr(e,{bytes:t.base64Decoder}),Ta=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"]}),Oa=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),La="accept",Na="contentType",$a="content-type",Ua="guardrailIdentifier",Ba="guardrailVersion",Da="trace",Fa="x-amzn-bedrock-accept",ja="x-amzn-bedrock-content-type",qa="x-amzn-bedrock-guardrailidentifier",Ha="x-amzn-bedrock-guardrailversion",za="x-amzn-bedrock-trace";class Va extends(Sr.classBuilder().ep({...Di}).m(function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),Vn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ta,na).ser(oa).de(ca).build()){}class Ga extends(Sr.classBuilder().ep({...Di}).m(function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),Vn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(Yo,ea).ser(sa).de(aa).build()){}const Wa=Ka;function Ka(e,t){const n=Qa();return(Ka=function(e,t){return n[e-=101]})(e,t)}!function(e){const t=Ka,n=e();for(;;)try{if(473991===parseInt(t(156))/1*(parseInt(t(120))/2)+-parseInt(t(170))/3+parseInt(t(146))/4+-parseInt(t(127))/5+-parseInt(t(151))/6+parseInt(t(178))/7*(-parseInt(t(135))/8)+parseInt(t(101))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qa);class Ja extends Ge{[Wa(180)];[Wa(149)];[Wa(136)];[Wa(128)];static get[Wa(140)](){return Wa(147)}constructor(e){const t=Wa;super(e),e[t(157)][t(109)](t(181))||e[t(157)][t(165)](t(181),{model:t(150),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(148),stream:!0}),this[t(180)]=e[t(157)][t(109)](t(141)),this[t(136)]=e[t(157)][t(109)](t(174)),this[t(149)]=e[t(157)][t(109)](t(111)),this[t(128)]=e[t(157)][t(109)](t(181))}async[Wa(154)]({query:e,context:t,onData:n,actionId:r}){const i=Wa,{model:s,stream:o,...a}=await this[i(107)](this[i(128)],r),c={prompt:await this[i(139)](e,t,s,r),...a};this[i(180)]?await this[i(105)](c,s,o,n,r):await this[i(134)](c,s,o,n)}async[Wa(139)](e,t,n,r){const i=Wa;let s,o;return t?(s=i(121),o=i(159)+e+i(114)+t):(s=i(132),o=e),i(117)==this[i(103)](n)?i(169)+s+i(142)+o+i(182):i(110)+s+"\n"+o+i(176)}[Wa(103)](e){const t=Wa;if(/^anthropic\.claude/[t(167)](e))return t(102);if(/^ai21\.j2/[t(167)](e))return t(126);if(/^cohere\.command/[t(167)](e))return t(164);if(/^meta\.llama/[t(167)](e))return t(117);throw new b(v(this[t(168)][t(160)],t(179),e))}async[Wa(105)](e,t,n,r,i){const s=Wa,o={method:s(163),headers:await this[s(129)](this[s(149)],i),body:JSON[s(155)]({...e,model:t,stream:n}),signal:this[s(106)][s(161)]},a=await fetch(this[s(180)],o);n?await this[s(152)](a,t,r):await this[s(172)](a,t,r)}async[Wa(134)](e,t,n,r){const i=Wa,s=new Io(this[i(136)]),o={body:JSON[i(155)](e),contentType:i(166),accept:i(166),modelId:t};let a;if(n){const e=new Va(o);a=await s[i(115)](e,{abortSignal:this[i(106)][i(161)]}),await this[i(143)](a,t,r)}else{const e=new Ga(o);a=await s[i(115)](e,{abortSignal:this[i(106)][i(161)]}),await this[i(172)](a,t,r)}}async[Wa(143)](e,t,n){const r=Wa,i=e[r(113)],s=new TextDecoder(r(118));let o="";for await(const e of i)if(e[r(131)]){const i=s[r(162)](e[r(131)][r(124)]),a=JSON[r(138)](i);o+=this[r(130)](a,t),n(o)}return Promise[r(158)]()}async[Wa(152)](e,t,n){const r=Wa,i=e[r(113)],s=new TextDecoder(r(118)),o=i[r(122)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(123)]();if(u=e,u)break;const d=(a+s[r(162)](i))[r(177)]("\n")[r(104)](e=>{const t=r;try{return a="",JSON[t(138)](e)}catch{return a=e,null}})[r(119)](e=>null!==e);d[r(153)]&&(c+=d[r(104)](e=>this[r(130)](e,t))[r(145)](""),n(c))}return Promise[r(158)]()}async[Wa(172)](e,t,n){const r=Wa;let i;return i=e instanceof Response?await e[r(137)]():JSON[r(138)](Buffer[r(116)](e[r(113)])[r(173)](r(171))),n(this[r(130)](i,t)),Promise[r(158)]()}[Wa(130)](e,t){const n=Wa;switch(this[n(103)](t)){case n(102):return e[n(125)];case n(126):return e[n(133)][0][n(112)][n(108)];case n(164):return e[n(144)][0][n(108)];case n(117):return e[n(175)]}}}function Qa(){const e=["765409WSFfMB","config","resolve","Instruction:\n","locale","signal","decode","POST","cohere.command","define","application/json","test","editor","<<SYS>>\n","2783682TfKyGu","utf8","_readStaticResponse","toString","ai.aws.bedrockClientConfig","generation","\n\nAssistant:","split","203IMCdFt","AI_ERROR_UNSUPPORTED_MODEL","_apiUrl","ai.aws.requestParameters","\n[/INST]","14123835IoMXBw","anthropic.claude","getModelFamily","map","_processProxyRequest","abortController","_prepareRequestParameters","text","get","Human:\n","ai.aws.requestHeaders","data","body","\nYou must keep the text formatting.\n\nContent:\n","send","from","meta.llama","utf-8","filter","2GTLSIZ","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.","getReader","read","bytes","completion","ai21.j2","3186100XLbzRa","_requestParameters","_prepareRequestHeaders","_getGeneratedText","chunk","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.","completions","_processAWSRequest","185256GMalvK","_bedrockClientConfig","json","parse","preparePrompt","pluginName","ai.aws.apiUrl","\n<</SYS>>\n[INST]\n","_readAsyncIterableResponse","generations","join","2704212tEZXsT","AWSTextAdapter","bedrock-2023-05-31","_requestHeaders","anthropic.claude-v2","1800714ZcvbLX","_readStreamableResponse","length","sendRequest","stringify"];return(Qa=function(){return e})()}function Za(e,t){var n=Xa();return(Za=function(e,t){return n[e-=397]})(e,t)}function Xa(){var e=["788347HDelns","1199385tYRwCB","39640JSxAMZ","26VcnnYo","12zvPogX","8GXdMKp","96730ZIKSAI","46326LJURXN","887264BlWdNl","13594ztumis"];return(Xa=function(){return e})()}!function(e){for(var t=Za,n=e();;)try{if(114835===-parseInt(t(403))/1+parseInt(t(397))/2*(-parseInt(t(401))/3)+parseInt(t(402))/4+parseInt(t(400))/5+parseInt(t(398))/6*(parseInt(t(404))/7)+parseInt(t(399))/8*(-parseInt(t(405))/9)+-parseInt(t(406))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xa)})(),(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),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","Pale Moon":"pale_moon",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",pale_moon:"Pale Moon",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",bot:"bot"},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(Array.isArray(t.test))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(Array.isArray(t.test))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(Array.isArray(t.test))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(Array.isArray(t.test))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:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:PaleMoon)[\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:s.PLATFORMS_MAP.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:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{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:()=>g,AIAssistant:()=>He,AIAssistantUI:()=>$e,AIRequestError:()=>y,AITextAdapter:()=>We,AWSTextAdapter:()=>Ja,OpenAITextAdapter:()=>Je});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=l;function d(){const e=["canEditAt","getChildren","forEach","ai.useTheme","selection","_getDefaultInsertBelowPosition","isOfficialPlugin","24OMHSaI","ai-ui","config","conversion","getMarkersGroup","getColumnIndexes","_getAISelection","change","ck-fake-ai-selection_collapsed","off","isPremiumPlugin","paste","editing","getSelectedTableCells","from","contentInsertion","table","insertContentBelow","hideFakeVisualSelection","createPositionAfter","schema","isCollapsed","pop","first","text/html","markerToElement","getFirstRange","insertContent","750958HWMPhY","updateMarker","for","editingDowncast","fire","map","has","_resetContentOfSelectedTableCells","addClass","data","markers","init","105309aEFEoC","_prepareTableInsertBelowPosition","pluginName","resultRange","href","fromCharCode","getSelectedBlocks","showFakeVisualSelection","getChild","getRange","236886QWXDeS","getLastPosition","isContent","1148975VOvrIw","lowest","afterInit","document","span","TableUtils","start","markerToHighlight","setSelection","createUIElement","getRowIndexes","AIAssistantEditing","filter","removeMarker","setData","getRows","insertRows","editor","isAtEnd","element","_createEmptyTableRows","getRanges","findAncestor","parse","model","push","3015112WKZwjO","ck-ai-assistant-ui_theme","DataTransfer","length","deleteContent","234saoGPe","join","markerRange","getLastMatchingPosition","12348wwmyaa","17170490ImruqN","_pasteHTMLUsingClipboard","ck-fake-ai-selection","_getTableRowCountFromContent","createRange","get","createPositionAt","createSelection","once","plugins","addMarker","9NatdzJ","last","end"];return(d=function(){return e})()}function l(e,t){const n=d();return(l=function(e,t){return n[e-=287]})(e,t)}!function(e){const t=l,n=e();for(;;)try{if(218586===-parseInt(t(336))/1+-parseInt(t(314))/2+-parseInt(t(326))/3*(parseInt(t(396))/4)+-parseInt(t(339))/5+parseInt(t(370))/6*(-parseInt(t(374))/7)+-parseInt(t(365))/8+parseInt(t(386))/9*(parseInt(t(375))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const h=globalThis[u(367)],f=u(287);class p extends e.Plugin{static get[u(328)](){return u(350)}static get[u(395)](){return!0}static get[u(296)](){return!0}[u(325)](){const e=u,{editor:t}=this,n=[e(377)];t[e(288)][e(380)](e(392))&&n[e(364)](e(366)),t[e(289)][e(316)](e(317))[e(346)]({model:f,view:{classes:n,priority:12}}),t[e(289)][e(316)](e(317))[e(311)]({model:f,view:(t,{writer:n})=>{const r=e;if(!t[r(372)][r(307)])return null;const i=n[r(348)](r(343));return n[r(322)]([r(377),r(294)],i),i}})}[u(341)](){!async function(e){const t=g([78,120,111,75,106,50,77,119,102,100,83,69,112,108,57,89,87,80,109,85,53,52,118,74,68,99,113,82,76,84,115,88,90,103,48,70,79,107,122,117,66,121,97,116,104,86,55,101,73,114,67,98,72,81,51,71,110,49,65,54,105,56]),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])](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(319)](e=>String[t(331)](e))[t(371)]("")}!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([78]);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])](d(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:1756857600;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(330)]);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(333)](){const e=u,t=this[e(356)][e(363)];t[e(293)](n=>{const r=e,i=t[r(342)][r(393)][r(360)]();let s=0;for(const e of i){const i=f+":"+s;if(t[r(324)][r(320)](i))n[r(315)](i,{range:e});else if(e[r(345)][r(357)]){const s=e[r(345)][r(373)](({item:e})=>!t[r(306)][r(338)](e),{boundaries:e});n[r(385)](i,{usingOperation:!1,affectsData:!1,range:n[r(379)](s,e[r(388)])})}else n[r(385)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(304)](){const e=u,t=this[e(356)][e(363)],n=Array[e(300)](this[e(356)][e(363)][e(324)][e(290)](f));n[e(368)]&&t[e(293)](t=>{const r=e;n[r(391)](e=>{t[r(352)](e)})})}[u(313)](e,t){const n=u,r=this[n(292)](),i=t||r[n(312)]();this[n(356)][n(363)][n(389)](i)&&this[n(356)][n(363)][n(293)](s=>{const o=n;this[o(304)](),t||this[o(321)](s,r),this[o(376)]({insertAt:i,writer:s,html:e})})}[u(303)](e){const t=u,{model:n}=this[t(356)],r=this[t(292)]();n[t(293)](()=>{const n=t,i=this[n(327)](e,r)||this[n(394)](r);this[n(313)](e,i)})}[u(292)](){const e=u,t=this[e(356)][e(363)],n=Array[e(300)](t[e(324)][e(290)](f))[e(319)](t=>t[e(335)]());return t[e(382)](n)}[u(376)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(356)][r(298)],s=this[r(356)][r(384)][r(380)](a.ClipboardPipeline),o=new h;o[r(353)](r(310),t);const d=new ClipboardEvent(r(297),{clipboardData:o}),l=new c.DomEventData(i,d,{dataTransfer:new c.DataTransfer(o)});e[r(347)](n);const f=(t,n)=>{const i=r;n[i(329)]&&e[i(347)](n[i(329)])};s[r(383)](r(301),f,{priority:r(340)}),i[r(342)][r(318)](r(297),l),s[r(295)](r(301),f)}[u(394)](e){const t=u,{model:n}=this[t(356)],r=Array[t(300)](e[t(332)]());return r[t(368)]?n[t(305)](r[t(308)]()):e[t(337)]()}[u(327)](e,t){const n=u,{model:r,plugins:i}=this[n(356)];if(i[n(320)](n(344))){const s=i[n(380)](n(344))[n(299)](t);if(s[n(368)]){const t=this[n(378)](e),i=this[n(359)](s,t);return r[n(381)](i,0)}}return null}[u(378)](e){const t=u,n=this[t(356)][t(384)][t(380)](t(344)),r=this[t(356)][t(323)][t(362)](e),i=Array[t(300)](r[t(390)]())[t(351)](e=>e.is(t(358),t(302)));let s=0;return i[t(391)](e=>{s+=n[t(354)](e)}),s}[u(359)](e,t){const n=u,r=this[n(356)][n(384)][n(380)](n(344)),i=r[n(349)](e),s=r[n(291)](e),o=i[n(387)]+1,a=s[n(309)],c=e[0][n(361)](n(302));for(let e=0;e<t;e++)r[n(355)](c,{at:o});return c[n(334)](o)[n(334)](a)}[u(321)](e,t){const n=u,{plugins:r}=this[n(356)],{model:i}=e;r[n(320)](n(344))&&r[n(380)](n(344))[n(299)](t)[n(368)]&&i[n(369)](t)}}var m=w;!function(e){for(var t=w,n=e();;)try{if(301110===-parseInt(t(459))/1*(-parseInt(t(460))/2)+-parseInt(t(471))/3*(parseInt(t(474))/4)+-parseInt(t(458))/5*(-parseInt(t(468))/6)+-parseInt(t(476))/7+-parseInt(t(473))/8*(parseInt(t(464))/9)+-parseInt(t(461))/10+parseInt(t(469))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(b);class g extends e.Plugin{static get[m(475)](){return m(467)}static get[m(472)](){return!0}static get[m(470)](){return!0}[m(466)](){var e=m;if(!this[e(465)])throw new i.CKEditorError(e(463),null)}}class y extends Error{constructor(e){var t=m;super(e),this[t(462)]=t(477)}}function w(e,t){var n=b();return(w=function(e,t){return n[e-=458]})(e,t)}function b(){var e=["afterInit","AIAdapter","30zxHkwW","18098608DJdEkR","isPremiumPlugin","9XpKTIL","isOfficialPlugin","88pFReZd","375764hNrdpk","pluginName","2233609HOXvPk","AIRequestError","250255QwGodi","1IVrUwc","339058rOsXJt","5974610QQabmv","name","aiadapter-text-adapter-not-set","462789tKNNxj","textAdapter"];return(b=function(){return e})()}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=S;function S(e,t){const n=A();return(S=function(e,t){return n[e-=260]})(e,t)}function A(){const e=["refresh","element","from","ai.aiAssistant.disabledElements","add","get","2039088fGsmLE","getFirstRange","set","_hasContext","requiresContent","config","editor","enabledCommandsIds","isEmpty","isCollapsed","28806668UKKZSt","getRanges","values","model","_commandDefinitions","showUI","hasContent","change:_hasContext","change:isEnabled","name","574716ecfDlP","isEnabled","75ANoPox","12CQlDZY","getItems","1866952ERtXbW","111630adJCfY","plugins","36KZcYOW","execute","document","selection","2744452prwPMW","custom","14GLbhcf","length","2ldawLl","getSelectedBlocks","885298PrYwZD","includes"];return(A=function(){return e})()}!function(e){const t=S,n=e();for(;;)try{if(814507===-parseInt(t(300))/1*(parseInt(t(302))/2)+-parseInt(t(264))/3+parseInt(t(296))/4+-parseInt(t(286))/5*(parseInt(t(284))/6)+-parseInt(t(298))/7*(-parseInt(t(289))/8)+parseInt(t(292))/9*(parseInt(t(290))/10)+-parseInt(t(274))/11*(-parseInt(t(287))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class E extends e.Command{[k(278)];constructor(e,t){const n=k;super(e),this[n(278)]=t,this[n(266)](n(271),[]),this.on(n(281),(e,t,r)=>{const i=n;this[i(285)]&&(this[i(271)]=I(this[i(278)],r))}),this[n(266)](n(267),!1),this.on(n(282),(e,t,r)=>{const i=n;this[i(271)]=r?I(this[i(278)],this[i(267)]):[]})}[k(304)](){const e=k,t=this[e(270)][e(277)];this[e(267)]=function(t){const n=e,r=t[n(294)][n(295)];return r[n(273)]?0!==[...r[n(301)]()][n(299)]&&![...r[n(301)]()][0][n(272)]:!!t[n(280)](r[n(265)]())}(t);const n=t[e(294)][e(295)],r=this[e(270)][e(269)][e(263)](e(261));for(const t of n[e(275)]())for(const n of t[e(288)]())if(n.is(e(305))&&r[e(303)](n[e(283)]))return void(this[e(285)]=!1);this[e(285)]=!0}[k(293)](e="",t="",n=k(297)){const r=k;this[r(270)][r(291)][r(263)]($e)[r(279)](e,t,n)}}function I(e,t){const n=k,r=new Set;for(const i of e[n(276)]())(t||!1===i[n(268)])&&r[n(262)](i.id);return Array[n(260)](r)}const _=P;function x(){const e=["element","mainAction","nodeType","1966803yYHMvB","tryAgainEvent","listenTo","setContentOf","_stripMarkdownSyntax","101017oZYAxV","reverse","body","submitPrompt","createElement","_parseAndNormalizeContent","_xmlSerializer","match","isProcessing","querySelector","clear","currentContext","previousQuery","stringify","54400aVBiJB","render","serializeToString","abort","config","finally","prompt","set:currentContext","remove","initialContext","name","toModel","<h1></h1>","catch","destroy","handleError","childNodes","54XtKZEM","set","endsWith","toView","view","previousLabel","text/html","ai.aiAssistant.preserveComments","exec","once","_sanitizationContainer","2BqAoiZ","innerHTML","_isH1TagSupportEnabled","editor","data","finishProcessing","custom","trim","markers","from","then","_handleQuery","714893TmkbnS","parseFromString","1051803zSEQwo","```html","stopProcessing","div","message","296VflZwR","domConverter","value","updateView","244985bcJDBv","makeRequest","document","rename","processor","627BQgvlF","isRendered","```","viewToDom","ELEMENT_NODE","length","_domParser","_sanitizeHTML","editing","previousContext","stopListening","previousActionId","currentResponse","htmlProcessor","reset","textAdapter","startsWith","get","567400rqelxE","startProcessing","push","_normalizeResponseHeadings","substring"];return(x=function(){return e})()}!function(e){const t=P,n=e();for(;;)try{if(446937===parseInt(t(566))/1+parseInt(t(554))/2*(parseInt(t(507))/3)+-parseInt(t(499))/4+-parseInt(t(577))/5*(parseInt(t(543))/6)+-parseInt(t(512))/7*(parseInt(t(573))/8)+-parseInt(t(568))/9+parseInt(t(526))/10*(parseInt(t(582))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const R=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");function P(e,t){const n=x();return(P=function(e,t){return n[e-=499]})(e,t)}class C extends((0,i.ObservableMixin)()){[_(557)];[_(597)];[_(547)];[_(553)];[_(588)];[_(518)];constructor(e,t,n){const r=_;super(),this[r(557)]=e,this[r(597)]=t,this[r(553)]=document[r(516)](r(571)),this[r(588)]=new DOMParser,this[r(518)]=new XMLSerializer,this[r(547)]=n,this[r(544)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(533),(e,t,n)=>{const i=r;this[i(547)][i(575)]=this[i(589)](n)}),this[r(509)](this[r(547)],r(515),(e,t)=>{const n=r,i=this[n(523)]||this[n(535)];this[n(565)](t,i,n(560))}),this[r(509)](this[r(547)],r(508),()=>{const e=r;this[e(547)][e(532)]=this[e(548)],this[e(565)](this[e(524)],this[e(591)],this[e(593)],this[e(548)])}),this[r(509)](this[r(547)],r(570),()=>{this[r(570)]()})}[_(540)](){this[_(592)]()}async[_(576)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(547)][s(532)]=r,this[s(547)][s(505)]=i,this[s(535)]=n,t&&(this[s(547)][s(583)]?this[s(565)](t,n,e,r):this[s(547)][s(552)](s(527),()=>{this[s(565)](t,n,e,r)}))}[_(570)](){const e=_;this[e(520)]&&(this[e(520)]=!1,this[e(547)][e(559)](),this[e(597)][e(529)]())}[_(596)](){const e=_;this[e(535)]="",this[e(523)]="",this[e(594)]="",this[e(591)]="",this[e(524)]="",this[e(548)]="",this[e(593)]=void 0,this[e(547)][e(596)](),this[e(570)]()}async[_(565)](e,t,n,r){const i=_;return this[i(520)]=!0,this[i(547)][i(500)](),this[i(591)]=t,this[i(524)]=e,this[i(548)]=r||e,this[i(593)]=n,new Promise(r=>{const s=i;this[s(597)][s(578)]({query:e,context:t,onData:e=>{const t=s;this[t(594)]=e,this[t(523)]=this[t(517)](this[t(594)])},actionId:n})[s(564)](()=>{const e=s;!this[e(523)]&&this[e(594)]&&(this[e(523)]=this[e(517)](this[e(594)],!0))})[s(539)](e=>{const t=s;e instanceof y?this[t(547)][t(541)](e[t(572)]):this[t(547)][t(541)](),r()})[s(531)](()=>{this[s(570)](),r()})})}[_(517)](e,t=!1){const n=_,r=R[n(551)](e);e=r?e[n(503)](r[1][n(587)]):e[n(587)]<100&&!t?"":this[n(511)](e);const i=this[n(588)][n(567)](e,n(549));if(r){const e=Array[n(563)](i[n(514)][n(542)]);e[n(513)]();for(const t of e){if(t[n(506)]==Node[n(586)])break;t[n(534)]()}}const s=this[n(557)][n(558)][n(581)][n(546)](this[n(518)][n(528)](i[n(514)]));this[n(556)]()||this[n(502)](s);const o=this[n(557)][n(530)][n(599)](n(550)),a=this[n(557)][n(558)][n(537)](s);return o||a[n(562)][n(522)](),this[n(557)][n(558)][n(525)](a)}[_(502)](e){const t=_,n=new c.UpcastWriter(this[t(557)][t(590)][t(547)][t(579)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(504))&&r[t(519)](n)&&(i[t(501)](n),"h1"==n[t(536)]&&(s=!0));if(s)for(const e of i)n[t(580)]("h"+(parseInt(e[t(536)][1])+1),e)}[_(556)](){const e=_,{data:t,editing:n}=this[e(557)],r=t[e(595)][e(546)](e(538)),i=t[e(546)](t[e(537)](r));return!!n[e(547)][e(574)][e(585)](i)[e(521)]("h1")}[_(589)](e){const t=_;return this[t(557)][t(590)][t(547)][t(574)][t(510)](this[t(553)],e),this[t(553)][t(555)]}[_(511)](e){const t=_,n=e[t(561)]();return n[t(598)](t(569))?n[t(545)](t(584))?n[t(503)](7,n[t(587)]-3):n[t(503)](7):e}}const M=O;function T(){const e=["label","Stop","insertButton","AI_","toUpperCase","stopButton","1531878tcSkoI","8xKCkbY","ck-ai-form__toolbar","bindTemplate","ck-button-action","8IRJSNh","6DNuAzU","33gMmHJO","332471wzXXma","set","replaceButton","addMany","items","mainAction","bind","extendTemplate","isVisible","4692814FHcRdz","Insert below","4979412fjzpGn","_CONTENT","replace","ck-hidden","373995fKPSvA","9zHsDXR","tryAgainButton","1171020nuOTHg","insert","locale","_createButton","Try again","7806070bejLoW","REPLACE"];return(T=function(){return e})()}function O(e,t){const n=T();return(O=function(e,t){return n[e-=275]})(e,t)}!function(e){const t=O,n=e();for(;;)try{if(681830===-parseInt(t(310))/1+-parseInt(t(289))/2+-parseInt(t(302))/3*(parseInt(t(307))/4)+parseInt(t(286))/5*(-parseInt(t(308))/6)+-parseInt(t(280))/7*(-parseInt(t(303))/8)+parseInt(t(287))/9*(parseInt(t(294))/10)+-parseInt(t(309))/11*(-parseInt(t(282))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(T);const L={REPLACE:M(284),INSERT:M(290)};class N extends s.ToolbarView{constructor(e){const t=M;super(e),this[t(311)](t(279),!1),this[t(311)](t(276),L[t(295)]),this[t(312)]=this[t(292)]("",t(306)),this[t(312)][t(277)](t(296)).to(this,t(276),n=>v(e,t(299)+n[t(300)]()+t(283))),this[t(298)]=this[t(292)](v(e,t(281))),this[t(288)]=this[t(292)](v(e,t(293))),this[t(301)]=this[t(292)](v(e,t(297)));const n=this[t(305)];this[t(278)]({attributes:{class:[t(304),n.if(t(279),t(285),e=>!e)]}}),this[t(275)][t(313)]([this[t(312)],this[t(298)],this[t(288)],this[t(301)]])}[M(292)](e,t){const n=M,r=new s.ButtonView(this[n(291)]);return r[n(311)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const $=D;function D(e,t){const n=B();return(D=function(e,t){return n[e-=160]})(e,t)}!function(e){const t=D,n=e();for(;;)try{if(201219===-parseInt(t(163))/1+parseInt(t(184))/2+parseInt(t(167))/3*(-parseInt(t(193))/4)+-parseInt(t(219))/5*(parseInt(t(209))/6)+-parseInt(t(165))/7*(parseInt(t(206))/8)+parseInt(t(218))/9*(parseInt(t(231))/10)+-parseInt(t(185))/11*(-parseInt(t(166))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(B);class U extends s.View{[$(182)];[$(190)];constructor(e,t=""){const n=$;super(e),this[n(200)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(188)];this[n(182)]=new F(e,t),this[n(190)]=this[n(169)](),this[n(179)]({tag:n(164),attributes:{class:["ck",n(239),r.if(n(178),n(187),e=>!e)],tabindex:"-1"},children:[{tag:n(164),attributes:{class:["ck",n(171),r.if(n(234),n(208))]},children:[this[n(182)],{tag:n(164),attributes:{class:["ck",n(246)]},children:[this[n(190)]]}]}]})}[$(228)](){const e=$;super[e(228)](),this[e(205)]&&this[e(182)][e(194)](this[e(205)]);let t=!1;this.on(e(199),(n,r,i)=>{const s=e,o=!this[s(182)][s(226)][s(161)](s(241));this[s(182)][s(194)](i),this[s(234)]&&o&&!t&&this[s(226)][s(222)]({top:this[s(226)][s(197)],behavior:s(173)})}),this.on(e(212),(n,r,i)=>{const s=e;t=!1,i?(this[s(205)]=null,this[s(182)][s(172)]()):this[s(205)]||this[s(182)][s(194)]("")}),this[e(220)](this[e(226)],e(210),()=>{t=!0}),this[e(220)](this[e(226)],e(230),()=>{t=!0})}[$(213)](){const e=$;this[e(226)][e(213)]()}[$(169)](){const e=$,n=this[e(183)],r=new s.ButtonView(this[e(183)]),i=e(223);return r[e(200)]({label:v(n,e(215)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(160)](e(178)).to(this,e(205),e=>!!e),r[e(160)](e(232)).to(this,e(234),e=>!e),r.on(e(240),()=>{const n=e;this[n(175)](this[n(182)][n(226)]),r[n(168)]=t.IconCheck,r[n(224)]=i+n(198),this[n(213)](),setTimeout(()=>{const e=n;r[e(168)]=t.IconCopy,r[e(224)]=i},1e3)}),r}[$(175)](e){const t=$,{window:n,document:r}=i.global;if(n[t(221)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(242)]],{type:t(227)}),"text/plain":new r([e[t(236)]||""],{type:t(180)})})];navigator[t(245)][t(225)](s)}else{const i=r[t(176)](t(164));i[t(170)][t(174)]=t(202),i[t(170)][t(181)]=t(195),i[t(242)]=t(201)+e[t(242)]+t(214),r[t(186)][t(189)](i);const s=r[t(191)]();s[t(238)](i[t(162)]),s[t(244)](i[t(243)]);const o=n[t(177)]();o[t(235)](),o[t(192)](s),r[t(229)](t(207)),i[t(211)]()}}}class F extends s.View{constructor(e,t=""){const n=$;super(e),this[n(233)]=this[n(217)](),this[n(179)]({tag:n(164),attributes:{class:["ck",n(196),t,n(203),n(204)]}})}[$(194)](e){const t=$;this[t(226)][t(242)]=e}[$(172)](){const e=$;this[e(226)][e(189)](this[e(233)][e(226)])}[$(217)](){const e=$,t=new s.View,n=this[e(183)],r=new s.SpinnerView;return r[e(178)]=!0,t[e(179)]({tag:e(164),attributes:{class:["ck",e(216)]},children:[r,{text:v(n,e(237))}]}),t[e(228)](),t}}function B(){const e=["style","ck-ai-form__content-area","appendLoader","smooth","position","_copyHTMLToClipboard","createElement","getSelection","isVisible","setTemplate","text/plain","left","contentFieldView","locale","741968AWvRap","1111OUlWvB","body","ck-hidden","bindTemplate","appendChild","copyButtonView","createRange","addRange","1238316laGhgY","setContent","-9999px","ck-content","scrollHeight"," ck-ai-form__copy-button--copied","change:value","set","<span>[</span>","absolute","ck-reset_all-excluded","ck-ai-form__content-field","value","725464Bviexy","copy","ck-ai-form__content-area--processing","318606NmMuNr","wheel","remove","change:isProcessing","focus","<span>]</span>","Copy","ck-ai-form__loader","_createLoader","27yWLXKA","30yiqlRh","listenTo","ClipboardItem","scrollTo","ck-ai-form__copy-button","class","write","element","text/html","render","execCommand","mousedown","56410Hbdmlk","isEnabled","loaderView","isProcessing","removeAllRanges","textContent","AI is writing...","setStartAfter","ck-ai-form__content-area-wrapper","execute",".ck-ai-form__loader","innerHTML","lastElementChild","setEndBefore","clipboard","ck-ai-form__copy-button-wrapper","bind","querySelector","firstElementChild","145777wXeaav","div","28xNzIdS","112872AbiuUr","3nMblVi","icon","_createCopyButton"];return(B=function(){return e})()}function j(){const e=["1yAwGyf","42AMgsLi","168cVMTME","text","38490LkBwDH","div","1092VcNEhw","56415vaNQkj","content","set","55202RzDWXe","1084XfJgKh","412654yKNRQZ","20064jHdbkF","341Usqgis","ck-ai-form__error","35253BXshZz","2795XXJpsr","setTemplate","bindTemplate"];return(j=function(){return e})()}function H(e,t){const n=j();return(H=function(e,t){return n[e-=147]})(e,t)}!function(e){const t=H,n=e();for(;;)try{if(106299===-parseInt(t(159))/1*(-parseInt(t(151))/2)+-parseInt(t(166))/3+parseInt(t(150))/4*(parseInt(t(156))/5)+-parseInt(t(160))/6*(parseInt(t(149))/7)+parseInt(t(161))/8*(parseInt(t(155))/9)+-parseInt(t(163))/10*(parseInt(t(153))/11)+-parseInt(t(152))/12*(parseInt(t(165))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(j);class q extends s.View{constructor(e,n=""){const r=H;super(e);const i=new s.IconView,o=this[r(158)];this[r(148)](r(162),n),i[r(147)]=t.IconError,this[r(157)]({tag:r(164),attributes:{class:["ck",r(154)]},children:[i,{text:o.to(r(162))}]})}}const z=W;function V(){const e=["ck-ai-form__toggle-history","locale","focusFirst","isEnabled","target","focusCycler","style","focus","isOn","742089jEpBvS","1812264VZoDvK","isEmpty","right","fieldView","render","49256kMcCYY","showHistoryButtonView","resultsView","requestAnimationFrame","8416062xczzNE","submit","focusableChildren","queryView","enter","maxRows","120720ouInKp","isVisible","focusLast","_createSubmitButton","68172bufkjr","update","fire","value","submitButtonView","set","Submit","width","uiLanguageDirection","children","execute","element","45jJLgNd","minRows","_createShowHistoryButton","left","excludeScrollbarsAndBorders","History","388092clqkRu","add","keystrokes","fieldWrapperChildren","ck-ai-form__submit","91Rylkfn","rtl","filteredView","bind","window"];return(V=function(){return e})()}function W(e,t){const n=V();return(W=function(e,t){return n[e-=183]})(e,t)}!function(e){const t=W,n=e();for(;;)try{if(197027===parseInt(t(236))/1+parseInt(t(211))/2+parseInt(t(230))/3+parseInt(t(193))/4*(parseInt(t(205))/5)+parseInt(t(189))/6*(parseInt(t(216))/7)+parseInt(t(231))/8+-parseInt(t(183))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(V);class G extends s.AutocompleteView{[z(197)];[z(237)];constructor(e,t){const n=z;super(e,t),this[n(186)][n(234)][n(206)]=1,this[n(186)][n(234)][n(188)]=3,this[n(197)]=this[n(192)](),this[n(237)]=this[n(207)](),this[n(185)][n(212)](this[n(237)],1),this[n(185)][n(212)](this[n(197)])}[z(235)](){const e=z;super[e(235)](),this[e(186)][e(214)][e(212)](this[e(237)]),this[e(202)][e(212)](this[e(197)]),this[e(213)][e(198)](e(187),(t,n)=>{const r=e;t[r(225)]==this[r(186)][r(234)][r(204)]&&(this[r(184)](),n())})}[z(192)](){const e=z,n=new s.ButtonView(this[e(222)]),r=this[e(222)];return n[e(198)]({icon:t.IconSubmit,label:v(r,e(199)),isVisible:!0,tooltip:!0,class:e(215)}),n.on(e(203),()=>{this[e(184)]()}),n[e(219)](e(224)).to(this[e(186)][e(234)],e(232),this,e(224),(e,t)=>!e&&t),n}[z(207)](){const e=z,n=new s.ButtonView(this[e(222)]),r=this[e(238)],o=this[e(222)];n[e(198)]({label:v(o,e(210)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(221)}),n[e(219)](e(229)).to(r,e(190)),n[e(219)](e(224)).to(this,e(224)),n.on(e(203),()=>{const t=e;r[t(190)]=!r[t(190)],r[t(190)]?this[t(218)][t(228)]():this[t(228)]()});const a=()=>{const t=e;i.global[t(220)][t(239)](()=>{const e=t;if((0,i.isVisible)(this[e(204)])){const t=new i.Rect(this[e(186)][e(234)][e(204)]),r=t[e(200)],s=e(217)===o[e(201)]?e(208):e(233);t[e(209)](),n[e(204)][e(227)][s]=r-t[e(200)]+1+"px"}})};return this[e(186)][e(234)].on(e(194),a),this.on(e(235),a),n}[z(184)](){const e=z,t=this[e(186)][e(234)][e(204)][e(196)];this[e(195)](e(184),t)}[z(228)](e){const t=z;-1===e?this[t(226)][t(191)]():this[t(226)][t(223)]()}}function K(){const e=["items","2152lwpNsm","1257530WiQzcW","filter","12DZhWIU","historyGroupView","17864ZKXCFf","delegate","2799520BbwNHU","1167dCikNF","Prompt history","label","add","execute","13790lNAMov","6099WVnRqb","children","clearHistory","1084NPelpo","locale","_createClearHistoryButton","set","436znHbBD","Clear","fire","clearHistoryButton","length","9294480yecEsK"];return(K=function(){return e})()}const Q=J;function J(e,t){const n=K();return(J=function(e,t){return n[e-=100]})(e,t)}!function(e){const t=J,n=e();for(;;)try{if(523995===parseInt(t(105))/1*(parseInt(t(118))/2)+parseInt(t(111))/3*(parseInt(t(114))/4)+parseInt(t(126))/5*(parseInt(t(100))/6)+parseInt(t(110))/7*(parseInt(t(125))/8)+-parseInt(t(123))/9+-parseInt(t(104))/10+-parseInt(t(102))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(K);class X extends s.ListView{[Q(101)];[Q(121)];constructor(e){const t=Q;super(e),this[t(121)]=this[t(116)](),this[t(101)]=new s.ListItemGroupView,this[t(101)][t(112)][t(108)](this[t(121)],1),this[t(101)][t(107)]=v(e,t(106)),this[t(101)][t(124)][t(103)](t(109)).to(this),this[t(124)][t(108)](this[t(101)])}[Q(127)](){const e=Q;let t=0;for(const n of this[e(124)])t+=n[e(124)][e(122)];return{resultsCount:t,totalItemsCount:t}}[Q(116)](){const e=Q,t=this[e(115)],n=new s.ButtonView(this[e(115)]);return n[e(117)]({label:"("+v(t,e(119))+")",withText:!0}),n.on(e(109),()=>this[e(120)](e(113))),n}}const Y={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function Z(e){if(null==e)return"";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 te(e,t){const n=ne();return(te=function(e,t){return n[e-=478]})(e,t)}function ne(){const e=["765875wVLprn","children","140733YKZsaV","203573AEiqnv","set","locale","prompt","44656ygvZNx","193004VLVTzJ","1698522bnhIKX","add","execute","501loIbxN","2832jKxBdp","133UjvbsM","fire"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(217090===parseInt(t(480))/1+-parseInt(t(485))/2+parseInt(t(489))/3*(parseInt(t(490))/4)+parseInt(t(493))/5+-parseInt(t(486))/6+-parseInt(t(491))/7*(-parseInt(t(484))/8)+parseInt(t(479))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(482)],n);this[t(478)][t(487)](r),r[t(481)]({label:e[t(483)],withText:!0}),r.on(t(488),()=>{const n=t;this[n(492)](n(488),{value:ee(e[n(483)])})})}}const ie=ae;!function(e){const t=ae,n=e();for(;;)try{if(307822===-parseInt(t(355))/1*(parseInt(t(366))/2)+parseInt(t(361))/3*(-parseInt(t(353))/4)+parseInt(t(356))/5+parseInt(t(367))/6*(-parseInt(t(363))/7)+-parseInt(t(371))/8+-parseInt(t(370))/9*(-parseInt(t(360))/10)+-parseInt(t(359))/11*(-parseInt(t(378))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ue);const se=ie(362);class oe extends i.Collection{constructor(){const e=ie;super(),this[e(368)](),this.on(e(358),(t,n)=>{const r=e,i=ce(n[r(380)]);for(const e of this)if(e!=n&&ce(e[r(380)])===i){this[r(357)](e);break}this[r(369)]>20&&this[r(357)](this[r(374)]),this[r(377)]()}),this.on(e(357),()=>{this[e(377)]()})}[ie(368)](){const e=ie,t=sessionStorage[e(372)](se)||"[]";this[e(365)](JSON[e(373)](t))}[ie(377)](){const e=ie;sessionStorage[e(376)](se,JSON[e(354)](this[e(375)](e=>e)))}}function ae(e,t){const n=ue();return(ae=function(e,t){return n[e-=353]})(e,t)}function ce(e){const t=ie;return e[t(364)]()[t(379)]()}function ue(){const e=["1903253qPmXCW","26570uIipHW","3210FkCQSq","CKEditor/AIFormView/PromptHistory","7stobgu","toLowerCase","addMany","776332LIQinf","417822oyEWar","_loadFromSessionStorage","length","351GplhAv","2054816KSWONv","getItem","parse","last","map","setItem","_saveToSessionStorage","60OpjKBK","trim","prompt","284gcmhfg","stringify","1UXwcIF","648545DVDTQO","remove","add"];return(ue=function(){return e})()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return Z(e).replace(/[&<>"']/g,e=>de[e])}function he(){const e=["focus","prompt","finishProcessing","isVisible","copyButtonView","isEnabled","value","fire","stopButton","set","1275540CwHkey","chain","REPLACE","search","3668808DEzhyI","_focusables","focusFirst","bindTo","text","historyGroupView","712089WFdrwt","fieldView","ck-hidden","insertButton","handleError","add","listenTo","_promptHistory","bindTemplate","focusLast","queryView","_createToolbar","ck-ai-form","startProcessing","locale","_createPromptView","submitPrompt","promptView","replaceContent","focusTracker","Ask AI and your prompts will be listed here for you to use later.","focusCycler","trim","50QbjKMO","5398tQMhuC","toolbar","clear","render","Ask AI to improve generated text","shift + tab","Empty history","bind","tryAgainButton","Ask AI to edit or generate","div","label","keystrokes","isProcessing","setTemplate","mainAction","execute","reset","ck-ai-form-content","submit","243HpOXGo","stopProcessing","errorView","insertContentBelow","1108590pVdyFd","createCollection","5ymwaca","high","delegate","replaceButton","220012AGXrBa","isError","tryAgainEvent","_createHistoryView","AI_ERROR_FAILED","element","contentArea","clearHistory","tab","items","167208qEgMfI"];return(he=function(){return e})()}const fe=pe;function pe(e,t){const n=he();return(pe=function(e,t){return n[e-=387]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(387031===parseInt(t(451))/1*(-parseInt(t(450))/2)+-parseInt(t(390))/3+-parseInt(t(396))/4+parseInt(t(392))/5*(parseInt(t(421))/6)+-parseInt(t(427))/7+-parseInt(t(406))/8*(-parseInt(t(471))/9)+-parseInt(t(417))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(he);class me extends s.View{[fe(446)];[fe(463)];[fe(402)];[fe(452)];[fe(444)];[fe(388)];[fe(422)];[fe(448)];[fe(434)];constructor(e,t,n=""){const r=fe;super(e),this[r(416)](r(412),!0),this[r(416)](r(464),!1),this[r(416)](r(408),""),this[r(416)](r(413),""),this[r(416)](r(397),!1),this[r(416)](r(466),L[r(419)]),this[r(434)]=new oe,this[r(388)]=new q(e),this[r(402)]=new U(e,n),this[r(402)][r(458)](r(464)).to(this),this[r(402)][r(458)](r(413)).to(this),this[r(452)]=this[r(438)](),this[r(452)][r(458)](r(466)).to(this),this[r(444)]=this[r(442)](),this[r(446)]=new i.FocusTracker,this[r(463)]=new i.KeystrokeHandler,this[r(422)]=this[r(391)]([this[r(402)],this[r(402)][r(411)],this[r(452)],this[r(444)]]),this[r(448)]=new s.FocusCycler({focusables:this[r(422)],focusTracker:this[r(446)],keystrokeHandler:this[r(463)],actions:{focusPrevious:r(456),focusNext:r(404)}}),this[r(448)][r(418)](this[r(444)][r(448)]),this[r(444)][r(437)][r(428)][r(458)](r(413)).to(this,r(408));const o=this[r(435)];this[r(465)]({tag:r(461),attributes:{class:["ck",r(439),t],tabindex:"-1"},children:[{tag:r(461),attributes:{class:["ck",r(469)]},children:[{tag:r(461),attributes:{class:[o.if(r(397),r(429),e=>!e)]},children:[this[r(388)]]},this[r(402)],this[r(452)],this[r(444)]]}]})}[fe(454)](){const e=fe;super[e(454)](),this[e(446)][e(432)](this[e(402)][e(401)]),this[e(446)][e(432)](this[e(402)][e(411)][e(401)]),this[e(446)][e(432)](this[e(452)][e(401)]),this[e(446)][e(432)](this[e(444)][e(401)]),this[e(463)][e(433)](this[e(401)])}[fe(407)](e=1){const t=fe;-1===e?this[t(448)][t(436)]():this[t(448)][t(423)]()}[fe(468)](){const e=fe;this[e(408)]="",this[e(413)]="",this[e(397)]=!1,this[e(444)][e(468)](),this[e(402)][e(410)]=!1,this[e(452)][e(410)]=!1}[fe(442)](){const e=fe,t=this[e(441)],n=new G(t,{queryView:{label:v(t,e(460)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(457)),secondary:v(t,e(447))}}},filteredView:this[e(399)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(458)](e(412)).to(this,e(412),this,e(464),(e,t)=>e&&!t),this[e(433)](n,e(470),(t,n)=>{const r=e;this[r(408)]=n;const i=le(n);this[r(414)](r(443),i),n[r(449)]()&&this[r(434)][r(432)]({prompt:i},0)},{priority:e(393)}),n}[fe(399)](){const e=fe,t=new X(this[e(441)]);return t[e(426)][e(405)][e(424)](this[e(434)]).as(re),t.on(e(403),()=>{const t=e;this[t(434)][t(453)](),this[t(444)][t(420)](""),this[t(444)][t(407)]()}),t}[fe(438)](){const e=fe,t=new N(this[e(441)]);return t[e(395)][e(458)](e(412)).to(this,e(412),this,e(464),this,e(413),(e,t,n)=>e&&!t&&!!n),t[e(395)][e(394)](e(467)).to(this,e(445)),t[e(430)][e(458)](e(412)).to(this,e(412),this,e(464),this,e(413),(e,t,n)=>e&&!t&&!!n),t[e(430)][e(394)](e(467)).to(this,e(389)),t[e(459)][e(458)](e(412)).to(this,e(412),this,e(464),(e,t)=>e&&!t),t[e(459)][e(394)](e(467)).to(this,e(398)),t[e(415)][e(458)](e(412)).to(this,e(464)),t[e(415)][e(394)](e(467)).to(this,e(387)),t}[fe(440)](){const e=fe;this[e(413)]="",this[e(397)]=!1,this[e(464)]=!0,this[e(402)][e(410)]=!0,this[e(452)][e(410)]=!0,this[e(402)][e(407)]()}[fe(409)](){const e=fe,t=this[e(441)];this[e(464)]=!1,this[e(408)]="",this[e(444)][e(468)](),this[e(413)]&&(this[e(444)][e(437)][e(462)]=v(t,e(455)))}[fe(431)](e){const t=fe,n=this[t(441)];this[t(409)](),this[t(397)]=!0,this[t(388)][t(425)]=e||v(n,t(400)),this[t(413)]||(this[t(402)][t(410)]=!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),Pe={attributes:{"data-cke":!0}};Pe.setAttributes=Ae(),Pe.insert=ke().bind(null,"head"),Pe.domAPI=be(),Pe.insertStyleElement=Ie();ye()(Re.A,Pe);Re.A&&Re.A.locals&&Re.A.locals;var Ce=n(676),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ae(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Ce.A,Me);Ce.A&&Ce.A.locals&&Ce.A.locals;const Te=Le;function Oe(){const e=["text"," ck-ai-assistant-ui_theme","contentArea","values","listenTo","menuBar:aiAssistant","comment","trim","queryView","aiLicenseKeyDomainLimit","setSelection","_licenseKeyCheckInterval","bind","invalid","aiLicenseKeyValid","editor","forEach","locale","panelView","menuPanelClass","view","6540tRgAwU","menuBar:aiCommands","ai.aiAssistant.disabledElements","hide","10746848QLqPDL","reset","buttonView","delegate","ck-ai-assistant-button ","change:isProcessing","set","domainLimit","Error during AI content generation: %0","buttons","ai.useTheme","aiLicenseKeyNotAllowed","5720Pjwgkj","requires","getSelectedElement","showFakeVisualSelection","get","hideFakeVisualSelection","_uiCssClasses","items","change:value","includes","filter","media","aiLicenseKeyInvalid","from","53488575xXRKDO","updatePosition","Generated content: %0","ck-ai-commands-dropdown ","4AwXrpB","pluginName","AI Assistant","menuView","children","polite","468910bvieSD","getData","aiLicenseKeyTrialLimit","text/html","schema","usageLimit","order","insertContent","map","focus","_getMenuBarGroupButtons","groupId","copy","once","custom","isOfficialPlugin","isEnabled","currentContext","label","isOn","isCollapsed","isFlat","hideUI","menuitemcheckbox","getLimitElement","licenseKey","_forceMarkersCopy","aiAssistant","requiresContent","tableOfContents","AI is writing","DataTransfer","EDITOR_TOP_SIDE","_initView","sort","AI Commands","wasMoved","show","announce","3251445sKAInz","model","init","componentFactory","_createAIAssistantUIButton","aiCommands","selection","_initAriaAiStatusChangeAnnouncements","command:","define","splice","isPremiumPlugin","_aiAdapter","_populateMenuBarMenu","promptView","fieldView","_getResolvedCommandsDefinitions","</p>","editing","INSERT","destroy","replace","786435icGbnQ","commands","errorView","trialLimit","ck-ai-assistant-ui","aiLicenseKeyUsageLimit","change:enabledCommandsIds","REPLACE","_showLicenseError","insertContentBelow","featureNotAllowed","update","enabledCommandsIds","_aiAssistantController","execute","getSelectedBlocks","aiLicenseKeyExpired","_dialog","prompt","showUI","body","render","evaluationLimit","change:isError","source","showAIAssistant","expired","_commandDefinitions","replaceContent","push","add","_formView","13512776CglVyI","AIAssistantUI","fire","_onExecute","ai.aiAssistant.contentAreaCssClass","textAdapter","AIAssistant","document","addMany","length","aiLicenseKeyEvaluationLimit","config","<p>","groupLabel","rawHtml","ai.aiAssistant.commands","updateView","ai-commands-config-order-collision","change","plugins","getRanges"];return(Oe=function(){return e})()}function Le(e,t){const n=Oe();return(Le=function(e,t){return n[e-=496]})(e,t)}!function(e){const t=Le,n=e();for(;;)try{if(940019===parseInt(t(665))/1+-parseInt(t(604))/2+parseInt(t(643))/3*(-parseInt(t(598))/4)+parseInt(t(580))/5*(-parseInt(t(564))/6)+-parseInt(t(568))/7+-parseInt(t(522))/8+parseInt(t(594))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const Ne=globalThis[Te(635)];class $e extends e.Plugin{[Te(629)];[Te(554)];[Te(507)];[Te(521)];[Te(655)];[Te(503)];[Te(586)]="";static get[Te(599)](){return Te(523)}static get[Te(619)](){return!0}static get[Te(654)](){return!0}static get[Te(581)](){return[a.ClipboardMarkersUtils,p,g,s.Dialog]}constructor(e){const t=Te;super(e),e[t(533)][t(652)](t(566),[t(591),t(536),t(633)]),e[t(533)][t(652)](t(526),""),e[t(533)][t(652)](t(578),!0),this[t(586)]=t(669)+(e[t(533)][t(584)](t(578))?t(544):"")}[Te(645)](){const e=Te,{editor:n}=this;this[e(655)]=n[e(541)][e(584)](g),this[e(507)]=n[e(541)][e(584)](s.Dialog),this[e(521)]=null,this[e(517)]=this[e(659)]();const r=new E(n,Array[e(593)](this[e(517)][e(546)]()));n[e(666)][e(520)](e(515),r),n.ui[e(646)][e(520)](e(648),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(574)]({class:a(597)+this[a(586)]}),c[a(570)][a(574)]({label:v(i,a(639)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(504),e=>this[a(525)](e[a(514)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(563)][a(510)],function(e){const t=a,n=o(e[t(533)][t(584)](t(537)),e[t(560)]),r=Ue(e,n)[t(590)](e=>e[t(666)][t(531)]);return 1===r[t(531)]?Ue(e,r[0][t(666)])[t(612)](e=>({id:e.id,label:e[t(622)]})):r[t(612)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(612)](e=>({id:e.id,label:e[r(622)]}))}})}(n),{ariaLabel:v(i,a(639))}),c[a(601)][a(562)]=a(597)+this[a(586)],r.on(a(496),u),c[a(601)][a(617)](a(511),u),c;function u(){const e=a;c[e(620)]=r[e(502)][e(531)]>0;for(const t of c[e(601)][e(577)])t[e(620)]=r[e(502)][e(589)](t.id)}}),n.ui[e(646)][e(520)](e(565),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(570)][a(574)]({label:v(i,a(639)),icon:t.IconMagicWand}),c[a(555)](a(620)).to(r,a(502),e=>e[a(531)]>0);const u=o(n[a(533)][a(584)](a(537)),i);return this[a(656)](r,c,u,e=>this[a(525)](e)),c}),n.ui[e(646)][e(520)](e(631),()=>{const t=e,n=this[t(647)](s.ButtonView);return n[t(574)]({tooltip:!0,class:t(572)+this[t(586)]}),n}),n.ui[e(646)][e(520)](e(548),()=>{const t=e,n=this[t(647)](s.MenuBarMenuListItemButtonView);return n[t(574)]({role:t(627)}),n}),this[e(629)]=this[e(558)][e(533)][e(584)](e(629));const i=this[e(558)];this[e(554)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(557)==s||t(592)==s||t(506)==s||t(552)==s||t(579)==s||t(532)==s||t(606)==s||t(670)==s){delete i[r],n=s,clearInterval(this[t(554)]),this[t(554)]=void 0;break}}t(592)==n&&i[t(498)](t(556)),t(506)==n&&i[t(498)](t(516)),t(552)==n&&i[t(498)](t(575)),t(579)==n&&i[t(498)](t(500),t(528)),t(532)==n&&i[t(498)](t(512)),t(606)==n&&i[t(498)](t(668)),t(670)==n&&i[t(498)](t(609))},1e3)}[Te(663)](){const e=Te;super[e(663)](),this[e(554)]&&clearInterval(this[e(554)])}[Te(509)](e="",n="",r=Te(618)){const i=Te,o=this[i(558)],u=o[i(661)][i(563)],d=o[i(541)][i(584)](p),l=o[i(541)][i(584)](a.ClipboardMarkersUtils);d[i(583)]();const h=new Ne,f=new ClipboardEvent(i(616),{clipboardData:h}),m=new c.DataTransfer(h),g=new c.DomEventData(u,f,{dataTransfer:m});l[i(630)](i(549),()=>{const e=i;u[e(529)][e(524)](e(616),g)}),this[i(521)]||(this[i(637)](),this[i(503)]=new C(o,this[i(655)][i(527)],this[i(521)]));let y=m[i(605)](i(607));const w=o[i(644)][i(529)][i(649)],b=Array[i(593)](w[i(542)]());1===b[i(531)]&&b[0][i(625)]&&!w[i(582)]()&&""!==y[i(664)](/&nbsp;/g,"")[i(550)]()&&(y=i(534)+y+i(660)),this[i(503)][i(538)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:L[o[i(644)][i(529)][i(649)][i(624)]?i(662):i(497)]}),i(631)!==this[i(507)].id?this[i(507)][i(641)]({id:i(631),icon:t.IconRobotPencil,title:v(this[i(558)][i(560)],i(600)),content:this[i(521)],position:s.DialogViewPosition[i(636)],onShow:()=>{const e=i;this[e(521)][e(613)]()},onHide:()=>{const e=i;this[e(503)][e(569)](),d[e(585)]()}}):this[i(507)][i(563)][i(640)]||this[i(507)][i(563)][i(595)]()}[Te(626)](){const e=Te;this[e(507)][e(567)]()}[Te(659)](){const e=Te,t=new Map,n=o(this[e(558)][e(533)][e(584)](e(537)),this[e(558)][e(560)]);for(const r of n)for(const n of r[e(666)])t[e(574)](n.id,{...n,groupId:r[e(615)],groupLabel:r[e(535)]||r[e(615)]});return t}[Te(647)](e){const n=Te,r=this[n(558)],i=r[n(666)][n(584)](n(515)),s=new e(r[n(560)]);return s[n(574)]({label:v(r[n(560)],n(600)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(555)](n(620)).to(i),s[n(555)](n(623)).to(this[n(507)],"id",e=>n(631)===e),this[n(547)](s,n(504),()=>{const e=n;s[e(623)]?this[e(626)]():i[e(504)]()}),s}[Te(637)](){const e=Te,t=this[e(558)][e(541)][e(584)](p);this[e(521)]=new me(this[e(558)][e(560)],this[e(586)],this[e(558)][e(533)][e(584)](e(526))),this[e(521)].on(e(588),()=>{const t=e;this[t(507)][t(563)][t(640)]||this[t(507)][t(563)][t(595)]()}),this[e(521)][e(657)][e(551)][e(658)].on(e(501),()=>{const t=e;this[t(507)][t(563)][t(640)]||this[t(507)][t(563)][t(595)]()}),this[e(547)](this[e(521)],e(518),()=>{const n=e;t[n(611)](this[n(503)][n(621)]),this[n(626)]()}),this[e(547)](this[e(521)],e(499),()=>{const n=e;t[n(499)](this[n(503)][n(621)]),this[n(626)]()}),this[e(650)]()}[Te(650)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(558)];this[e(521)][e(545)].on(e(573),(r,i,s)=>{const o=e,a=this[o(503)][o(621)];s?n[o(642)](v(t,o(634))):a&&n[o(642)](v(t,o(596),a),{politeness:o(603),isUnsafeHTML:!0})}),this[e(521)].on(e(513),(r,i,s)=>{const o=e;if(s){const e=this[o(521)][o(667)][o(543)];n[o(642)](v(t,o(576),e))}})}[Te(525)](e){const t=Te,n=this[t(517)][t(584)](e),r=this[t(558)],s=r[t(644)][t(529)][t(649)],o=r[t(666)][t(584)](t(515)),a=r[t(541)][t(584)](p),c=("_ungrouppedCommands"!==n[t(615)]?n[t(535)]+": ":"")+n[t(622)];if(!1!==n[t(632)]&&s[t(624)]){const e=(0,i.first)(s[t(505)]())||r[t(644)][t(608)][t(628)](s);r[t(644)][t(540)](n=>{n[t(553)](e,"in")})}a[t(583)](),o[t(504)](n[t(508)],c,t(651)+e)}[Te(656)](e,t,n,r){const i=Te,o=this[i(558)],a=o[i(560)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(590)](e=>e[i(666)][i(531)]);1===u[i(531)]?this[i(614)]({command:e,commands:u[0][i(666)],parentMenuView:t,onExecute:r})[i(559)](e=>c[i(587)][i(520)](e)):u[i(559)](({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(614)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(570)][d(574)]({label:o||n}),h[d(571)](d(504)).to(t),f[d(587)][d(530)](p),h[d(561)][d(602)][d(520)](f),l[d(602)][d(520)](h),c[d(587)][d(520)](l)}),t[i(561)][i(602)][i(520)](c)}[Te(614)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(558)],a=o[i(560)];return Ue(o,t)[i(612)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(574)]({label:t[o(622)]}),u[o(571)](o(504)).to(n),u.on(o(504),()=>r(t.id)),u[o(555)](o(620)).to(e,o(502),e=>e[o(589)](t.id)),c[o(602)][o(520)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(610)]&&void 0===t[n(610)]?1:void 0===e[n(610)]&&void 0!==t[n(610)]?-1:void 0!==e[n(610)]&&void 0!==t[n(610)]?e[n(610)]-t[n(610)]:0}function Ue(e,t){const n=Te;t[n(638)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(610)]){if(o[n(610)]in r)throw new i.CKEditorError(n(539),e,{conflictingDefinitions:[o,r[o[n(610)]]]});r[o[n(610)]]=o,s[n(653)](o[n(610)],0,o)}else s[n(519)](o);return s}function Fe(e,t){const n=je();return(Fe=function(e,t){return n[e-=144]})(e,t)}const Be=Fe;function je(){const e=["Improve this content by using descriptive language and inserting more information and more detailed explanations.","3481808NRDLns","translateGerman","legal","get","5loRHER","simplifyLanguage","Improve using casual, informal language to convey a casual conversation with a real person.","friendly","business","Improve using direct language, using only the essential information.","Translate the content to Arabic language.","4246998oCCTOR","Direct","Simplify language","translateChinese","translateFrench","ai.aiAssistant.preserveComments","3809058nrCVUF","Arabic","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Poetic","Confident","translate","Improve using compelling, optimistic language to convey confidence in the writing.","Improve writing","Translate the content to Hindi language.","define","generate","isPremiumPlugin","translatePortuguese","includes","Journalism","commands","Change tone","editOrReview","Generate from selection","translateEnglish","Legal","poetic","improveWriting","changeTone","translateHindi","push","isOfficialPlugin","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Translate the content to Spanish language.","journalism","German","Improve using friendly, comforting language, to convey understanding and empathy.","Casual","4783429auDjJs","Business","6031076CeDgCa","professional","continue","Make longer","Simplified Chinese","makeLonger","Hindi","direct","English","groupId","Translate the content to French language.","ai.aiAssistant.removeCommands","ai.aiAssistant.commands","AIAssistant","Rewrite this content as a poem using poetic techniques without losing the original meaning.","changeStyle","French","Friendly","ai.aiAssistant.extraCommandGroups","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","Continue","confident","Spanish","pluginName","filter","Rewrite this content as a business professional with formal language.","set","locale","Translate the content to Portuguese language.","makeShorter","config","summarize","requires","forEach","Translate","Summarize","Translate the content to English language.","Translate the content to Simplified Chinese language.","translateSpanish","Translate the content to German language.","translateArabic","Rewrite this content as a legal professional using valid legal terminology.","Portuguese","Make shorter","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Edit or review","365108zYydzq","find","Professional","1381888DaKNXh","Change style","casual","concat","Rewrite this content as a journalist using engaging language to convey the importance of the information."];return(je=function(){return e})()}!function(e){const t=Fe,n=e();for(;;)try{if(844183===parseInt(t(231))/1+-parseInt(t(234))/2+parseInt(t(251))/3+parseInt(t(183))/4*(parseInt(t(244))/5)+-parseInt(t(148))/6+-parseInt(t(181))/7+-parseInt(t(240))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class He extends e.Plugin{static get[Be(216)](){return[$e,p]}static get[Be(207)](){return Be(196)}static get[Be(174)](){return!0}static get[Be(159)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(214)],r=e[t(211)];n[t(157)](t(147),!0),n[t(157)](t(195),function(e){const t=Be;return[{groupId:t(165),groupLabel:v(e,t(230)),commands:[{id:t(170),label:v(e,t(155)),prompt:t(150)},{id:t(213),label:v(e,t(227)),prompt:t(203)},{id:t(188),label:v(e,t(186)),prompt:t(239)},{id:t(245),label:v(e,t(144)),prompt:t(229)}]},{groupId:t(158),groupLabel:v(e,t(166)),commands:[{id:t(215),label:v(e,t(219)),prompt:t(228)},{id:t(185),label:v(e,t(204)),prompt:t(175)}]},{groupId:t(171),groupLabel:v(e,t(164)),commands:[{id:t(184),label:v(e,t(233)),prompt:t(202)},{id:t(236),label:v(e,t(180)),prompt:t(246)},{id:t(190),label:v(e,t(252)),prompt:t(249)},{id:t(205),label:v(e,t(152)),prompt:t(154)},{id:t(247),label:v(e,t(200)),prompt:t(179)}]},{groupId:t(198),groupLabel:v(e,t(235)),commands:[{id:t(248),label:v(e,t(182)),prompt:t(209)},{id:t(242),label:v(e,t(168)),prompt:t(225)},{id:t(177),label:v(e,t(162)),prompt:t(238)},{id:t(169),label:v(e,t(151)),prompt:t(197)}]},{groupId:t(153),groupLabel:v(e,t(218)),commands:[{id:t(167),label:v(e,t(191)),prompt:t(220)},{id:t(222),label:v(e,t(206)),prompt:t(176)},{id:t(160),label:v(e,t(226)),prompt:t(212)},{id:t(241),label:v(e,t(178)),prompt:t(223)},{id:t(146),label:v(e,t(199)),prompt:t(193)},{id:t(145),label:v(e,t(187)),prompt:t(221)},{id:t(172),label:v(e,t(189)),prompt:t(156)},{id:t(224),label:v(e,t(149)),prompt:t(250)}]}]}(r)),n[t(157)](t(201),[]),n[t(157)](t(194),[]);let i=o(n[t(243)](t(195)),r);const s=n[t(243)](t(201)),a=n[t(243)](t(194));s[t(217)](e=>{const n=t,r=i[n(232)](t=>t[n(192)]===e[n(192)]);r?r[n(163)]=r[n(163)][n(237)](e[n(163)]):i[n(173)](e)}),i=i[t(208)](e=>!a[t(161)](e[t(192)])),i[t(217)](e=>{const n=t;e[n(163)]=e[n(163)][n(208)](e=>!a[n(161)](e.id))}),n[t(210)](t(195),i)}}const qe=ze;function ze(e,t){const n=Ve();return(ze=function(e,t){return n[e-=336]})(e,t)}function Ve(){const e=["init","plugins","10ggWNgs","textAdapter","error","210241QeFcPi","1719275tGFPcJ","3nfcozK","5763725OPTBhS","sendRequest","_prepareRequestHeaders","aborted","16227pVvdbg","object","reject","43698RAcQbr","_prepareRequestParameters","aitextadapter-send-request-failed","get","AbortError","6tIRLab","name","abort","AI_ERROR_GET_PARAMETERS","AI_ERROR_GET_HEADERS","makeRequest","1704PQgTiV","abortController","resolve","application/json","2648947KrkoHt","locale","assign","396080Slgjlm","catch","signal","requires","editor"];return(Ve=function(){return e})()}!function(e){const t=ze,n=e();for(;;)try{if(194742===parseInt(t(349))/1+-parseInt(t(359))/2+parseInt(t(351))/3*(-parseInt(t(339))/4)+parseInt(t(350))/5+parseInt(t(364))/6*(-parseInt(t(336))/7)+-parseInt(t(370))/8*(parseInt(t(356))/9)+-parseInt(t(346))/10*(-parseInt(t(352))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ve);class We extends e.Plugin{[qe(371)];static get[qe(342)](){return[g]}constructor(e){const t=qe;super(e),this[t(371)]=new AbortController}[qe(344)](){const e=qe;this[e(343)][e(345)][e(362)](g)[e(347)]=this}[qe(366)](){const e=qe;this[e(371)][e(341)][e(355)]||(this[e(371)][e(366)](),this[e(371)]=new AbortController)}async[qe(369)](e){const t=qe;return this[t(353)](e)[t(340)](e=>{const n=t;if(e instanceof y)return Promise[n(358)](e);if(n(363)==e[n(365)])return Promise[n(372)]();throw console[n(348)](e),new i.CKEditorError(n(361),null)})}async[qe(354)](e,t){const n=qe,r=this[n(343)][n(337)],i={"Content-Type":n(373)};if(n(357)==typeof e)Object[n(338)](i,e);else if(e)try{const r=await e(t);Object[n(338)](i,r)}catch{return Promise[n(358)](new y(v(r,n(368))))}return i}async[qe(360)](e,t){const n=qe,r=this[n(343)][n(337)];if(n(357)==typeof e)return e;try{return await e(t)}catch{return Promise[n(358)](new y(v(r,n(367))))}}}const Ge=Qe;function Ke(){const e=["_prepareRequestHeaders","5452370OgLuDQ","prepareMessages","context_length_exceeded","stringify","4FzCioa","96czBeSC","ai.openAI.apiUrl","_requestHeaders","split","data: ","148rRvUzx","message","1545350ZVtsHA","https://api.openai.com/v1/chat/completions","gpt-3.5-turbo","_readStaticResponse","map","delta","ai.openAI.requestParameters","json","sendRequest","user","[DONE]","system","includes","signal","config","ai.openAI.requestHeaders","read","abortController","_apiUrl","_prepareRequestParameters","_readStreamableResponse","length","editor","text","body","AI_ERROR_CONTEXT_LENGTH","content","632394rggdBb","1764555gJKkdQ","filter","254HFvsLz","reject","locale","3452430LUAxuI","_cleanUpData","join","define","OpenAITextAdapter","\nYou must keep the text formatting.\n\nContent:\n","stream","Instruction:\n","AI_ERROR_MODERATION","getReader","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.","decode","get","choices","pluginName","resolve","POST","_isBufferIncomplete","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.","parse","Moderation","_requestParameters","538980avPjAz","replace"];return(Ke=function(){return e})()}function Qe(e,t){const n=Ke();return(Qe=function(e,t){return n[e-=378]})(e,t)}!function(e){const t=Qe,n=e();for(;;)try{if(433266===-parseInt(t(423))/1*(-parseInt(t(385))/2)+-parseInt(t(383))/3+parseInt(t(417))/4*(parseInt(t(425))/5)+parseInt(t(388))/6+-parseInt(t(413))/7+-parseInt(t(418))/8*(-parseInt(t(382))/9)+parseInt(t(410))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ke);class Je extends We{[Ge(443)];[Ge(420)];[Ge(409)];static get[Ge(402)](){return Ge(392)}constructor(e){const t=Ge;super(e),e[t(439)][t(391)](t(419),t(426)),e[t(439)][t(400)](t(431))||e[t(439)][t(391)](t(431),{model:t(427),max_tokens:2e3,temperature:1,top_p:1,stream:!0}),this[t(443)]=e[t(439)][t(400)](t(419)),this[t(420)]=e[t(439)][t(400)](t(440))||{},this[t(409)]=e[t(439)][t(400)](t(431))}async[Ge(433)]({query:e,context:t,onData:n,actionId:r}){const i=Ge,s=this[i(447)][i(387)],o=await this[i(414)](e,t,r),a=await this[i(412)](this[i(420)],r),c=await this[i(444)](this[i(409)],r),u={messages:o,...c},d={method:i(404),headers:a,body:JSON[i(416)](u),signal:this[i(442)][i(438)]},l=await fetch(this[i(443)],d);if(l.ok)return c[i(394)]?await this[i(445)](l,n):await this[i(428)](l,n),Promise[i(403)]();{const e=await l[i(378)]();return e[i(437)](i(415))?Promise[i(386)](new y(v(s,i(380)))):e[i(437)](i(408))?Promise[i(386)](new y(v(s,i(396)))):Promise[i(386)](new Error(e))}}async[Ge(414)](e,t,n){const r=Ge;let i,s;return t?(i=r(406),s=r(395)+e+r(393)+t):(i=r(398),s=e),[{role:r(436),content:i},{role:r(434),content:s}]}async[Ge(445)](e,t){const n=Ge,r=e[n(379)][n(397)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(441)](),d=s+i[n(399)](u);let l="";c=e;try{l=this[n(389)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(405)](o)||o&&(a+=o,o="",t(a))}return Promise[n(403)]()}async[Ge(428)](e,t){const n=Ge;return t((await e[n(432)]())[n(401)][0][n(424)][n(381)]),Promise[n(403)]()}[Ge(405)](e){const t=Ge,n=e[t(421)]("<")[t(446)]!==e[t(421)](">")[t(446)],r=e[t(446)]<30;return n&&r}[Ge(389)](e){const t=Ge;return e[t(421)](/\n(?![^{]*\})/g)[t(429)](e=>e[t(411)](t(422),""))[t(384)](e=>e&&e[t(446)]>0&&t(435)!==e)[t(429)](e=>{const n=t,{choices:r}=JSON[n(407)](e);if(r[0]?.[n(430)]?.[n(381)])return r[0][n(430)][n(381)]})[t(384)](e=>e)[t(390)]("")}}const Xe=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}};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||r.headers.hasOwnProperty(lt))return t(n);const i=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o(i)&&o(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}});const pt=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}$"),mt=e=>pt.test(e)||e.startsWith("[")&&e.endsWith("]"),gt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),yt=(e,t=!1)=>{if(!t)return gt.test(e);const n=e.split(".");for(const e of n)if(!yt(e))return!1;return!0},wt={},bt="endpoints";function vt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${vt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(vt).join(", ")})`:JSON.stringify(e,null,2)}class kt extends Error{constructor(e){super(e),this.name="EndpointError"}}const St=(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 kt(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new kt(`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 kt(`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},Et={booleanEquals:(e,t)=>e===t,getAttr:St,isSet:e=>null!=e,isValidHostLabel:yt,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=mt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[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()}`)},It=(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(St(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},_t=(e,t,n)=>{if("string"==typeof e)return It(e,n);if(e.fn)return xt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new kt(`'${t}': ${String(e)} is not a string, function or reference.`)},xt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:_t(e,"arg",n)),i=e.split(".");return i[0]in wt&&null!=i[1]?wt[i[0]][i[1]](...r):Et[e](...r)},Rt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new kt(`'${e}' is already defined in Reference Record.`);const r=xt(t,n);return n.logger?.debug?.(`${bt} evaluateCondition: ${vt(t)} = ${vt(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}=Rt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${bt} assign: ${i.name} := ${vt(i.value)}`))}return{result:!0,referenceRecord:n}},Ct=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=_t(e,"Header value entry",t);if("string"!=typeof r)throw new kt(`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 It(e,t);case"object":if(null===e)throw new kt(`Unexpected endpoint property: ${e}`);return Tt(e,t);case"boolean":return e;default:throw new kt("Unexpected endpoint property type: "+typeof e)}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Mt(r,t)}),{}),Ot=(e,t)=>{const n=_t(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 kt("Endpoint URL must be a string, got "+typeof n)},Lt=(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?.(`${bt} Resolving endpoint from template: ${vt(r)}`),{...null!=u&&{headers:Ct(u,o)},...null!=c&&{properties:Tt(c,o)},url:Ot(a,o)}},Nt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)throw new kt(_t(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},$t=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)return Dt(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Dt=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Lt(n,t);if(e)return e}else if("error"===n.type)Nt(n,t);else{if("tree"!==n.type)throw new kt(`Unknown endpoint rule: ${n}`);{const e=$t(n,t);if(e)return e}}throw new kt("Rules evaluation failed")},Ut=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ut(t))return!1;return!0}return!!yt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!mt(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)\\\\-\\\\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)"},"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)"},"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":{"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":{}}],"version":"1.1"}'),Bt="";const jt={isVirtualHostableS3Bucket:Ut,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;return"arn"!==n||""===r||""===i||""===a[0]?null:{partition:r,service:i,region:s,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},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}}};wt.aws=jt;const Ht="user-agent",qt="x-amz-user-agent",zt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Wt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Gt)||[],a=(await e.defaultUserAgentProvider()).map(Gt),c=e?.customUserAgent?.map(Gt)||[],u=(Bt?[Bt]:[]).concat([...a,...o,...c]).join(" "),d=[...a.filter(e=>e.startsWith("aws-sdk-")),...c].join(" ");return"browser"!==e.runtime?(d&&(s[qt]=s[qt]?`${s[Ht]} ${d}`:d),s[Ht]=u):s[qt]=u,t({...r,request:i})},Gt=e=>{const t=e[0].split("/").map(e=>e.replace(zt,"-")).join("/"),n=e[1]?.replace(Vt,"-"),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}`}},"")},Kt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Qt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Qt||(Qt={}));const Jt=e=>e[rt]||(e[rt]={}),Xt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Yt=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Zt=e=>Yt(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const en=(e,t)=>(n,r)=>async i=>{const s=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Jt(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)},tn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},nn={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},rn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function sn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>n=>async r=>{const{response:i}=await n(r);try{return{response:i,output:await t(i,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:i}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,n),nn),r.add(((e,t)=>(n,r)=>async i=>{const s=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:s});return n({...i,request:o})})(e,t),rn)}}}const on=e=>e=>{throw e},an=(e,t)=>{},cn={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},un=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Jt(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||on)(i));return(o.successHandler||an)(a.response,i),a},cn)}}),dn=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},ln={},hn=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);ln[n]=e,hn[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;ln[n]=r,hn[r]=n}for(let e=0;e<10;e++){ln[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;ln[t]=n,hn[n]=t}ln["+"]=62,hn[62]="+",ln["/"]=63,hn[63]="/";const fn=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 ln))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=ln[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)},pn=e=>(new TextEncoder).encode(e);function mn(e){let t;t="string"==typeof e?pn(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+=hn[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const gn=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 yn extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?yn.mutate(fn(e)):yn.mutate(pn(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,yn.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?mn(e):gn(e)}(this,e)}}const wn={},bn={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),wn[e]=t,bn[t]=e}function vn(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 bn))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=bn[r]}return t}function kn(e){let t="";for(let n=0;n<e.byteLength;n++)t+=wn[e[n]];return t}"function"==typeof ReadableStream&&ReadableStream;const Sn=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return yn.mutate(e);if(!e)return yn.mutate(new Uint8Array);const n=t.streamCollector(e);return yn.mutate(await n)};function An(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function En(e,t){return new In(e,t)}class In{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=>An(e)).join("/"):An(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}}class _n{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 xn=(Rn=3e5,e=>Pn(e)&&e.expiration.getTime()-Date.now()<Rn);var Rn;const Pn=e=>void 0!==e.expiration,Cn="content-length";const Mn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Tn=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(Cn))try{const t=n(e);r.headers={...r.headers,[Cn]:String(t)}}catch(e){}}return e({...t,request:r})}),Mn)}}),On=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ln=/(\d+\.){3}\d+/,Nn=/\.\./,$n=e=>On.test(e)&&!Ln.test(e)&&!Nn.test(e),Dn=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},Un=(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()=>{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},Fn=async e=>{};const Bn=e=>{if("string"==typeof e)return Bn(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}},jn=e=>"object"==typeof e?"url"in e?Bn(e.url):e:Bn(e),Hn=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 Un(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("?"))),Dn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!$n(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},qn=({config:e,instructions:t})=>(n,r)=>async i=>{e.endpoint&&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.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Fn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(jn(e)))}const i=await Hn(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=Jt(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})},zn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:rn.name},Vn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(qn({config:e,instructions:t}),zn)}});var Wn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Wn||(Wn={}));const Gn=Wn.STANDARD,Kn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Qn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Jn=[500,502,503,504],Xn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Yn=e=>429===e.$metadata?.httpStatusCode||Kn.includes(e.name)||1==e.$retryable?.throttling,Zn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Qn.includes(e.name)||Xn.includes(e?.code||"")||Jn.includes(e.$metadata?.httpStatusCode||0)||void 0!==e.cause&&t<=10&&Zn(e.cause,t+1);class er{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=>er.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(),Yn(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))}}er.setTimeoutFn=setTimeout;const tr=100,nr=2e4,rr="amz-sdk-invocation-id",ir="amz-sdk-request",sr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(nr,e),getRetryCost:()=>n});class or{constructor(e){this.maxAttempts=e,this.mode=Wn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=tr;return{computeNextBackoffDelay:t=>Math.floor(Math.min(nr,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return sr({retryDelay:tr,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:tr);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,sr({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 ar{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Wn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new er,this.standardRetryStrategy=new or(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 cr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ur;const dr=new Uint8Array(16);function lr(){if(!ur&&(ur="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ur))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ur(dr)}const hr=[];for(let e=0;e<256;++e)hr.push((e+256).toString(16).slice(1));function fr(e,t=0){return hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]}const pr=function(e,t,n){if(cr.randomUUID&&!t&&!e)return cr.randomUUID();const r=(e=e||{}).random||(e.rng||lr)();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 fr(r)},mr=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 gr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},yr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,wr=()=>{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 gr(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of gr(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 ${yr(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)=>br[t.step]-br[e.step]||vr[t.priority||"normal"]-vr[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=gr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${yr(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(`"${yr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${yr(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=gr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${yr(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(`"${yr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${yr(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(wr()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=gr(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 gr(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=gr(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(wr());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 yr(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},br={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},vr={high:3,normal:2,low:1};class kr{constructor(e){this.config=e,this.middlewareStack=wr()}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}}class Sr{constructor(){this.middlewareStack=wr()}static classBuilder(){return new Ar}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 Ar{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}build(){const e=this;let t;return t=class extends Sr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}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 Er="***SensitiveInformation***",Ir=(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}`)}}),_r=e=>xr(e,32),xr=(e,t)=>{const n=Ir(e);if(void 0!==n&&Rr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Rr=(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]}},Pr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Mr.warn(Cr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Cr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Mr={warn:console.warn};class Tr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Tr.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}}const Or=(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},Lr=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"]}),Nr=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{}}},$r=e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Dr=e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t},Ur=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},Fr=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Br=e=>({...$r(e),...Ur(e)}),jr=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};jr.from=e=>e&&"object"==typeof e&&(e instanceof jr||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?jr(String(e)):jr(JSON.stringify(e)),jr.fromObject=jr.from;class Hr{trace(){}debug(){}info(){}warn(){}error(){}}function qr(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,Vr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Wr(r,null,s,e):r[e]=s[e];return r}const zr=(e,t)=>{const n={};for(const r in t)Wr(n,e,t,r);return n},Vr=(e,t,n)=>qr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Wr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Gr,o=Kr,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)}},Gr=e=>null!=e,Kr=e=>e,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:Yr(e)},n=ti(e.$response);return n&&(t.retryAfterHint=n),t},Yr=e=>Yn(e)?"THROTTLING":Zn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Zn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Zr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ei=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=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),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[rr]=pr());;)try{d&&(u.headers[ir]=`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=Xr(t);if(o=mr(t),d&&Qr(u))throw(n.logger instanceof Hr?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),Zr)}}),ti=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)},ni=e=>encodeURIComponent(e).replace(/[!'()*]/g,ri),ri=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ii=e=>"string"==typeof e?pn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),si="X-Amz-Date",oi="X-Amz-Signature",ai="X-Amz-Security-Token",ci="authorization",ui=si.toLowerCase(),di=[ci,ui,"date"],li=oi.toLowerCase(),hi="x-amz-content-sha256",fi=ai.toLowerCase(),pi={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},mi=/^proxy-/,gi=/^sec-/,yi="AWS4-HMAC-SHA256",wi="AWS4-HMAC-SHA256-PAYLOAD",bi="aws4_request",vi={},ki=[],Si=(e,t,n)=>`${e}/${t}/${n}/${bi}`,Ai=(e,t,n)=>{const r=new e(t);return r.update(ii(n)),r.digest()},Ei=({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 pi||t?.has(s)||mi.test(s)||gi.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Ii=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===hi)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(ii(t)),kn(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class _i{format(e){const t=[];for(const n of Object.keys(e)){const r=pn(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=pn(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(Pi.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(vn(e.value.replace(/\-/g,"")),1),d}}}var xi;!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"}(xi||(xi={}));const Ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Pi{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&&Ci(t),new Pi(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Ci(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Ci(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Mi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))di.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Ti=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Oi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.headerFormatter=new _i,this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=Xt(n),this.credentialProvider=Xt(t)}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}=Li(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=Si(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}})(Mi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[ai]=d.sessionToken),m.query["X-Amz-Algorithm"]=yi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[si]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Ei(m,i,o);return m.query["X-Amz-SignedHeaders"]=Ni(g),m.query[oi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Ii(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}=Li(n),u=Si(a,o,s??this.service),d=await Ii({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=kn(await l.digest()),f=[wi,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}=Li(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(ii(e)),kn(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=Mi(e),{longDate:u,shortDate:d}=Li(t),l=Si(d,a,s??this.service);c.headers[ui]=u,o.sessionToken&&(c.headers[fi]=o.sessionToken);const h=await Ii(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(hi,c.headers)&&this.applyChecksum&&(c.headers[hi]=h);const f=Ei(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[ci]=`${yi} Credential=${o.accessKeyId}/${l}, SignedHeaders=${Ni(f)}, Signature=${p}`,c}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()===li)continue;const i=ni(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${ni(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${ni(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){const r=new this.sha256;r.update(ii(n));const i=await r.digest();return`${yi}\n${e}\n${t}\n${kn(i)}`}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 ni(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r),s=new this.sha256(await n);return s.update(ii(i)),kn(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${kn(await Ai(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in vi)return vi[s];for(ki.push(s);ki.length>50;)delete vi[ki.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,bi])o=await Ai(e,o,t);return vi[s]=o})(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const Li=e=>{const t=(n=e,Ti(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Ni=e=>Object.keys(e).sort().join(";"),$i=e=>{let t;e.credentials&&(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))})(e.credentials,xn,Pn)),t||(t=e.credentialDefaultProvider?dn(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:i}=e;let s;return s=e.signer?dn(e.signer):e.regionInfoProvider?()=>dn(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([r,s])=>{const{signingRegion:o,signingService:a}=r;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(c)}):async r=>{const s=(r=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await dn(e.region)(),properties:{}},r)).signingRegion,o=r.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(a)},{...e,systemClockOffset:r,signingEscapePath:n,credentials:t,signer:s}},Di=async(e,t,n)=>({operation:Jt(t).operation,region:await Xt(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Ui=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"}},Bi="3.621.0";var ji="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Hi(e){return e instanceof Uint8Array?e:"string"==typeof e?ji(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function qi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var zi={name:"SHA-256"},Vi={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 Gi={};function Ki(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Gi}var Qi=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!qi(e)){var t=Hi(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 Ki().crypto.subtle.sign(Vi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):qi(this.toHash)?Promise.resolve(Wi):Promise.resolve().then(function(){return Ki().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){Ki().crypto.subtle.importKey("raw",Hi(e.secret),Vi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function Ji(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 Xi(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 Yi(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 Zi=64,es=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]),ts=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ns=Math.pow(2,53)-1,rs=function(){function e(){this.state=Int32Array.from(ts),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>ns)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Zi&&(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%Zi>=56){for(var r=this.bufferLength;r<Zi;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<Zi;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+(es[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}(),is=function(){function e(e){this.secret=e,this.hash=new rs,this.reset()}return e.prototype.update=function(e){if(!qi(e)&&!this.error)try{this.hash.update(Hi(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 rs,this.secret){this.outer=new rs;var e=function(e){var t=Hi(e);if(t.byteLength>Zi){var n=new rs;n.update(t),t=n.digest()}var r=new Uint8Array(Zi);return r.set(t),r}(this.secret),t=new Uint8Array(Zi);t.set(e);for(var n=0;n<Zi;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 ss=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function os(e){return e&&ss.every(function(t){return"function"==typeof e[t]})}var as=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)&&os(e.crypto.subtle)}(Ki())?this.hash=new is(e):this.hash=new Qi(e)}return e.prototype.update=function(e,t){this.hash.update(Hi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),cs=n(369),us=n.n(cs);const ds=({serviceId:e,clientVersion:t})=>async()=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r};!function(){function e(){this.crc32=new hs}e.prototype.update=function(e){qi(e)||this.crc32.update(Hi(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 hs}}();var ls,hs=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Yi(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^fs[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}(),fs=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 ps{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&&ms(t),new ps(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&ms(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function ms(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class gs{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(ps.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!_s.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(vn(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:ys,value:!0};break;case 1:t[i]={type:ys,value:!1};break;case 2:t[i]={type:ws,value:e.getInt8(n++)};break;case 3:t[i]={type:bs,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:vs,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:ks,value:new ps(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Ss,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:As,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Es,value:new Date(new ps(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:Is,value:`${kn(o.subarray(0,4))}-${kn(o.subarray(4,6))}-${kn(o.subarray(6,8))}-${kn(o.subarray(8,10))}-${kn(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"}(ls||(ls={}));const ys="boolean",ws="byte",bs="short",vs="integer",ks="long",Ss="binary",As="string",Es="timestamp",Is="uuid",_s=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class xs{constructor(e,t){this.headerMarshaller=new gs(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 hs;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 hs).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 Rs{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 Cs{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 Ts(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 Os{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new xs(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 Cs({messageStream:new Rs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Ts(t,this.utfEncoder)})}serialize(e,t){return new Ps({messageStream:new Ms({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Ls{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Os({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,$s=e=>new Ls(e);function Ds(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 Us={supported:void 0};class Fs{static create(e){return"function"==typeof e?.handle?e:new Fs(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Us.supported&&(Us.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ni(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${ni(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${ni(r)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:u}=e,d=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,l="GET"===u||"HEAD"===u?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(h.cache=this.config.cache),l&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),Us.supported&&(h.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let f=()=>{};const p=new Request(d,h),m=[fetch(p).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})}))}),Ds(n)];return t&&m.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}),f=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(m).finally(f)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const Bs=e=>"function"==typeof Blob&&e instanceof Blob?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=fn(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 js="function"==typeof TextEncoder?new TextEncoder:null,Hs=e=>{if("string"==typeof e){if(js)return js.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}`)},qs=e=>new Date(Date.now()+e),zs=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Vs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(qs(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Ws=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Gs{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{config:r,signer:i,signingRegion:s,signingName:o}=await(async e=>{const t=Ws("context",e.context),n=Ws("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Ws("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingName;return{config:n,signer:s,signingRegion:o,signingName:a}})(n);return await i.sign(e,{signingDate:qs(r.systemClockOffset),signingRegion:s,signingService:o})}errorHandler(e){return t=>{const n=t.ServerTime??zs(t.$response);if(n){const r=Ws("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Vs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=zs(e);if(n){const e=Ws("config",t.config);e.systemClockOffset=Vs(n,e.systemClockOffset)}}}const Ks="required",Qs="fn",Js="argv",Xs="ref",Ys=!0,Zs="isSet",eo="booleanEquals",to="error",no="endpoint",ro="tree",io="PartitionResult",so={[Ks]:!1,type:"String"},oo={[Ks]:!0,default:!1,type:"Boolean"},ao={[Xs]:"Endpoint"},co={[Qs]:eo,[Js]:[{[Xs]:"UseFIPS"},!0]},uo={[Qs]:eo,[Js]:[{[Xs]:"UseDualStack"},!0]},lo={},ho={[Qs]:"getAttr",[Js]:[{[Xs]:io},"supportsFIPS"]},fo={[Qs]:eo,[Js]:[!0,{[Qs]:"getAttr",[Js]:[{[Xs]:io},"supportsDualStack"]}]},po=[co],mo=[uo],go=[{[Xs]:"Region"}],yo={version:"1.0",parameters:{Region:so,UseDualStack:oo,UseFIPS:oo,Endpoint:so},rules:[{conditions:[{[Qs]:Zs,[Js]:[ao]}],rules:[{conditions:po,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:to},{rules:[{conditions:mo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:to},{endpoint:{url:ao,properties:lo,headers:lo},type:no}],type:ro}],type:ro},{rules:[{conditions:[{[Qs]:Zs,[Js]:go}],rules:[{conditions:[{[Qs]:"aws.partition",[Js]:go,assign:io}],rules:[{conditions:[co,uo],rules:[{conditions:[{[Qs]:eo,[Js]:[Ys,ho]},fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:to}],type:ro},{conditions:po,rules:[{conditions:[{[Qs]:eo,[Js]:[ho,Ys]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS is enabled but this partition does not support FIPS",type:to}],type:ro},{conditions:mo,rules:[{conditions:[fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"DualStack is enabled but this partition does not support DualStack",type:to}],type:ro},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro}],type:ro},{error:"Invalid Configuration: Missing Region",type:to}],type:ro}]},wo=(e,t={})=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${bt} Initial EndpointParams: ${vt(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 kt(`Missing required parameter: '${e}'`);const c=Dt(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${bt} Resolved endpoint: ${vt(c)}`),c})(yo,{endpointParams:e,logger:t.logger});wt.aws=jt;Error;const bo=["in-region","cross-region","mobile","standard","legacy"],vo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},ko=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(vo()?"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 ${bo.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Nr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??fn,base64Encoder:e?.base64Encoder??mn,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??wo,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ui,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Gs}],logger:e?.logger??new Hr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Bn,utf8Decoder:e?.utf8Decoder??pn,utf8Encoder:e?.utf8Encoder??gn}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ds({serviceId:r.serviceId,clientVersion:Bi}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??$s,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:Fs.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Gn),sha256:e?.sha256??as,streamCollector:e?.streamCollector??Bs,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},So=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Ao=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}},Eo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class Io extends kr{constructor(...[e]){const t=(e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(ko(e||{})),n=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Zt(t);const e=await t();return Zt(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Yt(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}})(t),r=(e=>{const t=e.tls??!0,{endpoint:n}=e,r=null!=n?async()=>jn(await Xt(n)()):void 0,i=!!n,s={...e,endpoint:r,tls:t,isCustomEndpoint:i,useDualstackEndpoint:Xt(e.useDualstackEndpoint??!1),useFipsEndpoint:Xt(e.useFipsEndpoint??!1)};let o;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!o&&(o=Fn(e.serviceId)),o),s})(n);var i;const s=(e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)}))((e=>{const{retryStrategy:t}=e,n=Xt(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await Xt(e.retryMode)()===Wn.ADAPTIVE?new ar(n):new or(n))}})((i=r,{...i,customUserAgent:"string"==typeof i.customUserAgent?[[i.customUserAgent]]:i.customUserAgent})));const o=((e,t)=>{const n={...So(e),...Br(e),...Xe(e),...Ao(e)};return t.forEach(e=>e.configure(n)),{...e,...(s=n,{region:s.region()}),...(i=n,{...Dr(i),...Fr(i)}),...(r=n,{httpHandler:r.httpHandler()}),...Eo(n)};var r,i,s})({...$i(s)},e?.extensions||[]);super(o),this.config=o,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=>({applyToStack:t=>{t.add(Wt(e),Kt)}}))(this.config)),this.middlewareStack.use(ei(this.config)),this.middlewareStack.use(Tn(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(en(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),tn)}}))(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use(un(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return Di}getIdentityProviderConfigProvider(){return async e=>new _n({"aws.auth#sigv4":e.credentials})}}class _o extends Tr{constructor(e){super(e),Object.setPrototypeOf(this,_o.prototype)}}class xo extends _o{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,xo.prototype)}}var Ro;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Ro||(Ro={}));class Po extends _o{constructor(e){super({name:"InternalServerException",$fault:"server",...e}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,Po.prototype)}}class Co extends _o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Co.prototype)}}class Mo extends _o{constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,Mo.prototype)}}class To extends _o{constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,To.prototype)}}class Oo extends _o{constructor(e){super({name:"ValidationException",$fault:"client",...e}),this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype)}}var Lo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Lo||(Lo={}));var No;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));var $o,Do;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($o||($o={})),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):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));var Uo;!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.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Uo||(Uo={}));var Fo,Bo,jo,Ho,qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Fo||(Fo={})),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])}(Bo||(Bo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(qo||(qo={}));class zo extends _o{constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),this.name="ModelErrorException",this.$fault="client",Object.setPrototypeOf(this,zo.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Vo extends _o{constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),this.name="ModelNotReadyException",this.$fault="client",Object.setPrototypeOf(this,Vo.prototype)}}class Wo extends _o{constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),this.name="ModelTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Wo.prototype)}}class Go extends _o{constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),this.name="ServiceUnavailableException",this.$fault="server",Object.setPrototypeOf(this,Go.prototype)}}var Ko,Qo,Jo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Ko||(Ko={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Qo||(Qo={}));class Xo extends _o{constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),this.name="ModelStreamErrorException",this.$fault="client",Object.setPrototypeOf(this,Xo.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])}(Jo||(Jo={}));var Yo;!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])}(Yo||(Yo={}));const Zo=e=>({...e,...e.body&&{body:Er}}),ea=e=>({...e,...e.body&&{body:Er}}),ta=e=>({...e,...e.body&&{body:Er}}),na=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ra=(e,t)=>((e,t)=>Sn(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{}}),ia=async(e,t)=>{const n=await ra(e,t);return n.message=n.message??n.Message,n},sa=async(e,t)=>{const n=En(e,t),r=qr({},Oa,{[$a]:e[Na]||"application/octet-stream",[La]:e[La],[za]:e[Fa],[Ha]:e[Da],[qa]:e[Ua]});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()},oa=async(e,t)=>{const n=En(e,t),r=qr({},Oa,{[$a]:e[Na]||"application/octet-stream",[Ba]:e[La],[za]:e[Fa],[Ha]:e[Da],[qa]:e[Ua]});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()},aa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=qr({$metadata:Ta(e),[Na]:[,e.headers[$a]]}),r=await Sn(e.body,t);return n.body=r,n},ca=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=qr({$metadata:Ta(e),[Na]:[,e.headers[ja]]}),r=e.body;return n.body=Aa(r,t),n},ua=async(e,t)=>{const n={...e,body:await ia(e.body,t)},r=((e,t)=>{const n=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},r=(i=e.headers,s="x-amzn-errortype",Object.keys(i).find(e=>e.toLowerCase()===s.toLowerCase()));var i,s;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ha(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await fa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await wa(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await ba(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ka(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Sa(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await pa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await ma(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await ya(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await va(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await ga(n,t);default:const i=n.body;return da({output:e,parsedBody:i,errorCode:r})}},da=(la=_o,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Lr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw Or(o,t)})({output:e,parsedBody:t,exceptionCtor:la,errorCode:n})});var la;const ha=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new xo({$metadata:Ta(e),...n});return Or(s,e.body)},fa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Po({$metadata:Ta(e),...n});return Or(s,e.body)},pa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr,originalStatusCode:_r,resourceName:Pr});Object.assign(n,i);const s=new zo({$metadata:Ta(e),...n});return Or(s,e.body)},ma=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Vo({$metadata:Ta(e),...n});return Or(s,e.body)},ga=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr,originalMessage:Pr,originalStatusCode:_r});Object.assign(n,i);const s=new Xo({$metadata:Ta(e),...n});return Or(s,e.body)},ya=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Wo({$metadata:Ta(e),...n});return Or(s,e.body)},wa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Co({$metadata:Ta(e),...n});return Or(s,e.body)},ba=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Mo({$metadata:Ta(e),...n});return Or(s,e.body)},va=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Go({$metadata:Ta(e),...n});return Or(s,e.body)},ka=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new To({$metadata:Ta(e),...n});return Or(s,e.body)},Sa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Oo({$metadata:Ta(e),...n});return Or(s,e.body)},Aa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await xa(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Ea(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Ia(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ca(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Pa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await _a(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ra(n.serviceUnavailableException,t)}:{$unknown:e}),Ea=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return fa(n,t)},Ia=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ga(n,t)},_a=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ya(n,t)},xa=async(e,t)=>{const n={},r=await ra(e.body,t);return Object.assign(n,Ma(r,t)),n},Ra=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return va(n,t)},Pa=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ka(n,t)},Ca=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return Sa(n,t)},Ma=(e,t)=>zr(e,{bytes:t.base64Decoder}),Ta=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"]}),Oa=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),La="accept",Na="contentType",$a="content-type",Da="guardrailIdentifier",Ua="guardrailVersion",Fa="trace",Ba="x-amzn-bedrock-accept",ja="x-amzn-bedrock-content-type",Ha="x-amzn-bedrock-guardrailidentifier",qa="x-amzn-bedrock-guardrailversion",za="x-amzn-bedrock-trace";class Va extends(Sr.classBuilder().ep({...Fi}).m(function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),Vn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ta,na).ser(oa).de(ca).build()){}class Wa extends(Sr.classBuilder().ep({...Fi}).m(function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),Vn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(Zo,ea).ser(sa).de(aa).build()){}const Ga=Qa;function Ka(){const e=["preparePrompt","_prepareRequestParameters","config","_processAWSRequest","pluginName","\n\nAssistant:","generations","test","7593304GYtLrT","completion","ai.aws.apiUrl","32767LbbeCp","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.","_prepareRequestHeaders","filter","_requestHeaders","getModelFamily","cohere.command","completions","split","editor","_readStaticResponse","Instruction:\n","bedrock-2023-05-31","_getGeneratedText","send","anthropic.claude-v2","define","_readStreamableResponse","ai.aws.requestHeaders","application/json","ai.aws.requestParameters","body","from","resolve","22FQNhDu","decode","ai21.j2","45HUcdhN","generation","620780pziQjn","meta.llama","join","data","4122750SdKPjH","parse","2442884EkDeXV","_requestParameters","\n<</SYS>>\n[INST]\n","abortController","3861702nWdIbH","Human:\n","toString","locale","AI_ERROR_UNSUPPORTED_MODEL","text","sendRequest","bytes","_readAsyncIterableResponse","POST","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.","map","anthropic.claude","chunk","\n[/INST]","get","AWSTextAdapter","json","_bedrockClientConfig","5466lEIFSY","_apiUrl","ai.aws.bedrockClientConfig","utf-8","utf8","<<SYS>>\n","6755yWwtQE","read","\nYou must keep the text formatting.\n\nContent:\n","_processProxyRequest","getReader","length","stringify","signal"];return(Ka=function(){return e})()}function Qa(e,t){const n=Ka();return(Qa=function(e,t){return n[e-=295]})(e,t)}!function(e){const t=Qa,n=e();for(;;)try{if(704826===parseInt(t(373))/1*(-parseInt(t(314))/2)+-parseInt(t(329))/3+-parseInt(t(325))/4+parseInt(t(323))/5+-parseInt(t(348))/6*(-parseInt(t(354))/7)+parseInt(t(370))/8+-parseInt(t(317))/9*(-parseInt(t(319))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ka);class Ja extends We{[Ga(349)];[Ga(377)];[Ga(347)];[Ga(326)];static get[Ga(366)](){return Ga(345)}constructor(e){const t=Ga;super(e),e[t(364)][t(344)](t(310))||e[t(364)][t(306)](t(310),{model:t(305),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(302),stream:!0}),this[t(349)]=e[t(364)][t(344)](t(372)),this[t(347)]=e[t(364)][t(344)](t(350)),this[t(377)]=e[t(364)][t(344)](t(308)),this[t(326)]=e[t(364)][t(344)](t(310))}async[Ga(335)]({query:e,context:t,onData:n,actionId:r}){const i=Ga,{model:s,stream:o,...a}=await this[i(363)](this[i(326)],r),c={prompt:await this[i(362)](e,t,s,r),...a};this[i(349)]?await this[i(357)](c,s,o,n,r):await this[i(365)](c,s,o,n)}async[Ga(362)](e,t,n,r){const i=Ga;let s,o;return t?(s=i(339),o=i(301)+e+i(356)+t):(s=i(374),o=e),i(320)==this[i(295)](n)?i(353)+s+i(327)+o+i(343):i(330)+s+"\n"+o+i(367)}[Ga(295)](e){const t=Ga;if(/^anthropic\.claude/[t(369)](e))return t(341);if(/^ai21\.j2/[t(369)](e))return t(316);if(/^cohere\.command/[t(369)](e))return t(296);if(/^meta\.llama/[t(369)](e))return t(320);throw new y(v(this[t(299)][t(332)],t(333),e))}async[Ga(357)](e,t,n,r,i){const s=Ga,o={method:s(338),headers:await this[s(375)](this[s(377)],i),body:JSON[s(360)]({...e,model:t,stream:n}),signal:this[s(328)][s(361)]},a=await fetch(this[s(349)],o);n?await this[s(307)](a,t,r):await this[s(300)](a,t,r)}async[Ga(365)](e,t,n,r){const i=Ga,s=new Io(this[i(347)]),o={body:JSON[i(360)](e),contentType:i(309),accept:i(309),modelId:t};let a;if(n){const e=new Va(o);a=await s[i(304)](e,{abortSignal:this[i(328)][i(361)]}),await this[i(337)](a,t,r)}else{const e=new Wa(o);a=await s[i(304)](e,{abortSignal:this[i(328)][i(361)]}),await this[i(300)](a,t,r)}}async[Ga(337)](e,t,n){const r=Ga,i=e[r(311)],s=new TextDecoder(r(351));let o="";for await(const e of i)if(e[r(342)]){const i=s[r(315)](e[r(342)][r(336)]),a=JSON[r(324)](i);o+=this[r(303)](a,t),n(o)}return Promise[r(313)]()}async[Ga(307)](e,t,n){const r=Ga,i=e[r(311)],s=new TextDecoder(r(351)),o=i[r(358)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(355)]();if(u=e,u)break;const d=(a+s[r(315)](i))[r(298)]("\n")[r(340)](e=>{const t=r;try{return a="",JSON[t(324)](e)}catch{return a=e,null}})[r(376)](e=>null!==e);d[r(359)]&&(c+=d[r(340)](e=>this[r(303)](e,t))[r(321)](""),n(c))}return Promise[r(313)]()}async[Ga(300)](e,t,n){const r=Ga;let i;return i=e instanceof Response?await e[r(346)]():JSON[r(324)](Buffer[r(312)](e[r(311)])[r(331)](r(352))),n(this[r(303)](i,t)),Promise[r(313)]()}[Ga(303)](e,t){const n=Ga;switch(this[n(295)](t)){case n(341):return e[n(371)];case n(316):return e[n(297)][0][n(322)][n(334)];case n(296):return e[n(368)][0][n(334)];case n(320):return e[n(318)]}}}function Xa(e,t){var n=Ya();return(Xa=function(e,t){return n[e-=337]})(e,t)}function Ya(){var e=["54639FzEflg","402924MwcwAp","13384nKCoOI","7RxiBzU","10VPSmDg","701yQKHFd","2650DXNtjE","471412mzZXYx","1704VQmLUS","188264AilnzJ","2705WSVPGV","319TXzPnz","3VvuSii","13359267YgOhvt"];return(Ya=function(){return e})()}!function(e){for(var t=Xa,n=e();;)try{if(879111===-parseInt(t(338))/1*(parseInt(t(339))/2)+parseInt(t(345))/3*(parseInt(t(340))/4)+-parseInt(t(343))/5*(-parseInt(t(341))/6)+-parseInt(t(350))/7*(parseInt(t(342))/8)+parseInt(t(346))/9*(-parseInt(t(337))/10)+parseInt(t(344))/11*(-parseInt(t(348))/12)+-parseInt(t(347))/13*(-parseInt(t(349))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ya)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();