@ckeditor/ckeditor5-ai 46.1.0 → 46.1.1-alpha.1
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.
- package/build/ai.js +1 -1
- package/dist/index.js +2 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/legacyerrors.js +1 -1
- package/src/ui/aiassistantcontroller.js +2 -2
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- 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","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:()=>w,AIAssistant:()=>He,AIAssistantUI:()=>$e,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>uc,OpenAITextAdapter:()=>Je,ShowAIAssistantCommand:()=>A,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);function u(e,t){const n=p();return(u=function(e,t){return n[e-=292]})(e,t)}const d=u;!function(e){const t=u,n=e();for(;;)try{if(345122===parseInt(t(301))/1+-parseInt(t(323))/2+parseInt(t(366))/3+-parseInt(t(324))/4*(-parseInt(t(304))/5)+parseInt(t(305))/6*(parseInt(t(400))/7)+parseInt(t(331))/8+-parseInt(t(344))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(p);const l=globalThis[d(389)],h=d(293);class f extends e.Plugin{static get[d(369)](){return d(380)}static get[d(345)](){return!0}static get[d(343)](){return!0}[d(385)](){const e=d,{editor:t}=this,n=[e(346)];t[e(364)][e(330)](e(297))&&n[e(373)](e(299)),t[e(333)][e(382)](e(358))[e(315)]({model:h,view:{classes:n,priority:12}}),t[e(333)][e(382)](e(358))[e(360)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(353)][r(396)])return null;const i=n[r(300)](r(294));return n[r(309)]([r(346),r(340)],i),i}})}[d(314)](){!async function(e){const t=g([110,65,55,121,117,114,103,79,72,98,90,118,68,112,108,82,107,74,115,99,100,73,67,109,56,54,111,80,87,120,57,50,102,49,113,70,48,76,97,83,88,51,78,71,119,84,77,75,52,106,86,116,89,85,66,81,105,53,122,104,101,69]),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 d(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=u;return e[t(395)](e=>String[t(359)](e))[t(354)]("")}!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([110]);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=d(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=d(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:1757462400;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=u,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(357)]);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)}[d(374)](){const e=d,t=this[e(306)][e(320)];t[e(386)](n=>{const r=e,i=t[r(377)][r(351)][r(317)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(370)][r(365)](i))n[r(313)](i,{range:e});else if(e[r(379)][r(326)]){const s=e[r(379)][r(321)](({item:e})=>!t[r(399)][r(337)](e),{boundaries:e});n[r(335)](i,{usingOperation:!1,affectsData:!1,range:n[r(342)](s,e[r(327)])})}else n[r(335)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[d(383)](){const e=d,t=this[e(306)][e(320)],n=Array[e(392)](this[e(306)][e(320)][e(370)][e(381)](h));n[e(318)]&&t[e(386)](t=>{const r=e;n[r(388)](e=>{t[r(375)](e)})})}[d(348)](e,t){const n=d,r=this[n(310)](),i=t||r[n(325)]();this[n(306)][n(320)][n(312)](i)&&this[n(306)][n(320)][n(386)](s=>{const o=n;this[o(383)](),t||this[o(350)](s,r),this[o(362)]({insertAt:i,writer:s,html:e})})}[d(329)](e){const t=d,{model:n}=this[t(306)],r=this[t(310)]();n[t(386)](()=>{const n=t,i=this[n(397)](e,r)||this[n(363)](r);this[n(348)](e,i)})}[d(310)](){const e=d,t=this[e(306)][e(320)],n=Array[e(392)](t[e(370)][e(381)](h))[e(395)](t=>t[e(368)]());return t[e(298)](n)}[d(362)]({writer:e,html:t,insertAt:n}){const r=d,{view:i}=this[r(306)][r(393)],s=this[r(306)][r(376)][r(330)](a.ClipboardPipeline),o=new l;o[r(316)](r(334),t);const u=new ClipboardEvent(r(338),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,u,{dataTransfer:new c.ViewDataTransfer(o)});e[r(328)](n);const f=(t,n)=>{const i=r;n[i(339)]&&e[i(328)](n[i(339)])};s[r(356)](r(349),f,{priority:r(308)}),i[r(377)][r(394)](r(338),h),s[r(307)](r(349),f)}[d(363)](e){const t=d,{model:n}=this[t(306)],r=Array[t(392)](e[t(322)]());return r[t(318)]?n[t(319)](r[t(372)]()):e[t(311)]()}[d(397)](e,t){const n=d,{model:r,plugins:i}=this[n(306)];if(i[n(365)](n(336))){const s=i[n(330)](n(336))[n(387)](t);if(s[n(318)]){const t=this[n(367)](e),i=this[n(292)](s,t);return r[n(332)](i,0)}}return null}[d(367)](e){const t=d,n=this[t(306)][t(376)][t(330)](t(336)),r=this[t(306)][t(355)][t(384)](e),i=Array[t(392)](r[t(347)]())[t(303)](e=>e.is(t(295),t(296)));let s=0;return i[t(388)](e=>{s+=n[t(390)](e)}),s}[d(292)](e,t){const n=d,r=this[n(306)][n(376)][n(330)](n(336)),i=r[n(398)](e),s=r[n(341)](e),o=i[n(378)]+1,a=s[n(352)],c=e[0][n(391)](n(296));for(let e=0;e<t;e++)r[n(371)](c,{at:o});return c[n(361)](o)[n(361)](a)}[d(350)](e,t){const n=d,{plugins:r}=this[n(306)],{model:i}=e;r[n(365)](n(336))&&r[n(330)](n(336))[n(387)](t)[n(318)]&&i[n(302)](t)}}function p(){const e=["span","element","table","ai.useTheme","createSelection","ck-ai-assistant-ui_theme","createUIElement","186864iRVGmy","deleteContent","filter","5uJvTeN","1248CNrrOR","editor","off","lowest","addClass","_getAISelection","getLastPosition","canEditAt","updateMarker","afterInit","markerToHighlight","setData","getRanges","length","createPositionAfter","model","getLastMatchingPosition","getSelectedBlocks","439272VctAVi","1260452vDvizY","getFirstRange","isAtEnd","end","setSelection","insertContentBelow","get","4968872zgmkPP","createPositionAt","conversion","text/html","addMarker","TableUtils","isContent","paste","resultRange","ck-fake-ai-selection_collapsed","getColumnIndexes","createRange","isPremiumPlugin","7341291SAsEUw","isOfficialPlugin","ck-fake-ai-selection","getChildren","insertContent","contentInsertion","_resetContentOfSelectedTableCells","selection","first","markerRange","join","data","once","href","editingDowncast","fromCharCode","markerToElement","getChild","_pasteHTMLUsingClipboard","_getDefaultInsertBelowPosition","config","has","29553lyaTYh","_getTableRowCountFromContent","getRange","pluginName","markers","insertRows","pop","push","showFakeVisualSelection","removeMarker","plugins","document","last","start","AIAssistantEditing","getMarkersGroup","for","hideFakeVisualSelection","parse","init","change","getSelectedTableCells","forEach","DataTransfer","getRows","findAncestor","from","editing","fire","map","isCollapsed","_prepareTableInsertBelowPosition","getRowIndexes","schema","8330MUxvCm","_createEmptyTableRows","ai-ui"];return(p=function(){return e})()}var m=g;function g(e,t){var n=y();return(g=function(e,t){return n[e-=285]})(e,t)}function y(){var e=["7680970MkpsNh","1072JjFglF","isPremiumPlugin","pluginName","name","8ASJCbZ","5847rincyr","21maoUpz","afterInit","1843830REVYEP","textAdapter","4068330jQxFuU","aiadapter-text-adapter-not-set","AIAdapter","11HdApag","AIRequestError","1ysjIJw","2979372NLHgGA","8486253qlpuWX","56394744tcvkRo","isOfficialPlugin"];return(y=function(){return e})()}!function(e){for(var t=g,n=e();;)try{if(777143===parseInt(t(302))/1*(-parseInt(t(295))/2)+parseInt(t(292))/3*(-parseInt(t(287))/4)+-parseInt(t(297))/5+parseInt(t(303))/6*(-parseInt(t(293))/7)+parseInt(t(291))/8*(-parseInt(t(304))/9)+parseInt(t(286))/10+parseInt(t(300))/11*(parseInt(t(305))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(y);class w extends e.Plugin{static get[m(289)](){return m(299)}static get[m(285)](){return!0}static get[m(288)](){return!0}[m(294)](){var e=m;if(!this[e(296)])throw new i.CKEditorError(e(298),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(290)]=t(301)}}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}}function k(e,t){const n=S();return(k=function(e,t){return n[e-=492]})(e,t)}function S(){const e=["2167hygove","7796592cmxetB","element","execute","selection","hasContent","16OLLbSv","_commandDefinitions","plugins","getFirstRange","values","editor","334cAXMII","5512XwJluh","getSelectedBlocks","model","config","refresh","205806OSrwCi","name","4142184aFhMwa","get","custom","enabledCommandsIds","includes","add","document","getItems","isEmpty","ai.aiAssistant.disabledElements","set","isEnabled","showUI","166360leOtFT","_hasContext","change:isEnabled","isCollapsed","length","4838820zfzoDJ","change:_hasContext","3058643oKaBFJ","20IqRsKo","getRanges","requiresContent","from"];return(S=function(){return e})()}const E=k;!function(e){const t=k,n=e();for(;;)try{if(550992===-parseInt(t(503))/1*(parseInt(t(504))/2)+parseInt(t(509))/3*(-parseInt(t(532))/4)+parseInt(t(529))/5+-parseInt(t(511))/6+parseInt(t(531))/7*(-parseInt(t(497))/8)+-parseInt(t(492))/9+-parseInt(t(524))/10*(-parseInt(t(536))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(S);class A extends e.Command{[E(498)];constructor(e,t){const n=E;super(e),this[n(498)]=t,this[n(521)](n(514),[]),this.on(n(530),(e,t,r)=>{const i=n;this[i(522)]&&(this[i(514)]=I(this[i(498)],r))}),this[n(521)](n(525),!1),this.on(n(526),(e,t,r)=>{const i=n;this[i(514)]=r?I(this[i(498)],this[i(525)]):[]})}[E(508)](){const e=E,t=this[e(502)][e(506)];this[e(525)]=function(t){const n=e,r=t[n(517)][n(495)];return r[n(527)]?0!==[...r[n(505)]()][n(528)]&&![...r[n(505)]()][0][n(519)]:!!t[n(496)](r[n(500)]())}(t);const n=t[e(517)][e(495)],r=this[e(502)][e(507)][e(512)](e(520));for(const t of n[e(533)]())for(const n of t[e(518)]())if(n.is(e(493))&&r[e(515)](n[e(510)]))return void(this[e(522)]=!1);this[e(522)]=!0}[E(494)](e="",t="",n=E(513)){const r=E;this[r(502)][r(499)][r(512)]($e)[r(523)](e,t,n)}}function I(e,t){const n=E,r=new Set;for(const i of e[n(501)]())(t||!1===i[n(534)])&&r[n(516)](i.id);return Array[n(535)](r)}const _=x;function x(e,t){const n=R();return(x=function(e,t){return n[e-=428]})(e,t)}function R(){const e=["length","message","```","data","stopProcessing","```html","set:currentContext","config","name","handleError","div","893246cNloJV","trim","serializeToString","_handleQuery","parseFromString","stopListening","tryAgainEvent","startProcessing","match","set","toView","body","previousLabel","previousQuery","clear","destroy","textAdapter","ELEMENT_NODE","finally","get","_domParser","text/html","editor","catch","editing","initialContext","_isH1TagSupportEnabled","document","ai.aiAssistant.preserveComments","388WHcgTQ","view","nodeType","substring","previousContext","_normalizeResponseHeadings","currentContext","from","_parseAndNormalizeContent","prompt","toModel","element","stringify","15381Zpmvro","25633690SvLTXU","markers","<h1></h1>","isProcessing","reverse","rename","11AWuFle","value","once","updateView","abort","startsWith","_sanitizationContainer","remove","54yWsLBD","custom","processor","viewToDom","reset","414FBpHLC","htmlProcessor","finishProcessing","currentResponse","175064KiZgsN","listenTo","3445505WYiTfV","_stripMarkdownSyntax","domConverter","push","mainAction","innerHTML","1279453mrFQvr","submitPrompt","_sanitizeHTML","isRendered","previousActionId","childNodes","then","_xmlSerializer","2142234iXBZbk","setContentOf","createElement","endsWith","querySelector","makeRequest","render","exec"];return(R=function(){return e})()}!function(e){const t=x,n=e();for(;;)try{if(866203===parseInt(t(467))/1+parseInt(t(448))/2+-parseInt(t(509))/3*(parseInt(t(496))/4)+-parseInt(t(434))/5+parseInt(t(524))/6*(parseInt(t(440))/7)+-parseInt(t(432))/8*(-parseInt(t(428))/9)+parseInt(t(510))/10*(-parseInt(t(516))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(R);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class M extends((0,i.ObservableMixin)()){[_(489)];[_(483)];[_(497)];[_(522)];[_(487)];[_(447)];constructor(e,t,n){const r=_;super(),this[r(489)]=e,this[r(483)]=t,this[r(522)]=document[r(450)](r(466)),this[r(487)]=new DOMParser,this[r(447)]=new XMLSerializer,this[r(497)]=n,this[r(476)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(462),(e,t,n)=>{const i=r;this[i(497)][i(517)]=this[i(442)](n)}),this[r(433)](this[r(497)],r(441),(e,t)=>{const n=r,i=this[n(502)]||this[n(492)];this[n(470)](t,i,n(525))}),this[r(433)](this[r(497)],r(473),()=>{const e=r;this[e(497)][e(505)]=this[e(479)],this[e(470)](this[e(480)],this[e(500)],this[e(444)],this[e(479)])}),this[r(433)](this[r(497)],r(460),()=>{this[r(460)]()})}[_(482)](){this[_(472)]()}async[_(519)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(497)][s(505)]=r,this[s(497)][s(438)]=i,this[s(492)]=n,t&&(this[s(497)][s(443)]?this[s(470)](t,n,e,r):this[s(497)][s(518)](s(454),()=>{this[s(470)](t,n,e,r)}))}[_(460)](){const e=_;this[e(513)]&&(this[e(513)]=!1,this[e(497)][e(430)](),this[e(483)][e(520)]())}[_(528)](){const e=_;this[e(492)]="",this[e(502)]="",this[e(431)]="",this[e(500)]="",this[e(480)]="",this[e(479)]="",this[e(444)]=void 0,this[e(497)][e(528)](),this[e(460)]()}async[_(470)](e,t,n,r){const i=_;return this[i(513)]=!0,this[i(497)][i(474)](),this[i(500)]=t,this[i(480)]=e,this[i(479)]=r||e,this[i(444)]=n,new Promise(r=>{const s=i;this[s(483)][s(453)]({query:e,context:t,onData:e=>{const t=s;this[t(431)]=e,this[t(502)]=this[t(504)](this[t(431)])},actionId:n})[s(446)](()=>{const e=s;!this[e(502)]&&this[e(431)]&&(this[e(502)]=this[e(504)](this[e(431)],!0))})[s(490)](e=>{const t=s;e instanceof b?this[t(497)][t(465)](e[t(457)]):this[t(497)][t(465)](),r()})[s(485)](()=>{this[s(460)](),r()})})}[_(504)](e,t=!1){const n=_,r=C[n(455)](e);e=r?e[n(499)](r[1][n(456)]):e[n(456)]<100&&!t?"":this[n(435)](e);const i=this[n(487)][n(471)](e,n(488));if(r){const e=Array[n(503)](i[n(478)][n(445)]);e[n(514)]();for(const t of e){if(t[n(498)]==Node[n(484)])break;t[n(523)]()}}const s=this[n(489)][n(459)][n(526)][n(477)](this[n(447)][n(469)](i[n(478)]));this[n(493)]()||this[n(501)](s);const o=this[n(489)][n(463)][n(486)](n(495)),a=this[n(489)][n(459)][n(506)](s);return o||a[n(511)][n(481)](),this[n(489)][n(459)][n(508)](a)}[_(501)](e){const t=_,n=new c.ViewUpcastWriter(this[t(489)][t(491)][t(497)][t(494)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(507))&&r[t(475)](n)&&(i[t(437)](n),"h1"==n[t(464)]&&(s=!0));if(s)for(const e of i)n[t(515)]("h"+(parseInt(e[t(464)][1])+1),e)}[_(493)](){const e=_,{data:t,editing:n}=this[e(489)],r=t[e(429)][e(477)](e(512)),i=t[e(477)](t[e(506)](r));return!!n[e(497)][e(436)][e(527)](i)[e(452)]("h1")}[_(442)](e){const t=_;return this[t(489)][t(491)][t(497)][t(436)][t(449)](this[t(522)],e),this[t(522)][t(439)]}[_(435)](e){const t=_,n=e[t(468)]();return n[t(521)](t(461))?n[t(451)](t(458))?n[t(499)](7,n[t(456)]-3):n[t(499)](7):e}}const P=T;function T(e,t){const n=O();return(T=function(e,t){return n[e-=220]})(e,t)}function O(){const e=["AI_","_createButton","tryAgainButton","8zXywwx","replace","8670WSqBrO","stopButton","ck-button-action","REPLACE","insert","1562671hqCQjQ","mainAction","129aiFIQQ","bindTemplate","insertButton","ck-ai-form__toolbar","1236qXFwhL","bind","locale","111924YaBhIP","addMany","1423056MRrtTA","items","470526ilyUcN","Try again","replaceButton","Stop","ck-hidden","toUpperCase","_CONTENT","Insert below","isVisible","label","set","470xKCGft","4405IcSLxh","1856911EzXmxn","extendTemplate"];return(O=function(){return e})()}!function(e){const t=T,n=e();for(;;)try{if(296839===parseInt(t(242))/1+parseInt(t(224))/2*(parseInt(t(231))/3)+-parseInt(t(240))/4+parseInt(t(254))/5*(-parseInt(t(235))/6)+-parseInt(t(255))/7*(parseInt(t(222))/8)+-parseInt(t(238))/9*(-parseInt(t(253))/10)+-parseInt(t(229))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(O);const N={REPLACE:P(223),INSERT:P(228)};class L extends s.ToolbarView{constructor(e){const t=P;super(e),this[t(252)](t(250),!1),this[t(252)](t(230),N[t(227)]),this[t(244)]=this[t(220)]("",t(226)),this[t(244)][t(236)](t(251)).to(this,t(230),n=>v(e,t(257)+n[t(247)]()+t(248))),this[t(233)]=this[t(220)](v(e,t(249))),this[t(221)]=this[t(220)](v(e,t(243))),this[t(225)]=this[t(220)](v(e,t(245)));const n=this[t(232)];this[t(256)]({attributes:{class:[t(234),n.if(t(250),t(246),e=>!e)]}}),this[t(241)][t(239)]([this[t(244)],this[t(233)],this[t(221)],this[t(225)]])}[P(220)](e,t){const n=P,r=new s.ButtonView(this[n(237)]);return r[n(252)]({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-=150]})(e,t)}!function(e){const t=D,n=e();for(;;)try{if(702187===parseInt(t(173))/1*(parseInt(t(229))/2)+parseInt(t(228))/3+parseInt(t(150))/4*(parseInt(t(183))/5)+-parseInt(t(194))/6*(parseInt(t(167))/7)+-parseInt(t(225))/8+parseInt(t(156))/9*(parseInt(t(191))/10)+parseInt(t(190))/11*(parseInt(t(181))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(B);class F extends s.View{[$(154)];[$(209)];constructor(e,t=""){const n=$;super(e),this[n(178)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(235)];this[n(154)]=new U(e,t),this[n(209)]=this[n(155)](),this[n(175)]({tag:n(200),attributes:{class:["ck",n(160),r.if(n(151),n(217),e=>!e)],tabindex:"-1"},children:[{tag:n(200),attributes:{class:["ck",n(174),r.if(n(192),n(187))]},children:[this[n(154)],{tag:n(200),attributes:{class:["ck",n(161)]},children:[this[n(209)]]}]}]})}[$(157)](){const e=$;super[e(157)](),this[e(158)]&&this[e(154)][e(170)](this[e(158)]);let t=!1;this.on(e(164),(n,r,i)=>{const s=e,o=!this[s(154)][s(207)][s(234)](s(232));this[s(154)][s(170)](i),this[s(192)]&&o&&!t&&this[s(207)][s(195)]({top:this[s(207)][s(166)],behavior:s(177)})}),this.on(e(184),(n,r,i)=>{const s=e;t=!1,i?(this[s(158)]=null,this[s(154)][s(152)]()):this[s(158)]||this[s(154)][s(170)]("")}),this[e(185)](this[e(207)],e(208),()=>{t=!0}),this[e(185)](this[e(207)],e(180),()=>{t=!0})}[$(159)](){const e=$;this[e(207)][e(159)]()}[$(155)](){const e=$,n=this[e(219)],r=new s.ButtonView(this[e(219)]),i=e(201);return r[e(178)]({label:v(n,e(179)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(230)](e(151)).to(this,e(158),e=>!!e),r[e(230)](e(153)).to(this,e(192),e=>!e),r.on(e(188),()=>{const n=e;this[n(224)](this[n(154)][n(207)]),r[n(236)]=t.IconCheck,r[n(165)]=i+n(227),this[n(159)](),setTimeout(()=>{const e=n;r[e(236)]=t.IconCopy,r[e(165)]=i},1e3)}),r}[$(224)](e){const t=$,{window:n,document:r}=i.global;if(n[t(163)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(233)]],{type:t(205)}),"text/plain":new r([e[t(186)]||""],{type:t(203)})})];navigator[t(211)][t(221)](s)}else{const i=r[t(193)](t(200));i[t(212)][t(169)]=t(218),i[t(212)][t(172)]=t(215),i[t(233)]=t(220)+e[t(233)]+t(182),r[t(213)][t(214)](i);const s=r[t(223)]();s[t(198)](i[t(162)]),s[t(226)](i[t(202)]);const o=n[t(204)]();o[t(171)](),o[t(196)](s),r[t(168)](t(231)),i[t(197)]()}}}class U extends s.View{constructor(e,t=""){const n=$;super(e),this[n(216)]=this[n(189)](),this[n(175)]({tag:n(200),attributes:{class:["ck",n(206),t,n(210),n(222)]}})}[$(170)](e){const t=$;this[t(207)][t(233)]=e}[$(152)](){const e=$;this[e(207)][e(214)](this[e(216)][e(207)])}[$(189)](){const e=$,t=new s.View,n=this[e(219)],r=new s.SpinnerView;return r[e(151)]=!0,t[e(175)]({tag:e(200),attributes:{class:["ck",e(176)]},children:[r,{text:v(n,e(199))}]}),t[e(157)](),t}}function B(){const e=["loaderView","ck-hidden","absolute","locale","<span>[</span>","write","ck-ai-form__content-field","createRange","_copyHTMLToClipboard","9844224LzNNeG","setEndBefore"," ck-ai-form__copy-button--copied","116106QoynaU","1252DLOrPu","bind","copy",".ck-ai-form__loader","innerHTML","querySelector","bindTemplate","icon","28wLDnPW","isVisible","appendLoader","isEnabled","contentFieldView","_createCopyButton","554787wrjKOL","render","value","focus","ck-ai-form__content-area-wrapper","ck-ai-form__copy-button-wrapper","firstElementChild","ClipboardItem","change:value","class","scrollHeight","70QyuxuD","execCommand","position","setContent","removeAllRanges","left","394ExPPCv","ck-ai-form__content-area","setTemplate","ck-ai-form__loader","smooth","set","Copy","mousedown","744hmPrcI","<span>]</span>","23875LhgCCH","change:isProcessing","listenTo","textContent","ck-ai-form__content-area--processing","execute","_createLoader","367741DahQYH","40dwlvPT","isProcessing","createElement","423210IxzFia","scrollTo","addRange","remove","setStartAfter","AI is writing...","div","ck-ai-form__copy-button","lastElementChild","text/plain","getSelection","text/html","ck-content","element","wheel","copyButtonView","ck-reset_all-excluded","clipboard","style","body","appendChild","-9999px"];return(B=function(){return e})()}!function(e){const t=H,n=e();for(;;)try{if(708762===-parseInt(t(132))/1*(-parseInt(t(125))/2)+-parseInt(t(120))/3+parseInt(t(133))/4*(parseInt(t(115))/5)+parseInt(t(128))/6*(-parseInt(t(131))/7)+-parseInt(t(117))/8*(parseInt(t(126))/9)+parseInt(t(121))/10*(parseInt(t(129))/11)+-parseInt(t(130))/12*(-parseInt(t(127))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q);class j extends s.View{constructor(e,n=""){const r=H;super(e);const i=new s.IconView,o=this[r(118)];this[r(119)](r(123),n),i[r(116)]=t.IconError,this[r(114)]({tag:r(122),attributes:{class:["ck",r(124)]},children:[i,{text:o.to(r(123))}]})}}function H(e,t){const n=q();return(H=function(e,t){return n[e-=114]})(e,t)}function q(){const e=["12EeeDim","44ekYbCI","12IATxWk","4434927nSNSTU","1OrpJqO","856104dvLkti","setTemplate","10hyRbwj","content","1238152oHjIpo","bindTemplate","set","2731422lEobnn","2974880vRBvFY","div","text","ck-ai-form__error","320326HCiQVC","36hZJEEL","22454471xnvQEg"];return(q=function(){return e})()}const z=G;function V(){const e=["render","History","update","excludeScrollbarsAndBorders","focusLast","fieldWrapperChildren","focus","filteredView","showHistoryButtonView","target","312487ppVCJk","set","2656696QsGIdw","isOn","isEnabled","focusFirst","isVisible","4904535SEIxsv","rtl","locale","258vlldas","right","children","enter","resultsView","bind","queryView","style","window","fieldView","focusCycler","execute","submit","element","9091104KzCCuf","left","focusableChildren","minRows","56763akloyz","requestAnimationFrame","fire","submitButtonView","add","_createSubmitButton","210630rtodGD","Submit","maxRows","23844xaiSAU","ck-ai-form__submit","96NOPblx","ck-ai-form__toggle-history","_createShowHistoryButton","1030jnaKBe","value","uiLanguageDirection","isEmpty","width","keystrokes"];return(V=function(){return e})()}function G(e,t){const n=V();return(G=function(e,t){return n[e-=342]})(e,t)}!function(e){const t=G,n=e();for(;;)try{if(903326===parseInt(t(353))/1+-parseInt(t(356))/2*(parseInt(t(387))/3)+-parseInt(t(379))/4+parseInt(t(384))/5+parseInt(t(343))/6+-parseInt(t(377))/7*(-parseInt(t(358))/8)+parseInt(t(347))/9*(-parseInt(t(361))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(V);class W extends s.AutocompleteView{[z(350)];[z(375)];constructor(e,t){const n=z;super(e,t),this[n(393)][n(396)][n(346)]=1,this[n(393)][n(396)][n(355)]=3,this[n(350)]=this[n(352)](),this[n(375)]=this[n(360)](),this[n(345)][n(351)](this[n(375)],1),this[n(345)][n(351)](this[n(350)])}[z(367)](){const e=z;super[e(367)](),this[e(393)][e(372)][e(351)](this[e(375)]),this[e(389)][e(351)](this[e(350)]),this[e(366)][e(378)](e(390),(t,n)=>{const r=e;t[r(376)]==this[r(393)][r(396)][r(342)]&&(this[r(399)](),n())})}[z(352)](){const e=z,n=new s.ButtonView(this[e(386)]),r=this[e(386)];return n[e(378)]({icon:t.IconSubmit,label:v(r,e(354)),isVisible:!0,tooltip:!0,class:e(357)}),n.on(e(398),()=>{this[e(399)]()}),n[e(392)](e(381)).to(this[e(393)][e(396)],e(364),this,e(381),(e,t)=>!e&&t),n}[z(360)](){const e=z,n=new s.ButtonView(this[e(386)]),r=this[e(391)],o=this[e(386)];n[e(378)]({label:v(o,e(368)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(359)}),n[e(392)](e(380)).to(r,e(383)),n[e(392)](e(381)).to(this,e(381)),n.on(e(398),()=>{const t=e;r[t(383)]=!r[t(383)],r[t(383)]?this[t(374)][t(373)]():this[t(373)]()});const a=()=>{const t=e;i.global[t(395)][t(348)](()=>{const e=t;if((0,i.isVisible)(this[e(342)])){const t=new i.Rect(this[e(393)][e(396)][e(342)]),r=t[e(365)],s=e(385)===o[e(363)]?e(344):e(388);t[e(370)](),n[e(342)][e(394)][s]=r-t[e(365)]+1+"px"}})};return this[e(393)][e(396)].on(e(369),a),this.on(e(367),a),n}[z(399)](){const e=z,t=this[e(393)][e(396)][e(342)][e(362)];this[e(349)](e(399),t)}[z(373)](e){const t=z;-1===e?this[t(397)][t(371)]():this[t(397)][t(382)]()}}const K=J;function J(e,t){const n=Y();return(J=function(e,t){return n[e-=322]})(e,t)}function Y(){const e=["children","clearHistoryButton","add","4509700magzzA","2496416BGkakk","14433831rwgWFx","708MrbcGj","clearHistory","historyGroupView","Prompt history","locale","_createClearHistoryButton","Clear","fire","delegate","length","items","filter","277672RekatE","5619PyLTyG","label","5015442YksqXt","605201BxFMwo","14kHuDei","set","execute"];return(Y=function(){return e})()}!function(e){const t=J,n=e();for(;;)try{if(769769===parseInt(t(324))/1+-parseInt(t(334))/2*(parseInt(t(347))/3)+parseInt(t(332))/4+parseInt(t(331))/5+parseInt(t(323))/6+-parseInt(t(325))/7*(-parseInt(t(346))/8)+-parseInt(t(333))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Y);class Q extends s.ListView{[K(336)];[K(329)];constructor(e){const t=K;super(e),this[t(329)]=this[t(339)](),this[t(336)]=new s.ListItemGroupView,this[t(336)][t(328)][t(330)](this[t(329)],1),this[t(336)][t(322)]=v(e,t(337)),this[t(336)][t(344)][t(342)](t(327)).to(this),this[t(344)][t(330)](this[t(336)])}[K(345)](){const e=K;let t=0;for(const n of this[e(344)])t+=n[e(344)][e(343)];return{resultsCount:t,totalItemsCount:t}}[K(339)](){const e=K,t=this[e(338)],n=new s.ButtonView(this[e(338)]);return n[e(326)]({label:"("+v(t,e(340))+")",withText:!0}),n.on(e(327),()=>this[e(341)](e(335))),n}}const X={"&":"&","<":"<",">":">",""":'"',"'":"'"};function Z(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(Z).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>X[e]||"'")}(Z(e))}function te(e,t){const n=re();return(te=function(e,t){return n[e-=246]})(e,t)}!function(e){const t=te,n=e();for(;;)try{if(345987===-parseInt(t(258))/1*(parseInt(t(251))/2)+-parseInt(t(254))/3+-parseInt(t(253))/4+-parseInt(t(255))/5+-parseInt(t(261))/6*(parseInt(t(256))/7)+parseInt(t(249))/8*(parseInt(t(262))/9)+parseInt(t(250))/10*(parseInt(t(247))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(re);class ne extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(259)],n);this[t(246)][t(257)](r),r[t(263)]({label:e[t(248)],withText:!0}),r.on(t(252),()=>{const n=t;this[n(260)](n(252),{value:ee(e[n(248)])})})}}function re(){const e=["1547316VIIDKY","1710462CdDejV","3193245SElzAX","7faZJnM","add","2UvrNtW","locale","fire","2038098hWiuqU","20673cqhyUv","set","children","11qTbVTG","prompt","1664ihZdrj","20437580bByLVs","240232QqMRuv","execute"];return(re=function(){return e})()}function ie(){const e=["addMany","1730118xIbRlX","remove","setItem","parse","trim","_saveToSessionStorage","prompt","length","199jkZANP","487998DwQKmA","last","toLowerCase","484sDVgZL","map","1802508vmeOLl","CKEditor/AIFormView/PromptHistory","473732odyAXS","add","1366296TajDQr","_loadFromSessionStorage","getItem","250240gLrITh","stringify"];return(ie=function(){return e})()}function se(e,t){const n=ie();return(se=function(e,t){return n[e-=373]})(e,t)}const oe=se;!function(e){const t=se,n=e();for(;;)try{if(497684===parseInt(t(384))/1*(-parseInt(t(388))/2)+parseInt(t(376))/3+parseInt(t(392))/4+parseInt(t(373))/5+-parseInt(t(390))/6+-parseInt(t(385))/7+parseInt(t(394))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ie);const ae=oe(391);class ce extends i.Collection{constructor(){const e=oe;super(),this[e(395)](),this.on(e(393),(t,n)=>{const r=e,i=ue(n[r(382)]);for(const e of this)if(e!=n&&ue(e[r(382)])===i){this[r(377)](e);break}this[r(383)]>20&&this[r(377)](this[r(386)]),this[r(381)]()}),this.on(e(377),()=>{this[e(381)]()})}[oe(395)](){const e=oe,t=sessionStorage[e(396)](ae)||"[]";this[e(375)](JSON[e(379)](t))}[oe(381)](){const e=oe;sessionStorage[e(378)](ae,JSON[e(374)](this[e(389)](e=>e)))}}function ue(e){const t=oe;return e[t(387)]()[t(380)]()}const de={"&":"&","<":"<",">":">",'"':""","'":"'"};function le(e){return Z(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["submitPrompt","prompt","_focusables","769164znZCYA","locale","REPLACE","search","promptView","53919HdJmTD","4911951BbtIGV","Empty history","historyGroupView","errorView","element","insertButton","isError","keystrokes","text","setTemplate","stopProcessing","contentArea","2619071VcufcJ","items","listenTo","Ask AI to improve generated text","execute","1482864WpSPXk","delegate","isVisible","toolbar","AI_ERROR_FAILED","12pCTAkU","add","fire","focusCycler","bindTo","startProcessing","copyButtonView","reset","shift + tab","focus","insertContentBelow","264tKAhco","stopButton","_createToolbar","set","high","clearHistory","10FhCaMN","1380735JReDtF","ck-ai-form","chain","replaceButton","bind","div","focusFirst","finishProcessing","isEnabled","_createHistoryView","mainAction","Ask AI to edit or generate","createCollection","tryAgainEvent","_createPromptView","queryView","submit","ck-hidden","_promptHistory","label","render","tab","bindTemplate","isProcessing","handleError","focusTracker","clear","value","fieldView","ck-ai-form-content","focusLast","trim","20HXDxfR","tryAgainButton","63689zVnPek","replaceContent","Ask AI and your prompts will be listed here for you to use later."];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=301]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(554864===parseInt(t(385))/1*(-parseInt(t(350))/2)+parseInt(t(328))/3+-parseInt(t(333))/4*(-parseInt(t(351))/5)+-parseInt(t(305))/6+parseInt(t(323))/7+parseInt(t(344))/8*(parseInt(t(310))/9)+parseInt(t(383))/10*(-parseInt(t(311))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(376)];[he(318)];[he(322)];[he(331)];[he(309)];[he(314)];[he(304)];[he(336)];[he(369)];constructor(e,t,n=""){const r=he;super(e),this[r(347)](r(359),!0),this[r(347)](r(374),!1),this[r(347)](r(303),""),this[r(347)](r(378),""),this[r(347)](r(317),!1),this[r(347)](r(361),N[r(307)]),this[r(369)]=new ce,this[r(314)]=new j(e),this[r(322)]=new F(e,n),this[r(322)][r(355)](r(374)).to(this),this[r(322)][r(355)](r(378)).to(this),this[r(331)]=this[r(346)](),this[r(331)][r(355)](r(361)).to(this),this[r(309)]=this[r(365)](),this[r(376)]=new i.FocusTracker,this[r(318)]=new i.KeystrokeHandler,this[r(304)]=this[r(363)]([this[r(322)],this[r(322)][r(339)],this[r(331)],this[r(309)]]),this[r(336)]=new s.FocusCycler({focusables:this[r(304)],focusTracker:this[r(376)],keystrokeHandler:this[r(318)],actions:{focusPrevious:r(341),focusNext:r(372)}}),this[r(336)][r(353)](this[r(309)][r(336)]),this[r(309)][r(366)][r(379)][r(355)](r(378)).to(this,r(303));const o=this[r(373)];this[r(320)]({tag:r(356),attributes:{class:["ck",r(352),t],tabindex:"-1"},children:[{tag:r(356),attributes:{class:["ck",r(380)]},children:[{tag:r(356),attributes:{class:[o.if(r(317),r(368),e=>!e)]},children:[this[r(314)]]},this[r(322)],this[r(331)],this[r(309)]]}]})}[he(371)](){const e=he;super[e(371)](),this[e(376)][e(334)](this[e(322)][e(315)]),this[e(376)][e(334)](this[e(322)][e(339)][e(315)]),this[e(376)][e(334)](this[e(331)][e(315)]),this[e(376)][e(334)](this[e(309)][e(315)]),this[e(318)][e(325)](this[e(315)])}[he(342)](e=1){const t=he;-1===e?this[t(336)][t(381)]():this[t(336)][t(357)]()}[he(340)](){const e=he;this[e(303)]="",this[e(378)]="",this[e(317)]=!1,this[e(309)][e(340)](),this[e(322)][e(330)]=!1,this[e(331)][e(330)]=!1}[he(365)](){const e=he,t=this[e(306)],n=new W(t,{queryView:{label:v(t,e(362)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(312)),secondary:v(t,e(301))}}},filteredView:this[e(360)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(355)](e(359)).to(this,e(359),this,e(374),(e,t)=>e&&!t),this[e(325)](n,e(367),(t,n)=>{const r=e;this[r(303)]=n;const i=le(n);this[r(335)](r(302),i),n[r(382)]()&&this[r(369)][r(334)]({prompt:i},0)},{priority:e(348)}),n}[he(360)](){const e=he,t=new Q(this[e(306)]);return t[e(313)][e(324)][e(337)](this[e(369)]).as(ne),t.on(e(349),()=>{const t=e;this[t(369)][t(377)](),this[t(309)][t(308)](""),this[t(309)][t(342)]()}),t}[he(346)](){const e=he,t=new L(this[e(306)]);return t[e(354)][e(355)](e(359)).to(this,e(359),this,e(374),this,e(378),(e,t,n)=>e&&!t&&!!n),t[e(354)][e(329)](e(327)).to(this,e(386)),t[e(316)][e(355)](e(359)).to(this,e(359),this,e(374),this,e(378),(e,t,n)=>e&&!t&&!!n),t[e(316)][e(329)](e(327)).to(this,e(343)),t[e(384)][e(355)](e(359)).to(this,e(359),this,e(374),(e,t)=>e&&!t),t[e(384)][e(329)](e(327)).to(this,e(364)),t[e(345)][e(355)](e(359)).to(this,e(374)),t[e(345)][e(329)](e(327)).to(this,e(321)),t}[he(338)](){const e=he;this[e(378)]="",this[e(317)]=!1,this[e(374)]=!0,this[e(322)][e(330)]=!0,this[e(331)][e(330)]=!0,this[e(322)][e(342)]()}[he(358)](){const e=he,t=this[e(306)];this[e(374)]=!1,this[e(303)]="",this[e(309)][e(340)](),this[e(378)]&&(this[e(309)][e(366)][e(370)]=v(t,e(326)))}[he(375)](e){const t=he,n=this[t(306)];this[t(358)](),this[t(317)]=!0,this[t(314)][t(319)]=e||v(n,t(332)),this[t(378)]||(this[t(322)][t(330)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ee(),xe.insert=ke().bind(null,"head"),xe.domAPI=be(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Me=n(676),Pe={attributes:{"data-cke":!0}};Pe.setAttributes=Ee(),Pe.insert=ke().bind(null,"head"),Pe.domAPI=be(),Pe.insertStyleElement=Ie();ye()(Me.A,Pe);Me.A&&Me.A.locals&&Me.A.locals;const Te=Oe;function Oe(e,t){const n=Le();return(Oe=function(e,t){return n[e-=239]})(e,t)}!function(e){const t=Oe,n=e();for(;;)try{if(599922===parseInt(t(411))/1*(parseInt(t(242))/2)+-parseInt(t(330))/3*(-parseInt(t(355))/4)+-parseInt(t(308))/5+parseInt(t(253))/6+-parseInt(t(404))/7+parseInt(t(240))/8+-parseInt(t(349))/9*(-parseInt(t(351))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Le);const Ne=globalThis[Te(348)];function Le(){const e=["forEach","hide","bind","_getResolvedCommandsDefinitions","ai.useTheme","menuPanelClass","</p>","groupId","_populateMenuBarMenu","enabledCommandsIds","plugins","usageLimit","custom","buttonView","commands","items","isCollapsed","currentContext","aiLicenseKeyValid","_getMenuBarGroupButtons","menuView","wasMoved","values","panelView","fire","featureNotAllowed","map","showAIAssistant","init","_dialog","domainLimit","sort","polite","getSelectedBlocks","isFlat","_initView","define","aiLicenseKeyTrialLimit","document","_createAIAssistantUIButton","textAdapter","_uiCssClasses","updatePosition","AI Commands","rawHtml","replace","AIAssistant","set","config","pluginName","Error during AI content generation: %0","show","trialLimit","3469815OHIWhZ","media","model","_forceMarkersCopy","comment"," ck-ai-assistant-ui_theme","getLimitElement","editing","schema","componentFactory","trim","AI Assistant","add","reset","change:isProcessing","updateView","_licenseKeyCheckInterval","listenTo","tableOfContents","requiresContent","showUI","change:value","12THCinv","push","execute","insertContentBelow","aiLicenseKeyUsageLimit","licenseKey","body","text/html","children","<p>","ai.aiAssistant.commands","Generated content: %0","isOn","aiLicenseKeyDomainLimit","addMany","_onExecute","replaceContent","splice","DataTransfer","12222zSBNDP","render","10XyzPbX","menuitemcheckbox","INSERT","copy","248116sYKwtr","change:enabledCommandsIds","errorView","aiLicenseKeyNotAllowed","REPLACE","ai-commands-config-order-collision","aiLicenseKeyInvalid","requires","selection","isEnabled","aiLicenseKeyEvaluationLimit","from","getSelectedElement","order","_commandDefinitions","contentArea","_initAriaAiStatusChangeAnnouncements","ck-ai-commands-dropdown ","change","delegate","invalid","fieldView","ck-ai-assistant-button ","text","_aiAssistantController","_aiAdapter","length","aiCommands","AIAssistantUI","showFakeVisualSelection","filter","menuBar:aiCommands","includes","isPremiumPlugin","destroy","label","queryView","hideFakeVisualSelection","EDITOR_TOP_SIDE","once","setSelection","ck-ai-assistant-ui","AI is writing","expired","aiLicenseKeyExpired","_showLicenseError","menuBar:aiAssistant","getRanges","prompt","7966168HvKOOl","source","locale","groupLabel","evaluationLimit","get","promptView","1102642LDnZov","ai.aiAssistant.contentAreaCssClass","change:isError","_formView","hideUI","784280EpcwIc","announce","2NeEPFJ","command:","insertContent","view","ai.aiAssistant.disabledElements","update","buttons","focus","aiAssistant","getData","editor","5890548MpBKSt","isOfficialPlugin"];return(Le=function(){return e})()}class $e extends e.Plugin{[Te(335)];[Te(324)];[Te(284)];[Te(414)];[Te(380)];[Te(379)];[Te(296)]="";static get[Te(304)](){return Te(383)}static get[Te(254)](){return!0}static get[Te(388)](){return!0}static get[Te(362)](){return[a.ClipboardMarkersUtils,f,w,s.Dialog]}constructor(e){const t=Te;super(e),e[t(303)][t(291)](t(246),[t(309),t(299),t(326)]),e[t(303)][t(291)](t(412),""),e[t(303)][t(291)](t(259),!0),this[t(296)]=t(396)+(e[t(303)][t(409)](t(259))?t(313):"")}[Te(283)](){const e=Te,{editor:n}=this;this[e(380)]=n[e(265)][e(409)](w),this[e(284)]=n[e(265)][e(409)](s.Dialog),this[e(414)]=null,this[e(369)]=this[e(258)]();const r=new A(n,Array[e(366)](this[e(369)][e(277)]()));n[e(269)][e(320)](e(282),r),n.ui[e(317)][e(320)](e(382),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(302)]({class:a(372)+this[a(296)]}),c[a(268)][a(302)]({label:v(i,a(298)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(332),e=>this[a(345)](e[a(405)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(245)][a(336)],function(e){const t=a,n=o(e[t(303)][t(409)](t(340)),e[t(406)]),r=Fe(e,n)[t(385)](e=>e[t(269)][t(381)]);return 1===r[t(381)]?Fe(e,r[0][t(269)])[t(281)](e=>({id:e.id,label:e[t(390)]})):r[t(281)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Fe(e,o)[r(281)](e=>({id:e.id,label:e[r(390)]}))}})}(n),{ariaLabel:v(i,a(298))}),c[a(275)][a(260)]=a(372)+this[a(296)],r.on(a(356),u),c[a(275)][a(394)](a(350),u),c;function u(){const e=a;c[e(364)]=r[e(264)][e(381)]>0;for(const t of c[e(275)][e(248)])t[e(364)]=r[e(264)][e(387)](t.id)}}),n.ui[e(317)][e(320)](e(386),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(268)][a(302)]({label:v(i,a(298)),icon:t.IconMagicWand}),c[a(257)](a(364)).to(r,a(264),e=>e[a(381)]>0);const u=o(n[a(303)][a(409)](a(340)),i);return this[a(263)](r,c,u,e=>this[a(345)](e)),c}),n.ui[e(317)][e(320)](e(250),()=>{const t=e,n=this[t(294)](s.ButtonView);return n[t(302)]({tooltip:!0,class:t(377)+this[t(296)]}),n}),n.ui[e(317)][e(320)](e(401),()=>{const t=e,n=this[t(294)](s.MenuBarMenuListItemButtonView);return n[t(302)]({role:t(352)}),n}),this[e(335)]=this[e(252)][e(303)][e(409)](e(335));const i=this[e(252)];this[e(324)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(273)==s||t(361)==s||t(399)==s||t(343)==s||t(358)==s||t(365)==s||t(292)==s||t(334)==s){delete i[r],n=s,clearInterval(this[t(324)]),this[t(324)]=void 0;break}}t(361)==n&&i[t(400)](t(375)),t(399)==n&&i[t(400)](t(398)),t(343)==n&&i[t(400)](t(285)),t(358)==n&&i[t(400)](t(280),t(301)),t(365)==n&&i[t(400)](t(408)),t(292)==n&&i[t(400)](t(307)),t(334)==n&&i[t(400)](t(266))},1e3)}[Te(389)](){const e=Te;super[e(389)](),this[e(324)]&&clearInterval(this[e(324)])}[Te(328)](e="",n="",r=Te(267)){const i=Te,o=this[i(252)],u=o[i(315)][i(245)],d=o[i(265)][i(409)](f),l=o[i(265)][i(409)](a.ClipboardMarkersUtils);d[i(384)]();const h=new Ne,p=new ClipboardEvent(i(354),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,p,{dataTransfer:m});l[i(311)](i(312),()=>{const e=i;u[e(293)][e(279)](e(354),g)}),this[i(414)]||(this[i(290)](),this[i(379)]=new M(o,this[i(380)][i(295)],this[i(414)]));let y=m[i(251)](i(337));const w=o[i(310)][i(293)][i(363)],b=Array[i(366)](w[i(402)]());1===b[i(381)]&&b[0][i(289)]&&!w[i(367)]()&&""!==y[i(300)](/ /g,"")[i(318)]()&&(y=i(339)+y+i(261)),this[i(379)][i(323)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:N[o[i(310)][i(293)][i(363)][i(271)]?i(353):i(359)]}),i(250)!==this[i(284)].id?this[i(284)][i(306)]({id:i(250),icon:t.IconRobotPencil,title:v(this[i(252)][i(406)],i(319)),content:this[i(414)],position:s.DialogViewPosition[i(393)],onShow:()=>{const e=i;this[e(414)][e(249)]()},onHide:()=>{const e=i;this[e(379)][e(321)](),d[e(392)]()}}):this[i(284)][i(245)][i(276)]||this[i(284)][i(245)][i(297)]()}[Te(239)](){const e=Te;this[e(284)][e(256)]()}[Te(258)](){const e=Te,t=new Map,n=o(this[e(252)][e(303)][e(409)](e(340)),this[e(252)][e(406)]);for(const r of n)for(const n of r[e(269)])t[e(302)](n.id,{...n,groupId:r[e(262)],groupLabel:r[e(407)]||r[e(262)]});return t}[Te(294)](e){const n=Te,r=this[n(252)],i=r[n(269)][n(409)](n(282)),s=new e(r[n(406)]);return s[n(302)]({label:v(r[n(406)],n(319)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(257)](n(364)).to(i),s[n(257)](n(342)).to(this[n(284)],"id",e=>n(250)===e),this[n(325)](s,n(332),()=>{const e=n;s[e(342)]?this[e(239)]():i[e(332)]()}),s}[Te(290)](){const e=Te,t=this[e(252)][e(265)][e(409)](f);this[e(414)]=new me(this[e(252)][e(406)],this[e(296)],this[e(252)][e(303)][e(409)](e(412))),this[e(414)].on(e(329),()=>{const t=e;this[t(284)][t(245)][t(276)]||this[t(284)][t(245)][t(297)]()}),this[e(414)][e(410)][e(391)][e(376)].on(e(247),()=>{const t=e;this[t(284)][t(245)][t(276)]||this[t(284)][t(245)][t(297)]()}),this[e(325)](this[e(414)],e(346),()=>{const n=e;t[n(244)](this[n(379)][n(272)]),this[n(239)]()}),this[e(325)](this[e(414)],e(333),()=>{const n=e;t[n(333)](this[n(379)][n(272)]),this[n(239)]()}),this[e(371)]()}[Te(371)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(252)];this[e(414)][e(370)].on(e(322),(r,i,s)=>{const o=e,a=this[o(379)][o(272)];s?n[o(241)](v(t,o(397))):a&&n[o(241)](v(t,o(341),a),{politeness:o(287),isUnsafeHTML:!0})}),this[e(414)].on(e(413),(r,i,s)=>{const o=e;if(s){const e=this[o(414)][o(357)][o(378)];n[o(241)](v(t,o(305),e))}})}[Te(345)](e){const t=Te,n=this[t(369)][t(409)](e),r=this[t(252)],s=r[t(310)][t(293)][t(363)],o=r[t(269)][t(409)](t(282)),a=r[t(265)][t(409)](f),c=("_ungrouppedCommands"!==n[t(262)]?n[t(407)]+": ":"")+n[t(390)];if(!1!==n[t(327)]&&s[t(271)]){const e=(0,i.first)(s[t(288)]())||r[t(310)][t(316)][t(314)](s);r[t(310)][t(373)](n=>{n[t(395)](e,"in")})}a[t(384)](),o[t(332)](n[t(403)],c,t(243)+e)}[Te(263)](e,t,n,r){const i=Te,o=this[i(252)],a=o[i(406)],c=new s.MenuBarMenuListView(a),u=Fe(o,n)[i(385)](e=>e[i(269)][i(381)]);1===u[i(381)]?this[i(274)]({command:e,commands:u[0][i(269)],parentMenuView:t,onExecute:r})[i(255)](e=>c[i(270)][i(320)](e)):u[i(255)](({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(274)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(268)][d(302)]({label:o||n}),h[d(374)](d(332)).to(t),f[d(270)][d(344)](p),h[d(278)][d(338)][d(320)](f),l[d(338)][d(320)](h),c[d(270)][d(320)](l)}),t[i(278)][i(338)][i(320)](c)}[Te(274)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(252)],a=o[i(406)];return Fe(o,t)[i(281)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(302)]({label:t[o(390)]}),u[o(374)](o(332)).to(n),u.on(o(332),()=>r(t.id)),u[o(257)](o(364)).to(e,o(264),e=>e[o(387)](t.id)),c[o(338)][o(320)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(368)]&&void 0===t[n(368)]?1:void 0===e[n(368)]&&void 0!==t[n(368)]?-1:void 0!==e[n(368)]&&void 0!==t[n(368)]?e[n(368)]-t[n(368)]:0}function Fe(e,t){const n=Te;t[n(286)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(368)]){if(o[n(368)]in r)throw new i.CKEditorError(n(360),e,{conflictingDefinitions:[o,r[o[n(368)]]]});r[o[n(368)]]=o,s[n(347)](o[n(368)],0,o)}else s[n(331)](o);return s}function Ue(){const e=["Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","set","Casual","Improve using direct language, using only the essential information.","Translate the content to German language.","2MXbgZx","groupId","commands","2774110MmaDxQ","726976gbvqZx","journalism","Professional","Poetic","get","isPremiumPlugin","German","makeShorter","Journalism","pluginName","10554040yuHjLO","French","confident","ai.aiAssistant.removeCommands","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","business","Rewrite this content as a journalist using engaging language to convey the importance of the information.","Translate the content to Arabic language.","Translate the content to French language.","Make longer","450495zwhaHu","translateChinese","locale","Translate the content to Hindi language.","Rewrite this content as a legal professional using valid legal terminology.","Portuguese","editOrReview","Improve this content by using descriptive language and inserting more information and more detailed explanations.","ai.aiAssistant.extraCommandGroups","AIAssistant","Business","define","professional","5149911FfZRPX","generate","Friendly","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Arabic","Legal","Summarize","Improve using friendly, comforting language, to convey understanding and empathy.","includes","push","ai.aiAssistant.commands","translateEnglish","5pJioiy","Improve using compelling, optimistic language to convey confidence in the writing.","makeLonger","improveWriting","ai.aiAssistant.preserveComments","Translate the content to Spanish language.","Make shorter","concat","requires","translateFrench","Continue","poetic","translateSpanish","Translate","Direct","changeTone","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","filter","isOfficialPlugin","config","translateHindi","2957672SeYeWD","simplifyLanguage","77aKsbeI","Edit or review","Hindi","English","friendly","continue","Improve using polished, formal, and respectful language to convey professional expertise and competence.","summarize","casual","Confident","find","Simplified Chinese","translateArabic","changeStyle","direct","forEach","translatePortuguese","Rewrite this content as a business professional with formal language.","Change style","Translate the content to English language.","legal","4768638sBXtyy","Translate the content to Simplified Chinese language.","Improve writing","Translate the content to Portuguese language.","Generate from selection","Improve using casual, informal language to convey a casual conversation with a real person.","Simplify language","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Spanish","Change tone","6RARvXH","translateGerman","translate"];return(Ue=function(){return e})()}const Be=je;function je(e,t){const n=Ue();return(je=function(e,t){return n[e-=478]})(e,t)}!function(e){const t=je,n=e();for(;;)try{if(925758===-parseInt(t(563))/1+-parseInt(t(559))/2*(parseInt(t(485))/3)+parseInt(t(518))/4*(parseInt(t(497))/5)+parseInt(t(551))/6*(-parseInt(t(541))/7)+parseInt(t(573))/8+parseInt(t(584))/9+-parseInt(t(562))/10*(-parseInt(t(520))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ue);class He extends e.Plugin{static get[Be(505)](){return[$e,f]}static get[Be(572)](){return Be(481)}static get[Be(515)](){return!0}static get[Be(568)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(516)],r=e[t(586)];n[t(483)](t(501),!0),n[t(483)](t(495),qe(r)),n[t(483)](t(480),[]),n[t(483)](t(576),[]);let i=o(n[t(567)](t(495)),r);const s=n[t(567)](t(480)),a=n[t(567)](t(576));s[t(535)](e=>{const n=t,r=i[n(530)](t=>t[n(560)]===e[n(560)]);r?r[n(561)]=r[n(561)][n(504)](e[n(561)]):i[n(494)](e)}),i=i[t(514)](e=>!a[t(493)](e[t(560)])),i[t(535)](e=>{const n=t;e[n(561)]=e[n(561)][n(514)](e=>!a[n(493)](e.id))}),n[t(555)](t(495),i)}}function qe(e){const t=Be;return[{groupId:t(478),groupLabel:v(e,t(521)),commands:[{id:t(500),label:v(e,t(543)),prompt:t(513)},{id:t(570),label:v(e,t(503)),prompt:t(554)},{id:t(499),label:v(e,t(583)),prompt:t(479)},{id:t(519),label:v(e,t(547)),prompt:t(548)}]},{groupId:t(486),groupLabel:v(e,t(545)),commands:[{id:t(527),label:v(e,t(491)),prompt:t(578)},{id:t(525),label:v(e,t(507)),prompt:t(577)}]},{groupId:t(512),groupLabel:v(e,t(550)),commands:[{id:t(484),label:v(e,t(565)),prompt:t(526)},{id:t(528),label:v(e,t(556)),prompt:t(546)},{id:t(534),label:v(e,t(511)),prompt:t(557)},{id:t(575),label:v(e,t(529)),prompt:t(498)},{id:t(524),label:v(e,t(487)),prompt:t(492)}]},{groupId:t(533),groupLabel:v(e,t(538)),commands:[{id:t(579),label:v(e,t(482)),prompt:t(537)},{id:t(540),label:v(e,t(490)),prompt:t(588)},{id:t(564),label:v(e,t(571)),prompt:t(580)},{id:t(508),label:v(e,t(566)),prompt:t(488)}]},{groupId:t(553),groupLabel:v(e,t(510)),commands:[{id:t(496),label:v(e,t(523)),prompt:t(539)},{id:t(509),label:v(e,t(549)),prompt:t(502)},{id:t(536),label:v(e,t(589)),prompt:t(544)},{id:t(552),label:v(e,t(569)),prompt:t(558)},{id:t(506),label:v(e,t(574)),prompt:t(582)},{id:t(585),label:v(e,t(531)),prompt:t(542)},{id:t(517),label:v(e,t(522)),prompt:t(587)},{id:t(532),label:v(e,t(489)),prompt:t(581)}]}]}function ze(e,t){const n=Ge();return(ze=function(e,t){return n[e-=126]})(e,t)}const Ve=ze;function Ge(){const e=["makeRequest","textAdapter","602JLIdxB","abort","6421908hBKAsj","aborted","_prepareRequestHeaders","28038HcSppI","editor","signal","AbortError","_prepareRequestParameters","assign","init","name","aitextadapter-send-request-failed","2889210QWYuwK","sendRequest","35990GRMube","1900785afCsWS","object","6064440uDFeHc","catch","locale","11xOykjp","4TxJtVR","1908fSJEkE","application/json","error","382717EIYCDc","plugins","get","reject","abortController","AI_ERROR_GET_PARAMETERS","AI_ERROR_GET_HEADERS","resolve","requires","2gByPKZ"];return(Ge=function(){return e})()}!function(e){const t=ze,n=e();for(;;)try{if(465178===-parseInt(t(131))/1*(-parseInt(t(140))/2)+-parseInt(t(160))/3*(parseInt(t(127))/4)+parseInt(t(157))/5+-parseInt(t(148))/6*(parseInt(t(143))/7)+-parseInt(t(162))/8+parseInt(t(128))/9*(parseInt(t(159))/10)+-parseInt(t(126))/11*(-parseInt(t(145))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[Ve(135)];static get[Ve(139)](){return[w]}constructor(e){const t=Ve;super(e),this[t(135)]=new AbortController}[Ve(154)](){const e=Ve;this[e(149)][e(132)][e(133)](w)[e(142)]=this}[Ve(144)](){const e=Ve;this[e(135)][e(150)][e(146)]||(this[e(135)][e(144)](),this[e(135)]=new AbortController)}async[Ve(141)](e){const t=Ve;return this[t(158)](e)[t(163)](e=>{const n=t;if(e instanceof b)return Promise[n(134)](e);if(n(151)==e[n(155)])return Promise[n(138)]();throw console[n(130)](e),new i.CKEditorError(n(156),null)})}async[Ve(147)](e,t){const n=Ve,r=this[n(149)][n(164)],i={"Content-Type":n(129)};if(n(161)==typeof e)Object[n(153)](i,e);else if(e)try{const r=await e(t);Object[n(153)](i,r)}catch{return Promise[n(134)](new b(v(r,n(137))))}return i}async[Ve(152)](e,t){const n=Ve,r=this[n(149)][n(164)];if(n(161)==typeof e)return e;try{return await e(t)}catch{return Promise[n(134)](new b(v(r,n(136))))}}}const Ke=Ye;!function(e){const t=Ye,n=e();for(;;)try{if(170189===parseInt(t(531))/1*(-parseInt(t(516))/2)+parseInt(t(499))/3*(-parseInt(t(497))/4)+parseInt(t(491))/5+parseInt(t(501))/6+parseInt(t(490))/7+parseInt(t(522))/8+parseInt(t(532))/9*(-parseInt(t(506))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qe);class Je extends We{[Ke(541)];[Ke(543)];[Ke(494)];static get[Ke(533)](){return Ke(510)}constructor(e){const t=Ke;super(e),e[t(548)][t(514)](t(498),t(544)),e[t(548)][t(512)](t(554))||e[t(548)][t(514)](t(554),{model:t(527),temperature:1,top_p:1,stream:!0}),this[t(541)]=e[t(548)][t(512)](t(498)),this[t(543)]=e[t(548)][t(512)](t(518))||{},this[t(494)]=e[t(548)][t(512)](t(554))}async[Ke(529)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(552)][i(549)],o=await this[i(507)](e,t,r),a=await this[i(524)](this[i(543)],r),c=await this[i(550)](this[i(494)],r),u={messages:o,...c},d={method:i(508),headers:a,body:JSON[i(503)](u),signal:this[i(511)][i(523)]},l=await fetch(this[i(541)],d);if(l.ok)return c[i(513)]?await this[i(488)](l,n):await this[i(547)](l,n),Promise[i(536)]();{const e=await l[i(540)]();return e[i(519)](i(551))?Promise[i(517)](new b(v(s,i(496)))):e[i(519)](i(526))?Promise[i(517)](new b(v(s,i(528)))):Promise[i(517)](new Error(e))}}async[Ke(507)](e,t,n){const r=Ke;let i,s;return t?(i=r(515),s=r(492)+e+r(537)+t):(i=r(535),s=e),[{role:r(493),content:i},{role:r(502),content:s}]}async[Ke(488)](e,t){const n=Ke,r=e[n(553)][n(538)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(546)](),d=s+i[n(495)](u);let l="";c=e;try{l=this[n(500)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(525)](o)||o&&(a+=o,o="",t(a))}return Promise[n(536)]()}async[Ke(547)](e,t){const n=Ke;return t((await e[n(504)]())[n(556)][0][n(520)][n(509)]),Promise[n(536)]()}[Ke(525)](e){const t=Ke,n=e[t(557)]("<")[t(545)]!==e[t(557)](">")[t(545)],r=e[t(545)]<30;return n&&r}[Ke(500)](e){const t=Ke;return e[t(557)](/\n(?![^{]*\})/g)[t(505)](e=>e[t(539)](t(534),""))[t(542)](e=>e&&e[t(545)]>0&&t(489)!==e)[t(505)](e=>{const n=t,{choices:r}=JSON[n(530)](e);if(r[0]?.[n(521)]?.[n(509)])return r[0][n(521)][n(509)]})[t(542)](e=>e)[t(555)]("")}}function Ye(e,t){const n=Qe();return(Ye=function(e,t){return n[e-=488]})(e,t)}function Qe(){const e=["_readStreamableResponse","[DONE]","2156581fGsUcY","203645fcpxrY","Instruction:\n","system","_requestParameters","decode","AI_ERROR_CONTEXT_LENGTH","4sWylRw","ai.openAI.apiUrl","554961AtNPEL","_cleanUpData","352236SnnpeY","user","stringify","json","map","10mqrRpT","prepareMessages","POST","content","OpenAITextAdapter","abortController","get","stream","define","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.","570938LbcDPH","reject","ai.openAI.requestHeaders","includes","message","delta","2186120WBlvzc","signal","_prepareRequestHeaders","_isBufferIncomplete","Moderation","gpt-4o","AI_ERROR_MODERATION","sendRequest","parse","1AqVIAW","361242EABQZN","pluginName","data: ","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.","resolve","\nYou must keep the text formatting.\n\nContent:\n","getReader","replace","text","_apiUrl","filter","_requestHeaders","https://api.openai.com/v1/chat/completions","length","read","_readStaticResponse","config","locale","_prepareRequestParameters","context_length_exceeded","editor","body","ai.openAI.requestParameters","join","choices","split"];return(Qe=function(){return e})()}class Xe{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 Xe({...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 Xe.clone(this)}}const Ze={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},et=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!Xe.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),Ze)}}),tt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},nt="X-Amzn-Trace-Id",rt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},it=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!Xe.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===nt.toLowerCase())??nt;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[nt]=o),t({...n,request:r})})(e),rt)}}),st=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const ot={},at=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ct=(e,t=!1)=>{if(!t)return at.test(e);const n=e.split(".");for(const e of n)if(!ct(e))return!1;return!0},ut=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}$"),dt=e=>ut.test(e)||e.startsWith("[")&&e.endsWith("]"),lt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!lt(t))return!1;return!0}return!!ct(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!dt(e)))};let ht=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),ft="";const pt={isVirtualHostableS3Bucket:lt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=ht;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function mt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}ot.aws=pt;const gt=/\d{12}\.ddb/;const yt="user-agent",wt="x-amz-user-agent",bt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const kt=e=>(t,n)=>async r=>{const{request:i}=r;if(!Xe.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(St)||[],a=(await e.defaultUserAgentProvider()).map(St);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&mt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?mt(e,"RETRY_MODE_ADAPTIVE","F"):mt(e,"RETRY_MODE_STANDARD","E"):mt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(gt)&&mt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":mt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":mt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":mt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&mt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))mt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(St)||[],d=await e.userAgentAppId();d&&a.push(St([`app/${d}`]));const l=(ft?[ft]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[wt]=s[wt]?`${s[yt]} ${h}`:h),s[yt]=l):s[wt]=l,t({...r,request:i})},St=e=>{const t=e[0].split("/").map(e=>e.replace(bt,"-")).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}`}},"")},Et={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},At=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),It=e=>At(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,_t="__smithy_context",xt=e=>e[_t]||(e[_t]={});const Rt=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=xt(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)},Ct={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class Mt{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 Pt=e=>e=>{throw e},Tt=(e,t)=>{},Ot={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Nt=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!Xe.isInstance(n.request))return e(n);const r=xt(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||Pt)(i));return(o.successHandler||Tt)(a.response,i),a},Ot)}}),Lt="content-length";const $t={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Dt=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(Xe.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(Lt))try{const t=n(e);r.headers={...r.headers,[Lt]:String(t)}}catch(e){}}return e({...t,request:r})}),$t)}}),Ft=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Ut=async e=>{};const Bt=e=>{if("string"==typeof e)return Bt(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}},jt=e=>"object"==typeof e?"url"in e?Bt(e.url):e:Bt(e);var Ht;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Ht||(Ht={}));const qt=Ht.STANDARD,zt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Vt=["TimeoutError","RequestTimeout","RequestTimeoutException"],Gt=[500,502,503,504],Wt=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Kt=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Jt=e=>429===e.$metadata?.httpStatusCode||zt.includes(e.name)||1==e.$retryable?.throttling,Yt=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Vt.includes(e.name)||Wt.includes(e?.code||"")||Kt.includes(e?.code||"")||Gt.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Yt(e.cause,t+1);class Qt{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=>Qt.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(),Jt(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))}}Qt.setTimeoutFn=setTimeout;const Xt=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class Zt{constructor(e){this.maxAttempts=e,this.mode=Ht.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Xt({retryDelay:100,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:100);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,Xt({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 en{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Ht.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Qt,this.standardRetryStrategy=new Zt(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)}}class tn{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}}class nn{trace(){}debug(){}info(){}warn(){}error(){}}const rn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let sn;const on=new Uint8Array(16);function an(){if(!sn&&(sn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!sn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return sn(on)}const cn=[];for(let e=0;e<256;++e)cn.push((e+256).toString(16).slice(1));function un(e,t=0){return cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]}const dn=function(e,t,n){if(rn.randomUUID&&!t&&!e)return rn.randomUUID();const r=(e=e||{}).random||(e.rng||an)();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 un(r)},ln=e=>e?.body instanceof ReadableStream,hn=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}`),fn=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,pn=e=>{const t={error:e,errorType:mn(e)},n=wn(e.$response);return n&&(t.retryAfterHint=n),t},mn=e=>Jt(e)?"THROTTLING":Yt(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Yt(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",gn={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},yn=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!fn(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=Xe.isInstance(u);for(d&&(u.headers["amz-sdk-invocation-id"]=dn());;)try{d&&(u.headers["amz-sdk-request"]=`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=pn(t);if(o=hn(t),d&&ln(u))throw(n.logger instanceof nn?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),gn)}}),wn=e=>{if(!tn.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)},bn=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},vn=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,kn=()=>{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 bn(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of bn(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 ${vn(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)=>Sn[t.step]-Sn[e.step]||En[t.priority||"normal"]-En[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=bn(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${vn(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(`"${vn(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${vn(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=bn(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${vn(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(`"${vn(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${vn(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(kn()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=bn(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 bn(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=bn(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(kn());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 vn(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},Sn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},En={high:3,normal:2,low:1};class An{constructor(e){this.config=e,this.middlewareStack=kn()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const In=(_n=3e5,e=>xn(e)&&e.expiration.getTime()-Date.now()<_n);var _n;const xn=e=>void 0!==e.expiration,Rn={},Cn={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Rn[e]=t,Cn[t]=e}function Mn(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 Cn))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Cn[r]}return t}function Pn(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Rn[e[n]];return t}const Tn=e=>(new TextEncoder).encode(e),On=e=>"string"==typeof e?Tn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Nn="X-Amz-Date",Ln="X-Amz-Signature",$n="X-Amz-Security-Token",Dn="authorization",Fn=Nn.toLowerCase(),Un=[Dn,Fn,"date"],Bn=Ln.toLowerCase(),jn="x-amz-content-sha256",Hn=$n.toLowerCase(),qn={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},zn=/^proxy-/,Vn=/^sec-/,Gn="AWS4-HMAC-SHA256",Wn="AWS4-HMAC-SHA256-PAYLOAD",Kn="aws4_request",Jn={},Yn=[],Qn=(e,t,n)=>`${e}/${t}/${n}/${Kn}`,Xn=(e,t,n)=>{const r=new e(t);return r.update(On(n)),r.digest()},Zn=({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 qn||t?.has(s)||zn.test(s)||Vn.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},er=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===jn)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(On(t)),Pn(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class tr{format(e){const t=[];for(const n of Object.keys(e)){const r=Tn(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=Tn(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(ir.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!rr.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Mn(e.value.replace(/\-/g,"")),1),d}}}var nr;!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"}(nr||(nr={}));const rr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ir{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&&sr(t),new ir(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&sr(e),parseInt(Pn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function sr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const or=e=>{e=Xe.clone(e);for(const t of Object.keys(e.headers))Un.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ar=e=>encodeURIComponent(e).replace(/[!'()*]/g,cr),cr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ur=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class dr{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=Ft(n),this.credentialProvider=Ft(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Bn)continue;const i=ar(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${ar(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${ar(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(On(n));return`${r}\n${e}\n${t}\n${Pn(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ar(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,ur(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class lr extends dr{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s}),this.headerFormatter=new tr}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Qn(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=Xe.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}})(or(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[$n]=d.sessionToken),m.query["X-Amz-Algorithm"]=Gn,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[Nn]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Zn(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[Ln]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await er(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Qn(a,o,s??this.service),d=await er({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Pn(await l.digest()),f=[Wn,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(On(e)),Pn(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=or(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Qn(d,a,s??this.service);c.headers[Fn]=u,o.sessionToken&&(c.headers[Hn]=o.sessionToken);const h=await er(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(jn,c.headers)&&this.applyChecksum&&(c.headers[jn]=h);const f=Zn(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[Dn]=`${Gn} Credential=${o.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Gn),s=new this.sha256(await n);return s.update(On(i)),Pn(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Pn(await Xn(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Jn)return Jn[s];for(Yn.push(s);Yn.length>50;)delete Jn[Yn.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,Kn])o=await Xn(e,o,t);return Jn[s]=o})(this.sha256,e,n,t,r||this.service)}}const hr=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,In,xn):n?st(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?st(e.signer):e.regionInfoProvider?()=>st(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||lr)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await st(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||lr)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const fr=async(e,t,n)=>({operation:xt(t).operation,region:await Ft(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const pr=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},mr={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},gr="3.823.0";var yr="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function wr(e){return e instanceof Uint8Array?e:"string"==typeof e?yr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function br(e){return"string"==typeof e?0===e.length:0===e.byteLength}var vr={name:"SHA-256"},kr={name:"HMAC",hash:vr},Sr=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 Er={};function Ar(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Er}var Ir=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!br(e)){var t=wr(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 Ar().crypto.subtle.sign(kr,t,e.toHash).then(function(e){return new Uint8Array(e)})}):br(this.toHash)?Promise.resolve(Sr):Promise.resolve().then(function(){return Ar().crypto.subtle.digest(vr,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){Ar().crypto.subtle.importKey("raw",wr(e.secret),kr,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function _r(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 xr(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 Rr(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 Cr=64,Mr=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]),Pr=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Tr=Math.pow(2,53)-1,Or=function(){function e(){this.state=Int32Array.from(Pr),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>Tr)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Cr&&(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%Cr>=56){for(var r=this.bufferLength;r<Cr;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<Cr;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+(Mr[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}(),Nr=function(){function e(e){this.secret=e,this.hash=new Or,this.reset()}return e.prototype.update=function(e){if(!br(e)&&!this.error)try{this.hash.update(wr(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 _r(this,void 0,void 0,function(){return xr(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Or,this.secret){this.outer=new Or;var e=function(e){var t=wr(e);if(t.byteLength>Cr){var n=new Or;n.update(t),t=n.digest()}var r=new Uint8Array(Cr);return r.set(t),r}(this.secret),t=new Uint8Array(Cr);t.set(e);for(var n=0;n<Cr;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 Lr=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function $r(e){return e&&Lr.every(function(t){return"function"==typeof e[t]})}var Dr=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)&&$r(e.crypto.subtle)}(Ar())?this.hash=new Nr(e):this.hash=new Ir(e)}return e.prototype.update=function(e,t){this.hash.update(wr(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),Fr=n(369),Ur=n.n(Fr);const Br=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?Ur().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};var jr;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(jr||(jr={}));!function(){function e(){this.crc32=new qr}e.prototype.update=function(e){br(e)||this.crc32.update(wr(e))},e.prototype.digest=function(){return _r(this,void 0,void 0,function(){return xr(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 qr}}();var Hr,qr=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Rr(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^zr[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}(),zr=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 Vr{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&&Gr(t),new Vr(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Gr(e),parseInt(Pn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Gr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class Wr{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(Vr.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(Mn(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:Kr,value:!0};break;case 1:t[i]={type:Kr,value:!1};break;case 2:t[i]={type:Jr,value:e.getInt8(n++)};break;case 3:t[i]={type:Yr,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:Qr,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Xr,value:new Vr(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Zr,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:ei,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:ti,value:new Date(new Vr(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:ni,value:`${Pn(o.subarray(0,4))}-${Pn(o.subarray(4,6))}-${Pn(o.subarray(6,8))}-${Pn(o.subarray(8,10))}-${Pn(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"}(Hr||(Hr={}));const Kr="boolean",Jr="byte",Yr="short",Qr="integer",Xr="long",Zr="binary",ei="string",ti="timestamp",ni="uuid",ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ii{constructor(e,t){this.headerMarshaller=new Wr(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 qr;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 qr).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 si{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 oi{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 ai{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 ci{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 ui(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 di{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new ii(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 si({messageStream:new oi({inputStream:n,decoder:this.eventStreamCodec}),deserializer:ui(t,this.utfEncoder)})}serialize(e,t){return new ai({messageStream:new ci({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class li{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new di({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=hi(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 hi=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,fi=e=>new li(e);function pi(e,t){return new Request(e,t)}function mi(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 gi={supported:void 0};class yi{static create(e){return"function"==typeof e?.handle?e:new yi(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===gi.supported&&(gi.supported=Boolean("undefined"!=typeof Request&&"keepalive"in pi("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ar(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${ar(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${ar(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),gi.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=pi(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new tn({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new tn({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),mi(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const wi={},bi=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);wi[n]=e,bi[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;wi[n]=r,bi[r]=n}for(let e=0;e<10;e++){wi[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;wi[t]=n,bi[n]=t}wi["+"]=62,bi[62]="+",wi["/"]=63,bi[63]="/";const vi=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 wi))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=wi[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)},ki=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=vi(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 Si="function"==typeof TextEncoder?new TextEncoder:null,Ei=e=>{if("string"==typeof e){if(Si)return Si.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}`)},Ai=e=>new Date(Date.now()+e),Ii=e=>tn.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,_i=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ai(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},xi=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Ri{async sign(e,t,n){if(!Xe.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=xi("context",e.context),n=xi("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=xi("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:Ai(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Ii(t.$response);if(n){const r=xi("config",e.config),i=r.systemClockOffset;r.systemClockOffset=_i(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Ii(e);if(n){const e=xi("config",t.config);e.systemClockOffset=_i(n,e.systemClockOffset)}}}function Ci(e){let t;t="string"==typeof e?Tn(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+=bi[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const Mi=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)};const Pi="endpoints";function Ti(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Ti(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Ti).join(", ")})`:JSON.stringify(e,null,2)}class Oi extends Error{constructor(e){super(e),this.name="EndpointError"}}const Ni=(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 Oi(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new Oi(`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 Oi(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e);var Li;!function(e){e.HTTP="http",e.HTTPS="https"}(Li||(Li={}));const $i={[Li.HTTP]:80,[Li.HTTPS]:443},Di={booleanEquals:(e,t)=>e===t,getAttr:Ni,isSet:e=>null!=e,isValidHostLabel:ct,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(Li).includes(c))return null;const u=dt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${$i[c]}`)||"string"==typeof e&&e.includes(`${r}:${$i[c]}`)?`:${$i[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()}`)},Fi=(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(Ni(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},Ui=(e,t,n)=>{if("string"==typeof e)return Fi(e,n);if(e.fn)return Bi(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new Oi(`'${t}': ${String(e)} is not a string, function or reference.`)},Bi=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:Ui(e,"arg",n)),i=e.split(".");return i[0]in ot&&null!=i[1]?ot[i[0]][i[1]](...r):Di[e](...r)},ji=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Oi(`'${e}' is already defined in Reference Record.`);const r=Bi(t,n);return n.logger?.debug?.(`${Pi} evaluateCondition: ${Ti(t)} = ${Ti(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Hi=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=ji(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${Pi} assign: ${i.name} := ${Ti(i.value)}`))}return{result:!0,referenceRecord:n}},qi=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=Ui(e,"Header value entry",t);if("string"!=typeof r)throw new Oi(`Header '${n}' value '${r}' is not a string`);return r})}),{}),zi=(e,t)=>{if(Array.isArray(e))return e.map(e=>zi(e,t));switch(typeof e){case"string":return Fi(e,t);case"object":if(null===e)throw new Oi(`Unexpected endpoint property: ${e}`);return Vi(e,t);case"boolean":return e;default:throw new Oi("Unexpected endpoint property type: "+typeof e)}},Vi=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:zi(r,t)}),{}),Gi=(e,t)=>{const n=Ui(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 Oi("Endpoint URL must be a string, got "+typeof n)},Wi=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${Pi} Resolving endpoint from template: ${Ti(r)}`),{...null!=u&&{headers:qi(u,o)},...null!=c&&{properties:Vi(c,o)},url:Gi(a,o)}},Ki=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(i)throw new Oi(Ui(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Ji=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Hi(n,t);if(i)return Yi(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Yi=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Wi(n,t);if(e)return e}else if("error"===n.type)Ki(n,t);else{if("tree"!==n.type)throw new Oi(`Unknown endpoint rule: ${n}`);{const e=Ji(n,t);if(e)return e}}throw new Oi("Rules evaluation failed")},Qi="required",Xi="fn",Zi="argv",es="ref",ts=!0,ns="isSet",rs="booleanEquals",is="error",ss="endpoint",os="tree",as="PartitionResult",cs={[Qi]:!1,type:"String"},us={[Qi]:!0,default:!1,type:"Boolean"},ds={[es]:"Endpoint"},ls={[Xi]:rs,[Zi]:[{[es]:"UseFIPS"},!0]},hs={[Xi]:rs,[Zi]:[{[es]:"UseDualStack"},!0]},fs={},ps={[Xi]:"getAttr",[Zi]:[{[es]:as},"supportsFIPS"]},ms={[Xi]:rs,[Zi]:[!0,{[Xi]:"getAttr",[Zi]:[{[es]:as},"supportsDualStack"]}]},gs=[ls],ys=[hs],ws=[{[es]:"Region"}],bs={version:"1.0",parameters:{Region:cs,UseDualStack:us,UseFIPS:us,Endpoint:cs},rules:[{conditions:[{[Xi]:ns,[Zi]:[ds]}],rules:[{conditions:gs,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:is},{rules:[{conditions:ys,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:is},{endpoint:{url:ds,properties:fs,headers:fs},type:ss}],type:os}],type:os},{rules:[{conditions:[{[Xi]:ns,[Zi]:ws}],rules:[{conditions:[{[Xi]:"aws.partition",[Zi]:ws,assign:as}],rules:[{conditions:[ls,hs],rules:[{conditions:[{[Xi]:rs,[Zi]:[ts,ps]},ms],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:is}],type:os},{conditions:gs,rules:[{conditions:[{[Xi]:rs,[Zi]:[ps,ts]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"FIPS is enabled but this partition does not support FIPS",type:is}],type:os},{conditions:ys,rules:[{conditions:[ms],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os},{error:"DualStack is enabled but this partition does not support DualStack",type:is}],type:os},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:fs,headers:fs},type:ss}],type:os}],type:os}],type:os},{error:"Invalid Configuration: Missing Region",type:is}],type:os}]},vs=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ks=(e,t={})=>vs.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${Pi} Initial EndpointParams: ${Ti(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 Oi(`Missing required parameter: '${e}'`);const c=Yi(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Pi} Resolved endpoint: ${Ti(c)}`),c})(bs,{endpointParams:e,logger:t.logger}));ot.aws=pt;const Ss=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{}}},Es=["in-region","cross-region","mobile","standard","legacy"],As=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?Ur().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Is=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(As()?"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 ${Es.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Ss),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??vi,base64Encoder:e?.base64Encoder??Ci,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ks,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??pr,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ri}],logger:e?.logger??new nn,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Bt,utf8Decoder:e?.utf8Decoder??Tn,utf8Encoder:e?.utf8Encoder??Mi}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ei,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Br({serviceId:r.serviceId,clientVersion:gr}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??fi,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:yi.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||qt),sha256:e?.sha256??Dr,streamCollector:e?.streamCollector??ki,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i};var _s;!function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(_s||(_s={}));const xs=e=>Object.assign((e=>{const t=[];for(const n in _s){const r=_s[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),Rs=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),xs(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class Cs extends An{config;constructor(...[e]){const t=Is(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=st(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ft(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ft(n)()===Ht.ADAPTIVE?new en(i):new Zt(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return It(t);const e=await t();return It(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!At(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>jt(await Ft(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:Ft(r??!1),useFipsEndpoint:Ft(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=Ut(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=hr(e);return Object.assign(t,{authSchemePreference:Ft(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=Rs(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(kt(l),Et)}})),this.middlewareStack.use(yn(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(et(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}},tt)}})),this.middlewareStack.use(it(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(Rt(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Ct)}}))(this.config,{httpAuthSchemeParametersProvider:fr,identityProviderConfigProvider:async e=>new Mt({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}const Ms=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],Ps={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Ts={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Os(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(tn.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:Ms(/^x-[\w-]+-request-?id$/,n),extendedRequestId:Ms(/^x-[\w-]+-id-2$/,n),cfId:Ms(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),Ps),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),Ts)}}}const Ns=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ls=/(\d+\.){3}\d+/,$s=/\.\./,Ds=e=>Ns.test(e)&&!Ls.test(e)&&!$s.test(e),Fs=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},Us=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},Bs=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 Us(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("?"))),Fs(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Ds(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},js=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Ut(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(jt(e)),n.isCustomEndpoint=!0)}const i=await Bs(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=xt(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})},Hs={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ts.name},qs=(e,t)=>({applyToStack:n=>{n.addRelativeTo(js({config:e,instructions:t}),Hs)}}),zs=e=>"function"==typeof e?e():e;class Vs{constructor(e,t=new Map){this.namespace=e,this.schemas=t}static for(e){return Vs.registries.has(e)||Vs.registries.set(e,new Vs(e)),Vs.registries.get(e)}register(e,t){const n=this.normalizeShapeId(e);Vs.for(this.getNamespace(e)).schemas.set(n,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}getBaseException(){for(const[e,t]of this.schemas.entries())if(e.startsWith("smithy.ts.sdk.synthetic.")&&e.endsWith("ServiceException"))return t}find(e){return[...this.schemas.values()].find(e)}destroy(){Vs.registries.delete(this.namespace),this.schemas.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}getNamespace(e){return this.normalizeShapeId(e).split("#")[0]}}Vs.registries=new Map;class Gs{static assign(e,t){const n=Object.assign(e,t);return Vs.for(n.namespace).register(n.name,n),n}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===this.symbol}return t}getName(){return this.namespace+"#"+this.name}}class Ws extends Gs{constructor(){super(...arguments),this.symbol=Ws.symbol}}Ws.symbol=Symbol.for("@smithy/lis");class Ks extends Gs{constructor(){super(...arguments),this.symbol=Ks.symbol}}Ks.symbol=Symbol.for("@smithy/map");const Js={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class Ys extends Gs{constructor(){super(...arguments),this.symbol=Ys.symbol}}Ys.symbol=Symbol.for("@smithy/sim");class Qs extends Gs{constructor(){super(...arguments),this.symbol=Qs.symbol}}Qs.symbol=Symbol.for("@smithy/str");class Xs{constructor(e,t){this.ref=e,this.memberName=t,this.symbol=Xs.symbol;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;Array.isArray(r);)n.push(r[1]),r=r[0],i=zs(r),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,Xs.translateTraits(t))}}else this.memberTraits=0;if(i instanceof Xs)return Object.assign(this,i),this.memberTraits=Object.assign({},i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=t??i.memberName);if(this.schema=zs(i),this.schema&&"object"==typeof this.schema?this.traits=this.schema?.traits??{}:this.traits=0,this.name=(this.schema instanceof Gs?this.schema.getName?.():void 0)??this.memberName??this.getSchemaName(),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){return Gs[Symbol.hasInstance].bind(this)(e)}static of(e){if(e instanceof Xs)return e;if(Array.isArray(e)){const[t,n]=e;if(t instanceof Xs)return Object.assign(t.getMergedTraits(),Xs.translateTraits(n)),t;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new Xs(e)}static translateTraits(e){if("object"==typeof e)return e;e|=0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>n++&1)&&(t[r]=1);return t}getSchema(){return this.schema instanceof Xs?(Object.assign(this,{schema:this.schema.getSchema()}),this.schema):this.schema instanceof Ys?zs(this.schema.schemaRef):zs(this.schema)}getName(e=!1){return!e&&this.name&&this.name.includes("#")?this.name.split("#")[1]:this.name||void 0}getMemberName(){if(!this.isMemberSchema())throw new Error(`@smithy/core/schema - non-member schema: ${this.getName(!0)}`);return this.memberName}isMemberSchema(){return this._isMemberSchema}isUnitSchema(){return"unit"===this.getSchema()}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=Js.LIST_MODIFIER&&e<Js.MAP_MODIFIER:e instanceof Ws}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=Js.MAP_MODIFIER&&e<=255:e instanceof Ks}isStructSchema(){const e=this.getSchema();return null!==e&&"object"==typeof e&&"members"in e||e instanceof Qs}isBlobSchema(){return this.getSchema()===Js.BLOB||this.getSchema()===Js.STREAMING_BLOB}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=Js.TIMESTAMP_DEFAULT&&e<=Js.TIMESTAMP_EPOCH_SECONDS}isDocumentSchema(){return this.getSchema()===Js.DOCUMENT}isStringSchema(){return this.getSchema()===Js.STRING}isBooleanSchema(){return this.getSchema()===Js.BOOLEAN}isNumericSchema(){return this.getSchema()===Js.NUMERIC}isBigIntegerSchema(){return this.getSchema()===Js.BIG_INTEGER}isBigDecimalSchema(){return this.getSchema()===Js.BIG_DECIMAL}isStreaming(){return!!this.getMergedTraits().streaming||this.getSchema()===Js.STREAMING_BLOB}isIdempotencyToken(){return"number"==typeof this.traits?!(4&~this.traits):"object"==typeof this.traits&&!!this.traits.idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Xs.translateTraits(this.memberTraits)}getOwnTraits(){return Xs.translateTraits(this.traits)}getKeySchema(){if(this.isDocumentSchema())return this.memberFrom([Js.DOCUMENT,0],"key");if(!this.isMapSchema())throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const e=this.getSchema();return"number"==typeof e?this.memberFrom([63&e,0],"key"):this.memberFrom([e.keySchema,0],"key")}getValueSchema(){const e=this.getSchema();if("number"==typeof e){if(this.isMapSchema())return this.memberFrom([63&e,0],"value");if(this.isListSchema())return this.memberFrom([63&e,0],"member")}if(e&&"object"==typeof e){if(this.isStructSchema())throw new Error(`may not getValueSchema() on structure ${this.getName(!0)}`);const t=e;if("valueSchema"in t){if(this.isMapSchema())return this.memberFrom([t.valueSchema,0],"value");if(this.isListSchema())return this.memberFrom([t.valueSchema,0],"member")}}if(this.isDocumentSchema())return this.memberFrom([Js.DOCUMENT,0],"value");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}hasMemberSchema(e){if(this.isStructSchema()){return this.getSchema().memberNames.includes(e)}return!1}getMemberSchema(e){if(this.isStructSchema()){const t=this.getSchema();if(!t.memberNames.includes(e))throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`);const n=t.memberNames.indexOf(e),r=t.memberList[n];return this.memberFrom(Array.isArray(r)?r:[r,0],e)}if(this.isDocumentSchema())return this.memberFrom([Js.DOCUMENT,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no members.`)}getMemberSchemas(){const e={};try{for(const[t,n]of this.structIterator())e[t]=n}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema();for(let t=0;t<e.memberNames.length;++t)yield[e.memberNames[t],this.memberFrom([e.memberList[t],0],e.memberNames[t])]}memberFrom(e,t){return e instanceof Xs?Object.assign(e,{memberName:t,_isMemberSchema:!0}):new Xs(e,t)}getSchemaName(){const e=this.getSchema();if("number"==typeof e){const t=63&e,n=192&e,r=Object.entries(Js).find(([,e])=>e===t)?.[0]??"Unknown";switch(n){case Js.MAP_MODIFIER:return`${r}Map`;case Js.LIST_MODIFIER:return`${r}List`;case 0:return r}}return"Unknown"}}Xs.symbol=Symbol.for("@smithy/nor");const Zs="***SensitiveInformation***";function eo(e,t){if(null==t)return t;const n=Xs.of(e);if(n.getMergedTraits().sensitive)return Zs;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Zs}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Zs}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=eo(i,e[t]));return r}return t}class to{constructor(){this.middlewareStack=kn()}static classBuilder(){return new no}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,[_t]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class no{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=void 0,this._outputFilterSensitiveLog=void 0,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends to{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(e._operationSchema?eo.bind(null,e._operationSchema.input):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(e._operationSchema?eo.bind(null,e._operationSchema.output):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const ro="***SensitiveInformation***";class io extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return io.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===io?io.isInstance(e):!!io.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const so=(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};class oo extends io{constructor(e){super(e),Object.setPrototypeOf(this,oo.prototype)}}class ao extends oo{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,ao.prototype)}}var co;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(co||(co={}));class uo extends oo{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,uo.prototype)}}class lo extends oo{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,lo.prototype)}}class ho extends oo{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,ho.prototype)}}class fo extends oo{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,fo.prototype)}}class po extends oo{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,po.prototype)}}class mo extends oo{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,mo.prototype)}}class go extends oo{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,go.prototype)}}var yo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(yo||(yo={}));var wo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(wo||(wo={}));var bo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(bo||(bo={}));var vo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(vo||(vo={}));var ko;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(ko||(ko={}));var So,Eo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(So||(So={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Eo||(Eo={}));var Ao,Io;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ao||(Ao={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Io||(Io={}));var _o;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(_o||(_o={}));var xo,Ro,Co,Mo,Po,To;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(xo||(xo={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Ro||(Ro={})),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])}(Co||(Co={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Mo||(Mo={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Po||(Po={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(To||(To={}));class Oo extends oo{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class No extends oo{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,No.prototype)}}class Lo extends oo{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,Lo.prototype)}}var $o,Do,Fo,Uo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}($o||($o={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Fo||(Fo={}));class Bo extends oo{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Bo.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])}(Uo||(Uo={}));var jo,Ho,qo;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={})),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])}(Ho||(Ho={})),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])}(qo||(qo={}));const zo=e=>({...e,...e.body&&{body:ro}}),Vo=e=>({...e,...e.body&&{body:ro}}),Go=e=>({...e,...e.body&&{body:ro}}),Wo=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}});class Ko extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?Ko.mutate(vi(e)):Ko.mutate(Tn(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Ko.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?Ci(e):Mi(e)}(this,e)}}const Jo=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ko.mutate(e);if(!e)return Ko.mutate(new Uint8Array);const n=t.streamCollector(e);return Ko.mutate(await n)},Yo=(e,t)=>((e,t)=>Jo(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{}}),Qo=async(e,t)=>{const n=await Yo(e,t);return n.message=n.message??n.Message,n};function Xo(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Zo(e,t){return new ea(e,t)}class ea{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 Xe({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=>Xo(e)).join("/"):Xo(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}}function ta(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,ra(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?ia(r,null,s,e):r[e]=s[e];return r}const na=(e,t)=>{const n={};for(const r in t)ia(n,e,t,r);return n},ra=(e,t,n)=>ta(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),ia=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=sa,o=oa,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)}},sa=e=>null!=e,oa=e=>e,aa=e=>null!=e,ca=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"]}),ua=(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}`)}}),da=e=>la(e,32),la=(e,t)=>{const n=ua(e);if(void 0!==n&&ha(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},ha=(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]}},fa=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return ma.warn(pa(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},pa=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),ma={warn:console.warn},ga=async(e,t)=>{const n=Zo(e,t),r=ta({},aa,{[Wa]:e[Ga]||"application/octet-stream",[Va]:e[Va],[rc]:e[Qa],[ec]:e[Ka],[tc]:e[Ja],[nc]:e[Ya]});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()},ya=async(e,t)=>{const n=Zo(e,t),r=ta({},aa,{[Wa]:e[Ga]||"application/octet-stream",[Xa]:e[Va],[rc]:e[Qa],[ec]:e[Ka],[tc]:e[Ja],[nc]:e[Ya]});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()},wa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return va(e,t);const n=ta({$metadata:za(e),[Ga]:[,e.headers[Wa]],[Ya]:[,e.headers[nc]]}),r=await Jo(e.body,t);return n.body=r,n},ba=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return va(e,t);const n=ta({$metadata:za(e),[Ga]:[,e.headers[Za]],[Ya]:[,e.headers[nc]]}),r=e.body;return n.body=La(r,t),n},va=async(e,t)=>{const n={...e,body:await Qo(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await Ea(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Ia(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ma(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Pa(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Oa(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Na(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await _a(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await xa(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await Ca(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Ta(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await Ra(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Aa(n,t);default:const i=n.body;return ka({output:e,parsedBody:i,errorCode:r})}},ka=(Sa=oo,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=ca(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw so(o,t)})({output:e,parsedBody:t,exceptionCtor:Sa,errorCode:n})});var Sa;const Ea=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new ao({$metadata:za(e),...n});return so(s,e.body)},Aa=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new fo({$metadata:za(e),...n});return so(s,e.body)},Ia=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new uo({$metadata:za(e),...n});return so(s,e.body)},_a=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa,originalStatusCode:da,resourceName:fa});Object.assign(n,i);const s=new Oo({$metadata:za(e),...n});return so(s,e.body)},xa=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new No({$metadata:za(e),...n});return so(s,e.body)},Ra=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa,originalMessage:fa,originalStatusCode:da});Object.assign(n,i);const s=new Bo({$metadata:za(e),...n});return so(s,e.body)},Ca=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new Lo({$metadata:za(e),...n});return so(s,e.body)},Ma=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new po({$metadata:za(e),...n});return so(s,e.body)},Pa=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new mo({$metadata:za(e),...n});return so(s,e.body)},Ta=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new go({$metadata:za(e),...n});return so(s,e.body)},Oa=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new lo({$metadata:za(e),...n});return so(s,e.body)},Na=async(e,t)=>{const n=ta({}),r=e.body,i=na(r,{message:fa});Object.assign(n,i);const s=new ho({$metadata:za(e),...n});return so(s,e.body)},La=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Ua(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await $a(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Da(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ha(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await ja(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Fa(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ba(n.serviceUnavailableException,t)}:{$unknown:e}),$a=async(e,t)=>{const n={...e,body:await Yo(e.body,t)};return Ia(n,t)},Da=async(e,t)=>{const n={...e,body:await Yo(e.body,t)};return Ra(n,t)},Fa=async(e,t)=>{const n={...e,body:await Yo(e.body,t)};return Ca(n,t)},Ua=async(e,t)=>{const n={},r=await Yo(e.body,t);return Object.assign(n,qa(r,t)),n},Ba=async(e,t)=>{const n={...e,body:await Yo(e.body,t)};return Ta(n,t)},ja=async(e,t)=>{const n={...e,body:await Yo(e.body,t)};return Oa(n,t)},Ha=async(e,t)=>{const n={...e,body:await Yo(e.body,t)};return Na(n,t)},qa=(e,t)=>na(e,{bytes:t.base64Decoder}),za=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"]}),Va="accept",Ga="contentType",Wa="content-type",Ka="guardrailIdentifier",Ja="guardrailVersion",Ya="performanceConfigLatency",Qa="trace",Xa="x-amzn-bedrock-accept",Za="x-amzn-bedrock-content-type",ec="x-amzn-bedrock-guardrailidentifier",tc="x-amzn-bedrock-guardrailversion",nc="x-amzn-bedrock-performanceconfig-latency",rc="x-amzn-bedrock-trace";class ic extends(to.classBuilder().ep(mr).m(function(e,t,n,r){return[Os(n,this.serialize,this.deserialize),qs(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(Go,Wo).ser(ya).de(ba).build()){}class sc extends(to.classBuilder().ep(mr).m(function(e,t,n,r){return[Os(n,this.serialize,this.deserialize),qs(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(zo,Vo).ser(ga).de(wa).build()){}function oc(e,t){const n=cc();return(oc=function(e,t){return n[e-=116]})(e,t)}const ac=oc;function cc(){const e=["_prepareRequestHeaders","Human:\n","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.","_processProxyRequest","decode","_bedrockClientConfig","<<SYS>>\n","json","1875325yscNNL","_processAWSRequest","AWSTextAdapter","2923218duqbcz","body","ai21.j2","read","156716GAoxCc","_readStreamableResponse","POST","application/json","_readAsyncIterableResponse","preparePrompt","signal","data","generation","312XupHei","completions","568750jDeGxg","config","abortController","parse","anthropic.claude","\nYou must keep the text formatting.\n\nContent:\n","_getGeneratedText","text","locale","cohere.command","map","stringify","resolve","meta.llama","2714704dlMmsb","get","_requestHeaders","Instruction:\n","generations","ai.aws.apiUrl","utf-8","ai.aws.bedrockClientConfig","ai.aws.requestParameters","_readStaticResponse","editor","test","completion","bytes","bedrock-2023-05-31","anthropic.claude-v2","getReader","_apiUrl","_requestParameters","getModelFamily","ai.aws.requestHeaders","64054bkdJVY","sendRequest","12ENqwxG","join","chunk","send","pluginName","\n[/INST]","split","7530696cNHDMx","\n<</SYS>>\n[INST]\n","AI_ERROR_UNSUPPORTED_MODEL","8FIwcOG","filter","length","define","_prepareRequestParameters","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.","\n\nAssistant:"];return(cc=function(){return e})()}!function(e){const t=oc,n=e();for(;;)try{if(553473===-parseInt(t(147))/1*(parseInt(t(135))/2)+parseInt(t(165))/3+parseInt(t(194))/4+-parseInt(t(162))/5*(parseInt(t(137))/6)+parseInt(t(169))/7*(-parseInt(t(178))/8)+parseInt(t(144))/9+-parseInt(t(180))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cc);class uc extends We{[ac(131)];[ac(116)];[ac(159)];[ac(132)];static get[ac(141)](){return ac(164)}constructor(e){const t=ac;super(e),e[t(181)][t(195)](t(122))||e[t(181)][t(150)](t(122),{model:t(129),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(128),stream:!0}),this[t(131)]=e[t(181)][t(195)](t(119)),this[t(159)]=e[t(181)][t(195)](t(121)),this[t(116)]=e[t(181)][t(195)](t(134)),this[t(132)]=e[t(181)][t(195)](t(122))}async[ac(136)]({query:e,context:t,onData:n,actionId:r}){const i=ac,{model:s,stream:o,...a}=await this[i(151)](this[i(132)],r),c={prompt:await this[i(174)](e,t,s,r),...a};this[i(131)]?await this[i(157)](c,s,o,n,r):await this[i(163)](c,s,o,n)}async[ac(174)](e,t,n,r){const i=ac;let s,o;return t?(s=i(156),o=i(117)+e+i(185)+t):(s=i(152),o=e),i(193)==this[i(133)](n)?i(160)+s+i(145)+o+i(142):i(155)+s+"\n"+o+i(153)}[ac(133)](e){const t=ac;if(/^anthropic\.claude/[t(125)](e))return t(184);if(/^ai21\.j2/[t(125)](e))return t(167);if(/^cohere\.command/[t(125)](e))return t(189);if(/^meta\.llama/[t(125)](e))return t(193);throw new b(v(this[t(124)][t(188)],t(146),e))}async[ac(157)](e,t,n,r,i){const s=ac,o={method:s(171),headers:await this[s(154)](this[s(116)],i),body:JSON[s(191)]({...e,model:t,stream:n}),signal:this[s(182)][s(175)]},a=await fetch(this[s(131)],o);n?await this[s(170)](a,t,r):await this[s(123)](a,t,r)}async[ac(163)](e,t,n,r){const i=ac,s=new Cs(this[i(159)]),o={body:JSON[i(191)](e),contentType:i(172),accept:i(172),modelId:t};let a;if(n){const e=new ic(o);a=await s[i(140)](e,{abortSignal:this[i(182)][i(175)]}),await this[i(173)](a,t,r)}else{const e=new sc(o);a=await s[i(140)](e,{abortSignal:this[i(182)][i(175)]}),await this[i(123)](a,t,r)}}async[ac(173)](e,t,n){const r=ac,i=e[r(166)],s=new TextDecoder(r(120));let o="";for await(const e of i)if(e[r(139)]){const i=s[r(158)](e[r(139)][r(127)]),a=JSON[r(183)](i);o+=this[r(186)](a,t),n(o)}return Promise[r(192)]()}async[ac(170)](e,t,n){const r=ac,i=e[r(166)],s=new TextDecoder(r(120)),o=i[r(130)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(168)]();if(u=e,u)break;const d=(a+s[r(158)](i))[r(143)]("\n")[r(190)](e=>{const t=r;try{return a="",JSON[t(183)](e)}catch{return a=e,null}})[r(148)](e=>null!==e);d[r(149)]&&(c+=d[r(190)](e=>this[r(186)](e,t))[r(138)](""),n(c))}return Promise[r(192)]()}async[ac(123)](e,t,n){const r=ac;let i;return i=e instanceof Response?await e[r(161)]():JSON[r(183)](new TextDecoder(r(120))[r(158)](e[r(166)])),n(this[r(186)](i,t)),Promise[r(192)]()}[ac(186)](e,t){const n=ac;switch(this[n(133)](t)){case n(184):return e[n(126)];case n(167):return e[n(179)][0][n(176)][n(187)];case n(189):return e[n(118)][0][n(187)];case n(193):return e[n(177)]}}}function dc(){var e=["7089560DeCvNR","1938trGFRo","16887OOLBuY","15186204yaBUwD","11221AZDUuf","1500266IjZbde","724LcknYU","3595505Cynosh","810106xXlDzU"];return(dc=function(){return e})()}function lc(e,t){var n=dc();return(lc=function(e,t){return n[e-=191]})(e,t)}!function(e){for(var t=lc,n=e();;)try{if(523167===-parseInt(t(193))/1+parseInt(t(199))/2+parseInt(t(196))/3*(parseInt(t(191))/4)+-parseInt(t(192))/5+-parseInt(t(195))/6*(parseInt(t(198))/7)+-parseInt(t(194))/8+parseInt(t(197))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(dc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
|
|
5
|
+
*/(()=>{var e={6:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}s.push(l)}return s}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var c=r(e,i),u=0;u<o.length;u++){var d=n(o[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}o=c}}},117:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(933),i=n.n(r),o=n(718),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=s},179:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","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},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(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(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.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(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={},o=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)}),r>0){var s=Object.keys(n),c=a.default.find(s,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(s,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(o>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(o,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(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:o.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})},237:e=>{"use strict";e.exports=CKEditor5.dll},290:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},302:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[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")},431:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(933),i=n.n(r),o=n(718),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=s},557: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)}},582:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(933),i=n.n(r),o=n(718),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=s},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},602:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var o;if(r)o="";else{o="",i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,s&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,o);else{var a=document.createTextNode(o),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},718:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&s[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")},933:e=>{"use strict";e.exports=function(e){return e[1]}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>w,AIAssistant:()=>He,AIAssistantUI:()=>Ne,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>ac,OpenAITextAdapter:()=>Xe,ShowAIAssistantCommand:()=>E,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),o=n(311);function s(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=l;function d(){const e=["getRowIndexes","getLastMatchingPosition","span","1154939YrlLzl","findAncestor","getMarkersGroup","first","init","setSelection","DataTransfer","plugins","config","get","224xGYHDb","getRange","href","AIAssistantEditing","editor","fromCharCode","ck-ai-assistant-ui_theme","schema","has","conversion","markers","_getAISelection","deleteContent","parse","join","2csOPGc","ck-fake-ai-selection","_prepareTableInsertBelowPosition","isAtEnd","text/html","change","start","isOfficialPlugin","markerRange","_getDefaultInsertBelowPosition","map","lowest","filter","resultRange","length","pop","TableUtils","createRange","editingDowncast","_resetContentOfSelectedTableCells","isCollapsed","for","push","updateMarker","getChildren","isContent","ai.useTheme","model","createUIElement","setData","contentInsertion","editing","isPremiumPlugin","element","_createEmptyTableRows","removeMarker","addClass","ai-ui","getChild","forEach","showFakeVisualSelection","941679khMokc","getColumnIndexes","1157989CmDtTg","once","createSelection","createPositionAfter","_pasteHTMLUsingClipboard","getLastPosition","insertRows","from","addMarker","getRows","insertContentBelow","off","_getTableRowCountFromContent","paste","document","selection","table","3654717TGhzJq","ck-fake-ai-selection_collapsed","3653304DVeMvZ","getSelectedTableCells","1102476cgpksq","getRanges","afterInit","getFirstRange","pluginName","markerToHighlight","createPositionAt","getSelectedBlocks","end","insertContent","last","markerToElement","4144815tRMmEd","canEditAt","hideFakeVisualSelection","data","fire"];return(d=function(){return e})()}function l(e,t){const n=d();return(l=function(e,t){return n[e-=441]})(e,t)}!function(e){const t=l,n=e();for(;;)try{if(991549===-parseInt(t(530))/1*(-parseInt(t(446))/2)+parseInt(t(506))/3+parseInt(t(510))/4+parseInt(t(522))/5+parseInt(t(508))/6+-parseInt(t(489))/7+parseInt(t(540))/8*(-parseInt(t(487))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const h=globalThis[u(536)],f=u(483);class p extends e.Plugin{static get[u(514)](){return u(543)}static get[u(453)](){return!0}static get[u(478)](){return!0}[u(534)](){const e=u,{editor:t}=this,n=[e(447)];t[e(538)][e(539)](e(472))&&n[e(468)](e(546)),t[e(549)][e(467)](e(464))[e(515)]({model:f,view:{classes:n,priority:12}}),t[e(549)][e(467)](e(464))[e(521)]({model:f,view:(t,{writer:n})=>{const r=e;if(!t[r(454)][r(466)])return null;const i=n[r(474)](r(529));return n[r(482)]([r(447),r(507)],i),i}})}[u(512)](){!async function(e){const t=g([110,65,55,121,117,114,103,79,72,98,90,118,68,112,108,82,107,74,115,99,100,73,67,109,56,54,111,80,87,120,57,50,102,49,113,70,48,76,97,83,88,51,78,71,119,84,77,75,52,106,86,116,89,85,66,81,105,53,122,104,101,69]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],o=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),s={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),o[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](d(e)):null}function d(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=l;return e[t(456)](e=>String[t(545)](e))[t(445)]("")}!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([110]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await o,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(s())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(o(),e),()=>{const e=s();return null==e?(o(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function o(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function s(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),o[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function s(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,o,s]=r;return t(i),await n(i,o,s),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](d(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),o=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),s,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,o)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1757721600;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(542)]);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(486)](){const e=u,t=this[e(544)][e(473)];t[e(451)](n=>{const r=e,i=t[r(503)][r(504)][r(511)]();let o=0;for(const e of i){const i=f+":"+o;if(t[r(441)][r(548)](i))n[r(469)](i,{range:e});else if(e[r(452)][r(449)]){const o=e[r(452)][r(528)](({item:e})=>!t[r(547)][r(471)](e),{boundaries:e});n[r(497)](i,{usingOperation:!1,affectsData:!1,range:n[r(463)](o,e[r(518)])})}else n[r(497)](i,{usingOperation:!1,affectsData:!1,range:e});o++}})}[u(524)](){const e=u,t=this[e(544)][e(473)],n=Array[e(496)](this[e(544)][e(473)][e(441)][e(532)](f));n[e(460)]&&t[e(451)](t=>{const r=e;n[r(485)](e=>{t[r(481)](e)})})}[u(519)](e,t){const n=u,r=this[n(442)](),i=t||r[n(513)]();this[n(544)][n(473)][n(523)](i)&&this[n(544)][n(473)][n(451)](o=>{const s=n;this[s(524)](),t||this[s(465)](o,r),this[s(493)]({insertAt:i,writer:o,html:e})})}[u(499)](e){const t=u,{model:n}=this[t(544)],r=this[t(442)]();n[t(451)](()=>{const n=t,i=this[n(448)](e,r)||this[n(455)](r);this[n(519)](e,i)})}[u(442)](){const e=u,t=this[e(544)][e(473)],n=Array[e(496)](t[e(441)][e(532)](f))[e(456)](t=>t[e(541)]());return t[e(491)](n)}[u(493)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(544)][r(477)],o=this[r(544)][r(537)][r(539)](a.ClipboardPipeline),s=new h;s[r(475)](r(450),t);const d=new ClipboardEvent(r(502),{clipboardData:s}),l=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(s)});e[r(535)](n);const f=(t,n)=>{const i=r;n[i(459)]&&e[i(535)](n[i(459)])};o[r(490)](r(476),f,{priority:r(457)}),i[r(503)][r(526)](r(502),l),o[r(500)](r(476),f)}[u(455)](e){const t=u,{model:n}=this[t(544)],r=Array[t(496)](e[t(517)]());return r[t(460)]?n[t(492)](r[t(461)]()):e[t(494)]()}[u(448)](e,t){const n=u,{model:r,plugins:i}=this[n(544)];if(i[n(548)](n(462))){const o=i[n(539)](n(462))[n(509)](t);if(o[n(460)]){const t=this[n(501)](e),i=this[n(480)](o,t);return r[n(516)](i,0)}}return null}[u(501)](e){const t=u,n=this[t(544)][t(537)][t(539)](t(462)),r=this[t(544)][t(525)][t(444)](e),i=Array[t(496)](r[t(470)]())[t(458)](e=>e.is(t(479),t(505)));let o=0;return i[t(485)](e=>{o+=n[t(498)](e)}),o}[u(480)](e,t){const n=u,r=this[n(544)][n(537)][n(539)](n(462)),i=r[n(527)](e),o=r[n(488)](e),s=i[n(520)]+1,a=o[n(533)],c=e[0][n(531)](n(505));for(let e=0;e<t;e++)r[n(495)](c,{at:s});return c[n(484)](s)[n(484)](a)}[u(465)](e,t){const n=u,{plugins:r}=this[n(544)],{model:i}=e;r[n(548)](n(462))&&r[n(539)](n(462))[n(509)](t)[n(460)]&&i[n(443)](t)}}var m=g;function g(e,t){var n=y();return(g=function(e,t){return n[e-=369]})(e,t)}function y(){var e=["AIRequestError","name","15118470oaXjFk","5lrAXfL","aiadapter-text-adapter-not-set","6816qeOHIl","isPremiumPlugin","114019ORMbqy","isOfficialPlugin","afterInit","AIAdapter","9ikHtMx","pluginName","textAdapter","9580824INIoUY","161pZIFun","276168ghyaxZ","6233468UYZZUh","6899046XOnaCz","1482rzJHbW"];return(y=function(){return e})()}!function(e){for(var t=g,n=e();;)try{if(985555===parseInt(t(381))/1+-parseInt(t(379))/2*(parseInt(t(373))/3)+parseInt(t(371))/4+-parseInt(t(377))/5*(-parseInt(t(372))/6)+parseInt(t(369))/7*(-parseInt(t(370))/8)+-parseInt(t(385))/9*(-parseInt(t(376))/10)+-parseInt(t(388))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(y);class w extends e.Plugin{static get[m(386)](){return m(384)}static get[m(382)](){return!0}static get[m(380)](){return!0}[m(383)](){var e=m;if(!this[e(387)])throw new i.CKEditorError(e(378),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(375)]=t(374)}}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}}function k(e,t){const n=S();return(k=function(e,t){return n[e-=355]})(e,t)}function S(){const e=["refresh","13433arfjSD","name","plugins","custom","model","enabledCommandsIds","add","getFirstRange","_commandDefinitions","change:isEnabled","hasContent","getRanges","getItems","values","isEnabled","from","config","502vqUswy","length","isEmpty","808uckGny","set","document","requiresContent","execute","223083syTELD","includes","ai.aiAssistant.disabledElements","isCollapsed","change:_hasContext","editor","element","1585686rOdkyI","get","_hasContext","selection","372624LwUrJm","showUI","967074oajJqp","15wXBjWa","8570120dHwALO","53KFUrRI","getSelectedBlocks"];return(S=function(){return e})()}const A=k;!function(e){const t=k,n=e();for(;;)try{if(164824===-parseInt(t(358))/1*(parseInt(t(378))/2)+parseInt(t(355))/3+-parseInt(t(397))/4*(-parseInt(t(356))/5)+parseInt(t(393))/6+-parseInt(t(361))/7*(-parseInt(t(381))/8)+-parseInt(t(386))/9+-parseInt(t(357))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(S);class E extends e.Command{[A(369)];constructor(e,t){const n=A;super(e),this[n(369)]=t,this[n(382)](n(366),[]),this.on(n(390),(e,t,r)=>{const i=n;this[i(375)]&&(this[i(366)]=I(this[i(369)],r))}),this[n(382)](n(395),!1),this.on(n(370),(e,t,r)=>{const i=n;this[i(366)]=r?I(this[i(369)],this[i(395)]):[]})}[A(360)](){const e=A,t=this[e(391)][e(365)];this[e(395)]=function(t){const n=e,r=t[n(383)][n(396)];return r[n(389)]?0!==[...r[n(359)]()][n(379)]&&![...r[n(359)]()][0][n(380)]:!!t[n(371)](r[n(368)]())}(t);const n=t[e(383)][e(396)],r=this[e(391)][e(377)][e(394)](e(388));for(const t of n[e(372)]())for(const n of t[e(373)]())if(n.is(e(392))&&r[e(387)](n[e(362)]))return void(this[e(375)]=!1);this[e(375)]=!0}[A(385)](e="",t="",n=A(364)){const r=A;this[r(391)][r(363)][r(394)](Ne)[r(398)](e,t,n)}}function I(e,t){const n=A,r=new Set;for(const i of e[n(374)]())(t||!1===i[n(384)])&&r[n(367)](i.id);return Array[n(376)](r)}const _=R;function x(){const e=["_parseAndNormalizeContent","finishProcessing","render","editing","value","length","exec","innerHTML","remove","body","markers","document","stopProcessing","previousLabel","toModel","createElement","name","prompt","endsWith","childNodes","_sanitizationContainer","config","textAdapter","domConverter","previousContext","set","listenTo","previousActionId","853536ytwybO","processor","toView","_isH1TagSupportEnabled","submitPrompt","rename","_domParser","serializeToString","initialContext","35biXPnl","destroy","from","updateView","isRendered","match","handleError","stringify","querySelector","_xmlSerializer","trim","14708vgXNcU","text/html","message","currentContext","substring","div","clear","reverse","tryAgainEvent","```html","setContentOf","abort","60NITshR","then","once","35VmAjTT","makeRequest","258tetuRv","previousQuery","<h1></h1>","viewToDom","13313322chZjHt","ai.aiAssistant.preserveComments","isProcessing","nodeType","htmlProcessor","custom","get","set:currentContext","```","element","_sanitizeHTML","startProcessing","_handleQuery","data","1393150xIbnJn","startsWith","143801nivhnF","ELEMENT_NODE","currentResponse","view","parseFromString","_normalizeResponseHeadings","mainAction","finally","stopListening","push","editor","reset","32626sulJwY","_stripMarkdownSyntax","6354162gMldoC","catch"];return(x=function(){return e})()}function R(e,t){const n=x();return(R=function(e,t){return n[e-=299]})(e,t)}!function(e){const t=R,n=e();for(;;)try{if(925787===parseInt(t(333))/1+-parseInt(t(345))/2*(-parseInt(t(313))/3)+parseInt(t(397))/4*(parseInt(t(311))/5)+parseInt(t(347))/6+parseInt(t(386))/7*(parseInt(t(377))/8)+-parseInt(t(317))/9+parseInt(t(308))/10*(-parseInt(t(331))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(343)];[_(371)];[_(336)];[_(369)];[_(383)];[_(395)];constructor(e,t,n){const r=_;super(),this[r(343)]=e,this[r(371)]=t,this[r(369)]=document[r(364)](r(301)),this[r(383)]=new DOMParser,this[r(395)]=new XMLSerializer,this[r(336)]=n,this[r(374)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(324),(e,t,n)=>{const i=r;this[i(336)][i(353)]=this[i(327)](n)}),this[r(375)](this[r(336)],r(381),(e,t)=>{const n=r,i=this[n(299)]||this[n(385)];this[n(329)](t,i,n(322))}),this[r(375)](this[r(336)],r(304),()=>{const e=r;this[e(336)][e(366)]=this[e(362)],this[e(329)](this[e(314)],this[e(373)],this[e(376)],this[e(362)])}),this[r(375)](this[r(336)],r(361),()=>{this[r(361)]()})}[_(387)](){this[_(341)]()}async[_(389)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const o=_;this[o(336)][o(366)]=r,this[o(336)][o(339)]=i,this[o(385)]=n,t&&(this[o(336)][o(390)]?this[o(329)](t,n,e,r):this[o(336)][o(310)](o(351),()=>{this[o(329)](t,n,e,r)}))}[_(361)](){const e=_;this[e(319)]&&(this[e(319)]=!1,this[e(336)][e(350)](),this[e(371)][e(307)]())}[_(344)](){const e=_;this[e(385)]="",this[e(299)]="",this[e(335)]="",this[e(373)]="",this[e(314)]="",this[e(362)]="",this[e(376)]=void 0,this[e(336)][e(344)](),this[e(361)]()}async[_(329)](e,t,n,r){const i=_;return this[i(319)]=!0,this[i(336)][i(328)](),this[i(373)]=t,this[i(314)]=e,this[i(362)]=r||e,this[i(376)]=n,new Promise(r=>{const o=i;this[o(371)][o(312)]({query:e,context:t,onData:e=>{const t=o;this[t(335)]=e,this[t(299)]=this[t(349)](this[t(335)])},actionId:n})[o(309)](()=>{const e=o;!this[e(299)]&&this[e(335)]&&(this[e(299)]=this[e(349)](this[e(335)],!0))})[o(348)](e=>{const t=o;e instanceof b?this[t(336)][t(392)](e[t(399)]):this[t(336)][t(392)](),r()})[o(340)](()=>{this[o(361)](),r()})})}[_(349)](e,t=!1){const n=_,r=C[n(355)](e);e=r?e[n(300)](r[1][n(354)]):e[n(354)]<100&&!t?"":this[n(346)](e);const i=this[n(383)][n(337)](e,n(398));if(r){const e=Array[n(388)](i[n(358)][n(368)]);e[n(303)]();for(const t of e){if(t[n(320)]==Node[n(334)])break;t[n(357)]()}}const o=this[n(343)][n(330)][n(378)][n(379)](this[n(395)][n(384)](i[n(358)]));this[n(380)]()||this[n(338)](o);const s=this[n(343)][n(370)][n(323)](n(318)),a=this[n(343)][n(330)][n(363)](o);return s||a[n(359)][n(302)](),this[n(343)][n(330)][n(393)](a)}[_(338)](e){const t=_,n=new c.ViewUpcastWriter(this[t(343)][t(352)][t(336)][t(360)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let o=!1;for(const n of e)n.is(t(326))&&r[t(391)](n)&&(i[t(342)](n),"h1"==n[t(365)]&&(o=!0));if(o)for(const e of i)n[t(382)]("h"+(parseInt(e[t(365)][1])+1),e)}[_(380)](){const e=_,{data:t,editing:n}=this[e(343)],r=t[e(321)][e(379)](e(315)),i=t[e(379)](t[e(363)](r));return!!n[e(336)][e(372)][e(316)](i)[e(394)]("h1")}[_(327)](e){const t=_;return this[t(343)][t(352)][t(336)][t(372)][t(306)](this[t(369)],e),this[t(369)][t(356)]}[_(346)](e){const t=_,n=e[t(396)]();return n[t(332)](t(305))?n[t(367)](t(325))?n[t(300)](7,n[t(354)]-3):n[t(300)](7):e}}const M=T;function T(e,t){const n=O();return(T=function(e,t){return n[e-=140]})(e,t)}function O(){const e=["label","861210noQtIC","2922360pUUeJL","_CONTENT","ck-ai-form__toolbar","extendTemplate","REPLACE","addMany","set","bind","replaceButton","locale","items","2UZjjAH","mainAction","6XLxbAJ","8055456vdXvBE","bindTemplate","toUpperCase","tryAgainButton","replace","Try again","_createButton","ck-button-action","isVisible","stopButton","1768015ZmHXsK","60tJbxqj","Insert below","Stop","8602965hOGGaQ","3GMJLOx","ck-hidden","3146588JrDzRO","AI_","1422091rfLsYG","insert","insertButton"];return(O=function(){return e})()}!function(e){const t=T,n=e();for(;;)try{if(524603===-parseInt(t(158))/1*(-parseInt(t(170))/2)+-parseInt(t(150))/3*(-parseInt(t(152))/4)+-parseInt(t(145))/5*(parseInt(t(172))/6)+parseInt(t(159))/7+-parseInt(t(173))/8+-parseInt(t(149))/9+-parseInt(t(146))/10*(-parseInt(t(154))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(O);const L={REPLACE:M(177),INSERT:M(155)};class $ extends o.ToolbarView{constructor(e){const t=M;super(e),this[t(165)](t(143),!1),this[t(165)](t(171),L[t(163)]),this[t(167)]=this[t(141)]("",t(142)),this[t(167)][t(166)](t(157)).to(this,t(171),n=>v(e,t(153)+n[t(175)]()+t(160))),this[t(156)]=this[t(141)](v(e,t(147))),this[t(176)]=this[t(141)](v(e,t(140))),this[t(144)]=this[t(141)](v(e,t(148)));const n=this[t(174)];this[t(162)]({attributes:{class:[t(161),n.if(t(143),t(151),e=>!e)]}}),this[t(169)][t(164)]([this[t(167)],this[t(156)],this[t(176)],this[t(144)]])}[M(141)](e,t){const n=M,r=new o.ButtonView(this[n(168)]);return r[n(165)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}function N(e,t){const n=F();return(N=function(e,t){return n[e-=254]})(e,t)}const D=N;!function(e){const t=N,n=e();for(;;)try{if(523668===parseInt(t(330))/1+parseInt(t(285))/2*(parseInt(t(331))/3)+-parseInt(t(289))/4+-parseInt(t(316))/5*(parseInt(t(254))/6)+-parseInt(t(276))/7*(-parseInt(t(257))/8)+-parseInt(t(310))/9*(parseInt(t(256))/10)+-parseInt(t(293))/11*(-parseInt(t(282))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(F);class U extends o.View{[D(301)];[D(333)];constructor(e,t=""){const n=D;super(e),this[n(259)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(288)];this[n(301)]=new B(e,t),this[n(333)]=this[n(303)](),this[n(299)]({tag:n(319),attributes:{class:["ck",n(311),r.if(n(261),n(280),e=>!e)],tabindex:"-1"},children:[{tag:n(319),attributes:{class:["ck",n(305),r.if(n(290),n(255))]},children:[this[n(301)],{tag:n(319),attributes:{class:["ck",n(295)]},children:[this[n(333)]]}]}]})}[D(313)](){const e=D;super[e(313)](),this[e(274)]&&this[e(301)][e(336)](this[e(274)]);let t=!1;this.on(e(339),(n,r,i)=>{const o=e,s=!this[o(301)][o(269)][o(284)](o(300));this[o(301)][o(336)](i),this[o(290)]&&s&&!t&&this[o(269)][o(277)]({top:this[o(269)][o(286)],behavior:o(279)})}),this.on(e(329),(n,r,i)=>{const o=e;t=!1,i?(this[o(274)]=null,this[o(301)][o(304)]()):this[o(274)]||this[o(301)][o(336)]("")}),this[e(302)](this[e(269)],e(314),()=>{t=!0}),this[e(302)](this[e(269)],e(271),()=>{t=!0})}[D(298)](){const e=D;this[e(269)][e(298)]()}[D(303)](){const e=D,n=this[e(306)],r=new o.ButtonView(this[e(306)]),i=e(283);return r[e(259)]({label:v(n,e(334)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(266)](e(261)).to(this,e(274),e=>!!e),r[e(266)](e(307)).to(this,e(290),e=>!e),r.on(e(294),()=>{const n=e;this[n(272)](this[n(301)][n(269)]),r[n(260)]=t.IconCheck,r[n(338)]=i+n(320),this[n(298)](),setTimeout(()=>{const e=n;r[e(260)]=t.IconCopy,r[e(338)]=i},1e3)}),r}[D(272)](e){const t=D,{window:n,document:r}=i.global;if(n[t(335)]){const{Blob:r,ClipboardItem:i}=n,o=[new i({"text/html":new r([e[t(312)]],{type:t(322)}),"text/plain":new r([e[t(326)]||""],{type:t(321)})})];navigator[t(262)][t(337)](o)}else{const i=r[t(318)](t(319));i[t(328)][t(340)]=t(315),i[t(328)][t(287)]=t(308),i[t(312)]=t(258)+e[t(312)]+t(267),r[t(273)][t(270)](i);const o=r[t(264)]();o[t(297)](i[t(281)]),o[t(317)](i[t(332)]);const s=n[t(324)]();s[t(296)](),s[t(278)](o),r[t(275)](t(292)),i[t(265)]()}}}function F(){const e=["wheel","absolute","1585XtenAt","setEndBefore","createElement","div"," ck-ai-form__copy-button--copied","text/plain","text/html","ck-ai-form__content-field","getSelection","AI is writing...","textContent","ck-content","style","change:isProcessing","354580QEKxif","3tfOchY","lastElementChild","copyButtonView","Copy","ClipboardItem","setContent","write","class","change:value","position","12066XlTXUp","ck-ai-form__content-area--processing","470DbiBwm","84144KyYjFS","<span>[</span>","set","icon","isVisible","clipboard","loaderView","createRange","remove","bind","<span>]</span>","_createLoader","element","appendChild","mousedown","_copyHTMLToClipboard","body","value","execCommand","77LNkQUe","scrollTo","addRange","smooth","ck-hidden","firstElementChild","6688404ctGXvJ","ck-ai-form__copy-button","querySelector","1828474ITcFYo","scrollHeight","left","bindTemplate","116600nRGKTm","isProcessing","ck-reset_all-excluded","copy","11CrJyyt","execute","ck-ai-form__copy-button-wrapper","removeAllRanges","setStartAfter","focus","setTemplate",".ck-ai-form__loader","contentFieldView","listenTo","_createCopyButton","appendLoader","ck-ai-form__content-area","locale","isEnabled","-9999px","ck-ai-form__loader","143919bKmlMR","ck-ai-form__content-area-wrapper","innerHTML","render"];return(F=function(){return e})()}class B extends o.View{constructor(e,t=""){const n=D;super(e),this[n(263)]=this[n(268)](),this[n(299)]({tag:n(319),attributes:{class:["ck",n(327),t,n(291),n(323)]}})}[D(336)](e){const t=D;this[t(269)][t(312)]=e}[D(304)](){const e=D;this[e(269)][e(270)](this[e(263)][e(269)])}[D(268)](){const e=D,t=new o.View,n=this[e(306)],r=new o.SpinnerView;return r[e(261)]=!0,t[e(299)]({tag:e(319),attributes:{class:["ck",e(309)]},children:[r,{text:v(n,e(325))}]}),t[e(313)](),t}}function j(){const e=["614298CPFSbc","259zdIGke","div","content","setTemplate","set","8665992wiZbmU","2234756JTjlCY","bindTemplate","text","2940960cDSnFM","566160mbBGJQ","96090IvRaUp","ck-ai-form__error","17274xYFNtq","50ieJPQg"];return(j=function(){return e})()}function H(e,t){const n=j();return(H=function(e,t){return n[e-=269]})(e,t)}!function(e){const t=H,n=e();for(;;)try{if(298824===-parseInt(t(274))/1*(-parseInt(t(273))/2)+parseInt(t(275))/3+parseInt(t(282))/4+parseInt(t(269))/5+-parseInt(t(271))/6*(parseInt(t(276))/7)+parseInt(t(270))/8+-parseInt(t(281))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(j);class q extends o.View{constructor(e,n=""){const r=H;super(e);const i=new o.IconView,s=this[r(283)];this[r(280)](r(284),n),i[r(278)]=t.IconError,this[r(279)]({tag:r(277),attributes:{class:["ck",r(272)]},children:[i,{text:s.to(r(284))}]})}}function z(e,t){const n=G();return(z=function(e,t){return n[e-=391]})(e,t)}const V=z;function G(){const e=["History","locale","852888mjbClI","width","maxRows","left","resultsView","focus","set","ck-ai-form__toggle-history","Submit","fieldView","rtl","fieldWrapperChildren","execute","focusableChildren","update","queryView","window","fire","value","enter","submitButtonView","element","4402836ysUvaw","add","222916eMmXAn","uiLanguageDirection","showHistoryButtonView","children","isEnabled","2489730JXcpJk","isVisible","isEmpty","ck-ai-form__submit","focusLast","_createSubmitButton","_createShowHistoryButton","filteredView","render","submit","focusCycler","394762gWURQE","focusFirst","requestAnimationFrame","right","isOn","55wCqGPZ","7xtysKg","excludeScrollbarsAndBorders","6487542LoGBMC","keystrokes","target","minRows","style","1040042DRmKdN","bind"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(724335===parseInt(t(397))/1+-parseInt(t(441))/2+parseInt(t(430))/3+-parseInt(t(425))/4*(-parseInt(t(446))/5)+parseInt(t(423))/6*(-parseInt(t(447))/7)+-parseInt(t(401))/8+-parseInt(t(392))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends o.AutocompleteView{[V(421)];[V(427)];constructor(e,t){const n=V;super(e,t),this[n(416)][n(410)][n(395)]=1,this[n(416)][n(410)][n(403)]=3,this[n(421)]=this[n(435)](),this[n(427)]=this[n(436)](),this[n(414)][n(424)](this[n(427)],1),this[n(414)][n(424)](this[n(421)])}[V(438)](){const e=V;super[e(438)](),this[e(416)][e(412)][e(424)](this[e(427)]),this[e(428)][e(424)](this[e(421)]),this[e(393)][e(407)](e(420),(t,n)=>{const r=e;t[r(394)]==this[r(416)][r(410)][r(422)]&&(this[r(439)](),n())})}[V(435)](){const e=V,n=new o.ButtonView(this[e(400)]),r=this[e(400)];return n[e(407)]({icon:t.IconSubmit,label:v(r,e(409)),isVisible:!0,tooltip:!0,class:e(433)}),n.on(e(413),()=>{this[e(439)]()}),n[e(398)](e(429)).to(this[e(416)][e(410)],e(432),this,e(429),(e,t)=>!e&&t),n}[V(436)](){const e=V,n=new o.ButtonView(this[e(400)]),r=this[e(405)],s=this[e(400)];n[e(407)]({label:v(s,e(399)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(408)}),n[e(398)](e(445)).to(r,e(431)),n[e(398)](e(429)).to(this,e(429)),n.on(e(413),()=>{const t=e;r[t(431)]=!r[t(431)],r[t(431)]?this[t(437)][t(406)]():this[t(406)]()});const a=()=>{const t=e;i.global[t(417)][t(443)](()=>{const e=t;if((0,i.isVisible)(this[e(422)])){const t=new i.Rect(this[e(416)][e(410)][e(422)]),r=t[e(402)],o=e(411)===s[e(426)]?e(404):e(444);t[e(391)](),n[e(422)][e(396)][o]=r-t[e(402)]+1+"px"}})};return this[e(416)][e(410)].on(e(415),a),this.on(e(438),a),n}[V(439)](){const e=V,t=this[e(416)][e(410)][e(422)][e(419)];this[e(418)](e(439),t)}[V(406)](e){const t=V;-1===e?this[t(440)][t(434)]():this[t(440)][t(442)]()}}const K=Q;function J(){const e=["add","items","263778lEoWxa","filter","set","execute","delegate","3520040sMNTPk","Prompt history","5hSSTEl","4477921GAcMbZ","historyGroupView","1OcPCsr","_createClearHistoryButton","20232630WIVDFA","clearHistoryButton","fire","1603638bvcQVQ","children","length","723osWhzo","14636tuelkH","label","clearHistory","Clear","1490888wbNZCu","locale"];return(J=function(){return e})()}function Q(e,t){const n=J();return(Q=function(e,t){return n[e-=103]})(e,t)}!function(e){const t=Q,n=e();for(;;)try{if(549489===-parseInt(t(128))/1*(-parseInt(t(114))/2)+parseInt(t(109))/3*(parseInt(t(110))/4)+-parseInt(t(125))/5*(-parseInt(t(118))/6)+parseInt(t(126))/7+parseInt(t(123))/8+-parseInt(t(106))/9+-parseInt(t(103))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class X extends o.ListView{[K(127)];[K(104)];constructor(e){const t=K;super(e),this[t(104)]=this[t(129)](),this[t(127)]=new o.ListItemGroupView,this[t(127)][t(107)][t(116)](this[t(104)],1),this[t(127)][t(111)]=v(e,t(124)),this[t(127)][t(117)][t(122)](t(121)).to(this),this[t(117)][t(116)](this[t(127)])}[K(119)](){const e=K;let t=0;for(const n of this[e(117)])t+=n[e(117)][e(108)];return{resultsCount:t,totalItemsCount:t}}[K(129)](){const e=K,t=this[e(115)],n=new o.ButtonView(this[e(115)]);return n[e(120)]({label:"("+v(t,e(113))+")",withText:!0}),n.on(e(121),()=>this[e(105)](e(112))),n}}const Y={"&":"&","<":"<",">":">",""":'"',"'":"'"};function Z(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(Z).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Y[e]||"'")}(Z(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=203]})(e,t)}function ne(){const e=["execute","2258730rLFjar","15RKNdfv","104mwoknT","2608636ZmopOP","children","1475652DgJIsM","fire","1907148Fgevsz","7645680oLyint","locale","prompt","104433JVVxey","set","1364714hFgFrS","add"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(995382===parseInt(t(216))/1+-parseInt(t(206))/2+-parseInt(t(204))/3*(-parseInt(t(208))/4)+parseInt(t(203))/5+-parseInt(t(210))/6+parseInt(t(214))/7*(-parseInt(t(205))/8)+-parseInt(t(211))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends o.ListItemView{constructor(e){const t=te;super();const n=new o.ButtonLabelView,r=new o.ButtonView(this[t(212)],n);this[t(207)][t(217)](r),r[t(215)]({label:e[t(213)],withText:!0}),r.on(t(218),()=>{const n=t;this[n(209)](n(218),{value:ee(e[n(213)])})})}}const ie=oe;function oe(e,t){const n=se();return(oe=function(e,t){return n[e-=269]})(e,t)}function se(){const e=["getItem","_saveToSessionStorage","5989128IXpJyh","stringify","220048JjJeuu","setItem","toLowerCase","trim","641253VPQLUE","add","map","8vPxrQQ","addMany","1422FAPIKX","prompt","5468wFNVgt","170420xZDyIN","4265513vsWYQl","last","parse","310nbQTgN","CKEditor/AIFormView/PromptHistory","_loadFromSessionStorage","length","remove","199416tOjmFH"];return(se=function(){return e})()}!function(e){const t=oe,n=e();for(;;)try{if(509960===parseInt(t(272))/1+-parseInt(t(279))/2*(parseInt(t(276))/3)+parseInt(t(283))/4*(parseInt(t(288))/5)+-parseInt(t(270))/6+-parseInt(t(285))/7+-parseInt(t(293))/8+-parseInt(t(281))/9*(-parseInt(t(284))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(se);const ae=ie(289);class ce extends i.Collection{constructor(){const e=ie;super(),this[e(290)](),this.on(e(277),(t,n)=>{const r=e,i=ue(n[r(282)]);for(const e of this)if(e!=n&&ue(e[r(282)])===i){this[r(292)](e);break}this[r(291)]>20&&this[r(292)](this[r(286)]),this[r(269)]()}),this.on(e(292),()=>{this[e(269)]()})}[ie(290)](){const e=ie,t=sessionStorage[e(294)](ae)||"[]";this[e(280)](JSON[e(287)](t))}[ie(269)](){const e=ie;sessionStorage[e(273)](ae,JSON[e(271)](this[e(278)](e=>e)))}}function ue(e){const t=ie;return e[t(274)]()[t(275)]()}const de={"&":"&","<":"<",">":">",'"':""","'":"'"};function le(e){return Z(e).replace(/[&<>"']/g,e=>de[e])}const he=fe;function fe(e,t){const n=pe();return(fe=function(e,t){return n[e-=280]})(e,t)}function pe(){const e=["handleError","focusFirst","isError","toolbar","Ask AI to edit or generate","startProcessing","historyGroupView","tryAgainEvent","queryView","AI_ERROR_FAILED","reset","3VzPAcG","fire","6136812pzECQI","focusTracker","focusCycler","promptView","215264EybDzr","submitPrompt","items","fieldView","delegate","clear","trim","stopProcessing","_promptHistory","10DYgVJo","set","REPLACE","focus","label","high","mainAction","chain","prompt","replaceButton","_focusables","bindTo","locale","errorView","isProcessing","setTemplate","_createToolbar","focusLast","20TIaOMi","execute","16zuVjrw","shift + tab","_createHistoryView","971457wiHmNo","element","div","insertButton","Ask AI and your prompts will be listed here for you to use later.","clearHistory","isEnabled","bind","8493126OWDUGz","render","ck-ai-form-content","insertContentBelow","text","finishProcessing","266301HjkPjE","stopButton","value","ck-hidden","replaceContent","_createPromptView","Ask AI to improve generated text","tryAgainButton","contentArea","isVisible","listenTo","13613369lIAMRf","copyButtonView","createCollection","add","search","Empty history","ck-ai-form","tab","442766yilCcb","submit","bindTemplate","keystrokes"];return(pe=function(){return e})()}!function(e){const t=fe,n=e();for(;;)try{if(723008===-parseInt(t(331))/1+parseInt(t(364))/2*(parseInt(t(293))/3)+-parseInt(t(299))/4*(-parseInt(t(308))/5)+parseInt(t(339))/6+parseInt(t(345))/7*(parseInt(t(328))/8)+-parseInt(t(295))/9*(parseInt(t(326))/10)+parseInt(t(356))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(pe);class me extends o.View{[he(296)];[he(281)];[he(353)];[he(285)];[he(298)];[he(321)];[he(318)];[he(297)];[he(307)];constructor(e,t,n=""){const r=he;super(e),this[r(309)](r(337),!0),this[r(309)](r(322),!1),this[r(309)](r(316),""),this[r(309)](r(347),""),this[r(309)](r(284),!1),this[r(309)](r(314),L[r(310)]),this[r(307)]=new ce,this[r(321)]=new q(e),this[r(353)]=new U(e,n),this[r(353)][r(338)](r(322)).to(this),this[r(353)][r(338)](r(347)).to(this),this[r(285)]=this[r(324)](),this[r(285)][r(338)](r(314)).to(this),this[r(298)]=this[r(350)](),this[r(296)]=new i.FocusTracker,this[r(281)]=new i.KeystrokeHandler,this[r(318)]=this[r(358)]([this[r(353)],this[r(353)][r(357)],this[r(285)],this[r(298)]]),this[r(297)]=new o.FocusCycler({focusables:this[r(318)],focusTracker:this[r(296)],keystrokeHandler:this[r(281)],actions:{focusPrevious:r(329),focusNext:r(363)}}),this[r(297)][r(315)](this[r(298)][r(297)]),this[r(298)][r(290)][r(302)][r(338)](r(347)).to(this,r(316));const s=this[r(280)];this[r(323)]({tag:r(333),attributes:{class:["ck",r(362),t],tabindex:"-1"},children:[{tag:r(333),attributes:{class:["ck",r(341)]},children:[{tag:r(333),attributes:{class:[s.if(r(284),r(348),e=>!e)]},children:[this[r(321)]]},this[r(353)],this[r(285)],this[r(298)]]}]})}[he(340)](){const e=he;super[e(340)](),this[e(296)][e(359)](this[e(353)][e(332)]),this[e(296)][e(359)](this[e(353)][e(357)][e(332)]),this[e(296)][e(359)](this[e(285)][e(332)]),this[e(296)][e(359)](this[e(298)][e(332)]),this[e(281)][e(355)](this[e(332)])}[he(311)](e=1){const t=he;-1===e?this[t(297)][t(325)]():this[t(297)][t(283)]()}[he(292)](){const e=he;this[e(316)]="",this[e(347)]="",this[e(284)]=!1,this[e(298)][e(292)](),this[e(353)][e(354)]=!1,this[e(285)][e(354)]=!1}[he(350)](){const e=he,t=this[e(320)],n=new W(t,{queryView:{label:v(t,e(286)),creator:o.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(361)),secondary:v(t,e(335))}}},filteredView:this[e(330)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(338)](e(337)).to(this,e(337),this,e(322),(e,t)=>e&&!t),this[e(355)](n,e(365),(t,n)=>{const r=e;this[r(316)]=n;const i=le(n);this[r(294)](r(300),i),n[r(305)]()&&this[r(307)][r(359)]({prompt:i},0)},{priority:e(313)}),n}[he(330)](){const e=he,t=new X(this[e(320)]);return t[e(288)][e(301)][e(319)](this[e(307)]).as(re),t.on(e(336),()=>{const t=e;this[t(307)][t(304)](),this[t(298)][t(360)](""),this[t(298)][t(311)]()}),t}[he(324)](){const e=he,t=new $(this[e(320)]);return t[e(317)][e(338)](e(337)).to(this,e(337),this,e(322),this,e(347),(e,t,n)=>e&&!t&&!!n),t[e(317)][e(303)](e(327)).to(this,e(349)),t[e(334)][e(338)](e(337)).to(this,e(337),this,e(322),this,e(347),(e,t,n)=>e&&!t&&!!n),t[e(334)][e(303)](e(327)).to(this,e(342)),t[e(352)][e(338)](e(337)).to(this,e(337),this,e(322),(e,t)=>e&&!t),t[e(352)][e(303)](e(327)).to(this,e(289)),t[e(346)][e(338)](e(337)).to(this,e(322)),t[e(346)][e(303)](e(327)).to(this,e(306)),t}[he(287)](){const e=he;this[e(347)]="",this[e(284)]=!1,this[e(322)]=!0,this[e(353)][e(354)]=!0,this[e(285)][e(354)]=!0,this[e(353)][e(311)]()}[he(344)](){const e=he,t=this[e(320)];this[e(322)]=!1,this[e(316)]="",this[e(298)][e(292)](),this[e(347)]&&(this[e(298)][e(290)][e(312)]=v(t,e(351)))}[he(282)](e){const t=he,n=this[t(320)];this[t(344)](),this[t(284)]=!0,this[t(321)][t(343)]=e||v(n,t(291)),this[t(347)]||(this[t(353)][t(354)]=!1)}}var ge=n(6),ye=n.n(ge),we=n(602),be=n.n(we),ve=n(557),ke=n.n(ve),Se=n(302),Ae=n.n(Se),Ee=n(290),Ie=n.n(Ee),_e=n(117),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(431),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ae(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(582),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ae(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Pe.A,Me);Pe.A&&Pe.A.locals&&Pe.A.locals;const Te=Oe;function Oe(e,t){const n=Le();return(Oe=function(e,t){return n[e-=343]})(e,t)}function Le(){const e=["<p>","insertContentBelow","_dialog","errorView","_aiAdapter","init","commands","55jujRfV","hideFakeVisualSelection","promptView","contentArea","comment","label","splice","announce","aiLicenseKeyExpired","aiCommands","command:","ai.aiAssistant.contentAreaCssClass","Error during AI content generation: %0","isPremiumPlugin","componentFactory","getRanges","buttons","_initView","set","view","from","sort","wasMoved","aiAssistant","_populateMenuBarMenu","change:isProcessing","selection","editing","_uiCssClasses","updatePosition","ai-commands-config-order-collision","hideUI","_commandDefinitions","AIAssistantUI","_onExecute","4019190FAwSbM","252ZvTLdC","map","setSelection","_formView","_getResolvedCommandsDefinitions","enabledCommandsIds","copy","aiLicenseKeyValid","add","ck-ai-commands-dropdown ","addMany"," ck-ai-assistant-ui_theme","values","replaceContent","buttonView","change:enabledCommandsIds","ai.useTheme","featureNotAllowed","ai.aiAssistant.disabledElements","ai.aiAssistant.commands","prompt","28965ZAKnjt","textAdapter","trialLimit","polite","evaluationLimit","queryView","get","custom","showUI","isEnabled","length","updateView","licenseKey","trim","menuBar:aiAssistant","hide","showAIAssistant","</p>","8007561kIKwQQ","filter","_forceMarkersCopy","forEach","push","plugins","isFlat","text","model","menuBar:aiCommands","editor","document","bind","_getMenuBarGroupButtons","render","ck-ai-assistant-ui","aiLicenseKeyTrialLimit","7ulDEpi","fieldView","247370yCnbtn","update","media","_aiAssistantController","114ryOnTI","Generated content: %0","panelView","isOfficialPlugin","execute","delegate","_initAriaAiStatusChangeAnnouncements","38949rduSqp","children","schema","getSelectedBlocks","pluginName","getLimitElement","usageLimit","show","isCollapsed","groupLabel","destroy","source","requires","locale","reset","expired","rawHtml","_createAIAssistantUIButton","domainLimit","replace","menuPanelClass","showFakeVisualSelection","order","invalid","EDITOR_TOP_SIDE","text/html","requiresContent","fire","aiLicenseKeyEvaluationLimit","_showLicenseError","change","define","isOn","AI Commands","items","AIAssistant","AI is writing","aiLicenseKeyInvalid","925833tpNnIT","once","menuitemcheckbox","REPLACE","tableOfContents","_licenseKeyCheckInterval","focus","body","groupId","aiLicenseKeyDomainLimit","change:isError","config","insertContent","getData","DataTransfer","ck-ai-assistant-button ","getSelectedElement","aiLicenseKeyNotAllowed","currentContext","includes","aiLicenseKeyUsageLimit","982232zIhCws","change:value","AI Assistant","INSERT","listenTo","menuView"];return(Le=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(487499===parseInt(t(463))/1+-parseInt(t(414))/2+parseInt(t(425))/3*(parseInt(t(356))/4)+parseInt(t(377))/5*(parseInt(t(418))/6)+parseInt(t(412))/7*(-parseInt(t(484))/8)+parseInt(t(395))/9+-parseInt(t(355))/10*(parseInt(t(497))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Le);const $e=globalThis[Te(477)];class Ne extends e.Plugin{[Te(389)];[Te(468)];[Te(492)];[Te(359)];[Te(494)];[Te(417)];[Te(348)]="";static get[Te(429)](){return Te(353)}static get[Te(421)](){return!0}static get[Te(510)](){return!0}static get[Te(437)](){return[a.ClipboardMarkersUtils,p,w,o.Dialog]}constructor(e){const t=Te;super(e),e[t(474)][t(456)](t(374),[t(416),t(441),t(467)]),e[t(474)][t(456)](t(508),""),e[t(474)][t(456)](t(372),!0),this[t(348)]=t(410)+(e[t(474)][t(383)](t(372))?t(367):"")}[Te(495)](){const e=Te,{editor:n}=this;this[e(494)]=n[e(400)][e(383)](w),this[e(492)]=n[e(400)][e(383)](o.Dialog),this[e(359)]=null,this[e(352)]=this[e(360)]();const r=new E(n,Array[e(517)](this[e(352)][e(368)]()));n[e(496)][e(364)](e(393),r),n.ui[e(511)][e(364)](e(506),i=>{const a=e,c=(0,o.createDropdown)(i);return c[a(515)]({class:a(365)+this[a(348)]}),c[a(370)][a(515)]({label:v(i,a(458)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(422),e=>this[a(354)](e[a(436)].id)),(0,o.addMenuToDropdown)(c,n.ui[a(516)][a(470)],function(e){const t=a,n=s(e[t(474)][t(383)](t(375)),e[t(438)]),r=Ue(e,n)[t(396)](e=>e[t(496)][t(387)]);return 1===r[t(387)]?Ue(e,r[0][t(496)])[t(357)](e=>({id:e.id,label:e[t(502)]})):r[t(357)](n=>{const r=t,{groupId:i,groupLabel:o,commands:s}=n;return{id:i,menu:o||i,children:Ue(e,s)[r(357)](e=>({id:e.id,label:e[r(502)]}))}})}(n),{ariaLabel:v(i,a(458))}),c[a(489)][a(445)]=a(365)+this[a(348)],r.on(a(371),u),c[a(489)][a(464)](a(409),u),c;function u(){const e=a;c[e(386)]=r[e(361)][e(387)]>0;for(const t of c[e(489)][e(513)])t[e(386)]=r[e(361)][e(482)](t.id)}}),n.ui[e(511)][e(364)](e(404),i=>{const a=e,c=new o.MenuBarMenuView(i);c[a(370)][a(515)]({label:v(i,a(458)),icon:t.IconMagicWand}),c[a(407)](a(386)).to(r,a(361),e=>e[a(387)]>0);const u=s(n[a(474)][a(383)](a(375)),i);return this[a(344)](r,c,u,e=>this[a(354)](e)),c}),n.ui[e(511)][e(364)](e(343),()=>{const t=e,n=this[t(442)](o.ButtonView);return n[t(515)]({tooltip:!0,class:t(478)+this[t(348)]}),n}),n.ui[e(511)][e(364)](e(391),()=>{const t=e,n=this[t(442)](o.MenuBarMenuListItemButtonView);return n[t(515)]({role:t(465)}),n}),this[e(389)]=this[e(405)][e(474)][e(383)](e(389));const i=this[e(405)];this[e(468)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,o=i[r];if(t(363)==o||t(462)==o||t(505)==o||t(472)==o||t(480)==o||t(453)==o||t(411)==o||t(483)==o){delete i[r],n=o,clearInterval(this[t(468)]),this[t(468)]=void 0;break}}t(462)==n&&i[t(454)](t(448)),t(505)==n&&i[t(454)](t(440)),t(472)==n&&i[t(454)](t(443)),t(480)==n&&i[t(454)](t(373),t(460)),t(453)==n&&i[t(454)](t(381)),t(411)==n&&i[t(454)](t(379)),t(483)==n&&i[t(454)](t(431))},1e3)}[Te(435)](){const e=Te;super[e(435)](),this[e(468)]&&clearInterval(this[e(468)])}[Te(385)](e="",n="",r=Te(384)){const i=Te,s=this[i(405)],u=s[i(347)][i(516)],d=s[i(400)][i(383)](p),l=s[i(400)][i(383)](a.ClipboardMarkersUtils);d[i(446)]();const h=new $e,f=new ClipboardEvent(i(362),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(397)](i(501),()=>{const e=i;u[e(406)][e(452)](e(362),g)}),this[i(359)]||(this[i(514)](),this[i(417)]=new P(s,this[i(494)][i(378)],this[i(359)]));let y=m[i(476)](i(450));const w=s[i(403)][i(406)][i(346)],b=Array[i(517)](w[i(512)]());1===b[i(387)]&&b[0][i(401)]&&!w[i(479)]()&&""!==y[i(444)](/ /g,"")[i(390)]()&&(y=i(490)+y+i(394)),this[i(417)][i(388)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:L[s[i(403)][i(406)][i(346)][i(433)]?i(487):i(466)]}),i(343)!==this[i(492)].id?this[i(492)][i(432)]({id:i(343),icon:t.IconRobotPencil,title:v(this[i(405)][i(438)],i(486)),content:this[i(359)],position:o.DialogViewPosition[i(449)],onShow:()=>{const e=i;this[e(359)][e(469)]()},onHide:()=>{const e=i;this[e(417)][e(439)](),d[e(498)]()}}):this[i(492)][i(516)][i(519)]||this[i(492)][i(516)][i(349)]()}[Te(351)](){const e=Te;this[e(492)][e(392)]()}[Te(360)](){const e=Te,t=new Map,n=s(this[e(405)][e(474)][e(383)](e(375)),this[e(405)][e(438)]);for(const r of n)for(const n of r[e(496)])t[e(515)](n.id,{...n,groupId:r[e(471)],groupLabel:r[e(434)]||r[e(471)]});return t}[Te(442)](e){const n=Te,r=this[n(405)],i=r[n(496)][n(383)](n(393)),o=new e(r[n(438)]);return o[n(515)]({label:v(r[n(438)],n(486)),icon:t.IconRobotPencil,isToggleable:!0}),o[n(407)](n(386)).to(i),o[n(407)](n(457)).to(this[n(492)],"id",e=>n(343)===e),this[n(488)](o,n(422),()=>{const e=n;o[e(457)]?this[e(351)]():i[e(422)]()}),o}[Te(514)](){const e=Te,t=this[e(405)][e(400)][e(383)](p);this[e(359)]=new me(this[e(405)][e(438)],this[e(348)],this[e(405)][e(474)][e(383)](e(508))),this[e(359)].on(e(485),()=>{const t=e;this[t(492)][t(516)][t(519)]||this[t(492)][t(516)][t(349)]()}),this[e(359)][e(499)][e(382)][e(413)].on(e(415),()=>{const t=e;this[t(492)][t(516)][t(519)]||this[t(492)][t(516)][t(349)]()}),this[e(488)](this[e(359)],e(369),()=>{const n=e;t[n(475)](this[n(417)][n(481)]),this[n(351)]()}),this[e(488)](this[e(359)],e(491),()=>{const n=e;t[n(491)](this[n(417)][n(481)]),this[n(351)]()}),this[e(424)]()}[Te(424)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(405)];this[e(359)][e(500)].on(e(345),(r,i,o)=>{const s=e,a=this[s(417)][s(481)];o?n[s(504)](v(t,s(461))):a&&n[s(504)](v(t,s(419),a),{politeness:s(380),isUnsafeHTML:!0})}),this[e(359)].on(e(473),(r,i,o)=>{const s=e;if(o){const e=this[s(359)][s(493)][s(402)];n[s(504)](v(t,s(509),e))}})}[Te(354)](e){const t=Te,n=this[t(352)][t(383)](e),r=this[t(405)],o=r[t(403)][t(406)][t(346)],s=r[t(496)][t(383)](t(393)),a=r[t(400)][t(383)](p),c=("_ungrouppedCommands"!==n[t(471)]?n[t(434)]+": ":"")+n[t(502)];if(!1!==n[t(451)]&&o[t(433)]){const e=(0,i.first)(o[t(428)]())||r[t(403)][t(427)][t(430)](o);r[t(403)][t(455)](n=>{n[t(358)](e,"in")})}a[t(446)](),s[t(422)](n[t(376)],c,t(507)+e)}[Te(344)](e,t,n,r){const i=Te,s=this[i(405)],a=s[i(438)],c=new o.MenuBarMenuListView(a),u=Ue(s,n)[i(396)](e=>e[i(496)][i(387)]);1===u[i(387)]?this[i(408)]({command:e,commands:u[0][i(496)],parentMenuView:t,onExecute:r})[i(398)](e=>c[i(459)][i(364)](e)):u[i(398)](({groupId:n,groupLabel:s,commands:u})=>{const d=i,l=new o.MenuBarMenuListItemView(a,t),h=new o.MenuBarMenuView(a),f=new o.MenuBarMenuListView(a),p=this[d(408)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(370)][d(515)]({label:s||n}),h[d(423)](d(422)).to(t),f[d(459)][d(366)](p),h[d(420)][d(426)][d(364)](f),l[d(426)][d(364)](h),c[d(459)][d(364)](l)}),t[i(420)][i(426)][i(364)](c)}[Te(408)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,s=this[i(405)],a=s[i(438)];return Ue(s,t)[i(357)](t=>{const s=i,c=new o.MenuBarMenuListItemView(a,n),u=new o.MenuBarMenuListItemButtonView(a);return u[s(515)]({label:t[s(502)]}),u[s(423)](s(422)).to(n),u.on(s(422),()=>r(t.id)),u[s(407)](s(386)).to(e,s(361),e=>e[s(482)](t.id)),c[s(426)][s(364)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(447)]&&void 0===t[n(447)]?1:void 0===e[n(447)]&&void 0!==t[n(447)]?-1:void 0!==e[n(447)]&&void 0!==t[n(447)]?e[n(447)]-t[n(447)]:0}function Ue(e,t){const n=Te;t[n(518)](De);const r={},o=[];for(const s of t)if(void 0!==s[n(447)]){if(s[n(447)]in r)throw new i.CKEditorError(n(350),e,{conflictingDefinitions:[s,r[s[n(447)]]]});r[s[n(447)]]=s,o[n(503)](s[n(447)],0,s)}else o[n(399)](s);return o}function Fe(){const e=["translateFrench","Confident","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","makeLonger","ai.aiAssistant.extraCommandGroups","188155lXhdkF","translateEnglish","forEach","poetic","Professional","isPremiumPlugin","Translate the content to Hindi language.","simplifyLanguage","direct","Translate","business","Direct","Improve using friendly, comforting language, to convey understanding and empathy.","groupId","requires","legal","ai.aiAssistant.commands","ai.aiAssistant.removeCommands","filter","Make shorter","config","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","casual","Change style","Continue","Arabic","ai.aiAssistant.preserveComments","translateArabic","translateChinese","isOfficialPlugin","includes","Generate from selection","Simplified Chinese","Simplify language","Change tone","summarize","commands","1609536QynorX","Translate the content to German language.","10jrhuch","translatePortuguese","pluginName","Poetic","Rewrite this content as a poem using poetic techniques without losing the original meaning.","set","Rewrite this content as a business professional with formal language.","Portuguese","Spanish","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","translateGerman","professional","generate","translateSpanish","Edit or review","Make longer","French","Translate the content to English language.","locale","Improve this content by using descriptive language and inserting more information and more detailed explanations.","2284758PEATxB","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.","Friendly","editOrReview","Translate the content to Simplified Chinese language.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Rewrite this content as a legal professional using valid legal terminology.","Journalism","876452vIJtsJ","changeTone","Translate the content to Portuguese language.","English","546021JlRTkx","concat","journalism","Translate the content to Arabic language.","makeShorter","Hindi","Legal","AIAssistant","Casual","Translate the content to French language.","Improve using direct language, using only the essential information.","friendly","translate","Rewrite this content as a journalist using engaging language to convey the importance of the information.","German","Improve writing","Summarize","2054304iLsDFL","Improve using casual, informal language to convey a casual conversation with a real person.","push","improveWriting","get","Translate the content to Spanish language.","confident","3026436zijnBa","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","continue","define","translateHindi","find","Business","changeStyle"];return(Fe=function(){return e})()}const Be=je;function je(e,t){const n=Fe();return(je=function(e,t){return n[e-=278]})(e,t)}!function(e){const t=je,n=e();for(;;)try{if(507252===-parseInt(t(282))/1+-parseInt(t(350))/2+parseInt(t(341))/3+-parseInt(t(371))/4+parseInt(t(321))/5*(parseInt(t(378))/6)+parseInt(t(354))/7+-parseInt(t(319))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Fe);class He extends e.Plugin{static get[Be(296)](){return[Ne,p]}static get[Be(323)](){return Be(361)}static get[Be(311)](){return!0}static get[Be(287)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(302)],r=e[t(339)];n[t(381)](t(308),!0),n[t(381)](t(298),qe(r)),n[t(381)](t(281),[]),n[t(381)](t(299),[]);let i=s(n[t(375)](t(298)),r);const o=n[t(375)](t(281)),a=n[t(375)](t(299));o[t(284)](e=>{const n=t,r=i[n(383)](t=>t[n(295)]===e[n(295)]);r?r[n(318)]=r[n(318)][n(355)](e[n(318)]):i[n(373)](e)}),i=i[t(300)](e=>!a[t(312)](e[t(295)])),i[t(284)](e=>{const n=t;e[n(318)]=e[n(318)][n(300)](e=>!a[n(312)](e.id))}),n[t(326)](t(298),i)}}function qe(e){const t=Be;return[{groupId:t(345),groupLabel:v(e,t(335)),commands:[{id:t(374),label:v(e,t(369)),prompt:t(330)},{id:t(358),label:v(e,t(301)),prompt:t(343)},{id:t(280),label:v(e,t(336)),prompt:t(340)},{id:t(289),label:v(e,t(315)),prompt:t(303)}]},{groupId:t(333),groupLabel:v(e,t(313)),commands:[{id:t(317),label:v(e,t(370)),prompt:t(379)},{id:t(380),label:v(e,t(306)),prompt:t(279)}]},{groupId:t(351),groupLabel:v(e,t(316)),commands:[{id:t(332),label:v(e,t(286)),prompt:t(347)},{id:t(304),label:v(e,t(362)),prompt:t(372)},{id:t(290),label:v(e,t(293)),prompt:t(364)},{id:t(377),label:v(e,t(278)),prompt:t(342)},{id:t(365),label:v(e,t(344)),prompt:t(294)}]},{groupId:t(385),groupLabel:v(e,t(305)),commands:[{id:t(292),label:v(e,t(384)),prompt:t(327)},{id:t(297),label:v(e,t(360)),prompt:t(348)},{id:t(356),label:v(e,t(349)),prompt:t(367)},{id:t(285),label:v(e,t(324)),prompt:t(325)}]},{groupId:t(366),groupLabel:v(e,t(291)),commands:[{id:t(283),label:v(e,t(353)),prompt:t(338)},{id:t(334),label:v(e,t(329)),prompt:t(376)},{id:t(322),label:v(e,t(328)),prompt:t(352)},{id:t(331),label:v(e,t(368)),prompt:t(320)},{id:t(386),label:v(e,t(337)),prompt:t(363)},{id:t(310),label:v(e,t(314)),prompt:t(346)},{id:t(382),label:v(e,t(359)),prompt:t(288)},{id:t(309),label:v(e,t(307)),prompt:t(357)}]}]}const ze=Ge;function Ve(){const e=["7iZWqcv","abort","AbortError","reject","31428auMCCT","assign","17825120qVEDyZ","aborted","plugins","sendRequest","textAdapter","editor","init","locale","_prepareRequestParameters","AI_ERROR_GET_PARAMETERS","171107tXKgMV","410qxoNqt","name","aitextadapter-send-request-failed","resolve","AI_ERROR_GET_HEADERS","3586068taMhAB","41614hBBRRd","3983768HdCRdg","8904924eBuXpX","object","87ThCWtE","error","makeRequest","catch","_prepareRequestHeaders","application/json","signal","get","requires","abortController"];return(Ve=function(){return e})()}function Ge(e,t){const n=Ve();return(Ge=function(e,t){return n[e-=460]})(e,t)}!function(e){const t=Ge,n=e();for(;;)try{if(526001===parseInt(t(493))/1+parseInt(t(463))/2*(parseInt(t(467))/3)+parseInt(t(481))/4*(parseInt(t(494))/5)+-parseInt(t(462))/6+-parseInt(t(477))/7*(-parseInt(t(464))/8)+parseInt(t(465))/9+-parseInt(t(483))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ve);class We extends e.Plugin{[ze(476)];static get[ze(475)](){return[w]}constructor(e){const t=ze;super(e),this[t(476)]=new AbortController}[ze(489)](){const e=ze;this[e(488)][e(485)][e(474)](w)[e(487)]=this}[ze(478)](){const e=ze;this[e(476)][e(473)][e(484)]||(this[e(476)][e(478)](),this[e(476)]=new AbortController)}async[ze(469)](e){const t=ze;return this[t(486)](e)[t(470)](e=>{const n=t;if(e instanceof b)return Promise[n(480)](e);if(n(479)==e[n(495)])return Promise[n(460)]();throw console[n(468)](e),new i.CKEditorError(n(496),null)})}async[ze(471)](e,t){const n=ze,r=this[n(488)][n(490)],i={"Content-Type":n(472)};if(n(466)==typeof e)Object[n(482)](i,e);else if(e)try{const r=await e(t);Object[n(482)](i,r)}catch{return Promise[n(480)](new b(v(r,n(461))))}return i}async[ze(491)](e,t){const n=ze,r=this[n(488)][n(490)];if(n(466)==typeof e)return e;try{return await e(t)}catch{return Promise[n(480)](new b(v(r,n(492))))}}}function Ke(e,t){const n=Je();return(Ke=function(e,t){return n[e-=378]})(e,t)}function Je(){const e=["ai.openAI.requestParameters","reject","\nYou must keep the text formatting.\n\nContent:\n","[DONE]","content","filter","config","json","text","signal","map","join","sendRequest","stringify","delta","3207888giDUQH","define","_prepareRequestParameters","POST","get","AI_ERROR_CONTEXT_LENGTH","message","951058giJdAg","context_length_exceeded","split","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.","7vZFoIQ","_readStreamableResponse","_prepareRequestHeaders","editor","3516erAvNK","gpt-4o","pluginName","prepareMessages","9695939wVUvcA","1812APNALt","parse","OpenAITextAdapter","AI_ERROR_MODERATION","choices","data: ","resolve","Instruction:\n","3658182ibnOcE","user","_cleanUpData","ai.openAI.apiUrl","system","includes","_requestHeaders","2822475HUASqI","read","Moderation","324110DntwgF","81vDwfPB","_isBufferIncomplete","locale","length","ai.openAI.requestHeaders","_requestParameters","_apiUrl","https://api.openai.com/v1/chat/completions","1rXxPFt","decode","body","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","abortController","stream","replace","_readStaticResponse"];return(Je=function(){return e})()}const Qe=Ke;!function(e){const t=Ke,n=e();for(;;)try{if(344555===parseInt(t(448))/1*(parseInt(t(408))/2)+-parseInt(t(421))/3*(parseInt(t(416))/4)+-parseInt(t(436))/5+parseInt(t(429))/6*(-parseInt(t(412))/7)+parseInt(t(401))/8+parseInt(t(440))/9*(parseInt(t(439))/10)+parseInt(t(420))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Je);class Xe extends We{[Qe(446)];[Qe(435)];[Qe(445)];static get[Qe(418)](){return Qe(423)}constructor(e){const t=Qe;super(e),e[t(392)][t(402)](t(432),t(447)),e[t(392)][t(405)](t(386))||e[t(392)][t(402)](t(386),{model:t(417),temperature:1,top_p:1,stream:!0}),this[t(446)]=e[t(392)][t(405)](t(432)),this[t(435)]=e[t(392)][t(405)](t(444))||{},this[t(445)]=e[t(392)][t(405)](t(386))}async[Qe(398)]({query:e,context:t,onData:n,actionId:r}){const i=Qe,o=this[i(415)][i(442)],s=await this[i(419)](e,t,r),a=await this[i(414)](this[i(435)],r),c=await this[i(403)](this[i(445)],r),u={messages:s,...c},d={method:i(404),headers:a,body:JSON[i(399)](u),signal:this[i(382)][i(395)]},l=await fetch(this[i(446)],d);if(l.ok)return c[i(383)]?await this[i(413)](l,n):await this[i(385)](l,n),Promise[i(427)]();{const e=await l[i(394)]();return e[i(434)](i(409))?Promise[i(387)](new b(v(o,i(406)))):e[i(434)](i(438))?Promise[i(387)](new b(v(o,i(424)))):Promise[i(387)](new Error(e))}}async[Qe(419)](e,t,n){const r=Qe;let i,o;return t?(i=r(380),o=r(428)+e+r(388)+t):(i=r(411),o=e),[{role:r(433),content:i},{role:r(430),content:o}]}async[Qe(413)](e,t){const n=Qe,r=e[n(379)][n(381)](),i=new TextDecoder;let o="",s="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(437)](),d=o+i[n(378)](u);let l="";c=e;try{l=this[n(431)](d),o=""}catch{o=d;continue}s+=l,!c&&this[n(441)](s)||s&&(a+=s,s="",t(a))}return Promise[n(427)]()}async[Qe(385)](e,t){const n=Qe;return t((await e[n(393)]())[n(425)][0][n(407)][n(390)]),Promise[n(427)]()}[Qe(441)](e){const t=Qe,n=e[t(410)]("<")[t(443)]!==e[t(410)](">")[t(443)],r=e[t(443)]<30;return n&&r}[Qe(431)](e){const t=Qe;return e[t(410)](/\n(?![^{]*\})/g)[t(396)](e=>e[t(384)](t(426),""))[t(391)](e=>e&&e[t(443)]>0&&t(389)!==e)[t(396)](e=>{const n=t,{choices:r}=JSON[n(422)](e);if(r[0]?.[n(400)]?.[n(390)])return r[0][n(400)][n(390)]})[t(391)](e=>e)[t(397)]("")}}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,ot;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(ot||(ot={}));class st{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new st({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return st.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!st.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!st.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(o)&&a(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),wt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!wt(e))return!1;return!0},bt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const At=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),Et={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:At,isSet:e=>null!=e,isValidHostLabel:wt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:o={}}=e,s=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return s.search=Object.entries(o).map(([e,t])=>`${e}=${t}`).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${Et[c]}`)||"string"==typeof e&&e.includes(`${r}:${Et[c]}`)?`:${Et[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),i=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(At(r[e],t))}else n.push(r[s]);i=o+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in bt&&null!=i[1]?bt[i[0]][i[1]](...r):It[e](...r)},Ct=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new St(`'${e}' is already defined in Reference Record.`);const r=Rt(t,n);return n.logger?.debug?.(`${vt} evaluateCondition: ${kt(t)} = ${kt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Ct(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Mt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Tt=(e,t)=>{if(Array.isArray(e))return e.map(e=>Tt(e,t));switch(typeof e){case"string":return _t(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Tt(r,t)}),{}),Lt=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new St("Endpoint URL must be a string, got "+typeof n)},$t=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(!i)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Mt(u,s)},...null!=c&&{properties:Ot(c,s)},url:Lt(a,s)}},Nt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Dt=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...o}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=$t(n,t);if(e)return e}else if("error"===n.type)Nt(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=Dt(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Ft=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ft(t))return!1;return!0}return!!wt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Bt=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const Ht={isVirtualHostableS3Bucket:Ft,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,o,s,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:o,accountId:s,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=Bt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function qt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}bt.aws=Ht;const zt=/\d{12}\.ddb/;const Vt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Jt=e=>(t,n)=>async r=>{const{request:i}=r;if(!st.isInstance(i))return t(r);const{headers:o}=i,s=n?.userAgent?.map(Qt)||[],a=(await e.defaultUserAgentProvider()).map(Qt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&qt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?qt(e,"RETRY_MODE_ADAPTIVE","F"):qt(e,"RETRY_MODE_STANDARD","E"):qt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(zt)&&qt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":qt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":qt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":qt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&qt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))qt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Qt)||[],d=await e.userAgentAppId();d&&a.push(Qt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...s,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(o[Gt]=o[Gt]?`${o[Vt]} ${h}`:h),o[Vt]=l):o[Gt]=l,t({...r,request:i})},Qt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let o=t.substring(r+1);return"api"===i&&(o=o.toLowerCase()),[i,o,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Xt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Yt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Yt||(Yt={}));const Zt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const o=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Zt(r),c=[];for(const n of o){const i=s.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=i.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},on={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class sn{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!st.isInstance(n.request))return e(n);const r=Zt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:s}=r,a=await e({...n,request:await s.sign(n.request,o,i)}).catch((s.errorHandler||an)(i));return(s.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(st.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),wn=e=>{const[t,n,r,,,i]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&r&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},bn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(o)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:s}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),An=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":r[t]=o.value;break;case"contextParams":r[t]=e[o.name];break;case"clientContextParams":case"builtInParams":r[t]=await bn(o.name,t,n)();break;case"operationContextParams":r[t]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),wn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},En=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const o=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await An(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=o,r.authSchemes=o.properties?.authSchemes;const s=r.authSchemes?.[0];if(s){r.signing_region=s.signingRegion,r.signing_service=s.signingName;const e=Zt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:o}=await n(i);try{return{response:o,output:await t(o,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:o}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(o)){const{headers:t={}}=o,n=Object.entries(t);e.$metadata={httpStatusCode:o.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const o=e,s=r.endpointV2?.url&&o.urlParser?async()=>o.urlParser(r.endpointV2.url):o.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:s});return n({...i,request:a})})(e,t),xn)}}}const Cn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Pn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(En({config:e,instructions:t}),Cn)}});var Mn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Mn||(Mn={}));const Tn=Mn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Ln=["TimeoutError","RequestTimeout","RequestTimeoutException"],$n=[500,502,503,504],Nn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Dn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Fn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Ln.includes(e.name)||Nn.includes(e?.code||"")||Dn.includes(e?.code||"")||$n.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Fn(e.cause,t+1);class Bn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Bn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Bn.setTimeoutFn=setTimeout;const jn=100,Hn=2e4,qn="amz-sdk-invocation-id",zn="amz-sdk-request",Vn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Hn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Mn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Hn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Vn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,o=this.getCapacityCost(n);return this.capacity-=o,Vn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Mn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Bn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Jn;const Qn=new Uint8Array(16);function Xn(){if(!Jn&&(Jn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Jn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jn(Qn)}const Yn=[];for(let e=0;e<256;++e)Yn.push((e+256).toString(16).slice(1));function Zn(e,t=0){return Yn[e[t+0]]+Yn[e[t+1]]+Yn[e[t+2]]+Yn[e[t+3]]+"-"+Yn[e[t+4]]+Yn[e[t+5]]+"-"+Yn[e[t+6]]+Yn[e[t+7]]+"-"+Yn[e[t+8]]+Yn[e[t+9]]+"-"+Yn[e[t+10]]+Yn[e[t+11]]+Yn[e[t+12]]+Yn[e[t+13]]+Yn[e[t+14]]+Yn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Xn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Zn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t},s=(n=!1)=>{const r=[],i=[],s={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>or[t.step]-or[e.step]||sr[t.priority||"normal"]-sr[e.priority||"normal"])).map(o).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:o,aliases:s}=n,a={middleware:e,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const o=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n):(n=>{let i=!1;const o=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n),removeByTag:n=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=nr(o,s);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>s(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},or={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},sr={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let o;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return o(e).then(e=>e.output);o(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,o=t+3;r<=o;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(o-r),i+=6}else n>>=6;const o=t/4*3;n>>=i%8;const s=Math.floor(i/8);for(let e=0;e<s;e++){const t=8*(s-e-1);r.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,o=Math.min(e+3,t.length);i<o;i++)n|=t[i]<<8*(o-i-1),r+=8;const o=Math.ceil(r/6);n<<=6*o-r;for(let e=1;e<=o;e++){const t=6*(o-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-o)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function wr(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const br={supported:void 0};class vr{static create(e){return"function"==typeof e?.handle?e:new vr(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===br.supported&&(br.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,o=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(s+=`?${a}`),e.fragment&&(s+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${s}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:o};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),br.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=yr(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),wr(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),o=i>-1?i+1:e.length;t(e.substring(o))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:o}=await n.read();o&&(t.push(o),i+=o.length),r=e}const o=new Uint8Array(i);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const Sr={},Ar={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Ar[t]=e}function Er(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Ar))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Ar[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)};class xr{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Rr}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Rr{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends xr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Cr="***SensitiveInformation***";class Pr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Pr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Pr?Pr.isInstance(e):!!Pr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Mr=(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},Tr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Or=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Lr=e=>Object.assign((e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),$r=e=>null!=e;class Nr{trace(){}debug(){}info(){}warn(){}error(){}}function Dr(e,t,n){let r,i,o;if(void 0===t&&void 0===n)r={},o=e;else{if(r=e,"function"==typeof t)return i=t,o=n,Fr(r,i,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?Br(r,null,o,e):r[e]=o[e];return r}const Ur=(e,t)=>{const n={};for(const r in t)Br(n,e,t,r);return n},Fr=(e,t,n)=>Dr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Br=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[o=jr,s=Hr,a=r]=i;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[r]=s(t[a])))}let[i,o]=n[r];if("function"==typeof o){let t;const n=void 0===i&&null!=(t=o()),s="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:s&&(e[r]=o())}else{const t=void 0===i&&null!=o,n="function"==typeof i&&!!i(o)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=o)}},jr=e=>null!=e,Hr=e=>e,qr=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),zr=e=>Vr(e,32),Vr=(e,t)=>{const n=qr(e);if(void 0!==n&&Gr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Gr=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Wr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Jr.warn(Kr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Kr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Jr={warn:console.warn},Qr=e=>e?.body instanceof ReadableStream,Xr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Yr=e=>{const t={error:e,errorType:Zr(e)},n=ni(e.$response);return n&&(t.retryAfterHint=n),t},Zr=e=>Un(e)?"THROTTLING":Fn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Fn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",ei={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ti=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(!Xr(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),s=new Error,a=0,c=0;const{request:u}=r,d=st.isInstance(u);for(d&&(u.headers[qn]=er());;)try{d&&(u.headers[zn]=`attempt=${a+1}; max=${o}`);const{response:n,output:s}=await t(r);return i.recordSuccess(e),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,{response:n,output:s}}catch(t){const r=Yr(t);if(s=tr(t),d&&Qr(u))throw(n.logger instanceof Nr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw s.$metadata||(s.$metadata={}),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,s}a=e.getRetryCount();const o=e.getRetryDelay();c+=o,await new Promise(e=>setTimeout(e,o))}}})(e),ei)}}),ni=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)};const ri=(ii=3e5,e=>oi(e)&&e.expiration.getTime()-Date.now()<ii);var ii;const oi=e=>void 0!==e.expiration,si=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ai="X-Amz-Date",ci="X-Amz-Signature",ui="X-Amz-Security-Token",di="authorization",li=ai.toLowerCase(),hi=[di,li,"date"],fi=ci.toLowerCase(),pi="x-amz-content-sha256",mi=ui.toLowerCase(),gi={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},yi=/^proxy-/,wi=/^sec-/,bi="AWS4-HMAC-SHA256",vi="AWS4-HMAC-SHA256-PAYLOAD",ki="aws4_request",Si={},Ai=[],Ei=(e,t,n)=>`${e}/${t}/${n}/${ki}`,Ii=(e,t,n)=>{const r=new e(t);return r.update(si(n)),r.digest()},_i=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const o=i.toLowerCase();(o in gi||t?.has(o)||yi.test(o)||wi.test(o))&&(!n||n&&!n.has(o))||(r[o]=e[i].trim().replace(/\s+/g," "))}return r},xi=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===pi)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(si(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ri{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=lr(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Mi.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Pi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Er(e.value.replace(/\-/g,"")),1),d}}}var Ci;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ci||(Ci={}));const Pi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Mi{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&&Ti(t),new Mi(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Ti(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Ti(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Oi=e=>{e=st.clone(e);for(const t of Object.keys(e.headers))hi.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Li=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){this.service=r,this.sha256=i,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===fi)continue;const i=mr(r);t.push(i);const o=e[r];"string"==typeof o?n[i]=`${i}=${mr(o)}`:Array.isArray(o)&&(n[i]=o.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(si(n));return`${r}\n${e}\n${t}\n${Ir(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return mr(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,Li(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Ni extends $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o}),this.headerFormatter=new Ri}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Ei(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=st.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Oi(e),{unhoistableHeaders:o,hoistableHeaders:a});d.sessionToken&&(m.query[ui]=d.sessionToken),m.query["X-Amz-Algorithm"]=bi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[ai]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=_i(m,i,s);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[ci]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await xi(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:o}){const s=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Ei(a,s,o??this.service),d=await xi({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[vi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:s}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,o,s,r));return a.update(si(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),c=Oi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ei(d,a,o??this.service);c.headers[li]=u,s.sessionToken&&(c.headers[mi]=s.sessionToken);const h=await xi(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(pi,c.headers)&&this.applyChecksum&&(c.headers[pi]=h);const f=_i(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(s,a,d,o),this.createCanonicalRequest(c,f,h));return c.headers[di]=`${bi} Credential=${s.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,bi),o=new this.sha256(await n);return o.update(si(i)),Ir(await o.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const o=`${n}:${r}:${i}:${Ir(await Ii(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Si)return Si[o];for(Ai.push(o);Ai.length>50;)delete Si[Ai.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,ki])s=await Ii(e,s,t);return Si[o]=s})(this.sha256,e,n,t,r||this.service)}}const Di=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const o=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const c=async e=>{o||(o=r(e));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return void 0===t?async e=>(s&&!e?.forceRefresh||(i=await c(e)),i):async e=>(s&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,ri,oi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),s=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,o);r&&!s.attributed?(t=async e=>s(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=s.memoized,t.configBound=s.configBound,t.attributed=!0):t=s},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:s}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:o}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Ni)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const o={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Ni)(o)};return Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:a})};const Ui=async(e,t,n)=>({operation:Zt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Fi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Bi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ji="3.823.0";var Hi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function qi(e){return e instanceof Uint8Array?e:"string"==typeof e?Hi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function zi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Vi={name:"SHA-256"},Gi={name:"HMAC",hash:Vi},Wi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Ki={};function Ji(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Ki}var Qi=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!zi(e)){var t=qi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return Ji().crypto.subtle.sign(Gi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):zi(this.toHash)?Promise.resolve(Wi):Promise.resolve().then(function(){return Ji().crypto.subtle.digest(Vi,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){Ji().crypto.subtle.importKey("raw",qi(e.secret),Gi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function Xi(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function Yi(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Zi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var eo=64,to=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),no=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ro=Math.pow(2,53)-1,io=function(){function e(){this.state=Int32Array.from(no),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ro)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===eo&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%eo>=56){for(var r=this.bufferLength;r<eo;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],c=t[6],u=t[7],d=0;d<eo;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(u+(to[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=s,s=o+p|0,o=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=u},e}(),oo=function(){function e(e){this.secret=e,this.hash=new io,this.reset()}return e.prototype.update=function(e){if(!zi(e)&&!this.error)try{this.hash.update(qi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Xi(this,void 0,void 0,function(){return Yi(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new io,this.secret){this.outer=new io;var e=function(e){var t=qi(e);if(t.byteLength>eo){var n=new io;n.update(t),t=n.digest()}var r=new Uint8Array(eo);return r.set(t),r}(this.secret),t=new Uint8Array(eo);t.set(e);for(var n=0;n<eo;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var so=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ao(e){return e&&so.every(function(t){return"function"==typeof e[t]})}var co=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&ao(e.crypto.subtle)}(Ji())?this.hash=new oo(e):this.hash=new Qi(e)}return e.prototype.update=function(e,t){this.hash.update(qi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),uo=n(179),lo=n.n(uo);const ho=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&i.push([`app/${o}`]),i};!function(){function e(){this.crc32=new po}e.prototype.update=function(e){zi(e)||this.crc32.update(qi(e))},e.prototype.digest=function(){return Xi(this,void 0,void 0,function(){return Yi(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new po}}();var fo,po=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Zi(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.checksum=this.checksum>>>8^mo[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),mo=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class go{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&yo(t),new go(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&yo(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function yo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class wo{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(go.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ro.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Er(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:bo,value:!0};break;case 1:t[i]={type:bo,value:!1};break;case 2:t[i]={type:vo,value:e.getInt8(n++)};break;case 3:t[i]={type:ko,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:So,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Ao,value:new go(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Eo,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const o=e.getUint16(n,!1);n+=2,t[i]={type:Io,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[i]={type:_o,value:new Date(new go(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:xo,value:`${Ir(s.subarray(0,4))}-${Ir(s.subarray(4,6))}-${Ir(s.subarray(6,8))}-${Ir(s.subarray(8,10))}-${Ir(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(fo||(fo={}));const bo="boolean",vo="byte",ko="short",So="integer",Ao="long",Eo="binary",Io="string",_o="timestamp",xo="uuid",Ro=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Co{constructor(e,t){this.headerMarshaller=new wo(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),o=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new po;return o.setUint32(0,r,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),o.setUint32(r-4,s.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const o=r.getUint32(4,!1),s=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new po).update(new Uint8Array(n,t,8));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,i-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Po{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Mo{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 To{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Oo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Lo(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},o=await e(i);if(o.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw o[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class $o{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Co(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;o(new DataView(i.buffer).getUint32(0,!1)),i=null}const s=Math.min(t-n,c-u);r.set(e.slice(u,u+s),n),n+=s,u+=s,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new To({messageStream:new Po({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Lo(t,this.utfEncoder)})}serialize(e,t){return new Mo({messageStream:new Oo({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class No{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new $o({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Do(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 Do=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Uo=e=>new No(e),Fo="function"==typeof TextEncoder?new TextEncoder:null,Bo=e=>{if("string"==typeof e){if(Fo)return Fo.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},jo=e=>new Date(Date.now()+e),Ho=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,qo=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(jo(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},zo=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Vo{async sign(e,t,n){if(!st.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=zo("context",e.context),n=zo("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=zo("signer",n.signer),o=await i(r),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:i,signer:o}=r;let{signingRegion:s,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:jo(i.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Ho(t.$response);if(n){const r=zo("config",e.config),i=r.systemClockOffset;r.systemClockOffset=qo(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Ho(e);if(n){const e=zo("config",t.config);e.systemClockOffset=qo(n,e.systemClockOffset)}}}const Go="required",Wo="fn",Ko="argv",Jo="ref",Qo=!0,Xo="isSet",Yo="booleanEquals",Zo="error",es="endpoint",ts="tree",ns="PartitionResult",rs={[Go]:!1,type:"String"},is={[Go]:!0,default:!1,type:"Boolean"},os={[Jo]:"Endpoint"},ss={[Wo]:Yo,[Ko]:[{[Jo]:"UseFIPS"},!0]},as={[Wo]:Yo,[Ko]:[{[Jo]:"UseDualStack"},!0]},cs={},us={[Wo]:"getAttr",[Ko]:[{[Jo]:ns},"supportsFIPS"]},ds={[Wo]:Yo,[Ko]:[!0,{[Wo]:"getAttr",[Ko]:[{[Jo]:ns},"supportsDualStack"]}]},ls=[ss],hs=[as],fs=[{[Jo]:"Region"}],ps={version:"1.0",parameters:{Region:rs,UseDualStack:is,UseFIPS:is,Endpoint:rs},rules:[{conditions:[{[Wo]:Xo,[Ko]:[os]}],rules:[{conditions:ls,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Zo},{rules:[{conditions:hs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Zo},{endpoint:{url:os,properties:cs,headers:cs},type:es}],type:ts}],type:ts},{rules:[{conditions:[{[Wo]:Xo,[Ko]:fs}],rules:[{conditions:[{[Wo]:"aws.partition",[Ko]:fs,assign:ns}],rules:[{conditions:[ss,as],rules:[{conditions:[{[Wo]:Yo,[Ko]:[Qo,us]},ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Zo}],type:ts},{conditions:ls,rules:[{conditions:[{[Wo]:Yo,[Ko]:[us,Qo]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS is enabled but this partition does not support FIPS",type:Zo}],type:ts},{conditions:hs,rules:[{conditions:[ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"DualStack is enabled but this partition does not support DualStack",type:Zo}],type:ts},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts}],type:ts},{error:"Invalid Configuration: Missing Region",type:Zo}],type:ts}]},ms=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),gs=(e,t={})=>ms.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:o}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const s=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(o,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(ps,{endpointParams:e,logger:t.logger}));bt.aws=Ht;Error;const ys=["in-region","cross-region","mobile","standard","legacy"],ws=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bs=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,o,s=!1;const a=async()=>{i||(i=e());try{r=await i,o=!0,s=!1}finally{i=void 0}return r};return void 0===t?async e=>(o&&!e?.forceRefresh||(r=await a()),r):async e=>(o&&!e?.forceRefresh||(r=await a()),s?r:n&&!n(r)?(s=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(ws()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${ys.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Or),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??gs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Vo}],logger:e?.logger??new Nr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??kn,utf8Decoder:e?.utf8Decoder??lr,utf8Encoder:e?.utf8Encoder??fr}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Bo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ho({serviceId:r.serviceId,clientVersion:ji}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Uo,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Tn),sha256:e?.sha256??co,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},vs=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Lr(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class ks extends ar{config;constructor(...[e]){const t=bs(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Mn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),o=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),s=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,o=null!=n?async()=>Sn(await en(n)()):void 0,s=!!n,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(o);var a;const c=(e=>{const t=Di(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=s,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=vs(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Jt(l),Xt)}})),this.middlewareStack.use(ti(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return s?.info?.({clientName:i,commandName:o,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),on)}}))(this.config,{httpAuthSchemeParametersProvider:Ui,identityProviderConfigProvider:async e=>new sn({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Ss extends Pr{constructor(e){super(e),Object.setPrototypeOf(this,Ss.prototype)}}class As extends Ss{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,As.prototype)}}var Es;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(Es||(Es={}));class Is extends Ss{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Is.prototype)}}class _s extends Ss{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,_s.prototype)}}class xs extends Ss{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,xs.prototype)}}class Rs extends Ss{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Rs.prototype)}}class Cs extends Ss{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Cs.prototype)}}class Ps extends Ss{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Ps.prototype)}}class Ms extends Ss{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,Ms.prototype)}}var Ts;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ts||(Ts={}));var Os;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Os||(Os={}));var Ls;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ls||(Ls={}));var $s;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($s||($s={}));var Ns;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Ns||(Ns={}));var Ds,Us;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ds||(Ds={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Us||(Us={}));var Fs,Bs;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Fs||(Fs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Bs||(Bs={}));var js;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(js||(js={}));var Hs,qs,zs,Vs,Gs,Ws;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Hs||(Hs={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(qs||(qs={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(zs||(zs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Vs||(Vs={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Gs||(Gs={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Ws||(Ws={}));class Ks extends Ss{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Ks.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Js extends Ss{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,Js.prototype)}}class Qs extends Ss{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,Qs.prototype)}}var Xs,Ys,Zs,ea;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(Xs||(Xs={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Ys||(Ys={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Zs||(Zs={}));class ta extends Ss{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ta.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ea||(ea={}));var na,ra,ia;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ia||(ia={}));const oa=e=>({...e,...e.body&&{body:Cr}}),sa=e=>({...e,...e.body&&{body:Cr}}),aa=e=>({...e,...e.body&&{body:Cr}}),ca=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ua=(e,t)=>((e,t)=>_r(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),da=async(e,t)=>{const n=await ua(e,t);return n.message=n.message??n.Message,n};function la(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function ha(e,t){return new fa(e,t)}class fa{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new st({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,o?t.split("/").map(e=>la(e)).join("/"):la(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const pa=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[Va]:e[za]||"application/octet-stream",[qa]:e[qa],[tc]:e[Ja],[Ya]:e[Ga],[Za]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ma=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[Va]:e[za]||"application/octet-stream",[Qa]:e[qa],[tc]:e[Ja],[Ya]:e[Ga],[Za]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ga=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:Ha(e),[za]:[,e.headers[Va]],[Ka]:[,e.headers[ec]]}),r=await _r(e.body,t);return n.body=r,n},ya=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:Ha(e),[za]:[,e.headers[Xa]],[Ka]:[,e.headers[ec]]}),r=e.body;return n.body=Oa(r,t),n},wa=async(e,t)=>{const n={...e,body:await da(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ka(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Aa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ra(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ca(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Ma(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ta(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Ea(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await Ia(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await xa(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Pa(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await _a(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Sa(n,t);default:const i=n.body;return ba({output:e,parsedBody:i,errorCode:r})}},ba=(va=Ss,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Tr(e),o=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||r||o||"UnknownError",$fault:"client",$metadata:i});throw Mr(s,t)})({output:e,parsedBody:t,exceptionCtor:va,errorCode:n})});var va;const ka=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new As({$metadata:Ha(e),...n});return Mr(o,e.body)},Sa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Rs({$metadata:Ha(e),...n});return Mr(o,e.body)},Aa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Is({$metadata:Ha(e),...n});return Mr(o,e.body)},Ea=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalStatusCode:zr,resourceName:Wr});Object.assign(n,i);const o=new Ks({$metadata:Ha(e),...n});return Mr(o,e.body)},Ia=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Js({$metadata:Ha(e),...n});return Mr(o,e.body)},_a=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalMessage:Wr,originalStatusCode:zr});Object.assign(n,i);const o=new ta({$metadata:Ha(e),...n});return Mr(o,e.body)},xa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Qs({$metadata:Ha(e),...n});return Mr(o,e.body)},Ra=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Cs({$metadata:Ha(e),...n});return Mr(o,e.body)},Ca=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ps({$metadata:Ha(e),...n});return Mr(o,e.body)},Pa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ms({$metadata:Ha(e),...n});return Mr(o,e.body)},Ma=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new _s({$metadata:Ha(e),...n});return Mr(o,e.body)},Ta=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new xs({$metadata:Ha(e),...n});return Mr(o,e.body)},Oa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Da(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await La(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await $a(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ba(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Fa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Na(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ua(n.serviceUnavailableException,t)}:{$unknown:e}),La=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Aa(n,t)},$a=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return _a(n,t)},Na=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return xa(n,t)},Da=async(e,t)=>{const n={},r=await ua(e.body,t);return Object.assign(n,ja(r,t)),n},Ua=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Pa(n,t)},Fa=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ma(n,t)},Ba=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ta(n,t)},ja=(e,t)=>Ur(e,{bytes:t.base64Decoder}),Ha=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),qa="accept",za="contentType",Va="content-type",Ga="guardrailIdentifier",Wa="guardrailVersion",Ka="performanceConfigLatency",Ja="trace",Qa="x-amzn-bedrock-accept",Xa="x-amzn-bedrock-content-type",Ya="x-amzn-bedrock-guardrailidentifier",Za="x-amzn-bedrock-guardrailversion",ec="x-amzn-bedrock-performanceconfig-latency",tc="x-amzn-bedrock-trace";class nc extends(xr.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(aa,ca).ser(ma).de(ya).build()){}class rc extends(xr.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(oa,sa).ser(pa).de(ga).build()){}function ic(e,t){const n=sc();return(ic=function(e,t){return n[e-=360]})(e,t)}const oc=ic;function sc(){const e=["_readStaticResponse","editor","getReader","1089046IqXpdu","map","\n<</SYS>>\n[INST]\n","anthropic.claude","data","meta.llama","_apiUrl","474894YOeEOe","_bedrockClientConfig","_prepareRequestHeaders","_readAsyncIterableResponse","_prepareRequestParameters","_processAWSRequest","107931AkbuYQ","send","utf-8","preparePrompt","POST","test","text","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.","completion","generations","get","generation","define","bytes","\n[/INST]","cohere.command","502732EcivMu","AI_ERROR_UNSUPPORTED_MODEL","anthropic.claude-v2","\nYou must keep the text formatting.\n\nContent:\n","13027743MChRfQ","resolve","ai.aws.bedrockClientConfig","config","56sXRyap","json","\n\nAssistant:","getModelFamily","stringify","2tnETDp","completions","ai21.j2","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.","signal","_requestHeaders","join","_requestParameters","Instruction:\n","abortController","bedrock-2023-05-31","length","split","AWSTextAdapter","sendRequest","<<SYS>>\n","pluginName","read","_processProxyRequest","_readStreamableResponse","390368wbeWQT","chunk","Human:\n","application/json","_getGeneratedText","2257035XVKMRc","parse","locale","ai.aws.requestHeaders","ai.aws.requestParameters","body","ai.aws.apiUrl","filter","decode"];return(sc=function(){return e})()}!function(e){const t=ic,n=e();for(;;)try{if(293813===parseInt(t(423))/1*(parseInt(t(436))/2)+parseInt(t(407))/3*(parseInt(t(431))/4)+parseInt(t(382))/5+parseInt(t(401))/6+parseInt(t(394))/7+parseInt(t(377))/8+-parseInt(t(427))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(sc);class ac extends We{[oc(400)];[oc(362)];[oc(402)];[oc(364)];static get[oc(373)](){return oc(370)}constructor(e){const t=oc;super(e),e[t(430)][t(417)](t(386))||e[t(430)][t(419)](t(386),{model:t(425),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(367),stream:!0}),this[t(400)]=e[t(430)][t(417)](t(388)),this[t(402)]=e[t(430)][t(417)](t(429)),this[t(362)]=e[t(430)][t(417)](t(385)),this[t(364)]=e[t(430)][t(417)](t(386))}async[oc(371)]({query:e,context:t,onData:n,actionId:r}){const i=oc,{model:o,stream:s,...a}=await this[i(405)](this[i(364)],r),c={prompt:await this[i(410)](e,t,o,r),...a};this[i(400)]?await this[i(375)](c,o,s,n,r):await this[i(406)](c,o,s,n)}async[oc(410)](e,t,n,r){const i=oc;let o,s;return t?(o=i(414),s=i(365)+e+i(426)+t):(o=i(360),s=e),i(399)==this[i(434)](n)?i(372)+o+i(396)+s+i(421):i(379)+o+"\n"+s+i(433)}[oc(434)](e){const t=oc;if(/^anthropic\.claude/[t(412)](e))return t(397);if(/^ai21\.j2/[t(412)](e))return t(438);if(/^cohere\.command/[t(412)](e))return t(422);if(/^meta\.llama/[t(412)](e))return t(399);throw new b(v(this[t(392)][t(384)],t(424),e))}async[oc(375)](e,t,n,r,i){const o=oc,s={method:o(411),headers:await this[o(403)](this[o(362)],i),body:JSON[o(435)]({...e,model:t,stream:n}),signal:this[o(366)][o(361)]},a=await fetch(this[o(400)],s);n?await this[o(376)](a,t,r):await this[o(391)](a,t,r)}async[oc(406)](e,t,n,r){const i=oc,o=new ks(this[i(402)]),s={body:JSON[i(435)](e),contentType:i(380),accept:i(380),modelId:t};let a;if(n){const e=new nc(s);a=await o[i(408)](e,{abortSignal:this[i(366)][i(361)]}),await this[i(404)](a,t,r)}else{const e=new rc(s);a=await o[i(408)](e,{abortSignal:this[i(366)][i(361)]}),await this[i(391)](a,t,r)}}async[oc(404)](e,t,n){const r=oc,i=e[r(387)],o=new TextDecoder(r(409));let s="";for await(const e of i)if(e[r(378)]){const i=o[r(390)](e[r(378)][r(420)]),a=JSON[r(383)](i);s+=this[r(381)](a,t),n(s)}return Promise[r(428)]()}async[oc(376)](e,t,n){const r=oc,i=e[r(387)],o=new TextDecoder(r(409)),s=i[r(393)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await s[r(374)]();if(u=e,u)break;const d=(a+o[r(390)](i))[r(369)]("\n")[r(395)](e=>{const t=r;try{return a="",JSON[t(383)](e)}catch{return a=e,null}})[r(389)](e=>null!==e);d[r(368)]&&(c+=d[r(395)](e=>this[r(381)](e,t))[r(363)](""),n(c))}return Promise[r(428)]()}async[oc(391)](e,t,n){const r=oc;let i;return i=e instanceof Response?await e[r(432)]():JSON[r(383)](new TextDecoder(r(409))[r(390)](e[r(387)])),n(this[r(381)](i,t)),Promise[r(428)]()}[oc(381)](e,t){const n=oc;switch(this[n(434)](t)){case n(397):return e[n(415)];case n(438):return e[n(437)][0][n(398)][n(413)];case n(422):return e[n(416)][0][n(413)];case n(399):return e[n(418)]}}}function cc(e,t){var n=uc();return(cc=function(e,t){return n[e-=460]})(e,t)}function uc(){var e=["926916vtcCgJ","2931405YvDhJo","40pkBNjx","32MGuBNT","4HEWJzh","1001btutVy","2552512vyhigo","53645KSLxGb","4000670iKThUg","2750310yforco","165ZLAmFh","9888uBrBBT"];return(uc=function(){return e})()}!function(e){for(var t=cc,n=e();;)try{if(809312===-parseInt(t(465))/1*(-parseInt(t(461))/2)+parseInt(t(471))/3+-parseInt(t(462))/4*(-parseInt(t(466))/5)+parseInt(t(469))/6*(parseInt(t(463))/7)+parseInt(t(464))/8+-parseInt(t(467))/9*(parseInt(t(460))/10)+-parseInt(t(468))/11*(parseInt(t(470))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(uc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
|