@ckeditor/ckeditor5-ai 46.0.3 → 46.1.0-alpha.0
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:()=>g,AIAssistant:()=>He,AIAssistantUI:()=>De,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>yc,OpenAITextAdapter:()=>Je,ShowAIAssistantCommand:()=>S,getDefaultAICommands:()=>qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=d;function d(e,t){const n=p();return(d=function(e,t){return n[e-=294]})(e,t)}!function(e){const t=d,n=e();for(;;)try{if(387933===-parseInt(t(371))/1+parseInt(t(376))/2*(-parseInt(t(398))/3)+parseInt(t(345))/4+-parseInt(t(366))/5*(parseInt(t(340))/6)+parseInt(t(297))/7+parseInt(t(304))/8+-parseInt(t(296))/9*(-parseInt(t(324))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(p);const l=globalThis[u(322)],h=u(399);class f extends e.Plugin{static get[u(386)](){return u(329)}static get[u(354)](){return!0}static get[u(395)](){return!0}[u(342)](){const e=u,{editor:t}=this,n=[e(369)];t[e(344)][e(312)](e(382))&&n[e(394)](e(332)),t[e(368)][e(359)](e(373))[e(326)]({model:h,view:{classes:n,priority:12}}),t[e(368)][e(359)](e(373))[e(339)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(337)][r(375)])return null;const i=n[r(327)](r(370));return n[r(384)]([r(369),r(338)],i),i}})}[u(307)](){!async function(e){const t=g([88,122,50,97,85,82,101,77,108,79,99,56,87,110,117,106,69,103,98,65,73,111,71,90,51,113,89,72,52,70,118,119,114,49,120,86,57,102,68,75,107,53,54,55,105,115,83,66,109,104,100,67,48,112,116,84,121,81,76,78,74,80]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],s=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),o={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),s[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](l(e)):null}function l(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=d;return e[t(390)](e=>String[t(396)](e))[t(391)]("")}!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([88]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await s,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(o())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(s(),e),()=>{const e=o();return null==e?(s(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function o(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),s[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function o(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,s,o]=r;return t(i),await n(i,s,o),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](l(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),o,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,s)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1756857600;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=d,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(392)]);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(401)](){const e=u,t=this[e(385)][e(364)];t[e(356)](n=>{const r=e,i=t[r(301)][r(310)][r(365)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(330)][r(298)](i))n[r(314)](i,{range:e});else if(e[r(335)][r(350)]){const s=e[r(335)][r(318)](({item:e})=>!t[r(341)][r(388)](e),{boundaries:e});n[r(351)](i,{usingOperation:!1,affectsData:!1,range:n[r(367)](s,e[r(380)])})}else n[r(351)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(302)](){const e=u,t=this[e(385)][e(364)],n=Array[e(397)](this[e(385)][e(364)][e(330)][e(306)](h));n[e(315)]&&t[e(356)](t=>{const r=e;n[r(328)](e=>{t[r(381)](e)})})}[u(305)](e,t){const n=u,r=this[n(383)](),i=t||r[n(393)]();this[n(385)][n(364)][n(299)](i)&&this[n(385)][n(364)][n(356)](s=>{const o=n;this[o(302)](),t||this[o(333)](s,r),this[o(389)]({insertAt:i,writer:s,html:e})})}[u(348)](e){const t=u,{model:n}=this[t(385)],r=this[t(383)]();n[t(356)](()=>{const n=t,i=this[n(379)](e,r)||this[n(300)](r);this[n(305)](e,i)})}[u(383)](){const e=u,t=this[e(385)][e(364)],n=Array[e(397)](t[e(330)][e(306)](h))[e(390)](t=>t[e(317)]());return t[e(347)](n)}[u(389)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(385)][r(355)],s=this[r(385)][r(357)][r(312)](a.ClipboardPipeline),o=new l;o[r(378)](r(309),t);const d=new ClipboardEvent(r(334),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(372)](n);const f=(t,n)=>{const i=r;n[i(352)]&&e[i(372)](n[i(352)])};s[r(295)](r(353),f,{priority:r(316)}),i[r(301)][r(308)](r(334),h),s[r(387)](r(353),f)}[u(300)](e){const t=u,{model:n}=this[t(385)],r=Array[t(397)](e[t(294)]());return r[t(315)]?n[t(321)](r[t(361)]()):e[t(319)]()}[u(379)](e,t){const n=u,{model:r,plugins:i}=this[n(385)];if(i[n(298)](n(358))){const s=i[n(312)](n(358))[n(320)](t);if(s[n(315)]){const t=this[n(400)](e),i=this[n(363)](s,t);return r[n(311)](i,0)}}return null}[u(400)](e){const t=u,n=this[t(385)][t(357)][t(312)](t(358)),r=this[t(385)][t(360)][t(349)](e),i=Array[t(397)](r[t(402)]())[t(325)](e=>e.is(t(303),t(343)));let s=0;return i[t(328)](e=>{s+=n[t(313)](e)}),s}[u(363)](e,t){const n=u,r=this[n(385)][n(357)][n(312)](n(358)),i=r[n(377)](e),s=r[n(362)](e),o=i[n(323)]+1,a=s[n(346)],c=e[0][n(403)](n(343));for(let e=0;e<t;e++)r[n(331)](c,{at:o});return c[n(336)](o)[n(336)](a)}[u(333)](e,t){const n=u,{plugins:r}=this[n(385)],{model:i}=e;r[n(298)](n(358))&&r[n(312)](n(358))[n(320)](t)[n(315)]&&i[n(374)](t)}}function p(){const e=["getColumnIndexes","_createEmptyTableRows","model","getRanges","1767020cVnWZz","createRange","conversion","ck-fake-ai-selection","span","640270Ilwbuv","setSelection","editingDowncast","deleteContent","isCollapsed","15900QZJInj","getRowIndexes","setData","_prepareTableInsertBelowPosition","end","removeMarker","ai.useTheme","_getAISelection","addClass","editor","pluginName","off","isContent","_pasteHTMLUsingClipboard","map","join","href","getFirstRange","push","isPremiumPlugin","fromCharCode","from","291NZHVrr","ai-ui","_getTableRowCountFromContent","showFakeVisualSelection","getChildren","findAncestor","getSelectedBlocks","once","244089msqepQ","4041086seDAiC","has","canEditAt","_getDefaultInsertBelowPosition","document","hideFakeVisualSelection","element","3723032dqIhUO","insertContent","getMarkersGroup","afterInit","fire","text/html","selection","createPositionAt","get","getRows","updateMarker","length","lowest","getRange","getLastMatchingPosition","getLastPosition","getSelectedTableCells","createPositionAfter","DataTransfer","last","310HDFmrL","filter","markerToHighlight","createUIElement","forEach","AIAssistantEditing","markers","insertRows","ck-ai-assistant-ui_theme","_resetContentOfSelectedTableCells","paste","start","getChild","markerRange","ck-fake-ai-selection_collapsed","markerToElement","6ENhTtD","schema","init","table","config","1077316wrDFiG","first","createSelection","insertContentBelow","parse","isAtEnd","addMarker","resultRange","contentInsertion","isOfficialPlugin","editing","change","plugins","TableUtils","for","data","pop"];return(p=function(){return e})()}var m=y;!function(e){for(var t=y,n=e();;)try{if(884864===parseInt(t(325))/1+parseInt(t(337))/2+parseInt(t(326))/3*(-parseInt(t(328))/4)+parseInt(t(336))/5+-parseInt(t(329))/6*(parseInt(t(322))/7)+-parseInt(t(333))/8+-parseInt(t(327))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(w);class g extends e.Plugin{static get[m(332)](){return m(331)}static get[m(338)](){return!0}static get[m(335)](){return!0}[m(334)](){var e=m;if(!this[e(324)])throw new i.CKEditorError(e(339),null)}}function y(e,t){var n=w();return(y=function(e,t){return n[e-=322]})(e,t)}class b extends Error{constructor(e){var t=m;super(e),this[t(323)]=t(330)}}function w(){var e=["pluginName","3711112HJyQkq","afterInit","isPremiumPlugin","334055ioMgcq","1978326aQvIAs","isOfficialPlugin","aiadapter-text-adapter-not-set","23737HNADZI","name","textAdapter","1758213OdikVY","579nAkIFv","2454570BHJNzT","2300fpnGfk","1914oOEhvE","AIRequestError","AIAdapter"];return(w=function(){return e})()}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=E;!function(e){const t=E,n=e();for(;;)try{if(580437===parseInt(t(491))/1+parseInt(t(506))/2+parseInt(t(512))/3+parseInt(t(509))/4+parseInt(t(513))/5*(parseInt(t(529))/6)+parseInt(t(510))/7+parseInt(t(492))/8*(-parseInt(t(500))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class S extends e.Command{[k(525)];constructor(e,t){const n=k;super(e),this[n(525)]=t,this[n(518)](n(499),[]),this.on(n(503),(e,t,r)=>{const i=n;this[i(493)]&&(this[i(499)]=I(this[i(525)],r))}),this[n(518)](n(527),!1),this.on(n(498),(e,t,r)=>{const i=n;this[i(499)]=r?I(this[i(525)],this[i(527)]):[]})}[k(494)](){const e=k,t=this[e(523)][e(502)];this[e(527)]=function(t){const n=e,r=t[n(511)][n(495)];return r[n(514)]?0!==[...r[n(520)]()][n(531)]&&![...r[n(520)]()][0][n(515)]:!!t[n(504)](r[n(505)]())}(t);const n=t[e(511)][e(495)],r=this[e(523)][e(507)][e(501)](e(530));for(const t of n[e(528)]())for(const n of t[e(522)]())if(n.is(e(519))&&r[e(490)](n[e(517)]))return void(this[e(493)]=!1);this[e(493)]=!0}[k(516)](e="",t="",n=k(489)){const r=k;this[r(523)][r(526)][r(501)](De)[r(497)](e,t,n)}}function E(e,t){const n=A();return(E=function(e,t){return n[e-=489]})(e,t)}function A(){const e=["2225214gznXqT","get","model","change:_hasContext","hasContent","getFirstRange","1288726GiAhod","config","requiresContent","2882604QtngaB","6286273XmyPPd","document","1706886pSnaPR","13660JHGawt","isCollapsed","isEmpty","execute","name","set","element","getSelectedBlocks","values","getItems","editor","add","_commandDefinitions","plugins","_hasContext","getRanges","1854OvmUhh","ai.aiAssistant.disabledElements","length","custom","includes","118432BRswwS","104SILkxv","isEnabled","refresh","selection","from","showUI","change:isEnabled","enabledCommandsIds"];return(A=function(){return e})()}function I(e,t){const n=k,r=new Set;for(const i of e[n(521)]())(t||!1===i[n(508)])&&r[n(524)](i.id);return Array[n(496)](r)}const _=x;function x(e,t){const n=P();return(x=function(e,t){return n[e-=238]})(e,t)}!function(e){const t=x,n=e();for(;;)try{if(490180===-parseInt(t(274))/1*(parseInt(t(319))/2)+-parseInt(t(259))/3*(-parseInt(t(301))/4)+-parseInt(t(321))/5*(-parseInt(t(280))/6)+parseInt(t(263))/7*(parseInt(t(290))/8)+-parseInt(t(289))/9*(-parseInt(t(310))/10)+parseInt(t(241))/11*(-parseInt(t(277))/12)+parseInt(t(309))/13*(-parseInt(t(272))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(P);const R=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class M extends((0,i.ObservableMixin)()){[_(253)];[_(244)];[_(247)];[_(313)];[_(281)];[_(255)];constructor(e,t,n){const r=_;super(),this[r(253)]=e,this[r(244)]=t,this[r(313)]=document[r(296)](r(297)),this[r(281)]=new DOMParser,this[r(255)]=new XMLSerializer,this[r(247)]=n,this[r(273)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(322),(e,t,n)=>{const i=r;this[i(247)][i(279)]=this[i(325)](n)}),this[r(302)](this[r(247)],r(251),(e,t)=>{const n=r,i=this[n(305)]||this[n(269)];this[n(276)](t,i,n(238))}),this[r(302)](this[r(247)],r(239),()=>{const e=r;this[e(247)][e(248)]=this[e(327)],this[e(276)](this[e(264)],this[e(282)],this[e(283)],this[e(327)])}),this[r(302)](this[r(247)],r(316),()=>{this[r(316)]()})}[_(326)](){this[_(246)]()}async[_(340)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(247)][s(248)]=r,this[s(247)][s(268)]=i,this[s(269)]=n,t&&(this[s(247)][s(323)]?this[s(276)](t,n,e,r):this[s(247)][s(261)](s(312),()=>{this[s(276)](t,n,e,r)}))}[_(316)](){const e=_;this[e(314)]&&(this[e(314)]=!1,this[e(247)][e(308)](),this[e(244)][e(333)]())}[_(256)](){const e=_;this[e(269)]="",this[e(305)]="",this[e(317)]="",this[e(282)]="",this[e(264)]="",this[e(327)]="",this[e(283)]=void 0,this[e(247)][e(256)](),this[e(316)]()}async[_(276)](e,t,n,r){const i=_;return this[i(314)]=!0,this[i(247)][i(243)](),this[i(282)]=t,this[i(264)]=e,this[i(327)]=r||e,this[i(283)]=n,new Promise(r=>{const s=i;this[s(244)][s(267)]({query:e,context:t,onData:e=>{const t=s;this[t(317)]=e,this[t(305)]=this[t(270)](this[t(317)])},actionId:n})[s(336)](()=>{const e=s;!this[e(305)]&&this[e(317)]&&(this[e(305)]=this[e(270)](this[e(317)],!0))})[s(341)](e=>{const t=s;e instanceof b?this[t(247)][t(334)](e[t(288)]):this[t(247)][t(334)](),r()})[s(240)](()=>{this[s(316)](),r()})})}[_(270)](e,t=!1){const n=_,r=R[n(306)](e);e=r?e[n(293)](r[1][n(295)]):e[n(295)]<100&&!t?"":this[n(294)](e);const i=this[n(281)][n(329)](e,n(249));if(r){const e=Array[n(254)](i[n(242)][n(298)]);e[n(245)]();for(const t of e){if(t[n(328)]==Node[n(262)])break;t[n(304)]()}}const s=this[n(253)][n(278)][n(286)][n(271)](this[n(255)][n(299)](i[n(242)]));this[n(250)]()||this[n(320)](s);const o=this[n(253)][n(260)][n(318)](n(307)),a=this[n(253)][n(278)][n(311)](s);return o||a[n(285)][n(258)](),this[n(253)][n(278)][n(315)](a)}[_(320)](e){const t=_,n=new c.ViewUpcastWriter(this[t(253)][t(332)][t(247)][t(252)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(331))&&r[t(292)](n)&&(i[t(257)](n),"h1"==n[t(303)]&&(s=!0));if(s)for(const e of i)n[t(324)]("h"+(parseInt(e[t(303)][1])+1),e)}[_(250)](){const e=_,{data:t,editing:n}=this[e(253)],r=t[e(284)][e(271)](e(300)),i=t[e(271)](t[e(311)](r));return!!n[e(247)][e(275)][e(338)](i)[e(335)]("h1")}[_(325)](e){const t=_;return this[t(253)][t(332)][t(247)][t(275)][t(337)](this[t(313)],e),this[t(313)][t(265)]}[_(294)](e){const t=_,n=e[t(287)]();return n[t(339)](t(291))?n[t(266)](t(330))?n[t(293)](7,n[t(295)]-3):n[t(293)](7):e}}function P(){const e=["previousContext","previousActionId","htmlProcessor","markers","processor","trim","message","27NEZGbU","88UxWleE","```html","match","substring","_stripMarkdownSyntax","length","createElement","div","childNodes","serializeToString","<h1></h1>","109024bocZmB","listenTo","name","remove","currentContext","exec","ai.aiAssistant.preserveComments","finishProcessing","52169OxOfkk","3034830mcseDE","toModel","render","_sanitizationContainer","isProcessing","stringify","stopProcessing","currentResponse","get","88898SQcfkO","_normalizeResponseHeadings","1285AyDfIu","set:currentContext","isRendered","rename","_sanitizeHTML","destroy","previousLabel","nodeType","parseFromString","```","element","editing","abort","handleError","querySelector","then","setContentOf","viewToDom","startsWith","updateView","catch","custom","tryAgainEvent","finally","6985OxkkSS","body","startProcessing","textAdapter","reverse","stopListening","view","prompt","text/html","_isH1TagSupportEnabled","submitPrompt","document","editor","from","_xmlSerializer","reset","push","clear","27TagoVK","config","once","ELEMENT_NODE","172144HLIVCl","previousQuery","innerHTML","endsWith","makeRequest","mainAction","initialContext","_parseAndNormalizeContent","toView","3010ElkMdv","set","2Dxqaqf","domConverter","_handleQuery","1740ILDhTe","data","value","2514EKcrNk","_domParser"];return(P=function(){return e})()}const T=C;function C(e,t){const n=L();return(C=function(e,t){return n[e-=111]})(e,t)}!function(e){const t=C,n=e();for(;;)try{if(542179===parseInt(t(112))/1*(-parseInt(t(122))/2)+parseInt(t(135))/3+parseInt(t(121))/4*(-parseInt(t(129))/5)+parseInt(t(117))/6+-parseInt(t(116))/7+-parseInt(t(115))/8*(parseInt(t(128))/9)+parseInt(t(133))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(L);const O={REPLACE:T(145),INSERT:T(143)};class N extends s.ToolbarView{constructor(e){const t=T;super(e),this[t(146)](t(127),!1),this[t(146)](t(111),O[t(136)]),this[t(119)]=this[t(132)]("",t(141)),this[t(119)][t(124)](t(131)).to(this,t(111),n=>v(e,t(120)+n[t(138)]()+t(137))),this[t(140)]=this[t(132)](v(e,t(113))),this[t(125)]=this[t(132)](v(e,t(123))),this[t(114)]=this[t(132)](v(e,t(126)));const n=this[t(144)];this[t(142)]({attributes:{class:[t(147),n.if(t(127),t(118),e=>!e)]}}),this[t(134)][t(139)]([this[t(119)],this[t(140)],this[t(125)],this[t(114)]])}[T(132)](e,t){const n=T,r=new s.ButtonView(this[n(130)]);return r[n(146)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}function L(){const e=["Insert below","stopButton","8iweiIb","554106cHiXgA","1571496BIEayL","ck-hidden","replaceButton","AI_","1556iLRVui","48OybzDS","Try again","bind","tryAgainButton","Stop","isVisible","4800078hHSkOB","7075NFDDoL","locale","label","_createButton","18473670VoGEFj","items","1326717NJUesH","REPLACE","_CONTENT","toUpperCase","addMany","insertButton","ck-button-action","extendTemplate","insert","bindTemplate","replace","set","ck-ai-form__toolbar","mainAction","35267STtjIu"];return(L=function(){return e})()}const D=U;function $(){const e=["listenTo","set","<span>]</span>","write","ck-ai-form__content-field","ck-ai-form__content-area--processing","671697cbvarx","copy","removeAllRanges","Copy","wheel","ck-ai-form__copy-button-wrapper","ck-hidden","innerHTML","value","left","appendLoader","class","mousedown","isProcessing","1758252bmCwoY","querySelector","render","scrollHeight","setContent","loaderView","isEnabled","AI is writing...","3224600SAKocy","isVisible","change:isProcessing","setTemplate","style","locale","contentFieldView","addRange"," ck-ai-form__copy-button--copied","div","remove","_createCopyButton","<span>[</span>","firstElementChild","text/plain","785304niacAH","absolute","_copyHTMLToClipboard","getSelection","bind","430486KWeWDd","clipboard","-9999px","18391XXpJEb","bindTemplate","appendChild","ck-ai-form__copy-button",".ck-ai-form__loader","change:value","14GvpMcS","455238smaYnQ","_createLoader","scrollTo","ClipboardItem","body","smooth","ck-reset_all-excluded","position","element","focus","createElement","textContent","execCommand","icon","5ErImhN","execute","copyButtonView","setStartAfter","createRange","ck-ai-form__loader","ck-content","setEndBefore","text/html","ck-ai-form__content-area","lastElementChild","ck-ai-form__content-area-wrapper"];return($=function(){return e})()}function U(e,t){const n=$();return(U=function(e,t){return n[e-=154]})(e,t)}!function(e){const t=U,n=e();for(;;)try{if(220627===-parseInt(t(189))/1+parseInt(t(186))/2+-parseInt(t(228))/3+-parseInt(t(158))/4*(-parseInt(t(210))/5)+-parseInt(t(181))/6*(-parseInt(t(195))/7)+-parseInt(t(166))/8+-parseInt(t(196))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}($);class B extends s.View{[D(172)];[D(212)];constructor(e,t=""){const n=D;super(e),this[n(223)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(190)];this[n(172)]=new F(e,t),this[n(212)]=this[n(177)](),this[n(169)]({tag:n(175),attributes:{class:["ck",n(221),r.if(n(167),n(234),e=>!e)],tabindex:"-1"},children:[{tag:n(175),attributes:{class:["ck",n(219),r.if(n(157),n(227))]},children:[this[n(172)],{tag:n(175),attributes:{class:["ck",n(233)]},children:[this[n(212)]]}]}]})}[D(160)](){const e=D;super[e(160)](),this[e(236)]&&this[e(172)][e(162)](this[e(236)]);let t=!1;this.on(e(194),(n,r,i)=>{const s=e,o=!this[s(172)][s(204)][s(159)](s(193));this[s(172)][s(162)](i),this[s(157)]&&o&&!t&&this[s(204)][s(198)]({top:this[s(204)][s(161)],behavior:s(201)})}),this.on(e(168),(n,r,i)=>{const s=e;t=!1,i?(this[s(236)]=null,this[s(172)][s(154)]()):this[s(236)]||this[s(172)][s(162)]("")}),this[e(222)](this[e(204)],e(232),()=>{t=!0}),this[e(222)](this[e(204)],e(156),()=>{t=!0})}[D(205)](){const e=D;this[e(204)][e(205)]()}[D(177)](){const e=D,n=this[e(171)],r=new s.ButtonView(this[e(171)]),i=e(192);return r[e(223)]({label:v(n,e(231)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(185)](e(167)).to(this,e(236),e=>!!e),r[e(185)](e(164)).to(this,e(157),e=>!e),r.on(e(211),()=>{const n=e;this[n(183)](this[n(172)][n(204)]),r[n(209)]=t.IconCheck,r[n(155)]=i+n(174),this[n(205)](),setTimeout(()=>{const e=n;r[e(209)]=t.IconCopy,r[e(155)]=i},1e3)}),r}[D(183)](e){const t=D,{window:n,document:r}=i.global;if(n[t(199)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(235)]],{type:t(218)}),"text/plain":new r([e[t(207)]||""],{type:t(180)})})];navigator[t(187)][t(225)](s)}else{const i=r[t(206)](t(175));i[t(170)][t(203)]=t(182),i[t(170)][t(237)]=t(188),i[t(235)]=t(178)+e[t(235)]+t(224),r[t(200)][t(191)](i);const s=r[t(214)]();s[t(213)](i[t(179)]),s[t(217)](i[t(220)]);const o=n[t(184)]();o[t(230)](),o[t(173)](s),r[t(208)](t(229)),i[t(176)]()}}}class F extends s.View{constructor(e,t=""){const n=D;super(e),this[n(163)]=this[n(197)](),this[n(169)]({tag:n(175),attributes:{class:["ck",n(216),t,n(202),n(226)]}})}[D(162)](e){const t=D;this[t(204)][t(235)]=e}[D(154)](){const e=D;this[e(204)][e(191)](this[e(163)][e(204)])}[D(197)](){const e=D,t=new s.View,n=this[e(171)],r=new s.SpinnerView;return r[e(167)]=!0,t[e(169)]({tag:e(175),attributes:{class:["ck",e(215)]},children:[r,{text:v(n,e(165))}]}),t[e(160)](),t}}function j(e,t){const n=H();return(j=function(e,t){return n[e-=209]})(e,t)}function H(){const e=["div","text","content","5109744nJgahz","4258782iRmIWY","7bSnXUD","5dKDAKW","ck-ai-form__error","bindTemplate","584608uhNlSy","set","4701861zqLmSG","315816dfPDUC","30cYuCUS","4019520cITWhn","setTemplate","496518YKZezc"];return(H=function(){return e})()}!function(e){const t=j,n=e();for(;;)try{if(795834===-parseInt(t(210))/1+parseInt(t(220))/2+parseInt(t(215))/3+parseInt(t(214))/4*(-parseInt(t(217))/5)+-parseInt(t(225))/6+-parseInt(t(216))/7*(parseInt(t(223))/8)+parseInt(t(222))/9*(parseInt(t(224))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(H);class q extends s.View{constructor(e,n=""){const r=j;super(e);const i=new s.IconView,o=this[r(219)];this[r(221)](r(212),n),i[r(213)]=t.IconError,this[r(209)]({tag:r(211),attributes:{class:["ck",r(218)]},children:[i,{text:o.to(r(212))}]})}}const V=z;function z(e,t){const n=G();return(z=function(e,t){return n[e-=458]})(e,t)}function G(){const e=["fieldWrapperChildren","target","set","fieldView","9647925QssuhS","1410EzFwTu","execute","queryView","update","7383786deQMBB","History","focusFirst","8zhhbAx","minRows","element","5dYlXtF","rtl","isOn","82GPQNxB","children","locale","isEmpty","fire","ck-ai-form__submit","resultsView","right","_createShowHistoryButton","focusCycler","6421581MUuYsx","value","3056175NjNuxh","keystrokes","add","isVisible","window","focusableChildren","isEnabled","filteredView","25375IkgYLv","submit","_createSubmitButton","1024456xkGfzp","92686lvOiOo","requestAnimationFrame","Submit","style","focus","excludeScrollbarsAndBorders","uiLanguageDirection","bind","render","maxRows","enter","left","submitButtonView","showHistoryButtonView","focusLast","width","ck-ai-form__toggle-history"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(856665===-parseInt(t(501))/1*(parseInt(t(481))/2)+parseInt(t(493))/3+parseInt(t(504))/4+-parseInt(t(478))/5*(parseInt(t(472))/6)+-parseInt(t(467))/7*(-parseInt(t(475))/8)+-parseInt(t(491))/9+parseInt(t(468))/10*(parseInt(t(505))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(458)];[V(459)];constructor(e,t){const n=V;super(e,t),this[n(470)][n(466)][n(476)]=1,this[n(470)][n(466)][n(514)]=3,this[n(458)]=this[n(503)](),this[n(459)]=this[n(489)](),this[n(498)][n(495)](this[n(459)],1),this[n(498)][n(495)](this[n(458)])}[V(513)](){const e=V;super[e(513)](),this[e(470)][e(463)][e(495)](this[e(459)]),this[e(482)][e(495)](this[e(458)]),this[e(494)][e(465)](e(515),(t,n)=>{const r=e;t[r(464)]==this[r(470)][r(466)][r(477)]&&(this[r(502)](),n())})}[V(503)](){const e=V,n=new s.ButtonView(this[e(483)]),r=this[e(483)];return n[e(465)]({icon:t.IconSubmit,label:v(r,e(507)),isVisible:!0,tooltip:!0,class:e(486)}),n.on(e(469),()=>{this[e(502)]()}),n[e(512)](e(499)).to(this[e(470)][e(466)],e(484),this,e(499),(e,t)=>!e&&t),n}[V(489)](){const e=V,n=new s.ButtonView(this[e(483)]),r=this[e(487)],o=this[e(483)];n[e(465)]({label:v(o,e(473)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(462)}),n[e(512)](e(480)).to(r,e(496)),n[e(512)](e(499)).to(this,e(499)),n.on(e(469),()=>{const t=e;r[t(496)]=!r[t(496)],r[t(496)]?this[t(500)][t(509)]():this[t(509)]()});const a=()=>{const t=e;i.global[t(497)][t(506)](()=>{const e=t;if((0,i.isVisible)(this[e(477)])){const t=new i.Rect(this[e(470)][e(466)][e(477)]),r=t[e(461)],s=e(479)===o[e(511)]?e(516):e(488);t[e(510)](),n[e(477)][e(508)][s]=r-t[e(461)]+1+"px"}})};return this[e(470)][e(466)].on(e(471),a),this.on(e(513),a),n}[V(502)](){const e=V,t=this[e(470)][e(466)][e(477)][e(492)];this[e(485)](e(502),t)}[V(509)](e){const t=V;-1===e?this[t(490)][t(460)]():this[t(490)][t(474)]()}}function K(e,t){const n=Y();return(K=function(e,t){return n[e-=296]})(e,t)}const Q=K;function Y(){const e=["1671549JfeTYv","delegate","Prompt history","6894408NMMzxO","add","9266950WQIpaW","15298686KPNNns","2435186RLXHmC","2568915fdFAGD","_createClearHistoryButton","set","execute","children","fire","historyGroupView","12ilVihV","81265VVNRGM","clearHistory","length","Clear","6VcZUrI","label","items","clearHistoryButton","locale","filter"];return(Y=function(){return e})()}!function(e){const t=K,n=e();for(;;)try{if(873223===parseInt(t(320))/1+-parseInt(t(301))/2+parseInt(t(302))/3+-parseInt(t(309))/4*(-parseInt(t(310))/5)+-parseInt(t(314))/6*(parseInt(t(299))/7)+-parseInt(t(297))/8+parseInt(t(300))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Y);class J extends s.ListView{[Q(308)];[Q(317)];constructor(e){const t=Q;super(e),this[t(317)]=this[t(303)](),this[t(308)]=new s.ListItemGroupView,this[t(308)][t(306)][t(298)](this[t(317)],1),this[t(308)][t(315)]=v(e,t(296)),this[t(308)][t(316)][t(321)](t(305)).to(this),this[t(316)][t(298)](this[t(308)])}[Q(319)](){const e=Q;let t=0;for(const n of this[e(316)])t+=n[e(316)][e(312)];return{resultsCount:t,totalItemsCount:t}}[Q(303)](){const e=Q,t=this[e(318)],n=new s.ButtonView(this[e(318)]);return n[e(304)]({label:"("+v(t,e(313))+")",withText:!0}),n.on(e(305),()=>this[e(307)](e(311))),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=ne();return(te=function(e,t){return n[e-=201]})(e,t)}function ne(){const e=["2064002eWpkpK","11894202sbpMPk","set","prompt","execute","80jCrbfQ","503340BXZiPh","locale","40UYJzqg","add","72Ipssfo","3779260bjjyvI","165084EQLwfi","773017qIYoHV","44xBiRll","children","1539390mAOUyO","fire"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(999471===parseInt(t(217))/1+parseInt(t(201))/2+parseInt(t(213))/3*(parseInt(t(209))/4)+parseInt(t(207))/5*(-parseInt(t(211))/6)+-parseInt(t(214))/7*(parseInt(t(206))/8)+-parseInt(t(202))/9+-parseInt(t(212))/10*(-parseInt(t(215))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(208)],n);this[t(216)][t(210)](r),r[t(203)]({label:e[t(204)],withText:!0}),r.on(t(205),()=>{const n=t;this[n(218)](n(205),{value:ee(e[n(204)])})})}}const ie=se;function se(e,t){const n=ce();return(se=function(e,t){return n[e-=265]})(e,t)}!function(e){const t=se,n=e();for(;;)try{if(176124===-parseInt(t(287))/1*(-parseInt(t(278))/2)+-parseInt(t(268))/3+-parseInt(t(286))/4*(parseInt(t(285))/5)+parseInt(t(281))/6+parseInt(t(273))/7+parseInt(t(289))/8+-parseInt(t(275))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);const oe=ie(269);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(274)](),this.on(e(266),(t,n)=>{const r=e,i=ue(n[r(267)]);for(const e of this)if(e!=n&&ue(e[r(267)])===i){this[r(272)](e);break}this[r(270)]>20&&this[r(272)](this[r(280)]),this[r(288)]()}),this.on(e(272),()=>{this[e(288)]()})}[ie(274)](){const e=ie,t=sessionStorage[e(271)](oe)||"[]";this[e(283)](JSON[e(265)](t))}[ie(288)](){const e=ie;sessionStorage[e(284)](oe,JSON[e(282)](this[e(277)](e=>e)))}}function ce(){const e=["trim","map","974MbvoCi","toLowerCase","last","950352TPIxxv","stringify","addMany","setItem","39030fkjCpk","124xTNSQS","269lvREnq","_saveToSessionStorage","372232GCCFMQ","parse","add","prompt","91101mQKXRU","CKEditor/AIFormView/PromptHistory","length","getItem","remove","2009707plLoOY","_loadFromSessionStorage","1570932sTSAdd"];return(ce=function(){return e})()}function ue(e){const t=ie;return e[t(279)]()[t(276)]()}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-=225]})(e,t)}function pe(){const e=["clearHistory","Ask AI and your prompts will be listed here for you to use later.","listenTo","1766166uGlbkA","isEnabled","historyGroupView","focus","label","40lurKcX","focusLast","tryAgainButton","insertButton","565280xVhgWV","108SRWtcf","text","_createHistoryView","replaceButton","_createPromptView","delegate","1654659yyAeuP","focusCycler","shift + tab","fieldView","element","bind","551446TJlXBH","ck-ai-form","ck-hidden","Ask AI to improve generated text","REPLACE","842976mjZLaU","tryAgainEvent","106232pfBuxo","_promptHistory","handleError","items","high","tab","startProcessing","contentArea","prompt","queryView","value","insertContentBelow","set","render","bindTemplate","4tMvxVj","promptView","bindTo","AI_ERROR_FAILED","Ask AI to edit or generate","submit","copyButtonView","focusFirst","stopButton","Empty history","finishProcessing","locale","6060467XJrkbX","isProcessing","errorView","submitPrompt","8rZcGND","ck-ai-form-content","_createToolbar","focusTracker","clear","isError","chain","replaceContent","stopProcessing","mainAction","_focusables","toolbar","fire","keystrokes","add","createCollection","trim","setTemplate","execute","reset","search","isVisible","110IjHXQD","div"];return(pe=function(){return e})()}!function(e){const t=fe,n=e();for(;;)try{if(606604===parseInt(t(305))/1*(-parseInt(t(283))/2)+-parseInt(t(271))/3*(-parseInt(t(290))/4)+-parseInt(t(270))/5+parseInt(t(261))/6+-parseInt(t(230))/7*(parseInt(t(234))/8)+-parseInt(t(277))/9*(-parseInt(t(266))/10)+-parseInt(t(256))/11*(-parseInt(t(288))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(pe);class me extends s.View{[he(237)];[he(247)];[he(297)];[he(245)];[he(306)];[he(232)];[he(244)];[he(278)];[he(291)];constructor(e,t,n=""){const r=he;super(e),this[r(302)](r(262),!0),this[r(302)](r(231),!1),this[r(302)](r(298),""),this[r(302)](r(300),""),this[r(302)](r(239),!1),this[r(302)](r(243),O[r(287)]),this[r(291)]=new ae,this[r(232)]=new q(e),this[r(297)]=new B(e,n),this[r(297)][r(282)](r(231)).to(this),this[r(297)][r(282)](r(300)).to(this),this[r(245)]=this[r(236)](),this[r(245)][r(282)](r(243)).to(this),this[r(306)]=this[r(275)](),this[r(237)]=new i.FocusTracker,this[r(247)]=new i.KeystrokeHandler,this[r(244)]=this[r(249)]([this[r(297)],this[r(297)][r(311)],this[r(245)],this[r(306)]]),this[r(278)]=new s.FocusCycler({focusables:this[r(244)],focusTracker:this[r(237)],keystrokeHandler:this[r(247)],actions:{focusPrevious:r(279),focusNext:r(295)}}),this[r(278)][r(240)](this[r(306)][r(278)]),this[r(306)][r(299)][r(280)][r(282)](r(300)).to(this,r(298));const o=this[r(304)];this[r(251)]({tag:r(257),attributes:{class:["ck",r(284),t],tabindex:"-1"},children:[{tag:r(257),attributes:{class:["ck",r(235)]},children:[{tag:r(257),attributes:{class:[o.if(r(239),r(285),e=>!e)]},children:[this[r(232)]]},this[r(297)],this[r(245)],this[r(306)]]}]})}[he(303)](){const e=he;super[e(303)](),this[e(237)][e(248)](this[e(297)][e(281)]),this[e(237)][e(248)](this[e(297)][e(311)][e(281)]),this[e(237)][e(248)](this[e(245)][e(281)]),this[e(237)][e(248)](this[e(306)][e(281)]),this[e(247)][e(260)](this[e(281)])}[he(264)](e=1){const t=he;-1===e?this[t(278)][t(267)]():this[t(278)][t(225)]()}[he(253)](){const e=he;this[e(298)]="",this[e(300)]="",this[e(239)]=!1,this[e(306)][e(253)](),this[e(297)][e(255)]=!1,this[e(245)][e(255)]=!1}[he(275)](){const e=he,t=this[e(229)],n=new W(t,{queryView:{label:v(t,e(309)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(227)),secondary:v(t,e(259))}}},filteredView:this[e(273)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(282)](e(262)).to(this,e(262),this,e(231),(e,t)=>e&&!t),this[e(260)](n,e(310),(t,n)=>{const r=e;this[r(298)]=n;const i=le(n);this[r(246)](r(233),i),n[r(250)]()&&this[r(291)][r(248)]({prompt:i},0)},{priority:e(294)}),n}[he(273)](){const e=he,t=new J(this[e(229)]);return t[e(263)][e(293)][e(307)](this[e(291)]).as(re),t.on(e(258),()=>{const t=e;this[t(291)][t(238)](),this[t(306)][t(254)](""),this[t(306)][t(264)]()}),t}[he(236)](){const e=he,t=new N(this[e(229)]);return t[e(274)][e(282)](e(262)).to(this,e(262),this,e(231),this,e(300),(e,t,n)=>e&&!t&&!!n),t[e(274)][e(276)](e(252)).to(this,e(241)),t[e(269)][e(282)](e(262)).to(this,e(262),this,e(231),this,e(300),(e,t,n)=>e&&!t&&!!n),t[e(269)][e(276)](e(252)).to(this,e(301)),t[e(268)][e(282)](e(262)).to(this,e(262),this,e(231),(e,t)=>e&&!t),t[e(268)][e(276)](e(252)).to(this,e(289)),t[e(226)][e(282)](e(262)).to(this,e(231)),t[e(226)][e(276)](e(252)).to(this,e(242)),t}[he(296)](){const e=he;this[e(300)]="",this[e(239)]=!1,this[e(231)]=!0,this[e(297)][e(255)]=!0,this[e(245)][e(255)]=!0,this[e(297)][e(264)]()}[he(228)](){const e=he,t=this[e(229)];this[e(231)]=!1,this[e(298)]="",this[e(306)][e(253)](),this[e(300)]&&(this[e(306)][e(299)][e(265)]=v(t,e(286)))}[he(292)](e){const t=he,n=this[t(229)];this[t(228)](),this[t(239)]=!0,this[t(232)][t(272)]=e||v(n,t(308)),this[t(300)]||(this[t(297)][t(255)]=!1)}}var ge=n(673),ye=n.n(ge),be=n(545),we=n.n(be),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=we(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ee(),Me.insert=ke().bind(null,"head"),Me.domAPI=we(),Me.insertStyleElement=Ie();ye()(Re.A,Me);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Te={attributes:{"data-cke":!0}};Te.setAttributes=Ee(),Te.insert=ke().bind(null,"head"),Te.domAPI=we(),Te.insertStyleElement=Ie();ye()(Pe.A,Te);Pe.A&&Pe.A.locals&&Pe.A.locals;const Ce=Le;function Oe(){const e=["addMany","isOfficialPlugin","model","update","ai.aiAssistant.contentAreaCssClass","bind","filter","init","schema","requires","from","once","includes","document","trialLimit","length"," ck-ai-assistant-ui_theme","groupLabel","body","aiLicenseKeyInvalid","_showLicenseError","_forceMarkersCopy","replace","evaluationLimit","define","tableOfContents","_initAriaAiStatusChangeAnnouncements","label","_uiCssClasses","hideFakeVisualSelection","9yhVKnU","AI Assistant","forEach","order","set","map","ai.aiAssistant.commands","getData","getSelectedBlocks","wasMoved","isPremiumPlugin","DataTransfer","aiAssistant","componentFactory","Generated content: %0","items","getLimitElement","aiLicenseKeyUsageLimit","promptView","change:value","locale","children","delegate","config","commands","panelView","show","selection","30498qYpZSt","buttons","change:isError","isEnabled","AIAssistant","ai-commands-config-order-collision","text/html","sort","menuBar:aiAssistant","2HKeOjv","ck-ai-assistant-ui","showAIAssistant","AI is writing","media","_licenseKeyCheckInterval","ai.aiAssistant.disabledElements","Error during AI content generation: %0","aiLicenseKeyValid","comment","queryView","ck-ai-assistant-button ","EDITOR_TOP_SIDE","fieldView","760396bMPhgs","_createAIAssistantUIButton","aiLicenseKeyTrialLimit","_populateMenuBarMenu","2153464ieBuJm","_initView","announce","_getResolvedCommandsDefinitions","pluginName","change:enabledCommandsIds","93669DmEsvr","licenseKey","replaceContent","usageLimit","destroy","reset","AIAssistantUI","_commandDefinitions","source","plugins","322BprQHz","getSelectedElement","expired","featureNotAllowed","custom","menuitemcheckbox","aiLicenseKeyNotAllowed","buttonView","splice","</p>","push","textAdapter","rawHtml","execute","aiLicenseKeyExpired","currentContext","aiLicenseKeyEvaluationLimit","enabledCommandsIds","fire","_dialog","4209930DoGfSv","requiresContent","ai.useTheme","get","_aiAdapter","editing","copy","domainLimit","getRanges","isOn","editor","errorView","menuPanelClass","insertContent","contentArea","aiCommands","aiLicenseKeyDomainLimit","setSelection","add","_aiAssistantController","menuBar:aiCommands","render","groupId","prompt","updateView","menuView","trim","showUI","isFlat","listenTo","insertContentBelow","312801YMpvfn","hide","ck-ai-commands-dropdown ","polite","hideUI","INSERT","focus","AI Commands","REPLACE","change:isProcessing","updatePosition","view","1384370BmajvU","_onExecute","<p>","values","text","command:","_getMenuBarGroupButtons","isCollapsed","showFakeVisualSelection","_formView","invalid","change"];return(Oe=function(){return e})()}!function(e){const t=Le,n=e();for(;;)try{if(187029===-parseInt(t(406))/1*(parseInt(t(382))/2)+-parseInt(t(467))/3+parseInt(t(396))/4+parseInt(t(479))/5+-parseInt(t(373))/6*(parseInt(t(416))/7)+parseInt(t(400))/8*(-parseInt(t(521))/9)+parseInt(t(436))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const Ne=globalThis[Ce(356)];function Le(e,t){const n=Oe();return(Le=function(e,t){return n[e-=352]})(e,t)}class De extends e.Plugin{[Ce(407)];[Ce(387)];[Ce(435)];[Ce(488)];[Ce(440)];[Ce(455)];[Ce(519)]="";static get[Ce(404)](){return Ce(412)}static get[Ce(492)](){return!0}static get[Ce(355)](){return!0}static get[Ce(500)](){return[a.ClipboardMarkersUtils,f,g,s.Dialog]}constructor(e){const t=Ce;super(e),e[t(368)][t(515)](t(388),[t(386),t(428),t(516)]),e[t(368)][t(515)](t(495),""),e[t(368)][t(515)](t(438),!0),this[t(519)]=t(383)+(e[t(368)][t(439)](t(438))?t(507):"")}[Ce(498)](){const e=Ce,{editor:n}=this;this[e(440)]=n[e(415)][e(439)](g),this[e(435)]=n[e(415)][e(439)](s.Dialog),this[e(488)]=null,this[e(413)]=this[e(403)]();const r=new S(n,Array[e(501)](this[e(413)][e(482)]()));n[e(369)][e(454)](e(384),r),n.ui[e(358)][e(454)](e(451),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(525)]({class:a(469)+this[a(519)]}),c[a(423)][a(525)]({label:v(i,a(474)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(429),e=>this[a(480)](e[a(414)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(478)][a(509)],function(e){const t=a,n=o(e[t(368)][t(439)](t(527)),e[t(365)]),r=Ue(e,n)[t(497)](e=>e[t(369)][t(506)]);return 1===r[t(506)]?Ue(e,r[0][t(369)])[t(526)](e=>({id:e.id,label:e[t(518)]})):r[t(526)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(526)](e=>({id:e.id,label:e[r(518)]}))}})}(n),{ariaLabel:v(i,a(474))}),c[a(461)][a(448)]=a(469)+this[a(519)],r.on(a(405),u),c[a(461)][a(502)](a(457),u),c;function u(){const e=a;c[e(376)]=r[e(433)][e(506)]>0;for(const t of c[e(461)][e(374)])t[e(376)]=r[e(433)][e(503)](t.id)}}),n.ui[e(358)][e(454)](e(456),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(423)][a(525)]({label:v(i,a(474)),icon:t.IconMagicWand}),c[a(496)](a(376)).to(r,a(433),e=>e[a(506)]>0);const u=o(n[a(368)][a(439)](a(527)),i);return this[a(399)](r,c,u,e=>this[a(480)](e)),c}),n.ui[e(358)][e(454)](e(357),()=>{const t=e,n=this[t(397)](s.ButtonView);return n[t(525)]({tooltip:!0,class:t(393)+this[t(519)]}),n}),n.ui[e(358)][e(454)](e(381),()=>{const t=e,n=this[t(397)](s.MenuBarMenuListItemButtonView);return n[t(525)]({role:t(421)}),n}),this[e(407)]=this[e(446)][e(368)][e(439)](e(407));const i=this[e(446)];this[e(387)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(390)==s||t(510)==s||t(430)==s||t(452)==s||t(422)==s||t(432)==s||t(398)==s||t(362)==s){delete i[r],n=s,clearInterval(this[t(387)]),this[t(387)]=void 0;break}}t(510)==n&&i[t(511)](t(489)),t(430)==n&&i[t(511)](t(418)),t(452)==n&&i[t(511)](t(443)),t(422)==n&&i[t(511)](t(419),t(377)),t(432)==n&&i[t(511)](t(514)),t(398)==n&&i[t(511)](t(505)),t(362)==n&&i[t(511)](t(409))},1e3)}[Ce(410)](){const e=Ce;super[e(410)](),this[e(387)]&&clearInterval(this[e(387)])}[Ce(463)](e="",n="",r=Ce(420)){const i=Ce,o=this[i(446)],u=o[i(441)][i(478)],d=o[i(415)][i(439)](f),l=o[i(415)][i(439)](a.ClipboardMarkersUtils);d[i(487)]();const h=new Ne,p=new ClipboardEvent(i(442),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,p,{dataTransfer:m});l[i(512)](i(391),()=>{const e=i;u[e(504)][e(434)](e(442),g)}),this[i(488)]||(this[i(401)](),this[i(455)]=new M(o,this[i(440)][i(427)],this[i(488)]));let y=m[i(352)](i(379));const b=o[i(493)][i(504)][i(372)],w=Array[i(501)](b[i(444)]());1===w[i(506)]&&w[0][i(464)]&&!b[i(417)]()&&""!==y[i(513)](/ /g,"")[i(462)]()&&(y=i(481)+y+i(425)),this[i(455)][i(460)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:O[o[i(493)][i(504)][i(372)][i(486)]?i(472):i(475)]}),i(357)!==this[i(435)].id?this[i(435)][i(371)]({id:i(357),icon:t.IconRobotPencil,title:v(this[i(446)][i(365)],i(522)),content:this[i(488)],position:s.DialogViewPosition[i(394)],onShow:()=>{const e=i;this[e(488)][e(473)]()},onHide:()=>{const e=i;this[e(455)][e(411)](),d[e(520)]()}}):this[i(435)][i(478)][i(354)]||this[i(435)][i(478)][i(477)]()}[Ce(471)](){const e=Ce;this[e(435)][e(468)]()}[Ce(403)](){const e=Ce,t=new Map,n=o(this[e(446)][e(368)][e(439)](e(527)),this[e(446)][e(365)]);for(const r of n)for(const n of r[e(369)])t[e(525)](n.id,{...n,groupId:r[e(458)],groupLabel:r[e(508)]||r[e(458)]});return t}[Ce(397)](e){const n=Ce,r=this[n(446)],i=r[n(369)][n(439)](n(384)),s=new e(r[n(365)]);return s[n(525)]({label:v(r[n(365)],n(522)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(496)](n(376)).to(i),s[n(496)](n(445)).to(this[n(435)],"id",e=>n(357)===e),this[n(465)](s,n(429),()=>{const e=n;s[e(445)]?this[e(471)]():i[e(429)]()}),s}[Ce(401)](){const e=Ce,t=this[e(446)][e(415)][e(439)](f);this[e(488)]=new me(this[e(446)][e(365)],this[e(519)],this[e(446)][e(368)][e(439)](e(495))),this[e(488)].on(e(364),()=>{const t=e;this[t(435)][t(478)][t(354)]||this[t(435)][t(478)][t(477)]()}),this[e(488)][e(363)][e(392)][e(395)].on(e(494),()=>{const t=e;this[t(435)][t(478)][t(354)]||this[t(435)][t(478)][t(477)]()}),this[e(465)](this[e(488)],e(408),()=>{const n=e;t[n(449)](this[n(455)][n(431)]),this[n(471)]()}),this[e(465)](this[e(488)],e(466),()=>{const n=e;t[n(466)](this[n(455)][n(431)]),this[n(471)]()}),this[e(517)]()}[Ce(517)](){const e=Ce,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(446)];this[e(488)][e(450)].on(e(476),(r,i,s)=>{const o=e,a=this[o(455)][o(431)];s?n[o(402)](v(t,o(385))):a&&n[o(402)](v(t,o(359),a),{politeness:o(470),isUnsafeHTML:!0})}),this[e(488)].on(e(375),(r,i,s)=>{const o=e;if(s){const e=this[o(488)][o(447)][o(483)];n[o(402)](v(t,o(389),e))}})}[Ce(480)](e){const t=Ce,n=this[t(413)][t(439)](e),r=this[t(446)],s=r[t(493)][t(504)][t(372)],o=r[t(369)][t(439)](t(384)),a=r[t(415)][t(439)](f),c=("_ungrouppedCommands"!==n[t(458)]?n[t(508)]+": ":"")+n[t(518)];if(!1!==n[t(437)]&&s[t(486)]){const e=(0,i.first)(s[t(353)]())||r[t(493)][t(499)][t(361)](s);r[t(493)][t(490)](n=>{n[t(453)](e,"in")})}a[t(487)](),o[t(429)](n[t(459)],c,t(484)+e)}[Ce(399)](e,t,n,r){const i=Ce,o=this[i(446)],a=o[i(365)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(497)](e=>e[i(369)][i(506)]);1===u[i(506)]?this[i(485)]({command:e,commands:u[0][i(369)],parentMenuView:t,onExecute:r})[i(523)](e=>c[i(360)][i(454)](e)):u[i(523)](({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(485)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(423)][d(525)]({label:o||n}),h[d(367)](d(429)).to(t),f[d(360)][d(491)](p),h[d(370)][d(366)][d(454)](f),l[d(366)][d(454)](h),c[d(360)][d(454)](l)}),t[i(370)][i(366)][i(454)](c)}[Ce(485)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Ce,o=this[i(446)],a=o[i(365)];return Ue(o,t)[i(526)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(525)]({label:t[o(518)]}),u[o(367)](o(429)).to(n),u.on(o(429),()=>r(t.id)),u[o(496)](o(376)).to(e,o(433),e=>e[o(503)](t.id)),c[o(366)][o(454)](u),c})}}function $e(e,t){const n=Ce;return void 0!==e[n(524)]&&void 0===t[n(524)]?1:void 0===e[n(524)]&&void 0!==t[n(524)]?-1:void 0!==e[n(524)]&&void 0!==t[n(524)]?e[n(524)]-t[n(524)]:0}function Ue(e,t){const n=Ce;t[n(380)]($e);const r={},s=[];for(const o of t)if(void 0!==o[n(524)]){if(o[n(524)]in r)throw new i.CKEditorError(n(378),e,{conflictingDefinitions:[o,r[o[n(524)]]]});r[o[n(524)]]=o,s[n(424)](o[n(524)],0,o)}else s[n(426)](o);return s}const Be=Fe;function Fe(e,t){const n=je();return(Fe=function(e,t){return n[e-=226]})(e,t)}function je(){const e=["translate","2143801wgacEf","Improve using casual, informal language to convey a casual conversation with a real person.","Improve writing","journalism","80lhauIt","translateGerman","Improve using direct language, using only the essential information.","locale","Spanish","business","106EZbTth","filter","Translate the content to Spanish language.","Translate the content to French language.","direct","Translate","continue","Translate the content to Hindi language.","professional","90TKfzCa","45684204ZDFiRe","isOfficialPlugin","13POJotO","push","groupId","editOrReview","Business","poetic","Confident","Make longer","get","define","translatePortuguese","English","Direct","Generate from selection","legal","find","summarize","Translate the content to English language.","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Hindi","Simplify language","set","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","translateHindi","AIAssistant","Improve using compelling, optimistic language to convey confidence in the writing.","Translate the content to Arabic language.","pluginName","isPremiumPlugin","friendly","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","forEach","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Change style","Arabic","includes","4642285GXVAuF","Edit or review","requires","Improve this content by using descriptive language and inserting more information and more detailed explanations.","ai.aiAssistant.extraCommandGroups","Translate the content to Simplified Chinese language.","Change tone","casual","German","3838251USgfBk","Poetic","changeStyle","commands","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","737658ZtaAtC","Continue","ai.aiAssistant.preserveComments","Translate the content to German language.","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Legal","ai.aiAssistant.removeCommands","config","changeTone","translateFrench","Journalism","translateChinese","translateSpanish","12yPBcdd","Rewrite this content as a journalist using engaging language to convey the importance of the information.","Professional","Portuguese","confident","improveWriting","4apdMtR","Simplified Chinese","concat","Rewrite this content as a legal professional using valid legal terminology.","Friendly","662529uNGVaJ","Summarize","3913sABBmZ","generate","translateEnglish","Make shorter","ai.aiAssistant.commands","simplifyLanguage","Improve using friendly, comforting language, to convey understanding and empathy.","French","Translate the content to Portuguese language.","Casual","translateArabic","Rewrite this content as a business professional with formal language.","makeLonger","makeShorter"];return(je=function(){return e})()}!function(e){const t=Fe,n=e();for(;;)try{if(957917===-parseInt(t(319))/1*(-parseInt(t(230))/2)+-parseInt(t(288))/3*(-parseInt(t(312))/4)+-parseInt(t(279))/5*(parseInt(t(306))/6)+parseInt(t(317))/7+-parseInt(t(338))/8*(parseInt(t(293))/9)+parseInt(t(239))/10*(-parseInt(t(334))/11)+-parseInt(t(240))/12*(-parseInt(t(242))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class He extends e.Plugin{static get[Be(281)](){return[De,f]}static get[Be(269)](){return Be(266)}static get[Be(241)](){return!0}static get[Be(270)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(300)],r=e[t(227)];n[t(251)](t(295),!0),n[t(251)](t(323),qe(r)),n[t(251)](t(283),[]),n[t(251)](t(299),[]);let i=o(n[t(250)](t(323)),r);const s=n[t(250)](t(283)),a=n[t(250)](t(299));s[t(274)](e=>{const n=t,r=i[n(257)](t=>t[n(244)]===e[n(244)]);r?r[n(291)]=r[n(291)][n(314)](e[n(291)]):i[n(243)](e)}),i=i[t(231)](e=>!a[t(278)](e[t(244)])),i[t(274)](e=>{const n=t;e[n(291)]=e[n(291)][n(231)](e=>!a[n(278)](e.id))}),n[t(263)](t(323),i)}}function qe(e){const t=Be;return[{groupId:t(245),groupLabel:v(e,t(280)),commands:[{id:t(311),label:v(e,t(336)),prompt:t(272)},{id:t(332),label:v(e,t(322)),prompt:t(292)},{id:t(331),label:v(e,t(249)),prompt:t(282)},{id:t(324),label:v(e,t(262)),prompt:t(264)}]},{groupId:t(320),groupLabel:v(e,t(255)),commands:[{id:t(258),label:v(e,t(318)),prompt:t(297)},{id:t(236),label:v(e,t(294)),prompt:t(275)}]},{groupId:t(301),groupLabel:v(e,t(285)),commands:[{id:t(238),label:v(e,t(308)),prompt:t(273)},{id:t(286),label:v(e,t(328)),prompt:t(335)},{id:t(234),label:v(e,t(254)),prompt:t(226)},{id:t(310),label:v(e,t(248)),prompt:t(267)},{id:t(271),label:v(e,t(316)),prompt:t(325)}]},{groupId:t(290),groupLabel:v(e,t(276)),commands:[{id:t(229),label:v(e,t(246)),prompt:t(330)},{id:t(256),label:v(e,t(298)),prompt:t(315)},{id:t(337),label:v(e,t(303)),prompt:t(307)},{id:t(247),label:v(e,t(289)),prompt:t(260)}]},{groupId:t(333),groupLabel:v(e,t(235)),commands:[{id:t(321),label:v(e,t(253)),prompt:t(259)},{id:t(305),label:v(e,t(228)),prompt:t(232)},{id:t(252),label:v(e,t(309)),prompt:t(327)},{id:t(339),label:v(e,t(287)),prompt:t(296)},{id:t(302),label:v(e,t(326)),prompt:t(233)},{id:t(304),label:v(e,t(313)),prompt:t(284)},{id:t(265),label:v(e,t(261)),prompt:t(237)},{id:t(329),label:v(e,t(277)),prompt:t(268)}]}]}const Ve=ze;function ze(e,t){const n=Ge();return(ze=function(e,t){return n[e-=323]})(e,t)}function Ge(){const e=["928xYUZlw","signal","3615rEEUNV","aitextadapter-send-request-failed","_prepareRequestHeaders","1219182tpdtUF","textAdapter","plugins","sendRequest","makeRequest","9585blXuEf","resolve","AbortError","5GVDdzn","4882740ITqqbd","253268inNoZp","aborted","get","188635jgNzrr","application/json","abortController","catch","AI_ERROR_GET_PARAMETERS","object","editor","assign","_prepareRequestParameters","init","locale","name","reject","error","1414168aSrMKc","AI_ERROR_GET_HEADERS","requires","abort","406dVYtMF"];return(Ge=function(){return e})()}!function(e){const t=ze,n=e();for(;;)try{if(133006===parseInt(t(355))/1+parseInt(t(336))/2*(parseInt(t(339))/3)+-parseInt(t(352))/4*(-parseInt(t(350))/5)+parseInt(t(342))/6+-parseInt(t(332))/7+parseInt(t(337))/8*(parseInt(t(347))/9)+-parseInt(t(351))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[Ve(357)];static get[Ve(334)](){return[g]}constructor(e){const t=Ve;super(e),this[t(357)]=new AbortController}[Ve(327)](){const e=Ve;this[e(324)][e(344)][e(354)](g)[e(343)]=this}[Ve(335)](){const e=Ve;this[e(357)][e(338)][e(353)]||(this[e(357)][e(335)](),this[e(357)]=new AbortController)}async[Ve(346)](e){const t=Ve;return this[t(345)](e)[t(358)](e=>{const n=t;if(e instanceof b)return Promise[n(330)](e);if(n(349)==e[n(329)])return Promise[n(348)]();throw console[n(331)](e),new i.CKEditorError(n(340),null)})}async[Ve(341)](e,t){const n=Ve,r=this[n(324)][n(328)],i={"Content-Type":n(356)};if(n(323)==typeof e)Object[n(325)](i,e);else if(e)try{const r=await e(t);Object[n(325)](i,r)}catch{return Promise[n(330)](new b(v(r,n(333))))}return i}async[Ve(326)](e,t){const n=Ve,r=this[n(324)][n(328)];if(n(323)==typeof e)return e;try{return await e(t)}catch{return Promise[n(330)](new b(v(r,n(359))))}}}const Ke=Qe;function Qe(e,t){const n=Ye();return(Qe=function(e,t){return n[e-=302]})(e,t)}function Ye(){const e=["12XLiCiz","user","2156904leucpg","map","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.","248lGqRbv","POST","length","reject","define","stringify","text","_prepareRequestParameters","stream","split","Instruction:\n","266751fTPsVG","json","filter","ai.openAI.apiUrl","decode","resolve","pluginName","_prepareRequestHeaders","getReader","_readStaticResponse","470MdebZW","5222214kiunJi","AI_ERROR_CONTEXT_LENGTH","AI_ERROR_MODERATION","121957YYmjBJ","_apiUrl","data: ","editor","_isBufferIncomplete","5788279HFKmVv","replace","ai.openAI.requestParameters","prepareMessages","1571652sfbisL","\nYou must keep the text formatting.\n\nContent:\n","system","ai.openAI.requestHeaders","OpenAITextAdapter","signal","690078plBrxz","get","body","https://api.openai.com/v1/chat/completions","choices","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.","[DONE]","abortController","content","Moderation","_readStreamableResponse","locale","gpt-4o","delta","includes","sendRequest","message","join","context_length_exceeded","_requestHeaders","read","config","_cleanUpData","5mRCMRW","parse","_requestParameters"];return(Ye=function(){return e})()}!function(e){const t=Qe,n=e();for(;;)try{if(788922===-parseInt(t(326))/1+-parseInt(t(332))/2*(-parseInt(t(358))/3)+parseInt(t(360))/4+parseInt(t(355))/5*(parseInt(t(314))/6)+-parseInt(t(322))/7+-parseInt(t(363))/8*(-parseInt(t(303))/9)+parseInt(t(313))/10*(-parseInt(t(317))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ye);class Je extends We{[Ke(318)];[Ke(351)];[Ke(357)];static get[Ke(309)](){return Ke(330)}constructor(e){const t=Ke;super(e),e[t(353)][t(367)](t(306),t(335)),e[t(353)][t(333)](t(324))||e[t(353)][t(367)](t(324),{model:t(344),temperature:1,top_p:1,stream:!0}),this[t(318)]=e[t(353)][t(333)](t(306)),this[t(351)]=e[t(353)][t(333)](t(329))||{},this[t(357)]=e[t(353)][t(333)](t(324))}async[Ke(347)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(320)][i(343)],o=await this[i(325)](e,t,r),a=await this[i(310)](this[i(351)],r),c=await this[i(370)](this[i(357)],r),u={messages:o,...c},d={method:i(364),headers:a,body:JSON[i(368)](u),signal:this[i(339)][i(331)]},l=await fetch(this[i(318)],d);if(l.ok)return c[i(371)]?await this[i(342)](l,n):await this[i(312)](l,n),Promise[i(308)]();{const e=await l[i(369)]();return e[i(346)](i(350))?Promise[i(366)](new b(v(s,i(315)))):e[i(346)](i(341))?Promise[i(366)](new b(v(s,i(316)))):Promise[i(366)](new Error(e))}}async[Ke(325)](e,t,n){const r=Ke;let i,s;return t?(i=r(362),s=r(302)+e+r(327)+t):(i=r(337),s=e),[{role:r(328),content:i},{role:r(359),content:s}]}async[Ke(342)](e,t){const n=Ke,r=e[n(334)][n(311)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(352)](),d=s+i[n(307)](u);let l="";c=e;try{l=this[n(354)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(321)](o)||o&&(a+=o,o="",t(a))}return Promise[n(308)]()}async[Ke(312)](e,t){const n=Ke;return t((await e[n(304)]())[n(336)][0][n(348)][n(340)]),Promise[n(308)]()}[Ke(321)](e){const t=Ke,n=e[t(372)]("<")[t(365)]!==e[t(372)](">")[t(365)],r=e[t(365)]<30;return n&&r}[Ke(354)](e){const t=Ke;return e[t(372)](/\n(?![^{]*\})/g)[t(361)](e=>e[t(323)](t(319),""))[t(305)](e=>e&&e[t(365)]>0&&t(338)!==e)[t(361)](e=>{const n=t,{choices:r}=JSON[n(356)](e);if(r[0]?.[n(345)]?.[n(340)])return r[0][n(345)][n(340)]})[t(305)](e=>e)[t(349)]("")}}var Xe,Ze,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,st;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(st||(st={}));class ot{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new ot({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return ot.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!ot.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!ot.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[lt]=o),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),bt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!bt(e))return!1;return!0},wt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const Et=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),At={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:Et,isSet:e=>null!=e,isValidHostLabel:bt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map(([e,t])=>`${e}=${t}`).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Et(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in wt&&null!=i[1]?wt[i[0]][i[1]](...r):It[e](...r)},Mt=({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}=Mt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Ct=(e,t)=>{if(Array.isArray(e))return e.map(e=>Ct(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]:Ct(r,t)}),{}),Nt=(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)},Lt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Tt(u,o)},...null!=c&&{properties:Ot(c,o)},url:Nt(a,o)}},Dt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},$t=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Lt(n,t);if(e)return e}else if("error"===n.type)Dt(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=$t(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Bt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Bt(t))return!1;return!0}return!!bt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Ft=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const Ht={isVirtualHostableS3Bucket:Bt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,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}=Ft;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function qt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}wt.aws=Ht;const Vt=/\d{12}\.ddb/;const zt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Qt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Yt)||[],a=(await e.defaultUserAgentProvider()).map(Yt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&qt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?qt(e,"RETRY_MODE_ADAPTIVE","F"):qt(e,"RETRY_MODE_STANDARD","E"):qt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Vt)&&qt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":qt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":qt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":qt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&qt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))qt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Yt)||[],d=await e.userAgentAppId();d&&a.push(Yt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[Gt]=s[Gt]?`${s[zt]} ${h}`:h),s[zt]=l):s[Gt]=l,t({...r,request:i})},Yt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Jt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Xt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Xt||(Xt={}));const Zt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Zt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},sn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class on{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Zt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||an)(i));return(o.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(ot.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),bn=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},wn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),En=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 wn(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("?"))),bn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},An=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await En(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Zt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),xn)}}}const Mn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Pn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(An({config:e,instructions:t}),Mn)}});var Tn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Tn||(Tn={}));const Cn=Tn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Nn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Ln=[500,502,503,504],Dn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],$n=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Bn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Nn.includes(e.name)||Dn.includes(e?.code||"")||$n.includes(e?.code||"")||Ln.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Bn(e.cause,t+1);class Fn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Fn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Fn.setTimeoutFn=setTimeout;const jn=100,Hn=2e4,qn="amz-sdk-invocation-id",Vn="amz-sdk-request",zn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Hn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Tn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Hn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return zn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,zn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Tn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Fn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qn;const Yn=new Uint8Array(16);function Jn(){if(!Qn&&(Qn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qn(Yn)}const Xn=[];for(let e=0;e<256;++e)Xn.push((e+256).toString(16).slice(1));function Zn(e,t=0){return Xn[e[t+0]]+Xn[e[t+1]]+Xn[e[t+2]]+Xn[e[t+3]]+"-"+Xn[e[t+4]]+Xn[e[t+5]]+"-"+Xn[e[t+6]]+Xn[e[t+7]]+"-"+Xn[e[t+8]]+Xn[e[t+9]]+"-"+Xn[e[t+10]]+Xn[e[t+11]]+Xn[e[t+12]]+Xn[e[t+13]]+Xn[e[t+14]]+Xn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Jn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Zn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>sr[t.step]-sr[e.step]||or[t.priority||"normal"]-or[e.priority||"normal"])).map(s).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=nr(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},sr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},or={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function br(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 wr={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===wr.supported&&(wr.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),wr.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})}))}),br(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const Sr={},Er={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Er[t]=e}function Ar(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Er))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Er[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)},xr=e=>"function"==typeof e?e():e;class Rr{constructor(e,t){this.name=e,this.traits=t}}class Mr extends Rr{constructor(e,t,n){super(e,t),this.name=e,this.traits=t,this.valueSchema=n,this.symbol=Mr.symbol}static[Symbol.hasInstance](e){const t=Mr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Mr.symbol}return t}}Mr.symbol=Symbol.for("@smithy/core/schema::ListSchema");class Pr extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.keySchema=n,this.valueSchema=r,this.symbol=Pr.symbol}static[Symbol.hasInstance](e){const t=Pr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Pr.symbol}return t}}Pr.symbol=Symbol.for("@smithy/core/schema::MapSchema");const Tr={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 Cr extends Rr{constructor(e,t,n){super(e,n),this.name=e,this.schemaRef=t,this.traits=n,this.symbol=Cr.symbol}static[Symbol.hasInstance](e){const t=Cr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Cr.symbol}return t}}Cr.symbol=Symbol.for("@smithy/core/schema::SimpleSchema");class Or extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.memberNames=n,this.memberList=r,this.symbol=Or.symbol,this.members={};for(let e=0;e<n.length;++e)this.members[n[e]]=Array.isArray(r[e])?r[e]:[r[e],0]}static[Symbol.hasInstance](e){const t=Or.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Or.symbol}return t}}Or.symbol=Symbol.for("@smithy/core/schema::StructureSchema");class Nr{constructor(e,t){this.ref=e,this.memberName=t,this.symbol=Nr.symbol;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;Array.isArray(r);)n.push(r[1]),r=r[0],i=xr(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,Nr.translateTraits(t))}}else this.memberTraits=0;if(i instanceof Nr)return this.name=i.name,this.traits=i.traits,this._isMemberSchema=i._isMemberSchema,this.schema=i.schema,this.memberTraits=Object.assign({},i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.ref=i.ref,void(this.memberName=t??i.memberName);if(this.schema=xr(i),this.schema&&"object"==typeof this.schema?this.traits=this.schema?.traits??{}:this.traits=0,this.name=("object"==typeof this.schema?this.schema?.name:void 0)??this.memberName??this.getSchemaName(),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(!0)} must initialize with memberName argument.`)}static[Symbol.hasInstance](e){const t=Nr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Nr.symbol}return t}static of(e,t){return e instanceof Nr?e:new Nr(e,t)}static translateTraits(e){if("object"==typeof e)return e;const t={};return 1&~(e|=0)||(t.httpLabel=1),1==(e>>1&1)&&(t.idempotent=1),1==(e>>2&1)&&(t.idempotencyToken=1),1==(e>>3&1)&&(t.sensitive=1),1==(e>>4&1)&&(t.httpPayload=1),1==(e>>5&1)&&(t.httpResponseCode=1),1==(e>>6&1)&&(t.httpQueryParams=1),t}static memberFrom(e,t){return e instanceof Nr?(e.memberName=t,e._isMemberSchema=!0,e):new Nr(e,t)}getSchema(){return this.schema instanceof Nr?this.schema=this.schema.getSchema():this.schema instanceof Cr?xr(this.schema.schemaRef):xr(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 - cannot get member name on 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>=Tr.LIST_MODIFIER&&e<Tr.MAP_MODIFIER:e instanceof Mr}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=Tr.MAP_MODIFIER&&e<=255:e instanceof Pr}isDocumentSchema(){return this.getSchema()===Tr.DOCUMENT}isStructSchema(){const e=this.getSchema();return null!==e&&"object"==typeof e&&"members"in e||e instanceof Or}isBlobSchema(){return this.getSchema()===Tr.BLOB||this.getSchema()===Tr.STREAMING_BLOB}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=Tr.TIMESTAMP_DEFAULT&&e<=Tr.TIMESTAMP_EPOCH_SECONDS}isStringSchema(){return this.getSchema()===Tr.STRING}isBooleanSchema(){return this.getSchema()===Tr.BOOLEAN}isNumericSchema(){return this.getSchema()===Tr.NUMERIC}isBigIntegerSchema(){return this.getSchema()===Tr.BIG_INTEGER}isBigDecimalSchema(){return this.getSchema()===Tr.BIG_DECIMAL}isStreaming(){return!!this.getMergedTraits().streaming||this.getSchema()===Tr.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()}),this.normalizedTraits}getMemberTraits(){return Nr.translateTraits(this.memberTraits)}getOwnTraits(){return Nr.translateTraits(this.traits)}getKeySchema(){if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"key");if(!this.isMapSchema())throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(!0)}`);const e=this.getSchema();return"number"==typeof e?Nr.memberFrom([63&e,0],"key"):Nr.memberFrom([e.keySchema,0],"key")}getValueSchema(){const e=this.getSchema();if("number"==typeof e){if(this.isMapSchema())return Nr.memberFrom([63&e,0],"value");if(this.isListSchema())return Nr.memberFrom([63&e,0],"member")}if(e&&"object"==typeof e){if(this.isStructSchema())throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(!0)}`);const t=e;if("valueSchema"in t){if(this.isMapSchema())return Nr.memberFrom([t.valueSchema,0],"value");if(this.isListSchema())return Nr.memberFrom([t.valueSchema,0],"member")}}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"value");throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a value member.`)}hasMemberSchema(e){if(this.isStructSchema()){return e in this.getSchema().members}return!1}getMemberSchema(e){if(this.isStructSchema()){const t=this.getSchema();if(!(e in t.members))throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a member with name=${e}.`);return Nr.memberFrom(t.members[e],e)}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],e);throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have members.`)}getMemberSchemas(){const{schema:e}=this,t=e;if(!t||"object"!=typeof t)return{};if("members"in t){const e={};for(const n of t.memberNames)e[n]=this.getMemberSchema(n);return e}return{}}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 acquire structIterator on non-struct schema.");const e=this.getSchema();for(let t=0;t<e.memberNames.length;++t)yield[e.memberNames[t],Nr.memberFrom([e.memberList[t],0],e.memberNames[t])]}getSchemaName(){const e=this.getSchema();if("number"==typeof e){const t=63&e,n=192&e,r=Object.entries(Tr).find(([,e])=>e===t)?.[0]??"Unknown";switch(n){case Tr.MAP_MODIFIER:return`${r}Map`;case Tr.LIST_MODIFIER:return`${r}List`;case 0:return r}}return"Unknown"}}Nr.symbol=Symbol.for("@smithy/core/schema::NormalizedSchema");const Lr="***SensitiveInformation***";function Dr(e,t){if(null==t)return t;const n=Nr.of(e);if(n.getMergedTraits().sensitive)return Lr;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=Dr(i,e[t]));return r}return t}class $r{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Ur}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Ur{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 $r{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?Dr.bind(null,e._operationSchema.input):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(e._operationSchema?Dr.bind(null,e._operationSchema.output):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Br="***SensitiveInformation***";class Fr 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 Fr.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===Fr?Fr.isInstance(e):!!Fr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const jr=(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},Hr=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"]}),qr=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{}}},Vr=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)),zr=e=>null!=e;class Gr{trace(){}debug(){}info(){}warn(){}error(){}}function Wr(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,Qr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Yr(r,null,s,e):r[e]=s[e];return r}const Kr=(e,t)=>{const n={};for(const r in t)Yr(n,e,t,r);return n},Qr=(e,t,n)=>Wr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Yr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Jr,o=Xr,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Jr=e=>null!=e,Xr=e=>e,Zr=(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}`)}}),ei=e=>ti(e,32),ti=(e,t)=>{const n=Zr(e);if(void 0!==n&&ni(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},ni=(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]}},ri=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return si.warn(ii(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ii=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),si={warn:console.warn},oi=e=>e?.body instanceof ReadableStream,ai=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,ci=e=>{const t={error:e,errorType:ui(e)},n=hi(e.$response);return n&&(t.retryAfterHint=n),t},ui=e=>Un(e)?"THROTTLING":Bn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Bn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",di={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},li=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!ai(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[qn]=er());;)try{d&&(u.headers[Vn]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=ci(t);if(o=tr(t),d&&oi(u))throw(n.logger instanceof Gr?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),di)}}),hi=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 fi=(pi=3e5,e=>mi(e)&&e.expiration.getTime()-Date.now()<pi);var pi;const mi=e=>void 0!==e.expiration,gi=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),yi="X-Amz-Date",bi="X-Amz-Signature",wi="X-Amz-Security-Token",vi="authorization",ki=yi.toLowerCase(),Si=[vi,ki,"date"],Ei=bi.toLowerCase(),Ai="x-amz-content-sha256",Ii=wi.toLowerCase(),_i={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},xi=/^proxy-/,Ri=/^sec-/,Mi="AWS4-HMAC-SHA256",Pi="AWS4-HMAC-SHA256-PAYLOAD",Ti="aws4_request",Ci={},Oi=[],Ni=(e,t,n)=>`${e}/${t}/${n}/${Ti}`,Li=(e,t,n)=>{const r=new e(t);return r.update(gi(n)),r.digest()},Di=({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 _i||t?.has(s)||xi.test(s)||Ri.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},$i=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===Ai)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(gi(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ui{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=lr(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ji.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Fi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}}var Bi;!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"}(Bi||(Bi={}));const Fi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ji{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&&Hi(t),new ji(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Hi(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Hi(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const qi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))Si.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Vi=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class zi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Ei)continue;const i=mr(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${mr(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(gi(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,Vi(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 Gi extends zi{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 Ui}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=Ni(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=ot.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(qi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[wi]=d.sessionToken),m.query["X-Amz-Algorithm"]=Mi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[yi]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Di(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[bi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await $i(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=Ni(a,o,s??this.service),d=await $i({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[Pi,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(gi(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=qi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ni(d,a,s??this.service);c.headers[ki]=u,o.sessionToken&&(c.headers[Ii]=o.sessionToken);const h=await $i(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(Ai,c.headers)&&this.applyChecksum&&(c.headers[Ai]=h);const f=Di(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[vi]=`${Mi} 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,Mi),s=new this.sha256(await n);return s.update(gi(i)),Ir(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Ir(await Li(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Ci)return Ci[s];for(Oi.push(s);Oi.length>50;)delete Ci[Oi.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,Ti])o=await Li(e,o,t);return Ci[s]=o})(this.sha256,e,n,t,r||this.service)}}const Wi=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,fi,mi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const Ki=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 Qi=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},Yi={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 Xi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Zi(e){return e instanceof Uint8Array?e:"string"==typeof e?Xi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function es(e){return"string"==typeof e?0===e.length:0===e.byteLength}var ts={name:"SHA-256"},ns={name:"HMAC",hash:ts},rs=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 is={};function ss(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:is}var os=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!es(e)){var t=Zi(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 ss().crypto.subtle.sign(ns,t,e.toHash).then(function(e){return new Uint8Array(e)})}):es(this.toHash)?Promise.resolve(rs):Promise.resolve().then(function(){return ss().crypto.subtle.digest(ts,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){ss().crypto.subtle.importKey("raw",Zi(e.secret),ns,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function as(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 cs(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 us(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 ds=64,ls=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]),hs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],fs=Math.pow(2,53)-1,ps=function(){function e(){this.state=Int32Array.from(hs),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>fs)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ds&&(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%ds>=56){for(var r=this.bufferLength;r<ds;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<ds;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+(ls[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}(),ms=function(){function e(e){this.secret=e,this.hash=new ps,this.reset()}return e.prototype.update=function(e){if(!es(e)&&!this.error)try{this.hash.update(Zi(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 as(this,void 0,void 0,function(){return cs(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ps,this.secret){this.outer=new ps;var e=function(e){var t=Zi(e);if(t.byteLength>ds){var n=new ps;n.update(t),t=n.digest()}var r=new Uint8Array(ds);return r.set(t),r}(this.secret),t=new Uint8Array(ds);t.set(e);for(var n=0;n<ds;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 gs=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ys(e){return e&&gs.every(function(t){return"function"==typeof e[t]})}var bs=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)&&ys(e.crypto.subtle)}(ss())?this.hash=new ms(e):this.hash=new os(e)}return e.prototype.update=function(e,t){this.hash.update(Zi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ws=n(369),vs=n.n(ws);const ks=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};!function(){function e(){this.crc32=new Es}e.prototype.update=function(e){es(e)||this.crc32.update(Zi(e))},e.prototype.digest=function(){return as(this,void 0,void 0,function(){return cs(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 Es}}();var Ss,Es=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=us(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^As[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}(),As=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 Is{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&&_s(t),new Is(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&_s(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function _s(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class xs{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(Is.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!$s.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:Rs,value:!0};break;case 1:t[i]={type:Rs,value:!1};break;case 2:t[i]={type:Ms,value:e.getInt8(n++)};break;case 3:t[i]={type:Ps,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:Ts,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Cs,value:new Is(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Os,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:Ns,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Ls,value:new Date(new Is(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:Ds,value:`${Ir(o.subarray(0,4))}-${Ir(o.subarray(4,6))}-${Ir(o.subarray(6,8))}-${Ir(o.subarray(8,10))}-${Ir(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ss||(Ss={}));const Rs="boolean",Ms="byte",Ps="short",Ts="integer",Cs="long",Os="binary",Ns="string",Ls="timestamp",Ds="uuid",$s=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Us{constructor(e,t){this.headerMarshaller=new xs(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 Es;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 Es).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 Bs{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 Fs{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 js{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 Hs{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 qs(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 Vs{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Us(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 js({messageStream:new Bs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:qs(t,this.utfEncoder)})}serialize(e,t){return new Fs({messageStream:new Hs({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class zs{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Vs({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Gs(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 Gs=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Ws=e=>new zs(e),Ks="function"==typeof TextEncoder?new TextEncoder:null,Qs=e=>{if("string"==typeof e){if(Ks)return Ks.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}`)},Ys=e=>new Date(Date.now()+e),Js=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Xs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ys(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Zs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class eo{async sign(e,t,n){if(!ot.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=Zs("context",e.context),n=Zs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Zs("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:Ys(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Js(t.$response);if(n){const r=Zs("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Xs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Js(e);if(n){const e=Zs("config",t.config);e.systemClockOffset=Xs(n,e.systemClockOffset)}}}const to="required",no="fn",ro="argv",io="ref",so=!0,oo="isSet",ao="booleanEquals",co="error",uo="endpoint",lo="tree",ho="PartitionResult",fo={[to]:!1,type:"String"},po={[to]:!0,default:!1,type:"Boolean"},mo={[io]:"Endpoint"},go={[no]:ao,[ro]:[{[io]:"UseFIPS"},!0]},yo={[no]:ao,[ro]:[{[io]:"UseDualStack"},!0]},bo={},wo={[no]:"getAttr",[ro]:[{[io]:ho},"supportsFIPS"]},vo={[no]:ao,[ro]:[!0,{[no]:"getAttr",[ro]:[{[io]:ho},"supportsDualStack"]}]},ko=[go],So=[yo],Eo=[{[io]:"Region"}],Ao={version:"1.0",parameters:{Region:fo,UseDualStack:po,UseFIPS:po,Endpoint:fo},rules:[{conditions:[{[no]:oo,[ro]:[mo]}],rules:[{conditions:ko,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:co},{rules:[{conditions:So,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:co},{endpoint:{url:mo,properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{rules:[{conditions:[{[no]:oo,[ro]:Eo}],rules:[{conditions:[{[no]:"aws.partition",[ro]:Eo,assign:ho}],rules:[{conditions:[go,yo],rules:[{conditions:[{[no]:ao,[ro]:[so,wo]},vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:co}],type:lo},{conditions:ko,rules:[{conditions:[{[no]:ao,[ro]:[wo,so]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS is enabled but this partition does not support FIPS",type:co}],type:lo},{conditions:So,rules:[{conditions:[vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"DualStack is enabled but this partition does not support DualStack",type:co}],type:lo},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo}],type:lo},{error:"Invalid Configuration: Missing Region",type:co}],type:lo}]},Io=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"]}),_o=(e,t={})=>Io.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const o=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(Ao,{endpointParams:e,logger:t.logger}));wt.aws=Ht;Error;const xo=["in-region","cross-region","mobile","standard","legacy"],Ro=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Mo=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(Ro()?"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 ${xo.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(qr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_o,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new eo}],logger:e?.logger??new Gr,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??Qs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ks({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??Ws,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||Cn),sha256:e?.sha256??bs,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},Po=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Vr(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 To extends ar{config;constructor(...[e]){const t=Mo(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Tn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>Sn(await en(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=Wi(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=Po(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Qt(l),Jt)}})),this.middlewareStack.use(li(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),sn)}}))(this.config,{httpAuthSchemeParametersProvider:Ki,identityProviderConfigProvider:async e=>new on({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Co extends Fr{constructor(e){super(e),Object.setPrototypeOf(this,Co.prototype)}}class Oo extends Co{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}var No;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));class Lo extends Co{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Lo.prototype)}}class Do extends Co{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,Do.prototype)}}class $o extends Co{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,$o.prototype)}}class Uo extends Co{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Uo.prototype)}}class Bo extends Co{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Bo.prototype)}}class Fo extends Co{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Fo.prototype)}}class jo extends Co{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,jo.prototype)}}var Ho;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));var qo;!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])}(qo||(qo={}));var Vo;!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])}(Vo||(Vo={}));var zo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(zo||(zo={}));var Go;!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])}(Go||(Go={}));var Wo,Ko;!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])}(Wo||(Wo={})),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])}(Ko||(Ko={}));var Qo,Yo;!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])}(Qo||(Qo={})),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])}(Yo||(Yo={}));var Jo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));var Xo,Zo,ea,ta,na,ra;!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])}(Zo||(Zo={})),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])}(ea||(ea={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(ta||(ta={})),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])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={}));class ia extends Co{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ia.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class sa extends Co{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,sa.prototype)}}class oa extends Co{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,oa.prototype)}}var aa,ca,ua,da;!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])}(aa||(aa={})),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])}(ca||(ca={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(ua||(ua={}));class la extends Co{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,la.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])}(da||(da={}));var ha,fa,pa;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(ha||(ha={})),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])}(fa||(fa={})),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])}(pa||(pa={}));const ma=e=>({...e,...e.body&&{body:Br}}),ga=e=>({...e,...e.body&&{body:Br}}),ya=e=>({...e,...e.body&&{body:Br}}),ba=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),wa=(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{}}),va=async(e,t)=>{const n=await wa(e,t);return n.message=n.message??n.Message,n};function ka(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Sa(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 ot({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map(e=>ka(e)).join("/"):ka(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 Aa=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[Za]:e[Za],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});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()},Ia=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[oc]:e[Za],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});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()},_a=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Xa(e),[ec]:[,e.headers[tc]],[ic]:[,e.headers[dc]]}),r=await _r(e.body,t);return n.body=r,n},xa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Xa(e),[ec]:[,e.headers[ac]],[ic]:[,e.headers[dc]]}),r=e.body;return n.body=qa(r,t),n},Ra=async(e,t)=>{const n={...e,body:await va(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 Ta(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Oa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ua(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ba(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ja(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ha(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Na(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await La(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await $a(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Fa(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await Da(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Ca(n,t);default:const i=n.body;return Ma({output:e,parsedBody:i,errorCode:r})}},Ma=(Pa=Co,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Hr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw jr(o,t)})({output:e,parsedBody:t,exceptionCtor:Pa,errorCode:n})});var Pa;const Ta=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Oo({$metadata:Xa(e),...n});return jr(s,e.body)},Ca=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Uo({$metadata:Xa(e),...n});return jr(s,e.body)},Oa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Lo({$metadata:Xa(e),...n});return jr(s,e.body)},Na=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalStatusCode:ei,resourceName:ri});Object.assign(n,i);const s=new ia({$metadata:Xa(e),...n});return jr(s,e.body)},La=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new sa({$metadata:Xa(e),...n});return jr(s,e.body)},Da=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalMessage:ri,originalStatusCode:ei});Object.assign(n,i);const s=new la({$metadata:Xa(e),...n});return jr(s,e.body)},$a=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new oa({$metadata:Xa(e),...n});return jr(s,e.body)},Ua=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Bo({$metadata:Xa(e),...n});return jr(s,e.body)},Ba=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Fo({$metadata:Xa(e),...n});return jr(s,e.body)},Fa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new jo({$metadata:Xa(e),...n});return jr(s,e.body)},ja=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Do({$metadata:Xa(e),...n});return jr(s,e.body)},Ha=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new $o({$metadata:Xa(e),...n});return jr(s,e.body)},qa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Wa(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Va(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await za(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ya(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Qa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Ga(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ka(n.serviceUnavailableException,t)}:{$unknown:e}),Va=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Oa(n,t)},za=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Da(n,t)},Ga=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return $a(n,t)},Wa=async(e,t)=>{const n={},r=await wa(e.body,t);return Object.assign(n,Ja(r,t)),n},Ka=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Fa(n,t)},Qa=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return ja(n,t)},Ya=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Ha(n,t)},Ja=(e,t)=>Kr(e,{bytes:t.base64Decoder}),Xa=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"]}),Za="accept",ec="contentType",tc="content-type",nc="guardrailIdentifier",rc="guardrailVersion",ic="performanceConfigLatency",sc="trace",oc="x-amzn-bedrock-accept",ac="x-amzn-bedrock-content-type",cc="x-amzn-bedrock-guardrailidentifier",uc="x-amzn-bedrock-guardrailversion",dc="x-amzn-bedrock-performanceconfig-latency",lc="x-amzn-bedrock-trace";class hc extends($r.classBuilder().ep(Yi).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(ya,ba).ser(Ia).de(xa).build()){}class fc extends($r.classBuilder().ep(Yi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(ma,ga).ser(Aa).de(_a).build()){}const pc=gc;function mc(){const e=["parse","_processAWSRequest","_requestParameters","1390728WkAeLU","bytes","json","_requestHeaders","2709FkELYK","utf-8","stringify","\n\nAssistant:","\n[/INST]","5822240IgrbXh","_prepareRequestHeaders","pluginName","ai21.j2","_readStaticResponse","_getGeneratedText","1tLnkXn","define","getModelFamily","anthropic.claude","AI_ERROR_UNSUPPORTED_MODEL","_prepareRequestParameters","10683937MSnZMq","resolve","abortController","cohere.command","_bedrockClientConfig","getReader","get","_readAsyncIterableResponse","test","AWSTextAdapter","\nYou must keep the text formatting.\n\nContent:\n","generations","config","ai.aws.requestParameters","locale","generation","_readStreamableResponse","chunk","data","2754176TbBRmv","sendRequest","map","filter","signal","18luvVcr","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","anthropic.claude-v2","\n<</SYS>>\n[INST]\n","preparePrompt","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.","text","bedrock-2023-05-31","POST","split","editor","decode","body","_apiUrl","application/json","_processProxyRequest","1394695DHTwdT","ai.aws.bedrockClientConfig","read","ai.aws.requestHeaders","12qsuBBf","Instruction:\n","12663610rhPunr","completions","send","meta.llama","<<SYS>>\n","Human:\n","21192rxlDKk","ai.aws.apiUrl","join","length"];return(mc=function(){return e})()}function gc(e,t){const n=mc();return(gc=function(e,t){return n[e-=103]})(e,t)}!function(e){const t=gc,n=e();for(;;)try{if(850115===parseInt(t(160))/1*(parseInt(t(104))/2)+parseInt(t(130))/3*(-parseInt(t(145))/4)+parseInt(t(126))/5+-parseInt(t(138))/6*(-parseInt(t(149))/7)+-parseInt(t(154))/8*(-parseInt(t(109))/9)+-parseInt(t(132))/10+-parseInt(t(166))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(mc);class yc extends We{[pc(123)];[pc(148)];[pc(170)];[pc(144)];static get[pc(156)](){return pc(175)}constructor(e){const t=pc;super(e),e[t(178)][t(172)](t(179))||e[t(178)][t(161)](t(179),{model:t(112),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(117),stream:!0}),this[t(123)]=e[t(178)][t(172)](t(139)),this[t(170)]=e[t(178)][t(172)](t(127)),this[t(148)]=e[t(178)][t(172)](t(129)),this[t(144)]=e[t(178)][t(172)](t(179))}async[pc(105)]({query:e,context:t,onData:n,actionId:r}){const i=pc,{model:s,stream:o,...a}=await this[i(165)](this[i(144)],r),c={prompt:await this[i(114)](e,t,s,r),...a};this[i(123)]?await this[i(125)](c,s,o,n,r):await this[i(143)](c,s,o,n)}async[pc(114)](e,t,n,r){const i=pc;let s,o;return t?(s=i(110),o=i(131)+e+i(176)+t):(s=i(115),o=e),i(135)==this[i(162)](n)?i(136)+s+i(113)+o+i(153):i(137)+s+"\n"+o+i(152)}[pc(162)](e){const t=pc;if(/^anthropic\.claude/[t(174)](e))return t(163);if(/^ai21\.j2/[t(174)](e))return t(157);if(/^cohere\.command/[t(174)](e))return t(169);if(/^meta\.llama/[t(174)](e))return t(135);throw new b(v(this[t(120)][t(180)],t(164),e))}async[pc(125)](e,t,n,r,i){const s=pc,o={method:s(118),headers:await this[s(155)](this[s(148)],i),body:JSON[s(151)]({...e,model:t,stream:n}),signal:this[s(168)][s(108)]},a=await fetch(this[s(123)],o);n?await this[s(182)](a,t,r):await this[s(158)](a,t,r)}async[pc(143)](e,t,n,r){const i=pc,s=new To(this[i(170)]),o={body:JSON[i(151)](e),contentType:i(124),accept:i(124),modelId:t};let a;if(n){const e=new hc(o);a=await s[i(134)](e,{abortSignal:this[i(168)][i(108)]}),await this[i(173)](a,t,r)}else{const e=new fc(o);a=await s[i(134)](e,{abortSignal:this[i(168)][i(108)]}),await this[i(158)](a,t,r)}}async[pc(173)](e,t,n){const r=pc,i=e[r(122)],s=new TextDecoder(r(150));let o="";for await(const e of i)if(e[r(183)]){const i=s[r(121)](e[r(183)][r(146)]),a=JSON[r(142)](i);o+=this[r(159)](a,t),n(o)}return Promise[r(167)]()}async[pc(182)](e,t,n){const r=pc,i=e[r(122)],s=new TextDecoder(r(150)),o=i[r(171)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(128)]();if(u=e,u)break;const d=(a+s[r(121)](i))[r(119)]("\n")[r(106)](e=>{const t=r;try{return a="",JSON[t(142)](e)}catch{return a=e,null}})[r(107)](e=>null!==e);d[r(141)]&&(c+=d[r(106)](e=>this[r(159)](e,t))[r(140)](""),n(c))}return Promise[r(167)]()}async[pc(158)](e,t,n){const r=pc;let i;return i=e instanceof Response?await e[r(147)]():JSON[r(142)](new TextDecoder(r(150))[r(121)](e[r(122)])),n(this[r(159)](i,t)),Promise[r(167)]()}[pc(159)](e,t){const n=pc;switch(this[n(162)](t)){case n(163):return e[n(111)];case n(157):return e[n(133)][0][n(103)][n(116)];case n(169):return e[n(177)][0][n(116)];case n(135):return e[n(181)]}}}function bc(e,t){var n=wc();return(bc=function(e,t){return n[e-=485]})(e,t)}function wc(){var e=["1606395ymtPAU","126xoyBPc","772849jQVToH","134877nxtmRo","437404MQRjGH","112832VgXeSh","415096LdDxFf","6adsayl","465189QzbbDG"];return(wc=function(){return e})()}!function(e){for(var t=bc,n=e();;)try{if(160975===parseInt(t(493))/1+parseInt(t(486))/2+parseInt(t(489))/3+parseInt(t(485))/4+parseInt(t(490))/5+parseInt(t(488))/6*(parseInt(t(492))/7)+-parseInt(t(487))/8*(parseInt(t(491))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
|
|
5
|
+
*/(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=o},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach(function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)}),r>0){var o=Object.keys(n),c=a.default.find(o,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:s.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:s.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>b,AIAssistant:()=>je,AIAssistantUI:()=>$e,AIRequestError:()=>w,AITextAdapter:()=>We,AWSTextAdapter:()=>gc,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);const u=f;function d(){const e=["afterInit","markerToElement","_getTableRowCountFromContent","conversion","href","getColumnIndexes","filter","updateMarker","isAtEnd","markerRange","isPremiumPlugin","DataTransfer","_resetContentOfSelectedTableCells","insertContent","contentInsertion","9kIVoMr","isCollapsed","fromCharCode","getChild","element","config","2264YQiQkY","map","first","ai.useTheme","2525022hNTOkU","markerToHighlight","text/html","setData","init","createPositionAfter","table","setSelection","get","getSelectedBlocks","hideFakeVisualSelection","createUIElement","_getDefaultInsertBelowPosition","removeMarker","createRange","model","getMarkersGroup","span","length","document","from","331988jkymKn","off","addMarker","editingDowncast","getChildren","change","220xnJwbB","markers","isOfficialPlugin","for","plugins","end","_prepareTableInsertBelowPosition","ai-ui","lowest","resultRange","showFakeVisualSelection","11ZlPQyd","editing","canEditAt","_getAISelection","260118lhvFZQ","167574QpHLdV","20fnnhuw","isContent","deleteContent","findAncestor","TableUtils","forEach","13573jptrty","ck-fake-ai-selection","paste","createPositionAt","ck-ai-assistant-ui_theme","schema","has","getRange","data","getLastPosition","insertRows","pop","createSelection","fire","getSelectedTableCells","push","165204CYWeLj","selection","insertContentBelow","editor","getRows","getRowIndexes","parse","once","addClass","ck-fake-ai-selection_collapsed","last","getLastMatchingPosition","getFirstRange","start","10784556mkPdvU","_createEmptyTableRows","getRanges","join","_pasteHTMLUsingClipboard","AIAssistantEditing","pluginName"];return(d=function(){return e})()}!function(e){const t=f,n=e();for(;;)try{if(811262===-parseInt(t(266))/1+parseInt(t(336))/2+parseInt(t(326))/3*(-parseInt(t(357))/4)+parseInt(t(268))/5*(parseInt(t(267))/6)+-parseInt(t(274))/7*(parseInt(t(332))/8)+-parseInt(t(290))/9*(parseInt(t(363))/10)+parseInt(t(262))/11*(parseInt(t(304))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const l=globalThis[u(322)],h=u(370);function f(e,t){const n=d();return(f=function(e,t){return n[e-=260]})(e,t)}class p extends e.Plugin{static get[u(310)](){return u(309)}static get[u(365)](){return!0}static get[u(321)](){return!0}[u(340)](){const e=u,{editor:t}=this,n=[e(275)];t[e(331)][e(344)](e(335))&&n[e(289)](e(278)),t[e(314)][e(366)](e(360))[e(337)]({model:h,view:{classes:n,priority:12}}),t[e(314)][e(366)](e(360))[e(312)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(320)][r(327)])return null;const i=n[r(347)](r(353));return n[r(298)]([r(275),r(299)],i),i}})}[u(311)](){!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 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 l(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 h(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=f;return e[t(333)](e=>String[t(328)](e))[t(307)]("")}!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=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])],l(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 f(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])?h(l(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])+h(l(e)),r=p(h(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])+h(l(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=>{f(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),s[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function o(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,s,o]=r;return t(i),await n(i,s,o),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](d(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),o,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,s)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1756944e3;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=f,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(315)]);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(261)](){const e=u,t=this[e(293)][e(351)];t[e(362)](n=>{const r=e,i=t[r(355)][r(291)][r(306)]();let s=0;for(const e of i){const i=h+":"+s;if(t[r(364)][r(280)](i))n[r(318)](i,{range:e});else if(e[r(303)][r(319)]){const s=e[r(303)][r(301)](({item:e})=>!t[r(279)][r(269)](e),{boundaries:e});n[r(359)](i,{usingOperation:!1,affectsData:!1,range:n[r(350)](s,e[r(368)])})}else n[r(359)](i,{usingOperation:!1,affectsData:!1,range:e});s++}})}[u(346)](){const e=u,t=this[e(293)][e(351)],n=Array[e(356)](this[e(293)][e(351)][e(364)][e(352)](h));n[e(354)]&&t[e(362)](t=>{const r=e;n[r(273)](e=>{t[r(349)](e)})})}[u(324)](e,t){const n=u,r=this[n(265)](),i=t||r[n(302)]();this[n(293)][n(351)][n(264)](i)&&this[n(293)][n(351)][n(362)](s=>{const o=n;this[o(346)](),t||this[o(323)](s,r),this[o(308)]({insertAt:i,writer:s,html:e})})}[u(292)](e){const t=u,{model:n}=this[t(293)],r=this[t(265)]();n[t(362)](()=>{const n=t,i=this[n(369)](e,r)||this[n(348)](r);this[n(324)](e,i)})}[u(265)](){const e=u,t=this[e(293)][e(351)],n=Array[e(356)](t[e(364)][e(352)](h))[e(333)](t=>t[e(281)]());return t[e(286)](n)}[u(308)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(293)][r(263)],s=this[r(293)][r(367)][r(344)](a.ClipboardPipeline),o=new l;o[r(339)](r(338),t);const d=new ClipboardEvent(r(276),{clipboardData:o}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(o)});e[r(343)](n);const f=(t,n)=>{const i=r;n[i(260)]&&e[i(343)](n[i(260)])};s[r(297)](r(325),f,{priority:r(371)}),i[r(355)][r(287)](r(276),h),s[r(358)](r(325),f)}[u(348)](e){const t=u,{model:n}=this[t(293)],r=Array[t(356)](e[t(345)]());return r[t(354)]?n[t(341)](r[t(285)]()):e[t(283)]()}[u(369)](e,t){const n=u,{model:r,plugins:i}=this[n(293)];if(i[n(280)](n(272))){const s=i[n(344)](n(272))[n(288)](t);if(s[n(354)]){const t=this[n(313)](e),i=this[n(305)](s,t);return r[n(277)](i,0)}}return null}[u(313)](e){const t=u,n=this[t(293)][t(367)][t(344)](t(272)),r=this[t(293)][t(282)][t(296)](e),i=Array[t(356)](r[t(361)]())[t(317)](e=>e.is(t(330),t(342)));let s=0;return i[t(273)](e=>{s+=n[t(294)](e)}),s}[u(305)](e,t){const n=u,r=this[n(293)][n(367)][n(344)](n(272)),i=r[n(295)](e),s=r[n(316)](e),o=i[n(300)]+1,a=s[n(334)],c=e[0][n(271)](n(342));for(let e=0;e<t;e++)r[n(284)](c,{at:o});return c[n(329)](o)[n(329)](a)}[u(323)](e,t){const n=u,{plugins:r}=this[n(293)],{model:i}=e;r[n(280)](n(272))&&r[n(344)](n(272))[n(288)](t)[n(354)]&&i[n(270)](t)}}var m=y;function g(){var e=["afterInit","isOfficialPlugin","aiadapter-text-adapter-not-set","AIAdapter","isPremiumPlugin","2104035WsStTl","1189754NeRXsI","35iHFkwj","textAdapter","353790NMPjuM","809958EFefDj","AIRequestError","4556430SdyXVq","pluginName","name","24CVBQvL","732180PICViA","809365pBapre"];return(g=function(){return e})()}function y(e,t){var n=g();return(y=function(e,t){return n[e-=238]})(e,t)}!function(e){for(var t=y,n=e();;)try{if(758893===parseInt(t(254))/1+-parseInt(t(250))/2+-parseInt(t(249))/3+parseInt(t(242))/4+-parseInt(t(243))/5+-parseInt(t(253))/6*(parseInt(t(251))/7)+parseInt(t(241))/8*(parseInt(t(238))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(g);class b extends e.Plugin{static get[m(239)](){return m(247)}static get[m(245)](){return!0}static get[m(248)](){return!0}[m(244)](){var e=m;if(!this[e(252)])throw new i.CKEditorError(e(246),null)}}class w extends Error{constructor(e){var t=m;super(e),this[t(240)]=t(255)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=S;function S(e,t){const n=E();return(S=function(e,t){return n[e-=129]})(e,t)}function E(){const e=["length","getSelectedBlocks","8133QuZbzR","getFirstRange","263512yFpfjn","model","change:isEnabled","_hasContext","plugins","560TSFkGV","hasContent","16800IVxoHP","3644sxoJEY","5tipyda","set","4509yhYUUY","add","name","values","getRanges","custom","_commandDefinitions","from","569724HrwcbK","3947461hyOSvP","includes","917983JlZzco","isCollapsed","refresh","getItems","24KVIUaK","8LvYrbQ","element","config","change:_hasContext","editor","document","ai.aiAssistant.disabledElements","execute","enabledCommandsIds","isEmpty","showUI","requiresContent","selection","get","isEnabled"];return(E=function(){return e})()}!function(e){const t=S,n=e();for(;;)try{if(644093===parseInt(t(131))/1+parseInt(t(174))/2*(-parseInt(t(167))/3)+parseInt(t(169))/4*(parseInt(t(132))/5)+parseInt(t(142))/6+-parseInt(t(143))/7*(-parseInt(t(150))/8)+parseInt(t(134))/9*(parseInt(t(130))/10)+-parseInt(t(145))/11*(parseInt(t(149))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(E);class A extends e.Command{[k(140)];constructor(e,t){const n=k;super(e),this[n(140)]=t,this[n(133)](n(158),[]),this.on(n(153),(e,t,r)=>{const i=n;this[i(164)]&&(this[i(158)]=I(this[i(140)],r))}),this[n(133)](n(172),!1),this.on(n(171),(e,t,r)=>{const i=n;this[i(158)]=r?I(this[i(140)],this[i(172)]):[]})}[k(147)](){const e=k,t=this[e(154)][e(170)];this[e(172)]=function(t){const n=e,r=t[n(155)][n(162)];return r[n(146)]?0!==[...r[n(166)]()][n(165)]&&![...r[n(166)]()][0][n(159)]:!!t[n(129)](r[n(168)]())}(t);const n=t[e(155)][e(162)],r=this[e(154)][e(152)][e(163)](e(156));for(const t of n[e(138)]())for(const n of t[e(148)]())if(n.is(e(151))&&r[e(144)](n[e(136)]))return void(this[e(164)]=!1);this[e(164)]=!0}[k(157)](e="",t="",n=k(139)){const r=k;this[r(154)][r(173)][r(163)]($e)[r(160)](e,t,n)}}function I(e,t){const n=k,r=new Set;for(const i of e[n(137)]())(t||!1===i[n(161)])&&r[n(135)](i.id);return Array[n(141)](r)}const _=x;function x(e,t){const n=R();return(x=function(e,t){return n[e-=374]})(e,t)}function R(){const e=["1406454TfZdVK","get","custom","stringify","markers","previousContext","div","value","previousQuery","mainAction","startsWith","659106IgPVwp","createElement","view","data","length","serializeToString","isRendered","```html","editor","toView","parseFromString","42055750QPvXeF","previousActionId","text/html","initialContext","domConverter","rename","reset","4008195ZDrJsq","_normalizeResponseHeadings","editing","push","finishProcessing","from","name","_sanitizeHTML","message","handleError","viewToDom","previousLabel","submitPrompt","once","startProcessing","_sanitizationContainer","config","_domParser","render","stopListening","listenTo","processor","_stripMarkdownSyntax","catch","childNodes","set:currentContext","isProcessing","6796sFGGHX","remove","exec","finally","body","element","setContentOf","nodeType","_handleQuery","64kZWkeu","<h1></h1>","3370563ZZDgnS","trim","921gPgUOh","destroy","toModel","updateView","_isH1TagSupportEnabled","document","tryAgainEvent","14oGcIWt","currentResponse","querySelector","ELEMENT_NODE","237959SEeNyp","_xmlSerializer","```","clear","textAdapter","then","htmlProcessor","reverse","_parseAndNormalizeContent","substring","set","abort","endsWith","makeRequest","ai.aiAssistant.preserveComments","stopProcessing","prompt","currentContext","match","innerHTML"];return(R=function(){return e})()}!function(e){const t=x,n=e();for(;;)try{if(877858===-parseInt(t(431))/1*(parseInt(t(427))/2)+-parseInt(t(420))/3*(parseInt(t(407))/4)+-parseInt(t(380))/5+-parseInt(t(451))/6+parseInt(t(418))/7+-parseInt(t(416))/8*(parseInt(t(462))/9)+parseInt(t(473))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(R);const P=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class C extends((0,i.ObservableMixin)()){[_(470)];[_(435)];[_(464)];[_(395)];[_(397)];[_(432)];constructor(e,t,n){const r=_;super(),this[r(470)]=e,this[r(435)]=t,this[r(395)]=document[r(463)](r(457)),this[r(397)]=new DOMParser,this[r(432)]=new XMLSerializer,this[r(464)]=n,this[r(441)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(405),(e,t,n)=>{const i=r;this[i(464)][i(458)]=this[i(387)](n)}),this[r(400)](this[r(464)],r(392),(e,t)=>{const n=r,i=this[n(448)]||this[n(376)];this[n(415)](t,i,n(453))}),this[r(400)](this[r(464)],r(426),()=>{const e=r;this[e(464)][e(447)]=this[e(391)],this[e(415)](this[e(459)],this[e(456)],this[e(374)],this[e(391)])}),this[r(400)](this[r(464)],r(446),()=>{this[r(446)]()})}[_(421)](){this[_(399)]()}async[_(423)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=_;this[s(464)][s(447)]=r,this[s(464)][s(460)]=i,this[s(376)]=n,t&&(this[s(464)][s(468)]?this[s(415)](t,n,e,r):this[s(464)][s(393)](s(398),()=>{this[s(415)](t,n,e,r)}))}[_(446)](){const e=_;this[e(406)]&&(this[e(406)]=!1,this[e(464)][e(384)](),this[e(435)][e(442)]())}[_(379)](){const e=_;this[e(376)]="",this[e(448)]="",this[e(428)]="",this[e(456)]="",this[e(459)]="",this[e(391)]="",this[e(374)]=void 0,this[e(464)][e(379)](),this[e(446)]()}async[_(415)](e,t,n,r){const i=_;return this[i(406)]=!0,this[i(464)][i(394)](),this[i(456)]=t,this[i(459)]=e,this[i(391)]=r||e,this[i(374)]=n,new Promise(r=>{const s=i;this[s(435)][s(444)]({query:e,context:t,onData:e=>{const t=s;this[t(428)]=e,this[t(448)]=this[t(439)](this[t(428)])},actionId:n})[s(436)](()=>{const e=s;!this[e(448)]&&this[e(428)]&&(this[e(448)]=this[e(439)](this[e(428)],!0))})[s(403)](e=>{const t=s;e instanceof w?this[t(464)][t(389)](e[t(388)]):this[t(464)][t(389)](),r()})[s(410)](()=>{this[s(446)](),r()})})}[_(439)](e,t=!1){const n=_,r=P[n(409)](e);e=r?e[n(440)](r[1][n(466)]):e[n(466)]<100&&!t?"":this[n(402)](e);const i=this[n(397)][n(472)](e,n(375));if(r){const e=Array[n(385)](i[n(411)][n(404)]);e[n(438)]();for(const t of e){if(t[n(414)]==Node[n(430)])break;t[n(408)]()}}const s=this[n(470)][n(465)][n(401)][n(471)](this[n(432)][n(467)](i[n(411)]));this[n(424)]()||this[n(381)](s);const o=this[n(470)][n(396)][n(452)](n(445)),a=this[n(470)][n(465)][n(422)](s);return o||a[n(455)][n(434)](),this[n(470)][n(465)][n(454)](a)}[_(381)](e){const t=_,n=new c.ViewUpcastWriter(this[t(470)][t(382)][t(464)][t(425)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(412))&&r[t(449)](n)&&(i[t(383)](n),"h1"==n[t(386)]&&(s=!0));if(s)for(const e of i)n[t(378)]("h"+(parseInt(e[t(386)][1])+1),e)}[_(424)](){const e=_,{data:t,editing:n}=this[e(470)],r=t[e(437)][e(471)](e(417)),i=t[e(471)](t[e(422)](r));return!!n[e(464)][e(377)][e(390)](i)[e(429)]("h1")}[_(387)](e){const t=_;return this[t(470)][t(382)][t(464)][t(377)][t(413)](this[t(395)],e),this[t(395)][t(450)]}[_(402)](e){const t=_,n=e[t(419)]();return n[t(461)](t(469))?n[t(443)](t(433))?n[t(440)](7,n[t(466)]-3):n[t(440)](7):e}}const T=O;function M(){const e=["_CONTENT","ck-hidden","extendTemplate","isVisible","set","ck-ai-form__toolbar","stopButton","_createButton","1859074PCupma","65768EQkARG","locale","AI_","mainAction","label","2hYwsQW","3432378QWLygC","102717VghwaA","addMany","replaceButton","234xFCSWq","542890ZmSJcw","toUpperCase","insert","Stop","items","tryAgainButton","bind","REPLACE","1457684AswvAj","replace","1418535WPjiYC","Try again","ck-button-action","insertButton","5BElOha","Insert below","bindTemplate"];return(M=function(){return e})()}function O(e,t){const n=M();return(O=function(e,t){return n[e-=113]})(e,t)}!function(e){const t=O,n=e();for(;;)try{if(363375===-parseInt(t(117))/1+-parseInt(t(115))/2*(parseInt(t(131))/3)+-parseInt(t(129))/4*(-parseInt(t(135))/5)+parseInt(t(116))/6+-parseInt(t(146))/7+parseInt(t(147))/8*(parseInt(t(120))/9)+parseInt(t(121))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(M);const N={REPLACE:T(130),INSERT:T(123)};class L extends s.ToolbarView{constructor(e){const t=T;super(e),this[t(142)](t(141),!1),this[t(142)](t(113),N[t(128)]),this[t(119)]=this[t(145)]("",t(133)),this[t(119)][t(127)](t(114)).to(this,t(113),n=>v(e,t(149)+n[t(122)]()+t(138))),this[t(134)]=this[t(145)](v(e,t(136))),this[t(126)]=this[t(145)](v(e,t(132))),this[t(144)]=this[t(145)](v(e,t(124)));const n=this[t(137)];this[t(140)]({attributes:{class:[t(143),n.if(t(141),t(139),e=>!e)]}}),this[t(125)][t(118)]([this[t(119)],this[t(134)],this[t(126)],this[t(144)]])}[T(145)](e,t){const n=T,r=new s.ButtonView(this[n(148)]);return r[n(142)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const $=F;function D(){const e=["text/plain","style","getSelection","33298ETjJDR","position","clipboard","isVisible","-9999px","execute","createRange","execCommand","ck-ai-form__copy-button-wrapper","smooth","7304479UgjgbJ","write","mousedown","bindTemplate","scrollTo","setEndBefore","24yRHNFl","ck-content","change:value","addRange","contentFieldView","locale","icon","appendLoader","remove","copy","wheel","body","301360fxwVqJ","createElement"," ck-ai-form__copy-button--copied","bind","31317QzQcvl","left","firstElementChild","lastElementChild",".ck-ai-form__loader","<span>]</span>","isProcessing","26665LQcrID","ck-ai-form__content-area--processing","ClipboardItem","Copy","28jfNlwR","ck-ai-form__content-area-wrapper","ck-ai-form__content-field","focus","change:isProcessing","textContent","copyButtonView","innerHTML","ck-ai-form__copy-button","loaderView","listenTo","setTemplate","ck-ai-form__content-area","text/html","absolute","32PKAwBm","setStartAfter","AI is writing...","scrollHeight","set","div","_copyHTMLToClipboard","ck-hidden","1978405fxbJeT","setContent","222IrQKjy","removeAllRanges","ck-reset_all-excluded","72xOhAoL","742496xSrMIl","appendChild","ck-ai-form__loader","isEnabled","_createCopyButton","class","_createLoader","22pShKjy","render","element","querySelector","<span>[</span>","value"];return(D=function(){return e})()}!function(e){const t=F,n=e();for(;;)try{if(223812===parseInt(t(267))/1*(-parseInt(t(258))/2)+parseInt(t(211))/3*(parseInt(t(237))/4)+-parseInt(t(218))/5*(-parseInt(t(247))/6)+-parseInt(t(222))/7*(parseInt(t(251))/8)+-parseInt(t(250))/9*(parseInt(t(207))/10)+parseInt(t(245))/11*(parseInt(t(283))/12)+parseInt(t(277))/13)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D);class U extends s.View{[$(199)];[$(228)];constructor(e,t=""){const n=$;super(e),this[n(241)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(280)];this[n(199)]=new B(e,t),this[n(228)]=this[n(255)](),this[n(233)]({tag:n(242),attributes:{class:["ck",n(223),r.if(n(270),n(244),e=>!e)],tabindex:"-1"},children:[{tag:n(242),attributes:{class:["ck",n(234),r.if(n(217),n(219))]},children:[this[n(199)],{tag:n(242),attributes:{class:["ck",n(275)]},children:[this[n(228)]]}]}]})}[$(259)](){const e=$;super[e(259)](),this[e(263)]&&this[e(199)][e(246)](this[e(263)]);let t=!1;this.on(e(197),(n,r,i)=>{const s=e,o=!this[s(199)][s(260)][s(261)](s(215));this[s(199)][s(246)](i),this[s(217)]&&o&&!t&&this[s(260)][s(281)]({top:this[s(260)][s(240)],behavior:s(276)})}),this.on(e(226),(n,r,i)=>{const s=e;t=!1,i?(this[s(263)]=null,this[s(199)][s(202)]()):this[s(263)]||this[s(199)][s(246)]("")}),this[e(232)](this[e(260)],e(205),()=>{t=!0}),this[e(232)](this[e(260)],e(279),()=>{t=!0})}[$(225)](){const e=$;this[e(260)][e(225)]()}[$(255)](){const e=$,n=this[e(200)],r=new s.ButtonView(this[e(200)]),i=e(230);return r[e(241)]({label:v(n,e(221)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(210)](e(270)).to(this,e(263),e=>!!e),r[e(210)](e(254)).to(this,e(217),e=>!e),r.on(e(272),()=>{const n=e;this[n(243)](this[n(199)][n(260)]),r[n(201)]=t.IconCheck,r[n(256)]=i+n(209),this[n(225)](),setTimeout(()=>{const e=n;r[e(201)]=t.IconCopy,r[e(256)]=i},1e3)}),r}[$(243)](e){const t=$,{window:n,document:r}=i.global;if(n[t(220)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(229)]],{type:t(235)}),"text/plain":new r([e[t(227)]||""],{type:t(264)})})];navigator[t(269)][t(278)](s)}else{const i=r[t(208)](t(242));i[t(265)][t(268)]=t(236),i[t(265)][t(212)]=t(271),i[t(229)]=t(262)+e[t(229)]+t(216),r[t(206)][t(252)](i);const s=r[t(273)]();s[t(238)](i[t(213)]),s[t(282)](i[t(214)]);const o=n[t(266)]();o[t(248)](),o[t(198)](s),r[t(274)](t(204)),i[t(203)]()}}}function F(e,t){const n=D();return(F=function(e,t){return n[e-=196]})(e,t)}class B extends s.View{constructor(e,t=""){const n=$;super(e),this[n(231)]=this[n(257)](),this[n(233)]({tag:n(242),attributes:{class:["ck",n(196),t,n(249),n(224)]}})}[$(246)](e){const t=$;this[t(260)][t(229)]=e}[$(202)](){const e=$;this[e(260)][e(252)](this[e(231)][e(260)])}[$(257)](){const e=$,t=new s.View,n=this[e(200)],r=new s.SpinnerView;return r[e(270)]=!0,t[e(233)]({tag:e(242),attributes:{class:["ck",e(253)]},children:[r,{text:v(n,e(239))}]}),t[e(259)](),t}}!function(e){const t=H,n=e();for(;;)try{if(831087===parseInt(t(405))/1*(-parseInt(t(410))/2)+-parseInt(t(398))/3*(-parseInt(t(409))/4)+-parseInt(t(404))/5*(-parseInt(t(407))/6)+-parseInt(t(399))/7+parseInt(t(400))/8+parseInt(t(406))/9+parseInt(t(401))/10*(-parseInt(t(415))/11))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(413)];this[r(408)](r(412),n),i[r(411)]=t.IconError,this[r(403)]({tag:r(414),attributes:{class:["ck",r(402)]},children:[i,{text:o.to(r(412))}]})}}function H(e,t){const n=q();return(H=function(e,t){return n[e-=398]})(e,t)}function q(){const e=["74776ZmfiwP","content","text","bindTemplate","div","124718JKoyhh","3qkaZef","11551995idgvwD","10548400tsOTRR","130ljfrBW","ck-ai-form__error","setTemplate","5480xzdKnU","19zhhHvq","1457424BHobBK","2562epLuqe","set","5562640nuByuK"];return(q=function(){return e})()}const V=z;function z(e,t){const n=G();return(z=function(e,t){return n[e-=151]})(e,t)}function G(){const e=["isOn","children","submit","609420yayQyO","ck-ai-form__submit","focusableChildren","rtl","render","fire","minRows","window","_createSubmitButton","focusCycler","element","isEmpty","67189WnVyWL","submitButtonView","execute","showHistoryButtonView","fieldWrapperChildren","locale","2916738myyimV","left","keystrokes","6ljHJvw","enter","ck-ai-form__toggle-history","isEnabled","uiLanguageDirection","fieldView","queryView","requestAnimationFrame","27060uBpDce","value","add","filteredView","focusLast","style","History","focus","target","1619288MqBPJj","isVisible","bind","resultsView","13413ZWAvFb","maxRows","set","1136420QrhAqO","excludeScrollbarsAndBorders","Submit","right","300ETngRb","focusFirst","update","_createShowHistoryButton","width"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(175990===-parseInt(t(153))/1*(-parseInt(t(162))/2)+-parseInt(t(183))/3+parseInt(t(186))/4+parseInt(t(190))/5*(-parseInt(t(170))/6)+parseInt(t(198))/7+parseInt(t(179))/8+-parseInt(t(159))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(154)];[V(156)];constructor(e,t){const n=V;super(e,t),this[n(168)][n(167)][n(204)]=1,this[n(168)][n(167)][n(184)]=3,this[n(154)]=this[n(206)](),this[n(156)]=this[n(193)](),this[n(200)][n(172)](this[n(156)],1),this[n(200)][n(172)](this[n(154)])}[V(202)](){const e=V;super[e(202)](),this[e(168)][e(157)][e(172)](this[e(156)]),this[e(196)][e(172)](this[e(154)]),this[e(161)][e(185)](e(163),(t,n)=>{const r=e;t[r(178)]==this[r(168)][r(167)][r(151)]&&(this[r(197)](),n())})}[V(206)](){const e=V,n=new s.ButtonView(this[e(158)]),r=this[e(158)];return n[e(185)]({icon:t.IconSubmit,label:v(r,e(188)),isVisible:!0,tooltip:!0,class:e(199)}),n.on(e(155),()=>{this[e(197)]()}),n[e(181)](e(165)).to(this[e(168)][e(167)],e(152),this,e(165),(e,t)=>!e&&t),n}[V(193)](){const e=V,n=new s.ButtonView(this[e(158)]),r=this[e(182)],o=this[e(158)];n[e(185)]({label:v(o,e(176)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(164)}),n[e(181)](e(195)).to(r,e(180)),n[e(181)](e(165)).to(this,e(165)),n.on(e(155),()=>{const t=e;r[t(180)]=!r[t(180)],r[t(180)]?this[t(173)][t(177)]():this[t(177)]()});const a=()=>{const t=e;i.global[t(205)][t(169)](()=>{const e=t;if((0,i.isVisible)(this[e(151)])){const t=new i.Rect(this[e(168)][e(167)][e(151)]),r=t[e(194)],s=e(201)===o[e(166)]?e(160):e(189);t[e(187)](),n[e(151)][e(175)][s]=r-t[e(194)]+1+"px"}})};return this[e(168)][e(167)].on(e(192),a),this.on(e(202),a),n}[V(197)](){const e=V,t=this[e(168)][e(167)][e(151)][e(171)];this[e(203)](e(197),t)}[V(177)](e){const t=V;-1===e?this[t(207)][t(174)]():this[t(207)][t(191)]()}}const K=Q;function Q(e,t){const n=J();return(Q=function(e,t){return n[e-=442]})(e,t)}!function(e){const t=Q,n=e();for(;;)try{if(325705===parseInt(t(468))/1+-parseInt(t(465))/2*(-parseInt(t(461))/3)+-parseInt(t(466))/4*(-parseInt(t(458))/5)+parseInt(t(447))/6+-parseInt(t(459))/7+-parseInt(t(455))/8*(-parseInt(t(454))/9)+parseInt(t(467))/10*(-parseInt(t(449))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Y extends s.ListView{[K(457)];[K(445)];constructor(e){const t=K;super(e),this[t(445)]=this[t(462)](),this[t(457)]=new s.ListItemGroupView,this[t(457)][t(452)][t(446)](this[t(445)],1),this[t(457)][t(464)]=v(e,t(443)),this[t(457)][t(450)][t(444)](t(463)).to(this),this[t(450)][t(446)](this[t(457)])}[K(451)](){const e=K;let t=0;for(const n of this[e(450)])t+=n[e(450)][e(453)];return{resultsCount:t,totalItemsCount:t}}[K(462)](){const e=K,t=this[e(442)],n=new s.ButtonView(this[e(442)]);return n[e(448)]({label:"("+v(t,e(460))+")",withText:!0}),n.on(e(463),()=>this[e(469)](e(456))),n}}function J(){const e=["22XveWol","items","filter","children","length","36NvDHbo","77432mmPLZh","clearHistory","historyGroupView","2150665iYsOso","3253369jxTDoT","Clear","745407TRukMC","_createClearHistoryButton","execute","label","2nvqbYM","4cFfBjz","3737050gXuUaY","312698lwlUEp","fire","locale","Prompt history","delegate","clearHistoryButton","add","3047196lrjgFO","set"];return(J=function(){return e})()}const Z={"&":"&","<":"<",">":">",""":'"',"'":"'"};function X(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(X).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=>Z[e]||"'")}(X(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=294]})(e,t)}function ne(){const e=["children","229cYAQaA","7233608wpTIfl","13458960lGkCqp","fire","set","add","execute","367056tepite","prompt","9mnVpfz","locale","374dQLyhA","6hodclr","3896496tiltYt","9464700jluDMv","6429500TitENQ"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(934006===-parseInt(t(308))/1*(parseInt(t(302))/2)+-parseInt(t(304))/3+parseInt(t(298))/4+parseInt(t(306))/5+-parseInt(t(303))/6*(parseInt(t(305))/7)+parseInt(t(309))/8*(parseInt(t(300))/9)+parseInt(t(310))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(301)],n);this[t(307)][t(296)](r),r[t(295)]({label:e[t(299)],withText:!0}),r.on(t(297),()=>{const n=t;this[n(294)](n(297),{value:ee(e[n(299)])})})}}const ie=ce;!function(e){const t=ce,n=e();for(;;)try{if(377267===-parseInt(t(349))/1+-parseInt(t(370))/2*(parseInt(t(358))/3)+parseInt(t(367))/4+-parseInt(t(361))/5+parseInt(t(357))/6+-parseInt(t(359))/7+parseInt(t(366))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oe);const se=ie(348);function oe(){const e=["prompt","parse","getItem","_loadFromSessionStorage","trim","492054ueLwwU","39aUgOXj","3502058lLzhKC","add","191290UxRDEc","_saveToSessionStorage","setItem","stringify","map","11279160nrMPEG","2482556MCfpIt","last","remove","101240VfGXYz","length","CKEditor/AIFormView/PromptHistory","538664sjouBQ","toLowerCase","addMany"];return(oe=function(){return e})()}class ae extends i.Collection{constructor(){const e=ie;super(),this[e(355)](),this.on(e(360),(t,n)=>{const r=e,i=ue(n[r(352)]);for(const e of this)if(e!=n&&ue(e[r(352)])===i){this[r(369)](e);break}this[r(371)]>20&&this[r(369)](this[r(368)]),this[r(362)]()}),this.on(e(369),()=>{this[e(362)]()})}[ie(355)](){const e=ie,t=sessionStorage[e(354)](se)||"[]";this[e(351)](JSON[e(353)](t))}[ie(362)](){const e=ie;sessionStorage[e(363)](se,JSON[e(364)](this[e(365)](e=>e)))}}function ce(e,t){const n=oe();return(ce=function(e,t){return n[e-=348]})(e,t)}function ue(e){const t=ie;return e[t(350)]()[t(356)]()}const de={"&":"&","<":"<",">":">",'"':""","'":"'"};function le(e){return X(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["ck-hidden","prompt","isEnabled","clearHistory","fieldView","reset","clear","isVisible","Ask AI to improve generated text","12478304UuCSZq","execute","listenTo","items","tryAgainButton","insertContentBelow","value","_createToolbar","6cyRXJB","add","ck-ai-form-content","7269344yDvevh","element","stopButton","set","118296RTOAOc","toolbar","tab","insertButton","div","focusCycler","text","950bjegVE","bindTemplate","focusFirst","render","createCollection","startProcessing","bindTo","stopProcessing","queryView","shift + tab","focus","AI_ERROR_FAILED","replaceContent","submitPrompt","isError","Empty history","promptView","search","_createHistoryView","errorView","focusTracker","tryAgainEvent","keystrokes","label","focusLast","handleError","_promptHistory","copyButtonView","fire","delegate","contentArea","REPLACE","trim","isProcessing","bind","submit","mainAction","4888599kqfWWU","replaceButton","1832896vyFIss","7HPpHKo","high","5326190pnOOiL","historyGroupView","Ask AI to edit or generate","finishProcessing","setTemplate","locale","_createPromptView","_focusables","chain","186376MhyvEt","ck-ai-form","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-=304]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(973567===parseInt(t(339))/1+-parseInt(t(327))/2+parseInt(t(325))/3+parseInt(t(362))/4+-parseInt(t(330))/5*(-parseInt(t(359))/6)+-parseInt(t(328))/7*(parseInt(t(351))/8)+-parseInt(t(366))/9*(parseInt(t(373))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(308)];[he(310)];[he(318)];[he(367)];[he(304)];[he(307)];[he(337)];[he(371)];[he(314)];constructor(e,t,n=""){const r=he;super(e),this[r(365)](r(344),!0),this[r(365)](r(321),!1),this[r(365)](r(343),""),this[r(365)](r(357),""),this[r(365)](r(387),!1),this[r(365)](r(324),N[r(319)]),this[r(314)]=new ae,this[r(307)]=new j(e),this[r(318)]=new U(e,n),this[r(318)][r(322)](r(321)).to(this),this[r(318)][r(322)](r(357)).to(this),this[r(367)]=this[r(358)](),this[r(367)][r(322)](r(324)).to(this),this[r(304)]=this[r(336)](),this[r(308)]=new i.FocusTracker,this[r(310)]=new i.KeystrokeHandler,this[r(337)]=this[r(377)]([this[r(318)],this[r(318)][r(315)],this[r(367)],this[r(304)]]),this[r(371)]=new s.FocusCycler({focusables:this[r(337)],focusTracker:this[r(308)],keystrokeHandler:this[r(310)],actions:{focusPrevious:r(382),focusNext:r(368)}}),this[r(371)][r(338)](this[r(304)][r(371)]),this[r(304)][r(381)][r(346)][r(322)](r(357)).to(this,r(343));const o=this[r(374)];this[r(334)]({tag:r(370),attributes:{class:["ck",r(340),t],tabindex:"-1"},children:[{tag:r(370),attributes:{class:["ck",r(361)]},children:[{tag:r(370),attributes:{class:[o.if(r(387),r(342),e=>!e)]},children:[this[r(307)]]},this[r(318)],this[r(367)],this[r(304)]]}]})}[he(376)](){const e=he;super[e(376)](),this[e(308)][e(360)](this[e(318)][e(363)]),this[e(308)][e(360)](this[e(318)][e(315)][e(363)]),this[e(308)][e(360)](this[e(367)][e(363)]),this[e(308)][e(360)](this[e(304)][e(363)]),this[e(310)][e(353)](this[e(363)])}[he(383)](e=1){const t=he;-1===e?this[t(371)][t(312)]():this[t(371)][t(375)]()}[he(347)](){const e=he;this[e(343)]="",this[e(357)]="",this[e(387)]=!1,this[e(304)][e(347)](),this[e(318)][e(349)]=!1,this[e(367)][e(349)]=!1}[he(336)](){const e=he,t=this[e(335)],n=new W(t,{queryView:{label:v(t,e(332)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(388)),secondary:v(t,e(341))}}},filteredView:this[e(306)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(322)](e(344)).to(this,e(344),this,e(321),(e,t)=>e&&!t),this[e(353)](n,e(323),(t,n)=>{const r=e;this[r(343)]=n;const i=le(n);this[r(316)](r(386),i),n[r(320)]()&&this[r(314)][r(360)]({prompt:i},0)},{priority:e(329)}),n}[he(306)](){const e=he,t=new Y(this[e(335)]);return t[e(331)][e(354)][e(379)](this[e(314)]).as(re),t.on(e(345),()=>{const t=e;this[t(314)][t(348)](),this[t(304)][t(305)](""),this[t(304)][t(383)]()}),t}[he(358)](){const e=he,t=new L(this[e(335)]);return t[e(326)][e(322)](e(344)).to(this,e(344),this,e(321),this,e(357),(e,t,n)=>e&&!t&&!!n),t[e(326)][e(317)](e(352)).to(this,e(385)),t[e(369)][e(322)](e(344)).to(this,e(344),this,e(321),this,e(357),(e,t,n)=>e&&!t&&!!n),t[e(369)][e(317)](e(352)).to(this,e(356)),t[e(355)][e(322)](e(344)).to(this,e(344),this,e(321),(e,t)=>e&&!t),t[e(355)][e(317)](e(352)).to(this,e(309)),t[e(364)][e(322)](e(344)).to(this,e(321)),t[e(364)][e(317)](e(352)).to(this,e(380)),t}[he(378)](){const e=he;this[e(357)]="",this[e(387)]=!1,this[e(321)]=!0,this[e(318)][e(349)]=!0,this[e(367)][e(349)]=!0,this[e(318)][e(383)]()}[he(333)](){const e=he,t=this[e(335)];this[e(321)]=!1,this[e(343)]="",this[e(304)][e(347)](),this[e(357)]&&(this[e(304)][e(381)][e(311)]=v(t,e(350)))}[he(313)](e){const t=he,n=this[t(335)];this[t(333)](),this[t(387)]=!0,this[t(307)][t(372)]=e||v(n,t(384)),this[t(357)]||(this[t(318)][t(349)]=!1)}}var ge=n(673),ye=n.n(ge),be=n(545),we=n.n(be),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=we(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Pe={attributes:{"data-cke":!0}};Pe.setAttributes=Ee(),Pe.insert=ke().bind(null,"head"),Pe.domAPI=we(),Pe.insertStyleElement=Ie();ye()(Re.A,Pe);Re.A&&Re.A.locals&&Re.A.locals;var Ce=n(676),Te={attributes:{"data-cke":!0}};Te.setAttributes=Ee(),Te.insert=ke().bind(null,"head"),Te.domAPI=we(),Te.insertStyleElement=Ie();ye()(Ce.A,Te);Ce.A&&Ce.A.locals&&Ce.A.locals;const Me=Oe;function Oe(e,t){const n=Ne();return(Oe=function(e,t){return n[e-=134]})(e,t)}function Ne(){const e=["groupId","1897165kYrGcJ","isCollapsed","isEnabled","model","from","command:","sort","includes","333936NPXHCx","values","selection","trim","showFakeVisualSelection","contentArea","_forceMarkersCopy","_commandDefinitions","_getMenuBarGroupButtons","insertContent","change:isError","buttonView","ck-ai-assistant-button ","custom","groupLabel","bind","aiAssistant","init","_initView","AIAssistantUI","wasMoved","order","invalid","editor","_populateMenuBarMenu","aiLicenseKeyUsageLimit","domainLimit","change","hide","950DDoIPf","isOfficialPlugin","429NqNSes","updateView","fieldView","comment","getSelectedElement","105292zUnJAk","aiLicenseKeyInvalid","licenseKey","filter","getSelectedBlocks","requiresContent","forEach","length","57695tRoyUW","hideFakeVisualSelection","insertContentBelow","_initAriaAiStatusChangeAnnouncements","label","AI is writing","push","body","EDITOR_TOP_SIDE","prompt","</p>","render","menuView","announce","change:isProcessing","queryView","_getResolvedCommandsDefinitions","menuitemcheckbox","updatePosition","children","ai.aiAssistant.disabledElements","AI Commands","112MXxSHJ","media","usageLimit","fire","showUI","AI Assistant","currentContext","_aiAdapter","getRanges","hideUI","83941RqnNKJ","plugins","update","isPremiumPlugin","textAdapter","listenTo","333AjXEOw","trialLimit","config","ck-ai-commands-dropdown ","items","componentFactory","menuBar:aiAssistant","INSERT","aiCommands","change:enabledCommandsIds","_onExecute","delegate","define","polite","copy","ai-commands-config-order-collision","Error during AI content generation: %0","add","buttons","showAIAssistant","reset","ck-ai-assistant-ui","panelView","schema","execute","<p>","focus","commands","document","ai.useTheme","aiLicenseKeyNotAllowed","menuPanelClass","featureNotAllowed","20YFuHoA","splice","map","locale","show","_formView","isOn","text","_aiAssistantController","tableOfContents","REPLACE","isFlat","aiLicenseKeyValid","rawHtml","16076pUptDL","enabledCommandsIds","set","aiLicenseKeyTrialLimit","3516udDlpy","change:value","addMany","DataTransfer","menuBar:aiCommands","text/html","replace","getLimitElement","get","destroy","Generated content: %0","view","aiLicenseKeyDomainLimit","AIAssistant","source","19112WCKQYD","getData","evaluationLimit","_licenseKeyCheckInterval","_dialog","_createAIAssistantUIButton","pluginName","replaceContent","setSelection","aiLicenseKeyExpired","editing","ai.aiAssistant.contentAreaCssClass","requires","_showLicenseError","once","_uiCssClasses","errorView","ai.aiAssistant.commands"," ck-ai-assistant-ui_theme","expired","promptView","aiLicenseKeyEvaluationLimit"];return(Ne=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(730437===parseInt(t(201))/1*(-parseInt(t(301))/2)+parseInt(t(296))/3*(parseInt(t(215))/4)+-parseInt(t(257))/5+parseInt(t(265))/6*(-parseInt(t(152))/7)+parseInt(t(234))/8*(parseInt(t(168))/9)+-parseInt(t(294))/10*(-parseInt(t(309))/11)+-parseInt(t(219))/12*(-parseInt(t(162))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ne);const Le=globalThis[Me(222)];class $e extends e.Plugin{[Me(303)];[Me(237)];[Me(238)];[Me(206)];[Me(159)];[Me(209)];[Me(249)]="";static get[Me(240)](){return Me(284)}static get[Me(295)](){return!0}static get[Me(165)](){return!0}static get[Me(246)](){return[a.ClipboardMarkersUtils,p,b,s.Dialog]}constructor(e){const t=Me;super(e),e[t(170)][t(180)](t(150),[t(153),t(214),t(210)]),e[t(170)][t(180)](t(245),""),e[t(170)][t(180)](t(197),!0),this[t(249)]=t(189)+(e[t(170)][t(227)](t(197))?t(252):"")}[Me(282)](){const e=Me,{editor:n}=this;this[e(159)]=n[e(163)][e(227)](b),this[e(238)]=n[e(163)][e(227)](s.Dialog),this[e(206)]=null,this[e(272)]=this[e(146)]();const r=new A(n,Array[e(261)](this[e(272)][e(266)]()));n[e(195)][e(185)](e(187),r),n.ui[e(173)][e(185)](e(176),i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(217)]({class:a(171)+this[a(249)]}),c[a(276)][a(217)]({label:v(i,a(151)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(192),e=>this[a(178)](e[a(233)].id)),(0,s.addMenuToDropdown)(c,n.ui[a(230)][a(137)],function(e){const t=a,n=o(e[t(170)][t(227)](t(251)),e[t(204)]),r=Ue(e,n)[t(304)](e=>e[t(195)][t(308)]);return 1===r[t(308)]?Ue(e,r[0][t(195)])[t(203)](e=>({id:e.id,label:e[t(134)]})):r[t(203)](n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:Ue(e,o)[r(203)](e=>({id:e.id,label:e[r(134)]}))}})}(n),{ariaLabel:v(i,a(151))}),c[a(142)][a(199)]=a(171)+this[a(249)],r.on(a(177),u),c[a(142)][a(248)](a(141),u),c;function u(){const e=a;c[e(259)]=r[e(216)][e(308)]>0;for(const t of c[e(142)][e(186)])t[e(259)]=r[e(216)][e(264)](t.id)}}),n.ui[e(173)][e(185)](e(223),i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(276)][a(217)]({label:v(i,a(151)),icon:t.IconMagicWand}),c[a(280)](a(259)).to(r,a(216),e=>e[a(308)]>0);const u=o(n[a(170)][a(227)](a(251)),i);return this[a(289)](r,c,u,e=>this[a(178)](e)),c}),n.ui[e(173)][e(185)](e(281),()=>{const t=e,n=this[t(239)](s.ButtonView);return n[t(217)]({tooltip:!0,class:t(277)+this[t(249)]}),n}),n.ui[e(173)][e(185)](e(174),()=>{const t=e,n=this[t(239)](s.MenuBarMenuListItemButtonView);return n[t(217)]({role:t(147)}),n}),this[e(303)]=this[e(288)][e(170)][e(227)](e(303));const i=this[e(288)];this[e(237)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(213)==s||t(302)==s||t(243)==s||t(231)==s||t(198)==s||t(255)==s||t(218)==s||t(290)==s){delete i[r],n=s,clearInterval(this[t(237)]),this[t(237)]=void 0;break}}t(302)==n&&i[t(247)](t(287)),t(243)==n&&i[t(247)](t(253)),t(231)==n&&i[t(247)](t(291)),t(198)==n&&i[t(247)](t(200),t(232)),t(255)==n&&i[t(247)](t(236)),t(218)==n&&i[t(247)](t(169)),t(290)==n&&i[t(247)](t(154))},1e3)}[Me(228)](){const e=Me;super[e(228)](),this[e(237)]&&clearInterval(this[e(237)])}[Me(156)](e="",n="",r=Me(278)){const i=Me,o=this[i(288)],u=o[i(244)][i(230)],d=o[i(163)][i(227)](p),l=o[i(163)][i(227)](a.ClipboardMarkersUtils);d[i(269)]();const h=new Le,f=new ClipboardEvent(i(182),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(271)](i(299),()=>{const e=i;u[e(196)][e(155)](e(182),g)}),this[i(206)]||(this[i(283)](),this[i(209)]=new C(o,this[i(159)][i(166)],this[i(206)]));let y=m[i(235)](i(224));const b=o[i(260)][i(196)][i(267)],w=Array[i(261)](b[i(160)]());1===w[i(308)]&&w[0][i(212)]&&!b[i(300)]()&&""!==y[i(225)](/ /g,"")[i(268)]()&&(y=i(193)+y+i(140)),this[i(209)][i(297)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:N[o[i(260)][i(196)][i(267)][i(258)]?i(175):i(211)]}),i(281)!==this[i(238)].id?this[i(238)][i(205)]({id:i(281),icon:t.IconRobotPencil,title:v(this[i(288)][i(204)],i(157)),content:this[i(206)],position:s.DialogViewPosition[i(138)],onShow:()=>{const e=i;this[e(206)][e(194)]()},onHide:()=>{const e=i;this[e(209)][e(188)](),d[e(310)]()}}):this[i(238)][i(230)][i(285)]||this[i(238)][i(230)][i(148)]()}[Me(161)](){const e=Me;this[e(238)][e(293)]()}[Me(146)](){const e=Me,t=new Map,n=o(this[e(288)][e(170)][e(227)](e(251)),this[e(288)][e(204)]);for(const r of n)for(const n of r[e(195)])t[e(217)](n.id,{...n,groupId:r[e(256)],groupLabel:r[e(279)]||r[e(256)]});return t}[Me(239)](e){const n=Me,r=this[n(288)],i=r[n(195)][n(227)](n(187)),s=new e(r[n(204)]);return s[n(217)]({label:v(r[n(204)],n(157)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(280)](n(259)).to(i),s[n(280)](n(207)).to(this[n(238)],"id",e=>n(281)===e),this[n(167)](s,n(192),()=>{const e=n;s[e(207)]?this[e(161)]():i[e(192)]()}),s}[Me(283)](){const e=Me,t=this[e(288)][e(163)][e(227)](p);this[e(206)]=new me(this[e(288)][e(204)],this[e(249)],this[e(288)][e(170)][e(227)](e(245))),this[e(206)].on(e(220),()=>{const t=e;this[t(238)][t(230)][t(285)]||this[t(238)][t(230)][t(148)]()}),this[e(206)][e(254)][e(145)][e(298)].on(e(164),()=>{const t=e;this[t(238)][t(230)][t(285)]||this[t(238)][t(230)][t(148)]()}),this[e(167)](this[e(206)],e(241),()=>{const n=e;t[n(274)](this[n(209)][n(158)]),this[n(161)]()}),this[e(167)](this[e(206)],e(311),()=>{const n=e;t[n(311)](this[n(209)][n(158)]),this[n(161)]()}),this[e(312)]()}[Me(312)](){const e=Me,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(288)];this[e(206)][e(270)].on(e(144),(r,i,s)=>{const o=e,a=this[o(209)][o(158)];s?n[o(143)](v(t,o(135))):a&&n[o(143)](v(t,o(229),a),{politeness:o(181),isUnsafeHTML:!0})}),this[e(206)].on(e(275),(r,i,s)=>{const o=e;if(s){const e=this[o(206)][o(250)][o(208)];n[o(143)](v(t,o(184),e))}})}[Me(178)](e){const t=Me,n=this[t(272)][t(227)](e),r=this[t(288)],s=r[t(260)][t(196)][t(267)],o=r[t(195)][t(227)](t(187)),a=r[t(163)][t(227)](p),c=("_ungrouppedCommands"!==n[t(256)]?n[t(279)]+": ":"")+n[t(134)];if(!1!==n[t(306)]&&s[t(258)]){const e=(0,i.first)(s[t(305)]())||r[t(260)][t(191)][t(226)](s);r[t(260)][t(292)](n=>{n[t(242)](e,"in")})}a[t(269)](),o[t(192)](n[t(139)],c,t(262)+e)}[Me(289)](e,t,n,r){const i=Me,o=this[i(288)],a=o[i(204)],c=new s.MenuBarMenuListView(a),u=Ue(o,n)[i(304)](e=>e[i(195)][i(308)]);1===u[i(308)]?this[i(273)]({command:e,commands:u[0][i(195)],parentMenuView:t,onExecute:r})[i(307)](e=>c[i(172)][i(185)](e)):u[i(307)](({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(273)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(276)][d(217)]({label:o||n}),h[d(179)](d(192)).to(t),f[d(172)][d(221)](p),h[d(190)][d(149)][d(185)](f),l[d(149)][d(185)](h),c[d(172)][d(185)](l)}),t[i(190)][i(149)][i(185)](c)}[Me(273)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Me,o=this[i(288)],a=o[i(204)];return Ue(o,t)[i(203)](t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(217)]({label:t[o(134)]}),u[o(179)](o(192)).to(n),u.on(o(192),()=>r(t.id)),u[o(280)](o(259)).to(e,o(216),e=>e[o(264)](t.id)),c[o(149)][o(185)](u),c})}}function De(e,t){const n=Me;return void 0!==e[n(286)]&&void 0===t[n(286)]?1:void 0===e[n(286)]&&void 0!==t[n(286)]?-1:void 0!==e[n(286)]&&void 0!==t[n(286)]?e[n(286)]-t[n(286)]:0}function Ue(e,t){const n=Me;t[n(263)](De);const r={},s=[];for(const o of t)if(void 0!==o[n(286)]){if(o[n(286)]in r)throw new i.CKEditorError(n(183),e,{conflictingDefinitions:[o,r[o[n(286)]]]});r[o[n(286)]]=o,s[n(202)](o[n(286)],0,o)}else s[n(136)](o);return s}const Fe=Be;function Be(e,t){const n=He();return(Be=function(e,t){return n[e-=236]})(e,t)}!function(e){const t=Be,n=e();for(;;)try{if(683110===parseInt(t(255))/1+-parseInt(t(279))/2+parseInt(t(262))/3*(parseInt(t(238))/4)+-parseInt(t(256))/5*(parseInt(t(289))/6)+parseInt(t(328))/7+-parseInt(t(239))/8+-parseInt(t(277))/9*(-parseInt(t(250))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(He);class je extends e.Plugin{static get[Fe(254)](){return[$e,p]}static get[Fe(325)](){return Fe(315)}static get[Fe(338)](){return!0}static get[Fe(267)](){return!0}constructor(e){const t=Fe;super(e);const n=e[t(266)],r=e[t(271)];n[t(312)](t(241),!0),n[t(312)](t(331),qe(r)),n[t(312)](t(268),[]),n[t(312)](t(247),[]);let i=o(n[t(243)](t(331)),r);const s=n[t(243)](t(268)),a=n[t(243)](t(247));s[t(322)](e=>{const n=t,r=i[n(344)](t=>t[n(317)]===e[n(317)]);r?r[n(286)]=r[n(286)][n(281)](e[n(286)]):i[n(260)](e)}),i=i[t(246)](e=>!a[t(276)](e[t(317)])),i[t(322)](e=>{const n=t;e[n(286)]=e[n(286)][n(246)](e=>!a[n(276)](e.id))}),n[t(258)](t(331),i)}}function He(){const e=["simplifyLanguage","Friendly","generate","Translate","119452CZBGWY","4587744srrALb","makeShorter","ai.aiAssistant.preserveComments","Business","get","Confident","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","filter","ai.aiAssistant.removeCommands","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Simplify language","3963230TnOgCU","Improve writing","business","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","requires","805469sOsUVR","5StsGma","legal","set","Improve using friendly, comforting language, to convey understanding and empathy.","push","French","30izuYkO","English","Portuguese","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","config","isPremiumPlugin","ai.aiAssistant.extraCommandGroups","translateEnglish","Arabic","locale","Rewrite this content as a legal professional using valid legal terminology.","Journalism","friendly","translateArabic","includes","36xoKfAD","improveWriting","1352748kwdTwh","German","concat","continue","Continue","Spanish","Legal","commands","Generate from selection","Rewrite this content as a business professional with formal language.","6789390xWlwVR","Make shorter","Translate the content to Portuguese language.","Edit or review","Rewrite this content as a journalist using engaging language to convey the importance of the information.","Translate the content to Simplified Chinese language.","Change tone","Make longer","Translate the content to Spanish language.","Professional","Translate the content to German language.","makeLonger","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Translate the content to French language.","direct","professional","translateGerman","poetic","Poetic","translateHindi","Improve this content by using descriptive language and inserting more information and more detailed explanations.","translateSpanish","editOrReview","define","Translate the content to English language.","Direct","AIAssistant","Summarize","groupId","Change style","translatePortuguese","changeTone","changeStyle","forEach","translate","casual","pluginName","translateFrench","Casual","2625882IftePo","summarize","Simplified Chinese","ai.aiAssistant.commands","Improve using casual, informal language to convey a casual conversation with a real person.","Translate the content to Hindi language.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","Hindi","Improve using direct language, using only the essential information.","confident","isOfficialPlugin","journalism","Improve using compelling, optimistic language to convey confidence in the writing.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","Translate the content to Arabic language.","translateChinese","find"];return(He=function(){return e})()}function qe(e){const t=Fe;return[{groupId:t(311),groupLabel:v(e,t(292)),commands:[{id:t(278),label:v(e,t(251)),prompt:t(253)},{id:t(240),label:v(e,t(290)),prompt:t(334)},{id:t(300),label:v(e,t(296)),prompt:t(309)},{id:t(345),label:v(e,t(249)),prompt:t(248)}]},{groupId:t(236),groupLabel:v(e,t(287)),commands:[{id:t(329),label:v(e,t(316)),prompt:t(245)},{id:t(282),label:v(e,t(283)),prompt:t(265)}]},{groupId:t(320),groupLabel:v(e,t(295)),commands:[{id:t(304),label:v(e,t(298)),prompt:t(341)},{id:t(324),label:v(e,t(327)),prompt:t(332)},{id:t(303),label:v(e,t(314)),prompt:t(336)},{id:t(337),label:v(e,t(244)),prompt:t(340)},{id:t(274),label:v(e,t(346)),prompt:t(259)}]},{groupId:t(321),groupLabel:v(e,t(318)),commands:[{id:t(252),label:v(e,t(242)),prompt:t(288)},{id:t(257),label:v(e,t(285)),prompt:t(272)},{id:t(339),label:v(e,t(273)),prompt:t(293)},{id:t(306),label:v(e,t(307)),prompt:t(301)}]},{groupId:t(323),groupLabel:v(e,t(237)),commands:[{id:t(269),label:v(e,t(263)),prompt:t(313)},{id:t(310),label:v(e,t(284)),prompt:t(297)},{id:t(319),label:v(e,t(264)),prompt:t(291)},{id:t(305),label:v(e,t(280)),prompt:t(299)},{id:t(326),label:v(e,t(261)),prompt:t(302)},{id:t(343),label:v(e,t(330)),prompt:t(294)},{id:t(308),label:v(e,t(335)),prompt:t(333)},{id:t(275),label:v(e,t(270)),prompt:t(342)}]}]}const Ve=ze;function ze(e,t){const n=Ge();return(ze=function(e,t){return n[e-=279]})(e,t)}function Ge(){const e=["editor","resolve","aitextadapter-send-request-failed","application/json","sendRequest","91uKzyhc","assign","catch","reject","requires","aborted","init","AI_ERROR_GET_PARAMETERS","2141975aGQOlU","AbortError","object","9bRRiCi","abortController","abort","locale","_prepareRequestParameters","1185116pVASgv","9572iDapQc","619416IAgWtu","signal","18dfdVum","get","91932oTMBCE","makeRequest","plugins","1491YzjVCd","AI_ERROR_GET_HEADERS","21147830ncOzWK","7382190dPanvc","_prepareRequestHeaders","error","name","textAdapter"];return(Ge=function(){return e})()}!function(e){const t=ze,n=e();for(;;)try{if(692168===parseInt(t(316))/1+-parseInt(t(310))/2+-parseInt(t(281))/3*(parseInt(t(311))/4)+parseInt(t(302))/5*(-parseInt(t(314))/6)+-parseInt(t(294))/7*(-parseInt(t(312))/8)+parseInt(t(305))/9*(parseInt(t(284))/10)+parseInt(t(283))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[Ve(306)];static get[Ve(298)](){return[b]}constructor(e){const t=Ve;super(e),this[t(306)]=new AbortController}[Ve(300)](){const e=Ve;this[e(289)][e(280)][e(315)](b)[e(288)]=this}[Ve(307)](){const e=Ve;this[e(306)][e(313)][e(299)]||(this[e(306)][e(307)](),this[e(306)]=new AbortController)}async[Ve(279)](e){const t=Ve;return this[t(293)](e)[t(296)](e=>{const n=t;if(e instanceof w)return Promise[n(297)](e);if(n(303)==e[n(287)])return Promise[n(290)]();throw console[n(286)](e),new i.CKEditorError(n(291),null)})}async[Ve(285)](e,t){const n=Ve,r=this[n(289)][n(308)],i={"Content-Type":n(292)};if(n(304)==typeof e)Object[n(295)](i,e);else if(e)try{const r=await e(t);Object[n(295)](i,r)}catch{return Promise[n(297)](new w(v(r,n(282))))}return i}async[Ve(309)](e,t){const n=Ve,r=this[n(289)][n(308)];if(n(304)==typeof e)return e;try{return await e(t)}catch{return Promise[n(297)](new w(v(r,n(301))))}}}const Ke=Qe;function Qe(e,t){const n=Ye();return(Qe=function(e,t){return n[e-=355]})(e,t)}function Ye(){const e=["_isBufferIncomplete","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.","AI_ERROR_CONTEXT_LENGTH","84QfAAHR","define","107895pMmpRK","json","10Qgqqyb","read","get","13245656urWSZZ","text","gpt-4o","content","6906vOqtCn","https://api.openai.com/v1/chat/completions","229044pCxPsk","_readStaticResponse","abortController","pluginName","split","_readStreamableResponse","ai.openAI.requestParameters","stringify","_cleanUpData","decode","join","config","Instruction:\n","parse","\nYou must keep the text formatting.\n\nContent:\n","body","signal","721070LnDWIa","_requestParameters","user","POST","getReader","length","sendRequest","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.","[DONE]","_prepareRequestParameters","_requestHeaders","delta","replace","context_length_exceeded","editor","filter","AI_ERROR_MODERATION","system","locale","stream","map","message","ai.openAI.requestHeaders","5137470NTJopF","OpenAITextAdapter","8340327wuQhjx","includes","_apiUrl","data: ","choices","reject","Moderation","_prepareRequestHeaders","prepareMessages","ai.openAI.apiUrl","10577tyAPVA","resolve"];return(Ye=function(){return e})()}!function(e){const t=Qe,n=e();for(;;)try{if(892095===parseInt(t(401))/1+parseInt(t(418))/2+-parseInt(t(371))/3+-parseInt(t(388))/4*(parseInt(t(390))/5)+-parseInt(t(399))/6*(-parseInt(t(383))/7)+parseInt(t(395))/8+-parseInt(t(373))/9*(parseInt(t(392))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ye);class Je extends We{[Ke(375)];[Ke(358)];[Ke(419)];static get[Ke(404)](){return Ke(372)}constructor(e){const t=Ke;super(e),e[t(412)][t(389)](t(382),t(400)),e[t(412)][t(394)](t(407))||e[t(412)][t(389)](t(407),{model:t(397),temperature:1,top_p:1,stream:!0}),this[t(375)]=e[t(412)][t(394)](t(382)),this[t(358)]=e[t(412)][t(394)](t(370))||{},this[t(419)]=e[t(412)][t(394)](t(407))}async[Ke(424)]({query:e,context:t,onData:n,actionId:r}){const i=Ke,s=this[i(362)][i(366)],o=await this[i(381)](e,t,r),a=await this[i(380)](this[i(358)],r),c=await this[i(357)](this[i(419)],r),u={messages:o,...c},d={method:i(421),headers:a,body:JSON[i(408)](u),signal:this[i(403)][i(417)]},l=await fetch(this[i(375)],d);if(l.ok)return c[i(367)]?await this[i(406)](l,n):await this[i(402)](l,n),Promise[i(384)]();{const e=await l[i(396)]();return e[i(374)](i(361))?Promise[i(378)](new w(v(s,i(387)))):e[i(374)](i(379))?Promise[i(378)](new w(v(s,i(364)))):Promise[i(378)](new Error(e))}}async[Ke(381)](e,t,n){const r=Ke;let i,s;return t?(i=r(355),s=r(413)+e+r(415)+t):(i=r(386),s=e),[{role:r(365),content:i},{role:r(420),content:s}]}async[Ke(406)](e,t){const n=Ke,r=e[n(416)][n(422)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(393)](),d=s+i[n(410)](u);let l="";c=e;try{l=this[n(409)](d),s=""}catch{s=d;continue}o+=l,!c&&this[n(385)](o)||o&&(a+=o,o="",t(a))}return Promise[n(384)]()}async[Ke(402)](e,t){const n=Ke;return t((await e[n(391)]())[n(377)][0][n(369)][n(398)]),Promise[n(384)]()}[Ke(385)](e){const t=Ke,n=e[t(405)]("<")[t(423)]!==e[t(405)](">")[t(423)],r=e[t(423)]<30;return n&&r}[Ke(409)](e){const t=Ke;return e[t(405)](/\n(?![^{]*\})/g)[t(368)](e=>e[t(360)](t(376),""))[t(363)](e=>e&&e[t(423)]>0&&t(356)!==e)[t(368)](e=>{const n=t,{choices:r}=JSON[n(414)](e);if(r[0]?.[n(359)]?.[n(398)])return r[0][n(359)][n(398)]})[t(363)](e=>e)[t(411)]("")}}var Ze,Xe,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,st;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(st||(st={}));class ot{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new ot({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return ot.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!ot.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!ot.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[lt]=o),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),bt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!bt(e))return!1;return!0},wt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const Et=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),At={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:Et,isSet:e=>null!=e,isValidHostLabel:bt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map(([e,t])=>`${e}=${t}`).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Et(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in wt&&null!=i[1]?wt[i[0]][i[1]](...r):It[e](...r)},Pt=({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}}}},Ct=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Pt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Mt=(e,t)=>{if(Array.isArray(e))return e.map(e=>Mt(e,t));switch(typeof e){case"string":return _t(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Mt(r,t)}),{}),Nt=(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)},Lt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Ct(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Tt(u,o)},...null!=c&&{properties:Ot(c,o)},url:Nt(a,o)}},$t=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Ct(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Dt=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Ct(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Lt(n,t);if(e)return e}else if("error"===n.type)$t(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!!bt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Bt=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const Ht={isVirtualHostableS3Bucket:Ft,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=Bt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function qt(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}wt.aws=Ht;const Vt=/\d{12}\.ddb/;const zt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Qt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Yt)||[],a=(await e.defaultUserAgentProvider()).map(Yt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&qt(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?qt(e,"RETRY_MODE_ADAPTIVE","F"):qt(e,"RETRY_MODE_STANDARD","E"):qt(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Vt)&&qt(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":qt(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":qt(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":qt(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&qt(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))qt(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Yt)||[],d=await e.userAgentAppId();d&&a.push(Yt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...o,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(s[Gt]=s[Gt]?`${s[zt]} ${h}`:h),s[zt]=l):s[Gt]=l,t({...r,request:i})},Yt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Jt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Zt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Zt||(Zt={}));const Xt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=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)},sn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class on{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=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||an)(i));return(o.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(ot.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),bn=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},wn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),En=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 wn(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("?"))),bn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},An=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await En(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=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})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(s)){const{headers:t={}}=s,n=Object.entries(t);e.$metadata={httpStatusCode:s.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const s=e,o=r.endpointV2?.url&&s.urlParser?async()=>s.urlParser(r.endpointV2.url):s.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:o});return n({...i,request:a})})(e,t),xn)}}}const Pn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Cn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(An({config:e,instructions:t}),Pn)}});var Tn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Tn||(Tn={}));const Mn=Tn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Nn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Ln=[500,502,503,504],$n=["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)||Nn.includes(e.name)||$n.includes(e?.code||"")||Dn.includes(e?.code||"")||Ln.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Fn(e.cause,t+1);class Bn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Bn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Bn.setTimeoutFn=setTimeout;const jn=100,Hn=2e4,qn="amz-sdk-invocation-id",Vn="amz-sdk-request",zn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Hn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Tn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(Hn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return zn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,zn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Tn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Bn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qn;const Yn=new Uint8Array(16);function Jn(){if(!Qn&&(Qn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qn(Yn)}const Zn=[];for(let e=0;e<256;++e)Zn.push((e+256).toString(16).slice(1));function Xn(e,t=0){return Zn[e[t+0]]+Zn[e[t+1]]+Zn[e[t+2]]+Zn[e[t+3]]+"-"+Zn[e[t+4]]+Zn[e[t+5]]+"-"+Zn[e[t+6]]+Zn[e[t+7]]+"-"+Zn[e[t+8]]+Zn[e[t+9]]+"-"+Zn[e[t+10]]+Zn[e[t+11]]+Zn[e[t+12]]+Zn[e[t+13]]+Zn[e[t+14]]+Zn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Jn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Xn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))}),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))o[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>sr[t.step]-sr[e.step]||or[t.priority||"normal"]-or[e.priority||"normal"])).map(s).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=nr(i,o);if(c.length>0){if(c.some(e=>r.has(e))){if(!s)throw new Error(`Duplicate middleware name '${rr(i,o)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=nr(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},sr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},or={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then(e=>e.output);s(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function br(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 wr={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===wr.supported&&(wr.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),wr.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})}))}),br(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const Sr={},Er={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Er[t]=e}function Ar(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Er))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Er[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)},xr=e=>"function"==typeof e?e():e;class Rr{constructor(e,t){this.name=e,this.traits=t}}class Pr extends Rr{constructor(e,t,n){super(e,t),this.name=e,this.traits=t,this.valueSchema=n,this.symbol=Pr.symbol}static[Symbol.hasInstance](e){const t=Pr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Pr.symbol}return t}}Pr.symbol=Symbol.for("@smithy/core/schema::ListSchema");class Cr extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.keySchema=n,this.valueSchema=r,this.symbol=Cr.symbol}static[Symbol.hasInstance](e){const t=Cr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Cr.symbol}return t}}Cr.symbol=Symbol.for("@smithy/core/schema::MapSchema");const Tr={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 Mr extends Rr{constructor(e,t,n){super(e,n),this.name=e,this.schemaRef=t,this.traits=n,this.symbol=Mr.symbol}static[Symbol.hasInstance](e){const t=Mr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Mr.symbol}return t}}Mr.symbol=Symbol.for("@smithy/core/schema::SimpleSchema");class Or extends Rr{constructor(e,t,n,r){super(e,t),this.name=e,this.traits=t,this.memberNames=n,this.memberList=r,this.symbol=Or.symbol,this.members={};for(let e=0;e<n.length;++e)this.members[n[e]]=Array.isArray(r[e])?r[e]:[r[e],0]}static[Symbol.hasInstance](e){const t=Or.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Or.symbol}return t}}Or.symbol=Symbol.for("@smithy/core/schema::StructureSchema");class Nr{constructor(e,t){this.ref=e,this.memberName=t,this.symbol=Nr.symbol;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;Array.isArray(r);)n.push(r[1]),r=r[0],i=xr(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,Nr.translateTraits(t))}}else this.memberTraits=0;if(i instanceof Nr)return this.name=i.name,this.traits=i.traits,this._isMemberSchema=i._isMemberSchema,this.schema=i.schema,this.memberTraits=Object.assign({},i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.ref=i.ref,void(this.memberName=t??i.memberName);if(this.schema=xr(i),this.schema&&"object"==typeof this.schema?this.traits=this.schema?.traits??{}:this.traits=0,this.name=("object"==typeof this.schema?this.schema?.name:void 0)??this.memberName??this.getSchemaName(),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member schema ${this.getName(!0)} must initialize with memberName argument.`)}static[Symbol.hasInstance](e){const t=Nr.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===Nr.symbol}return t}static of(e,t){return e instanceof Nr?e:new Nr(e,t)}static translateTraits(e){if("object"==typeof e)return e;const t={};return 1&~(e|=0)||(t.httpLabel=1),1==(e>>1&1)&&(t.idempotent=1),1==(e>>2&1)&&(t.idempotencyToken=1),1==(e>>3&1)&&(t.sensitive=1),1==(e>>4&1)&&(t.httpPayload=1),1==(e>>5&1)&&(t.httpResponseCode=1),1==(e>>6&1)&&(t.httpQueryParams=1),t}static memberFrom(e,t){return e instanceof Nr?(e.memberName=t,e._isMemberSchema=!0,e):new Nr(e,t)}getSchema(){return this.schema instanceof Nr?this.schema=this.schema.getSchema():this.schema instanceof Mr?xr(this.schema.schemaRef):xr(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 - cannot get member name on 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>=Tr.LIST_MODIFIER&&e<Tr.MAP_MODIFIER:e instanceof Pr}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=Tr.MAP_MODIFIER&&e<=255:e instanceof Cr}isDocumentSchema(){return this.getSchema()===Tr.DOCUMENT}isStructSchema(){const e=this.getSchema();return null!==e&&"object"==typeof e&&"members"in e||e instanceof Or}isBlobSchema(){return this.getSchema()===Tr.BLOB||this.getSchema()===Tr.STREAMING_BLOB}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=Tr.TIMESTAMP_DEFAULT&&e<=Tr.TIMESTAMP_EPOCH_SECONDS}isStringSchema(){return this.getSchema()===Tr.STRING}isBooleanSchema(){return this.getSchema()===Tr.BOOLEAN}isNumericSchema(){return this.getSchema()===Tr.NUMERIC}isBigIntegerSchema(){return this.getSchema()===Tr.BIG_INTEGER}isBigDecimalSchema(){return this.getSchema()===Tr.BIG_DECIMAL}isStreaming(){return!!this.getMergedTraits().streaming||this.getSchema()===Tr.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()}),this.normalizedTraits}getMemberTraits(){return Nr.translateTraits(this.memberTraits)}getOwnTraits(){return Nr.translateTraits(this.traits)}getKeySchema(){if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"key");if(!this.isMapSchema())throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(!0)}`);const e=this.getSchema();return"number"==typeof e?Nr.memberFrom([63&e,0],"key"):Nr.memberFrom([e.keySchema,0],"key")}getValueSchema(){const e=this.getSchema();if("number"==typeof e){if(this.isMapSchema())return Nr.memberFrom([63&e,0],"value");if(this.isListSchema())return Nr.memberFrom([63&e,0],"member")}if(e&&"object"==typeof e){if(this.isStructSchema())throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(!0)}`);const t=e;if("valueSchema"in t){if(this.isMapSchema())return Nr.memberFrom([t.valueSchema,0],"value");if(this.isListSchema())return Nr.memberFrom([t.valueSchema,0],"member")}}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],"value");throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a value member.`)}hasMemberSchema(e){if(this.isStructSchema()){return e in this.getSchema().members}return!1}getMemberSchema(e){if(this.isStructSchema()){const t=this.getSchema();if(!(e in t.members))throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have a member with name=${e}.`);return Nr.memberFrom(t.members[e],e)}if(this.isDocumentSchema())return Nr.memberFrom([Tr.DOCUMENT,0],e);throw new Error(`@smithy/core/schema - the schema ${this.getName(!0)} does not have members.`)}getMemberSchemas(){const{schema:e}=this,t=e;if(!t||"object"!=typeof t)return{};if("members"in t){const e={};for(const n of t.memberNames)e[n]=this.getMemberSchema(n);return e}return{}}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 acquire structIterator on non-struct schema.");const e=this.getSchema();for(let t=0;t<e.memberNames.length;++t)yield[e.memberNames[t],Nr.memberFrom([e.memberList[t],0],e.memberNames[t])]}getSchemaName(){const e=this.getSchema();if("number"==typeof e){const t=63&e,n=192&e,r=Object.entries(Tr).find(([,e])=>e===t)?.[0]??"Unknown";switch(n){case Tr.MAP_MODIFIER:return`${r}Map`;case Tr.LIST_MODIFIER:return`${r}List`;case 0:return r}}return"Unknown"}}Nr.symbol=Symbol.for("@smithy/core/schema::NormalizedSchema");const Lr="***SensitiveInformation***";function $r(e,t){if(null==t)return t;const n=Nr.of(e);if(n.getMergedTraits().sensitive)return Lr;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Lr}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=$r(i,e[t]));return r}return t}class Dr{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Ur}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Ur{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 Dr{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?$r.bind(null,e._operationSchema.input):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(e._operationSchema?$r.bind(null,e._operationSchema.output):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Fr="***SensitiveInformation***";class Br 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 Br.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===Br?Br.isInstance(e):!!Br.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const jr=(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},Hr=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"]}),qr=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{}}},Vr=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)),zr=e=>null!=e;class Gr{trace(){}debug(){}info(){}warn(){}error(){}}function Wr(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,Qr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Yr(r,null,s,e):r[e]=s[e];return r}const Kr=(e,t)=>{const n={};for(const r in t)Yr(n,e,t,r);return n},Qr=(e,t,n)=>Wr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Yr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Jr,o=Zr,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Jr=e=>null!=e,Zr=e=>e,Xr=(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}`)}}),ei=e=>ti(e,32),ti=(e,t)=>{const n=Xr(e);if(void 0!==n&&ni(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},ni=(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]}},ri=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return si.warn(ii(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ii=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),si={warn:console.warn},oi=e=>e?.body instanceof ReadableStream,ai=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,ci=e=>{const t={error:e,errorType:ui(e)},n=hi(e.$response);return n&&(t.retryAfterHint=n),t},ui=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",di={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},li=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!ai(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[qn]=er());;)try{d&&(u.headers[Vn]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=ci(t);if(o=tr(t),d&&oi(u))throw(n.logger instanceof Gr?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),di)}}),hi=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 fi=(pi=3e5,e=>mi(e)&&e.expiration.getTime()-Date.now()<pi);var pi;const mi=e=>void 0!==e.expiration,gi=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),yi="X-Amz-Date",bi="X-Amz-Signature",wi="X-Amz-Security-Token",vi="authorization",ki=yi.toLowerCase(),Si=[vi,ki,"date"],Ei=bi.toLowerCase(),Ai="x-amz-content-sha256",Ii=wi.toLowerCase(),_i={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},xi=/^proxy-/,Ri=/^sec-/,Pi="AWS4-HMAC-SHA256",Ci="AWS4-HMAC-SHA256-PAYLOAD",Ti="aws4_request",Mi={},Oi=[],Ni=(e,t,n)=>`${e}/${t}/${n}/${Ti}`,Li=(e,t,n)=>{const r=new e(t);return r.update(gi(n)),r.digest()},$i=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in _i||t?.has(s)||xi.test(s)||Ri.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Di=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===Ai)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(gi(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ui{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=lr(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ji.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Bi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}}var Fi;!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"}(Fi||(Fi={}));const Bi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ji{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&&Hi(t),new ji(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Hi(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Hi(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const qi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))Si.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Vi=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class zi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Ei)continue;const i=mr(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${mr(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(gi(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,Vi(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 Gi extends zi{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 Ui}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=Ni(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=ot.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(qi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[wi]=d.sessionToken),m.query["X-Amz-Algorithm"]=Pi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[yi]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=$i(m,i,o);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[bi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Di(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=Ni(a,o,s??this.service),d=await Di({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[Ci,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(gi(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=qi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ni(d,a,s??this.service);c.headers[ki]=u,o.sessionToken&&(c.headers[Ii]=o.sessionToken);const h=await Di(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(Ai,c.headers)&&this.applyChecksum&&(c.headers[Ai]=h);const f=$i(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[vi]=`${Pi} 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,Pi),s=new this.sha256(await n);return s.update(gi(i)),Ir(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${Ir(await Li(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Mi)return Mi[s];for(Oi.push(s);Oi.length>50;)delete Mi[Oi.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,Ti])o=await Li(e,o,t);return Mi[s]=o})(this.sha256,e,n,t,r||this.service)}}const Wi=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,fi,mi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);r&&!o.attributed?(t=async e=>o(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Gi)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const Ki=async(e,t,n)=>({operation:Xt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Qi=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},Yi={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 Zi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Xi(e){return e instanceof Uint8Array?e:"string"==typeof e?Zi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function es(e){return"string"==typeof e?0===e.length:0===e.byteLength}var ts={name:"SHA-256"},ns={name:"HMAC",hash:ts},rs=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 is={};function ss(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:is}var os=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!es(e)){var t=Xi(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 ss().crypto.subtle.sign(ns,t,e.toHash).then(function(e){return new Uint8Array(e)})}):es(this.toHash)?Promise.resolve(rs):Promise.resolve().then(function(){return ss().crypto.subtle.digest(ts,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){ss().crypto.subtle.importKey("raw",Xi(e.secret),ns,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function as(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 cs(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 us(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 ds=64,ls=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]),hs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],fs=Math.pow(2,53)-1,ps=function(){function e(){this.state=Int32Array.from(hs),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>fs)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ds&&(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%ds>=56){for(var r=this.bufferLength;r<ds;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<ds;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+(ls[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}(),ms=function(){function e(e){this.secret=e,this.hash=new ps,this.reset()}return e.prototype.update=function(e){if(!es(e)&&!this.error)try{this.hash.update(Xi(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 as(this,void 0,void 0,function(){return cs(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ps,this.secret){this.outer=new ps;var e=function(e){var t=Xi(e);if(t.byteLength>ds){var n=new ps;n.update(t),t=n.digest()}var r=new Uint8Array(ds);return r.set(t),r}(this.secret),t=new Uint8Array(ds);t.set(e);for(var n=0;n<ds;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 gs=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ys(e){return e&&gs.every(function(t){return"function"==typeof e[t]})}var bs=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)&&ys(e.crypto.subtle)}(ss())?this.hash=new ms(e):this.hash=new os(e)}return e.prototype.update=function(e,t){this.hash.update(Xi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ws=n(369),vs=n.n(ws);const ks=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const s=await(n?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i};!function(){function e(){this.crc32=new Es}e.prototype.update=function(e){es(e)||this.crc32.update(Xi(e))},e.prototype.digest=function(){return as(this,void 0,void 0,function(){return cs(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 Es}}();var Ss,Es=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=us(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^As[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}(),As=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 Is{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&&_s(t),new Is(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&_s(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function _s(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class xs{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(Is.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ds.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:Rs,value:!0};break;case 1:t[i]={type:Rs,value:!1};break;case 2:t[i]={type:Ps,value:e.getInt8(n++)};break;case 3:t[i]={type:Cs,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:Ts,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Ms,value:new Is(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Os,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:Ns,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Ls,value:new Date(new Is(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:$s,value:`${Ir(o.subarray(0,4))}-${Ir(o.subarray(4,6))}-${Ir(o.subarray(6,8))}-${Ir(o.subarray(8,10))}-${Ir(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ss||(Ss={}));const Rs="boolean",Ps="byte",Cs="short",Ts="integer",Ms="long",Os="binary",Ns="string",Ls="timestamp",$s="uuid",Ds=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Us{constructor(e,t){this.headerMarshaller=new xs(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 Es;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 Es).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 Fs{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 Bs{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 js{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 Hs{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 qs(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 Vs{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Us(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 js({messageStream:new Fs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:qs(t,this.utfEncoder)})}serialize(e,t){return new Bs({messageStream:new Hs({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class zs{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Vs({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Gs(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 Gs=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Ws=e=>new zs(e),Ks="function"==typeof TextEncoder?new TextEncoder:null,Qs=e=>{if("string"==typeof e){if(Ks)return Ks.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}`)},Ys=e=>new Date(Date.now()+e),Js=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Zs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ys(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Xs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class eo{async sign(e,t,n){if(!ot.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=Xs("context",e.context),n=Xs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Xs("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:Ys(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Js(t.$response);if(n){const r=Xs("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Zs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Js(e);if(n){const e=Xs("config",t.config);e.systemClockOffset=Zs(n,e.systemClockOffset)}}}const to="required",no="fn",ro="argv",io="ref",so=!0,oo="isSet",ao="booleanEquals",co="error",uo="endpoint",lo="tree",ho="PartitionResult",fo={[to]:!1,type:"String"},po={[to]:!0,default:!1,type:"Boolean"},mo={[io]:"Endpoint"},go={[no]:ao,[ro]:[{[io]:"UseFIPS"},!0]},yo={[no]:ao,[ro]:[{[io]:"UseDualStack"},!0]},bo={},wo={[no]:"getAttr",[ro]:[{[io]:ho},"supportsFIPS"]},vo={[no]:ao,[ro]:[!0,{[no]:"getAttr",[ro]:[{[io]:ho},"supportsDualStack"]}]},ko=[go],So=[yo],Eo=[{[io]:"Region"}],Ao={version:"1.0",parameters:{Region:fo,UseDualStack:po,UseFIPS:po,Endpoint:fo},rules:[{conditions:[{[no]:oo,[ro]:[mo]}],rules:[{conditions:ko,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:co},{rules:[{conditions:So,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:co},{endpoint:{url:mo,properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{rules:[{conditions:[{[no]:oo,[ro]:Eo}],rules:[{conditions:[{[no]:"aws.partition",[ro]:Eo,assign:ho}],rules:[{conditions:[go,yo],rules:[{conditions:[{[no]:ao,[ro]:[so,wo]},vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:co}],type:lo},{conditions:ko,rules:[{conditions:[{[no]:ao,[ro]:[wo,so]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"FIPS is enabled but this partition does not support FIPS",type:co}],type:lo},{conditions:So,rules:[{conditions:[vo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo},{error:"DualStack is enabled but this partition does not support DualStack",type:co}],type:lo},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:bo,headers:bo},type:uo}],type:lo}],type:lo}],type:lo},{error:"Invalid Configuration: Missing Region",type:co}],type:lo}]},Io=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"]}),_o=(e,t={})=>Io.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const o=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(Ao,{endpointParams:e,logger:t.logger}));wt.aws=Ht;Error;const xo=["in-region","cross-region","mobile","standard","legacy"],Ro=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?vs().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Po=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(Ro()?"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 ${xo.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(qr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_o,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new eo}],logger:e?.logger??new Gr,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??Qs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ks({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??Ws,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Mn),sha256:e?.sha256??bs,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},Co=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Vr(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 To extends ar{config;constructor(...[e]){const t=Po(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Tn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),s=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),o=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>Sn(await en(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(s);var a;const c=(e=>{const t=Wi(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=o,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=Co(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Qt(l),Jt)}})),this.middlewareStack.use(li(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),sn)}}))(this.config,{httpAuthSchemeParametersProvider:Ki,identityProviderConfigProvider:async e=>new on({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Mo extends Br{constructor(e){super(e),Object.setPrototypeOf(this,Mo.prototype)}}class Oo extends Mo{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Oo.prototype)}}var No;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));class Lo extends Mo{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Lo.prototype)}}class $o extends Mo{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,$o.prototype)}}class Do extends Mo{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,Do.prototype)}}class Uo extends Mo{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Uo.prototype)}}class Fo extends Mo{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Fo.prototype)}}class Bo extends Mo{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Bo.prototype)}}class jo extends Mo{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,jo.prototype)}}var Ho;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={}));var qo;!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])}(qo||(qo={}));var Vo;!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])}(Vo||(Vo={}));var zo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(zo||(zo={}));var Go;!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])}(Go||(Go={}));var Wo,Ko;!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])}(Wo||(Wo={})),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])}(Ko||(Ko={}));var Qo,Yo;!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])}(Qo||(Qo={})),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])}(Yo||(Yo={}));var Jo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));var Zo,Xo,ea,ta,na,ra;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Zo||(Zo={})),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])}(Xo||(Xo={})),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])}(ea||(ea={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(ta||(ta={})),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])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={}));class ia extends Mo{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ia.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class sa extends Mo{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,sa.prototype)}}class oa extends Mo{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,oa.prototype)}}var aa,ca,ua,da;!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])}(aa||(aa={})),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])}(ca||(ca={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(ua||(ua={}));class la extends Mo{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,la.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])}(da||(da={}));var ha,fa,pa;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(ha||(ha={})),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])}(fa||(fa={})),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])}(pa||(pa={}));const ma=e=>({...e,...e.body&&{body:Fr}}),ga=e=>({...e,...e.body&&{body:Fr}}),ya=e=>({...e,...e.body&&{body:Fr}}),ba=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),wa=(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{}}),va=async(e,t)=>{const n=await wa(e,t);return n.message=n.message??n.Message,n};function ka(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Sa(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 ot({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map(e=>ka(e)).join("/"):ka(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 Aa=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[Xa]:e[Xa],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});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()},Ia=async(e,t)=>{const n=Sa(e,t),r=Wr({},zr,{[tc]:e[ec]||"application/octet-stream",[oc]:e[Xa],[lc]:e[sc],[cc]:e[nc],[uc]:e[rc],[dc]:e[ic]});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()},_a=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Za(e),[ec]:[,e.headers[tc]],[ic]:[,e.headers[dc]]}),r=await _r(e.body,t);return n.body=r,n},xa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ra(e,t);const n=Wr({$metadata:Za(e),[ec]:[,e.headers[ac]],[ic]:[,e.headers[dc]]}),r=e.body;return n.body=qa(r,t),n},Ra=async(e,t)=>{const n={...e,body:await va(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 Ta(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Oa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ua(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Fa(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ja(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ha(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Na(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await La(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await Da(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Ba(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await $a(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Ma(n,t);default:const i=n.body;return Pa({output:e,parsedBody:i,errorCode:r})}},Pa=(Ca=Mo,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Hr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw jr(o,t)})({output:e,parsedBody:t,exceptionCtor:Ca,errorCode:n})});var Ca;const Ta=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Oo({$metadata:Za(e),...n});return jr(s,e.body)},Ma=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Uo({$metadata:Za(e),...n});return jr(s,e.body)},Oa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Lo({$metadata:Za(e),...n});return jr(s,e.body)},Na=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalStatusCode:ei,resourceName:ri});Object.assign(n,i);const s=new ia({$metadata:Za(e),...n});return jr(s,e.body)},La=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new sa({$metadata:Za(e),...n});return jr(s,e.body)},$a=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri,originalMessage:ri,originalStatusCode:ei});Object.assign(n,i);const s=new la({$metadata:Za(e),...n});return jr(s,e.body)},Da=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new oa({$metadata:Za(e),...n});return jr(s,e.body)},Ua=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Fo({$metadata:Za(e),...n});return jr(s,e.body)},Fa=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Bo({$metadata:Za(e),...n});return jr(s,e.body)},Ba=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new jo({$metadata:Za(e),...n});return jr(s,e.body)},ja=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new $o({$metadata:Za(e),...n});return jr(s,e.body)},Ha=async(e,t)=>{const n=Wr({}),r=e.body,i=Kr(r,{message:ri});Object.assign(n,i);const s=new Do({$metadata:Za(e),...n});return jr(s,e.body)},qa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Wa(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Va(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await za(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ya(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Qa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Ga(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ka(n.serviceUnavailableException,t)}:{$unknown:e}),Va=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Oa(n,t)},za=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return $a(n,t)},Ga=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Da(n,t)},Wa=async(e,t)=>{const n={},r=await wa(e.body,t);return Object.assign(n,Ja(r,t)),n},Ka=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Ba(n,t)},Qa=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return ja(n,t)},Ya=async(e,t)=>{const n={...e,body:await wa(e.body,t)};return Ha(n,t)},Ja=(e,t)=>Kr(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"]}),Xa="accept",ec="contentType",tc="content-type",nc="guardrailIdentifier",rc="guardrailVersion",ic="performanceConfigLatency",sc="trace",oc="x-amzn-bedrock-accept",ac="x-amzn-bedrock-content-type",cc="x-amzn-bedrock-guardrailidentifier",uc="x-amzn-bedrock-guardrailversion",dc="x-amzn-bedrock-performanceconfig-latency",lc="x-amzn-bedrock-trace";class hc extends(Dr.classBuilder().ep(Yi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Cn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ya,ba).ser(Ia).de(xa).build()){}class fc extends(Dr.classBuilder().ep(Yi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Cn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(ma,ga).ser(Aa).de(_a).build()){}const pc=mc;function mc(e,t){const n=yc();return(mc=function(e,t){return n[e-=454]})(e,t)}!function(e){const t=mc,n=e();for(;;)try{if(282652===-parseInt(t(471))/1+parseInt(t(511))/2*(parseInt(t(494))/3)+parseInt(t(520))/4*(-parseInt(t(507))/5)+parseInt(t(476))/6*(-parseInt(t(510))/7)+-parseInt(t(503))/8*(-parseInt(t(491))/9)+parseInt(t(506))/10*(parseInt(t(475))/11)+parseInt(t(505))/12*(parseInt(t(484))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(yc);class gc extends We{[pc(486)];[pc(466)];[pc(536)];[pc(529)];static get[pc(488)](){return pc(473)}constructor(e){const t=pc;super(e),e[t(485)][t(487)](t(461))||e[t(485)][t(480)](t(461),{model:t(458),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(504),stream:!0}),this[t(486)]=e[t(485)][t(487)](t(502)),this[t(536)]=e[t(485)][t(487)](t(459)),this[t(466)]=e[t(485)][t(487)](t(514)),this[t(529)]=e[t(485)][t(487)](t(461))}async[pc(535)]({query:e,context:t,onData:n,actionId:r}){const i=pc,{model:s,stream:o,...a}=await this[i(454)](this[i(529)],r),c={prompt:await this[i(522)](e,t,s,r),...a};this[i(486)]?await this[i(493)](c,s,o,n,r):await this[i(527)](c,s,o,n)}async[pc(522)](e,t,n,r){const i=pc;let s,o;return t?(s=i(462),o=i(468)+e+i(519)+t):(s=i(517),o=e),i(501)==this[i(469)](n)?i(534)+s+i(457)+o+i(499):i(467)+s+"\n"+o+i(516)}[pc(469)](e){const t=pc;if(/^anthropic\.claude/[t(525)](e))return t(530);if(/^ai21\.j2/[t(525)](e))return t(523);if(/^cohere\.command/[t(525)](e))return t(495);if(/^meta\.llama/[t(525)](e))return t(501);throw new w(v(this[t(521)][t(532)],t(497),e))}async[pc(493)](e,t,n,r,i){const s=pc,o={method:s(526),headers:await this[s(472)](this[s(466)],i),body:JSON[s(455)]({...e,model:t,stream:n}),signal:this[s(463)][s(474)]},a=await fetch(this[s(486)],o);n?await this[s(500)](a,t,r):await this[s(465)](a,t,r)}async[pc(527)](e,t,n,r){const i=pc,s=new To(this[i(536)]),o={body:JSON[i(455)](e),contentType:i(492),accept:i(492),modelId:t};let a;if(n){const e=new hc(o);a=await s[i(518)](e,{abortSignal:this[i(463)][i(474)]}),await this[i(508)](a,t,r)}else{const e=new fc(o);a=await s[i(518)](e,{abortSignal:this[i(463)][i(474)]}),await this[i(465)](a,t,r)}}async[pc(508)](e,t,n){const r=pc,i=e[r(483)],s=new TextDecoder(r(515));let o="";for await(const e of i)if(e[r(460)]){const i=s[r(477)](e[r(460)][r(489)]),a=JSON[r(533)](i);o+=this[r(498)](a,t),n(o)}return Promise[r(456)]()}async[pc(500)](e,t,n){const r=pc,i=e[r(483)],s=new TextDecoder(r(515)),o=i[r(479)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(528)]();if(u=e,u)break;const d=(a+s[r(477)](i))[r(470)]("\n")[r(496)](e=>{const t=r;try{return a="",JSON[t(533)](e)}catch{return a=e,null}})[r(524)](e=>null!==e);d[r(509)]&&(c+=d[r(496)](e=>this[r(498)](e,t))[r(531)](""),n(c))}return Promise[r(456)]()}async[pc(465)](e,t,n){const r=pc;let i;return i=e instanceof Response?await e[r(490)]():JSON[r(533)](new TextDecoder(r(515))[r(477)](e[r(483)])),n(this[r(498)](i,t)),Promise[r(456)]()}[pc(498)](e,t){const n=pc;switch(this[n(469)](t)){case n(530):return e[n(482)];case n(523):return e[n(464)][0][n(512)][n(513)];case n(495):return e[n(478)][0][n(513)];case n(501):return e[n(481)]}}}function yc(){const e=["_prepareRequestHeaders","AWSTextAdapter","signal","11PimIAv","6804NrWTHI","decode","generations","getReader","define","generation","completion","body","3302QBsVpw","config","_apiUrl","get","pluginName","bytes","json","218853TgeRwl","application/json","_processProxyRequest","9837FcJZvb","cohere.command","map","AI_ERROR_UNSUPPORTED_MODEL","_getGeneratedText","\n[/INST]","_readStreamableResponse","meta.llama","ai.aws.apiUrl","96gfqIQT","bedrock-2023-05-31","10716FxGueD","2124690PDGPQc","115pASWGV","_readAsyncIterableResponse","length","1092lYrskJ","130UIkTGN","data","text","ai.aws.requestHeaders","utf-8","\n\nAssistant:","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.","send","\nYou must keep the text formatting.\n\nContent:\n","9304WDRcoF","editor","preparePrompt","ai21.j2","filter","test","POST","_processAWSRequest","read","_requestParameters","anthropic.claude","join","locale","parse","<<SYS>>\n","sendRequest","_bedrockClientConfig","_prepareRequestParameters","stringify","resolve","\n<</SYS>>\n[INST]\n","anthropic.claude-v2","ai.aws.bedrockClientConfig","chunk","ai.aws.requestParameters","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","abortController","completions","_readStaticResponse","_requestHeaders","Human:\n","Instruction:\n","getModelFamily","split","431176cTXwGO"];return(yc=function(){return e})()}function bc(e,t){var n=wc();return(bc=function(e,t){return n[e-=295]})(e,t)}function wc(){var e=["910asjRaQ","1106KSiPtz","72GBQUPq","43448GHTCtd","9254883bZFCNH","2953782MYkDTP","5154364lHvrVs","48fOniSw","1393487qJcqce","63378wgtCST","3caAoTY","587650kATIsP"];return(wc=function(){return e})()}!function(e){for(var t=bc,n=e();;)try{if(749055===parseInt(t(304))/1+-parseInt(t(301))/2+-parseInt(t(306))/3*(-parseInt(t(302))/4)+-parseInt(t(295))/5*(-parseInt(t(298))/6)+-parseInt(t(297))/7*(-parseInt(t(299))/8)+-parseInt(t(305))/9*(-parseInt(t(296))/10)+parseInt(t(300))/11*(-parseInt(t(303))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
|