@ckeditor/ckeditor5-ai 45.0.0-alpha.6 → 45.0.0-alpha.7
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",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=a.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,(function(e){return t.isPlatform(e)}));if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>w,AIAssistant:()=>je,AIAssistantUI:()=>$e,AIRequestError:()=>b,AITextAdapter:()=>Ge,AWSTextAdapter:()=>Qa,OpenAITextAdapter:()=>Qe});var e=n(782),t=n(355),i=n(584),s=n(311);function o(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=l;function d(){const e=["15NYpqAp","getMarkersGroup","getRows","filter","model","getFirstRange","isCollapsed","has","markers","contentInsertion","markerToHighlight","4708952zABTaP","14xYxqim","createPositionAfter","isOfficialPlugin","length","4134042LivyLU","off","start","removeMarker","ck-fake-ai-selection","span","afterInit","getColumnIndexes","plugins","lowest","ck-ai-assistant-ui_theme","editingDowncast","resultRange","getLastMatchingPosition","getSelectedBlocks","createSelection","fromCharCode","parse","isContent","selection","_resetContentOfSelectedTableCells","getRanges","AIAssistantEditing","once","findAncestor","setData","_prepareTableInsertBelowPosition","pluginName","last","isPremiumPlugin","getLastPosition","_createEmptyTableRows","document","setSelection","hideFakeVisualSelection","join","createPositionAt","ai.useTheme","from","end","getRowIndexes","forEach","ai-ui","DataTransfer","pop","table","createUIElement","insertContentBelow","29915760wUaUsr","editing","createRange","text/html","isAtEnd","deleteContent","href","for","canEditAt","element","showFakeVisualSelection","markerRange","415732zaJlgF","first","getSelectedTableCells","getChildren","schema","config","get","push","addClass","data","updateMarker","map","change","insertContent","30cKugwO","TableUtils","editor","ck-fake-ai-selection_collapsed","getRange","conversion","paste","570970LipGRu","_pasteHTMLUsingClipboard","_getTableRowCountFromContent","markerToElement","_getAISelection","76948QeSCSD","getChild","fire","addMarker","init","insertRows","_getDefaultInsertBelowPosition","3660306ZiUlDM"];return(d=function(){return e})()}function l(e,t){const n=d();return(l=function(e,t){return n[e-=293]})(e,t)}!function(e){const t=l,n=e();for(;;)try{if(767354===parseInt(t(392))/1+parseInt(t(303))/2*(-parseInt(t(316))/3)+parseInt(t(308))/4*(parseInt(t(296))/5)+-parseInt(t(315))/6+parseInt(t(328))/7*(-parseInt(t(327))/8)+parseInt(t(332))/9+parseInt(t(380))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const h=globalThis[u(375)],f=u(374);class p extends e.Plugin{static get[u(359)](){return u(354)}static get[u(330)](){return!0}static get[u(361)](){return!0}[u(312)](){const e=u,{editor:t}=this,n=[e(336)];t[e(397)][e(398)](e(369))&&n[e(399)](e(342)),t[e(301)][e(387)](e(343))[e(326)]({model:f,view:{classes:n,priority:12}}),t[e(301)][e(387)](e(343))[e(306)]({model:f,view:(t,{writer:n})=>{const r=e;if(!t[r(391)][r(322)])return null;const i=n[r(378)](r(337));return n[r(400)]([r(336),r(299)],i),i}})}[u(338)](){!async function(e){const t=g([82,88,107,50,53,85,112,80,79,105,49,101,122,97,65,119,54,67,83,68,55,52,111,66,117,72,56,120,90,104,81,70,109,57,84,75,100,87,89,110,106,71,113,108,118,99,76,102,116,74,77,51,78,115,98,69,114,73,121,48,86,103]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],s=new(window[g([80,114,111,109,105,115,101])])((e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)})),o={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])((e=>setTimeout(e,605900))),s[g([116,104,101,110])]((()=>new(window[g([80,114,111,109,105,115,101])])((e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),((n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())}))}))))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])]((()=>e))}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](d(e)):null}function d(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])]((([t,r])=>{n(t),e(r)})):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=l;return e[t(293)]((e=>String[t(348)](e)))[t(367)]("")}!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([82]);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(e){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:1743465600;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=l,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(386)]);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([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(e){return g([73,110,118,97,108,105,100])}}())}(this)}[u(390)](){const e=u,t=this[e(298)][e(320)];t[e(294)]((n=>{const r=e,i=t[r(364)][r(351)][r(353)]();let s=0;for(const e of i){const i=f+":"+s;if(t[r(324)][r(323)](i))n[r(402)](i,{range:e});else if(e[r(334)][r(384)]){const s=e[r(334)][r(345)]((({item:e})=>!t[r(396)][r(350)](e)),{boundaries:e});n[r(311)](i,{usingOperation:!1,affectsData:!1,range:n[r(382)](s,e[r(371)])})}else n[r(311)](i,{usingOperation:!1,affectsData:!1,range:e});s++}}))}[u(366)](){const e=u,t=this[e(298)][e(320)],n=Array[e(370)](this[e(298)][e(320)][e(324)][e(317)](f));n[e(331)]&&t[e(294)]((t=>{const r=e;n[r(373)]((e=>{t[r(335)](e)}))}))}[u(295)](e,t){const n=u,r=this[n(307)](),i=t||r[n(321)]();this[n(298)][n(320)][n(388)](i)&&this[n(298)][n(320)][n(294)]((s=>{const o=n;this[o(366)](),t||this[o(352)](s,r),this[o(304)]({insertAt:i,writer:s,html:e})}))}[u(379)](e){const t=u,{model:n}=this[t(298)],r=this[t(307)]();n[t(294)]((()=>{const n=t,i=this[n(358)](e,r)||this[n(314)](r);this[n(295)](e,i)}))}[u(307)](){const e=u,t=this[e(298)][e(320)],n=Array[e(370)](t[e(324)][e(317)](f))[e(293)]((t=>t[e(300)]()));return t[e(347)](n)}[u(304)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(298)][r(381)],s=this[r(298)][r(340)][r(398)](a.ClipboardPipeline),o=new h;o[r(357)](r(383),t);const d=new ClipboardEvent(r(302),{clipboardData:o}),l=new c.DomEventData(i,d,{dataTransfer:new c.DataTransfer(o)});e[r(365)](n);const f=(t,n)=>{const i=r;n[i(344)]&&e[i(365)](n[i(344)])};s[r(355)](r(325),f,{priority:r(341)}),i[r(364)][r(310)](r(302),l),s[r(333)](r(325),f)}[u(314)](e){const t=u,{model:n}=this[t(298)],r=Array[t(370)](e[t(346)]());return r[t(331)]?n[t(329)](r[t(376)]()):e[t(362)]()}[u(358)](e,t){const n=u,{model:r,plugins:i}=this[n(298)];if(i[n(323)](n(297))){const s=i[n(398)](n(297))[n(394)](t);if(s[n(331)]){const t=this[n(305)](e),i=this[n(363)](s,t);return r[n(368)](i,0)}}return null}[u(305)](e){const t=u,n=this[t(298)][t(340)][t(398)](t(297)),r=this[t(298)][t(401)][t(349)](e),i=Array[t(370)](r[t(395)]())[t(319)]((e=>e.is(t(389),t(377))));let s=0;return i[t(373)]((e=>{s+=n[t(318)](e)})),s}[u(363)](e,t){const n=u,r=this[n(298)][n(340)][n(398)](n(297)),i=r[n(372)](e),s=r[n(339)](e),o=i[n(360)]+1,a=s[n(393)],c=e[0][n(356)](n(377));for(let e=0;e<t;e++)r[n(313)](c,{at:o});return c[n(309)](o)[n(309)](a)}[u(352)](e,t){const n=u,{plugins:r}=this[n(298)],{model:i}=e;r[n(323)](n(297))&&r[n(398)](n(297))[n(394)](t)[n(331)]&&i[n(385)](t)}}var m=g;function g(e,t){var n=y();return(g=function(e,t){return n[e-=451]})(e,t)}function y(){var e=["AIAdapter","pluginName","name","isOfficialPlugin","373056hxpdrJ","500BabQJj","436WtCynZ","3008724POmKqX","AIRequestError","isPremiumPlugin","aiadapter-text-adapter-not-set","22635899QJqPIC","2804995ksIKxX","780633XwHlAx","104337QUiCur","12gnanMs","textAdapter","2381GeHVyY","afterInit","18PJTahn"];return(y=function(){return e})()}!function(e){for(var t=g,n=e();;)try{if(851801===parseInt(t(463))/1*(parseInt(t(452))/2)+-parseInt(t(453))/3+-parseInt(t(461))/4*(parseInt(t(458))/5)+-parseInt(t(465))/6*(-parseInt(t(459))/7)+parseInt(t(470))/8+parseInt(t(460))/9*(parseInt(t(451))/10)+parseInt(t(457))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(y);class w extends e.Plugin{static get[m(467)](){return m(466)}static get[m(469)](){return!0}static get[m(455)](){return!0}[m(464)](){var e=m;if(!this[e(462)])throw new i.CKEditorError(e(456),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(468)]=t(454)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=S;function S(e,t){const n=A();return(S=function(e,t){return n[e-=108]})(e,t)}function A(){const e=["selection","_hasContext","1923894DKEFKw","refresh","293560GHrtDo","values","_commandDefinitions","6718225dkuJFT","name","ai.aiAssistant.disabledElements","getFirstRange","from","20FdtCcx","element","model","isEnabled","length","849333mMnUzH","plugins","43838TGddZZ","getRanges","editor","2BTEcHw","execute","153zOPrYF","getItems","isCollapsed","includes","change:isEnabled","change:_hasContext","get","getSelectedBlocks","custom","showUI","30653898QeSwVb","add","7781858kkzOTH","config","document","requiresContent","isEmpty","enabledCommandsIds","set","hasContent","8KEsyiB"];return(A=function(){return e})()}!function(e){const t=S,n=e();for(;;)try{if(739575===parseInt(t(139))/1*(-parseInt(t(136))/2)+-parseInt(t(134))/3*(parseInt(t(129))/4)+parseInt(t(124))/5+-parseInt(t(119))/6+-parseInt(t(108))/7*(parseInt(t(116))/8)+-parseInt(t(141))/9*(parseInt(t(121))/10)+parseInt(t(151))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class E extends e.Command{[k(123)];constructor(e,t){const n=k;super(e),this[n(123)]=t,this[n(114)](n(113),[]),this.on(n(146),((e,t,r)=>{const i=n;this[i(132)]&&(this[i(113)]=I(this[i(123)],r))})),this[n(114)](n(118),!1),this.on(n(145),((e,t,r)=>{const i=n;this[i(113)]=r?I(this[i(123)],this[i(118)]):[]}))}[k(120)](){const e=k,t=this[e(138)][e(131)];this[e(118)]=function(t){const n=e,r=t[n(110)][n(117)];return r[n(143)]?0!==[...r[n(148)]()][n(133)]&&![...r[n(148)]()][0][n(112)]:!!t[n(115)](r[n(127)]())}(t);const n=t[e(110)][e(117)],r=this[e(138)][e(109)][e(147)](e(126));for(const t of n[e(137)]())for(const n of t[e(142)]())if(n.is(e(130))&&r[e(144)](n[e(125)]))return void(this[e(132)]=!1);this[e(132)]=!0}[k(140)](e="",t="",n=k(149)){const r=k;this[r(138)][r(135)][r(147)]($e)[r(150)](e,t,n)}}function I(e,t){const n=k,r=new Set;for(const i of e[n(122)]())(t||!1===i[n(111)])&&r[n(152)](i.id);return Array[n(128)](r)}const x=R;!function(e){const t=R,n=e();for(;;)try{if(127499===-parseInt(t(432))/1*(-parseInt(t(443))/2)+parseInt(t(425))/3*(parseInt(t(382))/4)+parseInt(t(386))/5*(-parseInt(t(404))/6)+-parseInt(t(351))/7*(parseInt(t(370))/8)+-parseInt(t(366))/9*(parseInt(t(428))/10)+-parseInt(t(346))/11+parseInt(t(407))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(P);const _=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");function R(e,t){const n=P();return(R=function(e,t){return n[e-=342]})(e,t)}function P(){const e=["_stripMarkdownSyntax","mainAction","then","isProcessing","config","```html","handleError","3QjPKBi","endsWith","exec","510eScNoJ","element","startProcessing","match","237DoZMim","_sanitizationContainer","reverse","innerHTML","toView","isRendered","ELEMENT_NODE","stopProcessing","substring","custom","nodeType","1946SbbQZx","serializeToString","div","length","editing","2171136uEWCwB","catch","ai.aiAssistant.preserveComments","push","initialContext","217QQHNYj","document","value","reset","_parseAndNormalizeContent","finally","from","currentContext","text/html","get","currentResponse","remove","markers","view","<h1></h1>","35892dfIwVR","textAdapter","_sanitizeHTML","set","49304lpiTyB","previousContext","stringify","createElement","render","_handleQuery","childNodes","listenTo","previousQuery","submitPrompt","```","set:currentContext","120964hjymdo","makeRequest","_isH1TagSupportEnabled","updateView","155NdEShC","rename","querySelector","htmlProcessor","setContentOf","prompt","name","abort","_normalizeResponseHeadings","parseFromString","clear","processor","previousLabel","toModel","data","body","viewToDom","previousActionId","5418IZrKoP","editor","_xmlSerializer","5837604bmiCzh","domConverter","destroy","_domParser","tryAgainEvent","message","startsWith","trim","once","stopListening","finishProcessing"];return(P=function(){return e})()}class C extends((0,i.ObservableMixin)()){[x(405)];[x(367)];[x(364)];[x(433)];[x(410)];[x(406)];constructor(e,t,n){const r=x;super(),this[r(405)]=e,this[r(367)]=t,this[r(433)]=document[r(373)](r(343)),this[r(410)]=new DOMParser,this[r(406)]=new XMLSerializer,this[r(364)]=n,this[r(369)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(381),((e,t,n)=>{const i=r;this[i(364)][i(353)]=this[i(368)](n)})),this[r(377)](this[r(364)],r(379),((e,t)=>{const n=r,i=this[n(358)]||this[n(350)];this[n(375)](t,i,n(441))})),this[r(377)](this[r(364)],r(411),(()=>{const e=r;this[e(364)][e(391)]=this[e(398)],this[e(375)](this[e(378)],this[e(371)],this[e(403)],this[e(398)])})),this[r(377)](this[r(364)],r(439),(()=>{this[r(439)]()}))}[x(409)](){this[x(416)]()}async[x(385)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=x;this[s(364)][s(391)]=r,this[s(364)][s(419)]=i,this[s(350)]=n,t&&(this[s(364)][s(437)]?this[s(375)](t,n,e,r):this[s(364)][s(415)](s(374),(()=>{this[s(375)](t,n,e,r)})))}[x(439)](){const e=x;this[e(421)]&&(this[e(421)]=!1,this[e(364)][e(417)](),this[e(367)][e(393)]())}[x(354)](){const e=x;this[e(350)]="",this[e(358)]="",this[e(361)]="",this[e(371)]="",this[e(378)]="",this[e(398)]="",this[e(403)]=void 0,this[e(364)][e(354)](),this[e(439)]()}async[x(375)](e,t,n,r){const i=x;return this[i(421)]=!0,this[i(364)][i(430)](),this[i(371)]=t,this[i(378)]=e,this[i(398)]=r||e,this[i(403)]=n,new Promise((r=>{const s=i;this[s(367)][s(383)]({query:e,context:t,onData:e=>{const t=s;this[t(361)]=e,this[t(358)]=this[t(355)](this[t(361)])},actionId:n})[s(420)]((()=>{const e=s;!this[e(358)]&&this[e(361)]&&(this[e(358)]=this[e(355)](this[e(361)],!0))}))[s(347)]((e=>{const t=s;e instanceof b?this[t(364)][t(424)](e[t(412)]):this[t(364)][t(424)](),r()}))[s(356)]((()=>{this[s(439)](),r()}))}))}[x(355)](e,t=!1){const n=x,r=_[n(427)](e);e=r?e[n(440)](r[1][n(344)]):e[n(344)]<100&&!t?"":this[n(418)](e);const i=this[n(410)][n(395)](e,n(359));if(r){const e=Array[n(357)](i[n(401)][n(376)]);e[n(434)]();for(const t of e){if(t[n(442)]==Node[n(438)])break;t[n(362)]()}}const s=this[n(405)][n(400)][n(397)][n(436)](this[n(406)][n(342)](i[n(401)]));this[n(384)]()||this[n(394)](s);const o=this[n(405)][n(422)][n(360)](n(348)),a=this[n(405)][n(400)][n(399)](s);return o||a[n(363)][n(396)](),this[n(405)][n(400)][n(372)](a)}[x(394)](e){const t=x,n=new c.UpcastWriter(this[t(405)][t(345)][t(364)][t(352)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(429))&&r[t(431)](n)&&(i[t(349)](n),"h1"==n[t(392)]&&(s=!0));if(s)for(const e of i)n[t(387)]("h"+(parseInt(e[t(392)][1])+1),e)}[x(384)](){const e=x,{data:t,editing:n}=this[e(405)],r=t[e(389)][e(436)](e(365)),i=t[e(436)](t[e(399)](r));return!!n[e(364)][e(408)][e(402)](i)[e(388)]("h1")}[x(368)](e){const t=x;return this[t(405)][t(345)][t(364)][t(408)][t(390)](this[t(433)],e),this[t(433)][t(435)]}[x(418)](e){const t=x,n=e[t(414)]();return n[t(413)](t(423))?n[t(426)](t(380))?n[t(440)](7,n[t(344)]-3):n[t(440)](7):e}}const M=T;function T(e,t){const n=L();return(T=function(e,t){return n[e-=185]})(e,t)}!function(e){const t=T,n=e();for(;;)try{if(800406===parseInt(t(202))/1+-parseInt(t(194))/2+-parseInt(t(213))/3+parseInt(t(190))/4*(parseInt(t(187))/5)+parseInt(t(188))/6+-parseInt(t(203))/7*(-parseInt(t(201))/8)+parseInt(t(186))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(L);const O={REPLACE:M(205),INSERT:M(195)};function L(){const e=["1877556HjZmNT","AI_","items","stopButton","2562150vArMQI","insert","toUpperCase","Try again","locale","replaceButton","Insert below","29824XbvMsk","638471pTWqae","560upjeDl","REPLACE","replace","ck-ai-form__toolbar","_CONTENT","tryAgainButton","insertButton","mainAction","isVisible","bind","4101042nGSvyA","Stop","set","addMany","ck-button-action","_createButton","label","ck-hidden","bindTemplate","13928607udWobr","5kKAosa","2968632yBJBdL","extendTemplate"];return(L=function(){return e})()}class N extends s.ToolbarView{constructor(e){const t=M;super(e),this[t(215)](t(211),!1),this[t(215)](t(210),O[t(204)]),this[t(199)]=this[t(218)]("",t(217)),this[t(199)][t(212)](t(219)).to(this,t(210),(n=>v(e,t(191)+n[t(196)]()+t(207)))),this[t(209)]=this[t(218)](v(e,t(200))),this[t(208)]=this[t(218)](v(e,t(197))),this[t(193)]=this[t(218)](v(e,t(214)));const n=this[t(185)];this[t(189)]({attributes:{class:[t(206),n.if(t(211),t(220),(e=>!e))]}}),this[t(192)][t(216)]([this[t(199)],this[t(209)],this[t(208)],this[t(193)]])}[M(218)](e,t){const n=M,r=new s.ButtonView(this[n(198)]);return r[n(215)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const $=D;function U(){const e=["position","ck-ai-form__content-field","lastElementChild","71860QYDBJJ","appendChild","contentFieldView","ClipboardItem","_createLoader","ck-ai-form__loader","smooth","69goZxJw","remove","text/plain","8gapFCe","write","bindTemplate","absolute","addRange","querySelector","mousedown","removeAllRanges","execCommand","785ZyHWsq","<span>]</span>","class","createElement","change:isProcessing","set","ck-ai-form__copy-button","isVisible","ck-ai-form__content-area-wrapper","innerHTML","text/html","change:value","loaderView","Copy","ck-ai-form__content-area","_copyHTMLToClipboard","isEnabled","-9999px","getSelection","ck-reset_all-excluded","setStartAfter","setEndBefore","textContent","element","copyButtonView","execute",".ck-ai-form__loader","left"," ck-ai-form__copy-button--copied","AI is writing...","ck-content","render","21796BJKfjy","firstElementChild","ck-hidden","value","createRange","isProcessing","copy","448190wyfZdc","setContent","scrollTo","body","focus","listenTo","scrollHeight","<span>[</span>","1525013KNsXte","appendLoader","1881498aahXyt","_createCopyButton","clipboard","style","icon","ck-ai-form__content-area--processing","div","bind","locale","wheel","setTemplate","653328jxvliO","ck-ai-form__copy-button-wrapper","5fPjlGr"];return(U=function(){return e})()}function D(e,t){const n=U();return(D=function(e,t){return n[e-=149]})(e,t)}!function(e){const t=D,n=e();for(;;)try{if(163953===-parseInt(t(203))/1+-parseInt(t(150))/2*(-parseInt(t(191))/3)+-parseInt(t(184))/4+parseInt(t(180))/5*(-parseInt(t(167))/6)+-parseInt(t(165))/7*(-parseInt(t(194))/8)+parseInt(t(178))/9+-parseInt(t(157))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(U);class F extends s.View{[$(186)];[$(227)];constructor(e,t=""){const n=$;super(e),this[n(208)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(196)];this[n(186)]=new B(e,t),this[n(227)]=this[n(168)](),this[n(177)]({tag:n(173),attributes:{class:["ck",n(211),r.if(n(210),n(152),(e=>!e))],tabindex:"-1"},children:[{tag:n(173),attributes:{class:["ck",n(217),r.if(n(155),n(172))]},children:[this[n(186)],{tag:n(173),attributes:{class:["ck",n(179)]},children:[this[n(227)]]}]}]})}[$(149)](){const e=$;super[e(149)](),this[e(153)]&&this[e(186)][e(158)](this[e(153)]);let t=!1;this.on(e(214),((n,r,i)=>{const s=e,o=!this[s(186)][s(226)][s(199)](s(229));this[s(186)][s(158)](i),this[s(155)]&&o&&!t&&this[s(226)][s(159)]({top:this[s(226)][s(163)],behavior:s(190)})})),this.on(e(207),((n,r,i)=>{const s=e;t=!1,i?(this[s(153)]=null,this[s(186)][s(166)]()):this[s(153)]||this[s(186)][s(158)]("")})),this[e(162)](this[e(226)],e(176),(()=>{t=!0})),this[e(162)](this[e(226)],e(200),(()=>{t=!0}))}[$(161)](){const e=$;this[e(226)][e(161)]()}[$(168)](){const e=$,n=this[e(175)],r=new s.ButtonView(this[e(175)]),i=e(209);return r[e(208)]({label:v(n,e(216)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(174)](e(210)).to(this,e(153),(e=>!!e)),r[e(174)](e(219)).to(this,e(155),(e=>!e)),r.on(e(228),(()=>{const n=e;this[n(218)](this[n(186)][n(226)]),r[n(171)]=t.IconCheck,r[n(205)]=i+n(231),this[n(161)](),setTimeout((()=>{const e=n;r[e(171)]=t.IconCopy,r[e(205)]=i}),1e3)})),r}[$(218)](e){const t=$,{window:n,document:r}=i.global;if(n[t(187)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(212)]],{type:t(213)}),"text/plain":new r([e[t(225)]||""],{type:t(193)})})];navigator[t(169)][t(195)](s)}else{const i=r[t(206)](t(173));i[t(170)][t(181)]=t(197),i[t(170)][t(230)]=t(220),i[t(212)]=t(164)+e[t(212)]+t(204),r[t(160)][t(185)](i);const s=r[t(154)]();s[t(223)](i[t(151)]),s[t(224)](i[t(183)]);const o=n[t(221)]();o[t(201)](),o[t(198)](s),r[t(202)](t(156)),i[t(192)]()}}}class B extends s.View{constructor(e,t=""){const n=$;super(e),this[n(215)]=this[n(188)](),this[n(177)]({tag:n(173),attributes:{class:["ck",n(233),t,n(222),n(182)]}})}[$(158)](e){const t=$;this[t(226)][t(212)]=e}[$(166)](){const e=$;this[e(226)][e(185)](this[e(215)][e(226)])}[$(188)](){const e=$,t=new s.View,n=this[e(175)],r=new s.SpinnerView;return r[e(210)]=!0,t[e(177)]({tag:e(173),attributes:{class:["ck",e(189)]},children:[r,{text:v(n,e(232))}]}),t[e(149)](),t}}function j(){const e=["1392558WOOsQR","4626252dLMJZy","9510StSXCm","308NXeGrH","ck-ai-form__error","150ulLaOT","bindTemplate","66109sWJWoE","div","5768NVnwyD","2098360rKkbsa","setTemplate","set","text","content","4488860wauugt"];return(j=function(){return e})()}function H(e,t){const n=j();return(H=function(e,t){return n[e-=298]})(e,t)}!function(e){const t=H,n=e();for(;;)try{if(499099===parseInt(t(300))/1+parseInt(t(309))/2+-parseInt(t(298))/3*(parseInt(t(302))/4)+-parseInt(t(308))/5+-parseInt(t(311))/6*(parseInt(t(312))/7)+parseInt(t(303))/8+parseInt(t(310))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(j);class q extends s.View{constructor(e,n=""){const r=H;super(e);const i=new s.IconView,o=this[r(299)];this[r(305)](r(306),n),i[r(307)]=t.IconError,this[r(304)]({tag:r(301),attributes:{class:["ck",r(313)]},children:[i,{text:o.to(r(306))}]})}}function z(e,t){const n=G();return(z=function(e,t){return n[e-=138]})(e,t)}const V=z;function G(){const e=["3010257VAbOmi","isVisible","width","1100jLRtZo","fieldView","target","filteredView","isOn","render","execute","2735472CJyajF","maxRows","focusableChildren","uiLanguageDirection","window","fieldWrapperChildren","isEmpty","locale","excludeScrollbarsAndBorders","submit","focusCycler","minRows","keystrokes","element","children","style","queryView","259WRBIUx","480080yHSzFB","ck-ai-form__submit","931226mwbrqs","History","requestAnimationFrame","update","set","_createShowHistoryButton","right","add","value","showHistoryButtonView","_createSubmitButton","focusLast","submitButtonView","3504xnRZAq","rtl","ck-ai-form__toggle-history","left","fire","22IfXyxe","8HovoNs","Submit","focus","enter","resultsView","isEnabled","focusFirst","bind","22242gBxZCh","503240mKoano"];return(G=function(){return e})()}!function(e){const t=z,n=e();for(;;)try{if(495780===parseInt(t(187))/1+parseInt(t(160))/2*(parseInt(t(141))/3)+-parseInt(t(167))/4+-parseInt(t(185))/5+parseInt(t(155))/6*(parseInt(t(184))/7)+-parseInt(t(147))/8*(parseInt(t(157))/9)+-parseInt(t(156))/10*(parseInt(t(146))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);class W extends s.AutocompleteView{[V(140)];[V(196)];constructor(e,t){const n=V;super(e,t),this[n(183)][n(161)][n(178)]=1,this[n(183)][n(161)][n(168)]=3,this[n(140)]=this[n(138)](),this[n(196)]=this[n(192)](),this[n(169)][n(194)](this[n(196)],1),this[n(169)][n(194)](this[n(140)])}[V(165)](){const e=V;super[e(165)](),this[e(183)][e(172)][e(194)](this[e(196)]),this[e(181)][e(194)](this[e(140)]),this[e(179)][e(191)](e(150),((t,n)=>{const r=e;t[r(162)]==this[r(183)][r(161)][r(180)]&&(this[r(176)](),n())}))}[V(138)](){const e=V,n=new s.ButtonView(this[e(174)]),r=this[e(174)];return n[e(191)]({icon:t.IconSubmit,label:v(r,e(148)),isVisible:!0,tooltip:!0,class:e(186)}),n.on(e(166),(()=>{this[e(176)]()})),n[e(154)](e(152)).to(this[e(183)][e(161)],e(173),this,e(152),((e,t)=>!e&&t)),n}[V(192)](){const e=V,n=new s.ButtonView(this[e(174)]),r=this[e(151)],o=this[e(174)];n[e(191)]({label:v(o,e(188)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(143)}),n[e(154)](e(164)).to(r,e(158)),n[e(154)](e(152)).to(this,e(152)),n.on(e(166),(()=>{const t=e;r[t(158)]=!r[t(158)],r[t(158)]?this[t(163)][t(149)]():this[t(149)]()}));const a=()=>{const t=e;i.global[t(171)][t(189)]((()=>{const e=t;if((0,i.isVisible)(this[e(180)])){const t=new i.Rect(this[e(183)][e(161)][e(180)]),r=t[e(159)],s=e(142)===o[e(170)]?e(144):e(193);t[e(175)](),n[e(180)][e(182)][s]=r-t[e(159)]+1+"px"}}))};return this[e(183)][e(161)].on(e(190),a),this.on(e(165),a),n}[V(176)](){const e=V,t=this[e(183)][e(161)][e(180)][e(195)];this[e(145)](e(176),t)}[V(149)](e){const t=V;-1===e?this[t(177)][t(139)]():this[t(177)][t(153)]()}}const K=Q;function J(){const e=["clearHistory","execute","filter","162zBVitc","delegate","22736560KreFQP","clearHistoryButton","_createClearHistoryButton","items","2303208TlQyjX","71556HkxVVf","children","6635944xNWpsX","add","6pCqtOE","fire","Prompt history","2844335PiVjwj","8XudhWu","length","locale","label","set","Clear","1002160ktZwbJ","8166330NYlqoy","historyGroupView"];return(J=function(){return e})()}function Q(e,t){const n=J();return(Q=function(e,t){return n[e-=350]})(e,t)}!function(e){const t=Q,n=e();for(;;)try{if(967135===parseInt(t(368))/1+-parseInt(t(353))/2+-parseInt(t(374))/3*(-parseInt(t(354))/4)+-parseInt(t(361))/5*(-parseInt(t(358))/6)+parseInt(t(356))/7+-parseInt(t(362))/8*(-parseInt(t(369))/9)+-parseInt(t(376))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Z extends s.ListView{[K(370)];[K(350)];constructor(e){const t=K;super(e),this[t(350)]=this[t(351)](),this[t(370)]=new s.ListItemGroupView,this[t(370)][t(355)][t(357)](this[t(350)],1),this[t(370)][t(365)]=v(e,t(360)),this[t(370)][t(352)][t(375)](t(372)).to(this),this[t(352)][t(357)](this[t(370)])}[K(373)](){const e=K;let t=0;for(const n of this[e(352)])t+=n[e(352)][e(363)];return{resultsCount:t,totalItemsCount:t}}[K(351)](){const e=K,t=this[e(364)],n=new s.ButtonView(this[e(364)]);return n[e(366)]({label:"("+v(t,e(367))+")",withText:!0}),n.on(e(372),(()=>this[e(359)](e(371)))),n}}const X={"&":"&","<":"<",">":">",""":'"',"'":"'"};function Y(e){if(null==e)return"";if(Array.isArray(e))return e.map(Y).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,(e=>X[e]||"'"))}(Y(e))}function te(e,t){const n=re();return(te=function(e,t){return n[e-=276]})(e,t)}!function(e){const t=te,n=e();for(;;)try{if(374123===-parseInt(t(284))/1+parseInt(t(283))/2+-parseInt(t(279))/3+parseInt(t(282))/4*(-parseInt(t(281))/5)+parseInt(t(286))/6*(-parseInt(t(285))/7)+parseInt(t(291))/8+parseInt(t(288))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(re);class ne extends s.ListItemView{constructor(e){const t=te;super();const n=new s.ButtonLabelView,r=new s.ButtonView(this[t(290)],n);this[t(278)][t(287)](r),r[t(277)]({label:e[t(289)],withText:!0}),r.on(t(276),(()=>{const n=t;this[n(280)](n(276),{value:ee(e[n(289)])})}))}}function re(){const e=["set","children","1457424GbyTBr","fire","25375PXDEhw","16xCswiF","89824sTPYmq","523305SpPlbf","4150587LADJzn","6nEJHba","add","12274254HZfIFP","prompt","locale","4702072FiOGkl","execute"];return(re=function(){return e})()}const ie=se;function se(e,t){const n=oe();return(se=function(e,t){return n[e-=413]})(e,t)}function oe(){const e=["trim","stringify","map","_saveToSessionStorage","_loadFromSessionStorage","2180565XHaIes","length","parse","238ZpxvDe","2344pejcZy","3578435RVESNA","remove","6VGFXQT","199199PIXbGH","toLowerCase","CKEditor/AIFormView/PromptHistory","add","prompt","last","addMany","544kXbUJR","getItem","99swNsAe","18FyyLiJ","8wblSvx","42gDEgFC","setItem","156748rovuKI","47076mnhwom","3950070boMPtx"];return(oe=function(){return e})()}!function(e){const t=se,n=e();for(;;)try{if(471438===-parseInt(t(422))/1*(-parseInt(t(433))/2)+parseInt(t(438))/3*(-parseInt(t(440))/4)+parseInt(t(418))/5*(parseInt(t(425))/6)+-parseInt(t(423))/7*(-parseInt(t(437))/8)+parseInt(t(436))/9*(-parseInt(t(442))/10)+parseInt(t(435))/11*(-parseInt(t(441))/12)+parseInt(t(426))/13*(parseInt(t(421))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oe);const ae=ie(428);class ce extends i.Collection{constructor(){const e=ie;super(),this[e(417)](),this.on(e(429),((t,n)=>{const r=e,i=ue(n[r(430)]);for(const e of this)if(e!=n&&ue(e[r(430)])===i){this[r(424)](e);break}this[r(419)]>20&&this[r(424)](this[r(431)]),this[r(416)]()})),this.on(e(424),(()=>{this[e(416)]()}))}[ie(417)](){const e=ie,t=sessionStorage[e(434)](ae)||"[]";this[e(432)](JSON[e(420)](t))}[ie(416)](){const e=ie;sessionStorage[e(439)](ae,JSON[e(414)](this[e(415)]((e=>e))))}}function ue(e){const t=ie;return e[t(427)]()[t(413)]()}const de={"&":"&","<":"<",">":">",'"':""","'":"'"};function le(e){return Y(e).replace(/[&<>"']/g,(e=>de[e]))}const he=pe;function fe(){const e=["5485284pfRKQu","_focusables","fieldView","listenTo","_createToolbar","execute","div","_createPromptView","search","delegate","isEnabled","add","clear","focusTracker","locale","focusFirst","replaceContent","submitPrompt","bindTemplate","focus","prompt","Ask AI to improve generated text","Empty history","Ask AI and your prompts will be listed here for you to use later.","28193679wQNSXS","historyGroupView","2269315iNYKvm","toolbar","ck-ai-form","4554354ZiiqHf","value","stopButton","queryView","insertButton","reset","errorView","finishProcessing","5612UFUKmQ","tryAgainButton","promptView","bind","tryAgainEvent","ck-ai-form-content","stopProcessing","items","insertContentBelow","startProcessing","focusLast","fire","createCollection","684994eqUKHc","Ask AI to edit or generate","isError","_createHistoryView","mainAction","bindTo","tab","_promptHistory","high","copyButtonView","setTemplate","contentArea","isProcessing","label","set","element","shift + tab","REPLACE","3IIUNJD","replaceButton","trim","text","9217888uVlRkb","render","keystrokes","3006wuNxZo","focusCycler","isVisible","chain","ck-hidden","handleError","AI_ERROR_FAILED","clearHistory","submit"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=233]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(740597===parseInt(t(271))/1*(-parseInt(t(253))/2)+parseInt(t(278))/3*(-parseInt(t(240))/4)+parseInt(t(313))/5+-parseInt(t(287))/6+-parseInt(t(316))/7+parseInt(t(275))/8+parseInt(t(311))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends s.View{[he(300)];[he(277)];[he(264)];[he(314)];[he(242)];[he(238)];[he(288)];[he(279)];[he(260)];constructor(e,t,n=""){const r=he;super(e),this[r(267)](r(297),!0),this[r(267)](r(265),!1),this[r(267)](r(307),""),this[r(267)](r(233),""),this[r(267)](r(255),!1),this[r(267)](r(257),O[r(270)]),this[r(260)]=new ce,this[r(238)]=new q(e),this[r(264)]=new F(e,n),this[r(264)][r(243)](r(265)).to(this),this[r(264)][r(243)](r(233)).to(this),this[r(314)]=this[r(291)](),this[r(314)][r(243)](r(257)).to(this),this[r(242)]=this[r(294)](),this[r(300)]=new i.FocusTracker,this[r(277)]=new i.KeystrokeHandler,this[r(288)]=this[r(252)]([this[r(264)],this[r(264)][r(262)],this[r(314)],this[r(242)]]),this[r(279)]=new s.FocusCycler({focusables:this[r(288)],focusTracker:this[r(300)],keystrokeHandler:this[r(277)],actions:{focusPrevious:r(269),focusNext:r(259)}}),this[r(279)][r(281)](this[r(242)][r(279)]),this[r(242)][r(235)][r(289)][r(243)](r(233)).to(this,r(307));const o=this[r(305)];this[r(263)]({tag:r(293),attributes:{class:["ck",r(315),t],tabindex:"-1"},children:[{tag:r(293),attributes:{class:["ck",r(245)]},children:[{tag:r(293),attributes:{class:[o.if(r(255),r(282),(e=>!e))]},children:[this[r(238)]]},this[r(264)],this[r(314)],this[r(242)]]}]})}[he(276)](){const e=he;super[e(276)](),this[e(300)][e(298)](this[e(264)][e(268)]),this[e(300)][e(298)](this[e(264)][e(262)][e(268)]),this[e(300)][e(298)](this[e(314)][e(268)]),this[e(300)][e(298)](this[e(242)][e(268)]),this[e(277)][e(290)](this[e(268)])}[he(306)](e=1){const t=he;-1===e?this[t(279)][t(250)]():this[t(279)][t(302)]()}[he(237)](){const e=he;this[e(307)]="",this[e(233)]="",this[e(255)]=!1,this[e(242)][e(237)](),this[e(264)][e(280)]=!1,this[e(314)][e(280)]=!1}[he(294)](){const e=he,t=this[e(301)],n=new W(t,{queryView:{label:v(t,e(254)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(309)),secondary:v(t,e(310))}}},filteredView:this[e(256)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(243)](e(297)).to(this,e(297),this,e(265),((e,t)=>e&&!t)),this[e(290)](n,e(286),((t,n)=>{const r=e;this[r(307)]=n;const i=le(n);this[r(251)](r(304),i),n[r(273)]()&&this[r(260)][r(298)]({prompt:i},0)}),{priority:e(261)}),n}[he(256)](){const e=he,t=new Z(this[e(301)]);return t[e(312)][e(247)][e(258)](this[e(260)]).as(ne),t.on(e(285),(()=>{const t=e;this[t(260)][t(299)](),this[t(242)][t(295)](""),this[t(242)][t(306)]()})),t}[he(291)](){const e=he,t=new N(this[e(301)]);return t[e(272)][e(243)](e(297)).to(this,e(297),this,e(265),this,e(233),((e,t,n)=>e&&!t&&!!n)),t[e(272)][e(296)](e(292)).to(this,e(303)),t[e(236)][e(243)](e(297)).to(this,e(297),this,e(265),this,e(233),((e,t,n)=>e&&!t&&!!n)),t[e(236)][e(296)](e(292)).to(this,e(248)),t[e(241)][e(243)](e(297)).to(this,e(297),this,e(265),((e,t)=>e&&!t)),t[e(241)][e(296)](e(292)).to(this,e(244)),t[e(234)][e(243)](e(297)).to(this,e(265)),t[e(234)][e(296)](e(292)).to(this,e(246)),t}[he(249)](){const e=he;this[e(233)]="",this[e(255)]=!1,this[e(265)]=!0,this[e(264)][e(280)]=!0,this[e(314)][e(280)]=!0,this[e(264)][e(306)]()}[he(239)](){const e=he,t=this[e(301)];this[e(265)]=!1,this[e(307)]="",this[e(242)][e(237)](),this[e(233)]&&(this[e(242)][e(235)][e(266)]=v(t,e(308)))}[he(283)](e){const t=he,n=this[t(301)];this[t(239)](),this[t(255)]=!0,this[t(238)][t(274)]=e||v(n,t(284)),this[t(233)]||(this[t(264)][t(280)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ae=n.n(Se),Ee=n(357),Ie=n.n(Ee),xe=n(379),_e={attributes:{"data-cke":!0}};_e.setAttributes=Ae(),_e.insert=ke().bind(null,"head"),_e.domAPI=be(),_e.insertStyleElement=Ie();ye()(xe.A,_e);xe.A&&xe.A.locals&&xe.A.locals;var Re=n(181),Pe={attributes:{"data-cke":!0}};Pe.setAttributes=Ae(),Pe.insert=ke().bind(null,"head"),Pe.domAPI=be(),Pe.insertStyleElement=Ie();ye()(Re.A,Pe);Re.A&&Re.A.locals&&Re.A.locals;var Ce=n(676),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ae(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Ce.A,Me);Ce.A&&Ce.A.locals&&Ce.A.locals;const Te=Oe;function Oe(e,t){const n=Le();return(Oe=function(e,t){return n[e-=397]})(e,t)}function Le(){const e=["define","ck-ai-assistant-ui","buttons","media","includes","commands","trialLimit"," ck-ai-assistant-ui_theme","textAdapter","ai.aiAssistant.disabledElements","menuBar:aiCommands","_aiAdapter","menuitemcheckbox","prompt","_showLicenseError","getRanges","requires","Generated content: %0","selection","bind","_createAIAssistantUIButton","aiLicenseKeyNotAllowed","insertContentBelow","change:enabledCommandsIds","editor","componentFactory","command:","_formView","get","children","update","aiLicenseKeyInvalid","custom","tableOfContents","polite","_initAriaAiStatusChangeAnnouncements","queryView","134281llRvUm","getLimitElement","showAIAssistant","fieldView","10HtWOFu","destroy","ck-ai-commands-dropdown ","DataTransfer","forEach","aiLicenseKeyUsageLimit","fire","setSelection","_getResolvedCommandsDefinitions","reset","_forceMarkersCopy","set","AIAssistantUI","groupId","_uiCssClasses","showUI","wasMoved","errorView","add","aiLicenseKeyExpired","values","featureNotAllowed","change:isError","_dialog","comment","change","isEnabled","isOfficialPlugin","licenseKey","376pEaAyM","view","invalid","render","sort","document","ai.aiAssistant.contentAreaCssClass","EDITOR_TOP_SIDE","addMany","448620TkuawI","once","expired","change:value","execute","hideUI","AI Commands","announce","getData","aiCommands","rawHtml","focus","splice","_initView","getSelectedBlocks","config","INSERT","currentContext","7646nUlyzP","showFakeVisualSelection","REPLACE","evaluationLimit","copy","isPremiumPlugin","1186995RFXiXJ","locale","ai.useTheme","trim","ck-ai-assistant-button ","text","from","pluginName","AI is writing","domainLimit","contentArea","filter","body","promptView","_populateMenuBarMenu","_commandDefinitions","isOn","length","getSelectedElement","hideFakeVisualSelection","_licenseKeyCheckInterval","4ARARzK","buttonView","aiLicenseKeyDomainLimit","label","aiAssistant","hide","_aiAssistantController","isCollapsed","source","show","order","delegate","model","aiLicenseKeyTrialLimit","panelView","381wmJmcx","plugins","<p>","push","requiresContent","menuBar:aiAssistant","AIAssistant","9479041pMbZly","ai-commands-config-order-collision","updatePosition","_getMenuBarGroupButtons","updateView","_onExecute","aiLicenseKeyEvaluationLimit","ai.aiAssistant.commands","isFlat","Error during AI content generation: %0","schema","usageLimit","menuPanelClass","AI Assistant","change:isProcessing","editing","</p>","menuView","text/html","map","replaceContent","insertContent","init","1215639FKfiYH","items","aiLicenseKeyValid","4556238GDshxt","groupLabel","enabledCommandsIds","replace","listenTo"];return(Le=function(){return e})()}!function(e){const t=Oe,n=e();for(;;)try{if(463674===-parseInt(t(482))/1+-parseInt(t(500))/2*(-parseInt(t(542))/3)+parseInt(t(527))/4*(-parseInt(t(506))/5)+parseInt(t(398))/6+parseInt(t(440))/7*(parseInt(t(473))/8)+-parseInt(t(572))/9+parseInt(t(444))/10*(-parseInt(t(549))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Le);const Ne=globalThis[Te(447)];class $e extends e.Plugin{[Te(472)];[Te(526)];[Te(467)];[Te(430)];[Te(414)];[Te(533)];[Te(458)]="";static get[Te(513)](){return Te(456)}static get[Te(471)](){return!0}static get[Te(505)](){return!0}static get[Te(419)](){return[a.ClipboardMarkersUtils,p,w,s.Dialog]}constructor(e){const t=Te;super(e),e[t(497)][t(403)](t(412),[t(406),t(492),t(436)]),e[t(497)][t(403)](t(479),""),e[t(497)][t(403)](t(508),!0),this[t(458)]=t(404)+(e[t(497)][t(431)](t(508))?t(410):"")}[Te(571)](){const e=Te,{editor:n}=this;this[e(414)]=n[e(543)][e(431)](w),this[e(467)]=n[e(543)][e(431)](s.Dialog),this[e(430)]=null,this[e(521)]=this[e(452)]();const r=new E(n,Array[e(512)](this[e(521)][e(464)]()));n[e(408)][e(462)](e(442),r),n.ui[e(428)][e(462)](e(491),(i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(455)]({class:a(446)+this[a(458)]}),c[a(528)][a(455)]({label:v(i,a(488)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(486),(e=>this[a(554)](e[a(535)].id))),(0,s.addMenuToDropdown)(c,n.ui[a(474)][a(518)],function(e){const t=a,n=o(e[t(497)][t(431)](t(556)),e[t(507)]),r=De(e,n)[t(517)]((e=>e[t(408)][t(523)]));return 1===r[t(523)]?De(e,r[0][t(408)])[t(568)]((e=>({id:e.id,label:e[t(530)]}))):r[t(568)]((n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:De(e,o)[r(568)]((e=>({id:e.id,label:e[r(530)]})))}}))}(n),{ariaLabel:v(i,a(488))}),c[a(566)][a(561)]=a(446)+this[a(458)],r.on(a(426),u),c[a(566)][a(483)](a(476),u),c;function u(){const e=a;c[e(470)]=r[e(400)][e(523)]>0;for(const t of c[e(566)][e(405)])t[e(470)]=r[e(400)][e(407)](t.id)}})),n.ui[e(428)][e(462)](e(413),(i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(528)][a(455)]({label:v(i,a(488)),icon:t.IconMagicWand}),c[a(422)](a(470)).to(r,a(400),(e=>e[a(523)]>0));const u=o(n[a(497)][a(431)](a(556)),i);return this[a(520)](r,c,u,(e=>this[a(554)](e))),c})),n.ui[e(428)][e(462)](e(531),(()=>{const t=e,n=this[t(423)](s.ButtonView);return n[t(455)]({tooltip:!0,class:t(510)+this[t(458)]}),n})),n.ui[e(428)][e(462)](e(547),(()=>{const t=e,n=this[t(423)](s.MenuBarMenuListItemButtonView);return n[t(455)]({role:t(415)}),n})),this[e(472)]=this[e(427)][e(497)][e(431)](e(472));const i=this[e(427)];this[e(526)]=setInterval((()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(397)==s||t(434)==s||t(463)==s||t(529)==s||t(424)==s||t(555)==s||t(540)==s||t(449)==s){delete i[r],n=s,clearInterval(this[t(526)]),this[t(526)]=void 0;break}}t(434)==n&&i[t(417)](t(475)),t(463)==n&&i[t(417)](t(484)),t(529)==n&&i[t(417)](t(515)),t(424)==n&&i[t(417)](t(465),t(548)),t(555)==n&&i[t(417)](t(503)),t(540)==n&&i[t(417)](t(409)),t(449)==n&&i[t(417)](t(560))}),1e3)}[Te(445)](){const e=Te;super[e(445)](),this[e(526)]&&clearInterval(this[e(526)])}[Te(459)](e="",n="",r=Te(435)){const i=Te,o=this[i(427)],u=o[i(564)][i(474)],d=o[i(543)][i(431)](p),l=o[i(543)][i(431)](a.ClipboardMarkersUtils);d[i(501)]();const h=new Ne,f=new ClipboardEvent(i(504),{clipboardData:h}),m=new c.DataTransfer(h),g=new c.DomEventData(u,f,{dataTransfer:m});l[i(454)](i(468),(()=>{const e=i;u[e(478)][e(450)](e(504),g)})),this[i(430)]||(this[i(495)](),this[i(533)]=new C(o,this[i(414)][i(411)],this[i(430)]));let y=m[i(490)](i(567));const w=o[i(539)][i(478)][i(421)],b=Array[i(512)](w[i(418)]());1===b[i(523)]&&b[0][i(557)]&&!w[i(524)]()&&""!==y[i(401)](/ /g,"")[i(509)]()&&(y=i(544)+y+i(565)),this[i(533)][i(553)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:O[o[i(539)][i(478)][i(421)][i(534)]?i(498):i(502)]}),i(531)!==this[i(467)].id?this[i(467)][i(536)]({id:i(531),icon:t.IconRobotPencil,title:v(this[i(427)][i(507)],i(562)),content:this[i(430)],position:s.DialogViewPosition[i(480)],onShow:()=>{const e=i;this[e(430)][e(493)]()},onHide:()=>{const e=i;this[e(533)][e(453)](),d[e(525)]()}}):this[i(467)][i(474)][i(460)]||this[i(467)][i(474)][i(551)]()}[Te(487)](){const e=Te;this[e(467)][e(532)]()}[Te(452)](){const e=Te,t=new Map,n=o(this[e(427)][e(497)][e(431)](e(556)),this[e(427)][e(507)]);for(const r of n)for(const n of r[e(408)])t[e(455)](n.id,{...n,groupId:r[e(457)],groupLabel:r[e(399)]||r[e(457)]});return t}[Te(423)](e){const n=Te,r=this[n(427)],i=r[n(408)][n(431)](n(442)),s=new e(r[n(507)]);return s[n(455)]({label:v(r[n(507)],n(562)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(422)](n(470)).to(i),s[n(422)](n(522)).to(this[n(467)],"id",(e=>n(531)===e)),this[n(402)](s,n(486),(()=>{const e=n;s[e(522)]?this[e(487)]():i[e(486)]()})),s}[Te(495)](){const e=Te,t=this[e(427)][e(543)][e(431)](p);this[e(430)]=new me(this[e(427)][e(507)],this[e(458)],this[e(427)][e(497)][e(431)](e(479))),this[e(430)].on(e(485),(()=>{const t=e;this[t(467)][t(474)][t(460)]||this[t(467)][t(474)][t(551)]()})),this[e(430)][e(519)][e(439)][e(443)].on(e(433),(()=>{const t=e;this[t(467)][t(474)][t(460)]||this[t(467)][t(474)][t(551)]()})),this[e(402)](this[e(430)],e(569),(()=>{const n=e;t[n(570)](this[n(533)][n(499)]),this[n(487)]()})),this[e(402)](this[e(430)],e(425),(()=>{const n=e;t[n(425)](this[n(533)][n(499)]),this[n(487)]()})),this[e(438)]()}[Te(438)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(427)];this[e(430)][e(516)].on(e(563),((r,i,s)=>{const o=e,a=this[o(533)][o(499)];s?n[o(489)](v(t,o(514))):a&&n[o(489)](v(t,o(420),a),{politeness:o(437),isUnsafeHTML:!0})})),this[e(430)].on(e(466),((r,i,s)=>{const o=e;if(s){const e=this[o(430)][o(461)][o(511)];n[o(489)](v(t,o(558),e))}}))}[Te(554)](e){const t=Te,n=this[t(521)][t(431)](e),r=this[t(427)],s=r[t(539)][t(478)][t(421)],o=r[t(408)][t(431)](t(442)),a=r[t(543)][t(431)](p),c=("_ungrouppedCommands"!==n[t(457)]?n[t(399)]+": ":"")+n[t(530)];if(!1!==n[t(546)]&&s[t(534)]){const e=(0,i.first)(s[t(496)]())||r[t(539)][t(559)][t(441)](s);r[t(539)][t(469)]((n=>{n[t(451)](e,"in")}))}a[t(501)](),o[t(486)](n[t(416)],c,t(429)+e)}[Te(520)](e,t,n,r){const i=Te,o=this[i(427)],a=o[i(507)],c=new s.MenuBarMenuListView(a),u=De(o,n)[i(517)]((e=>e[i(408)][i(523)]));1===u[i(523)]?this[i(552)]({command:e,commands:u[0][i(408)],parentMenuView:t,onExecute:r})[i(448)]((e=>c[i(573)][i(462)](e))):u[i(448)]((({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(552)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(528)][d(455)]({label:o||n}),h[d(538)](d(486)).to(t),f[d(573)][d(481)](p),h[d(541)][d(432)][d(462)](f),l[d(432)][d(462)](h),c[d(573)][d(462)](l)})),t[i(541)][i(432)][i(462)](c)}[Te(552)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(427)],a=o[i(507)];return De(o,t)[i(568)]((t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(455)]({label:t[o(530)]}),u[o(538)](o(486)).to(n),u.on(o(486),(()=>r(t.id))),u[o(422)](o(470)).to(e,o(400),(e=>e[o(407)](t.id))),c[o(432)][o(462)](u),c}))}}function Ue(e,t){const n=Te;return void 0!==e[n(537)]&&void 0===t[n(537)]?1:void 0===e[n(537)]&&void 0!==t[n(537)]?-1:void 0!==e[n(537)]&&void 0!==t[n(537)]?e[n(537)]-t[n(537)]:0}function De(e,t){const n=Te;t[n(477)](Ue);const r={},s=[];for(const o of t)if(void 0!==o[n(537)]){if(o[n(537)]in r)throw new i.CKEditorError(n(550),e,{conflictingDefinitions:[o,r[o[n(537)]]]});r[o[n(537)]]=o,s[n(494)](o[n(537)],0,o)}else s[n(545)](o);return s}const Fe=He;function Be(){const e=["Translate","translateSpanish","changeStyle","Journalism","Business","Make shorter","12JlKrAK","makeShorter","business","Translate the content to Portuguese language.","isOfficialPlugin","Improve this content by using descriptive language and inserting more information and more detailed explanations.","translateGerman","translateEnglish","locale","changeTone","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Hindi","legal","ai.aiAssistant.preserveComments","summarize","Confident","Summarize","requires","Improve using friendly, comforting language, to convey understanding and empathy.","makeLonger","1240158sKSZpw","Rewrite this content as a journalist using engaging language to convey the importance of the information.","Improve using direct language, using only the essential information.","Casual","Friendly","Translate the content to French language.","isPremiumPlugin","French","translateHindi","Make longer","2075780BXKxLu","Simplified Chinese","Simplify language","Generate from selection","Direct","Professional","translate","professional","12631632PseQJN","Translate the content to Simplified Chinese language.","Rewrite this content as a legal professional using valid legal terminology.","Edit or review","Arabic","continue","translatePortuguese","includes","AIAssistant","groupId","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","translateFrench","Spanish","config","Translate the content to German language.","forEach","define","translateArabic","direct","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","commands","Translate the content to Spanish language.","English","1410914PugJgN","set","ai.aiAssistant.extraCommandGroups","ai.aiAssistant.commands","Rewrite this content as a business professional with formal language.","Improve writing","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Translate the content to Arabic language.","2970465eIiSlo","journalism","editOrReview","Translate the content to English language.","pluginName","friendly","find","Change tone","German","876339DLexCj","generate","poetic","Portuguese","Continue","Legal","ai.aiAssistant.removeCommands","8744470qHTelu","concat","get","Improve using polished, formal, and respectful language to convey professional expertise and competence.","improveWriting","Improve using casual, informal language to convey a casual conversation with a real person.","push","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","Poetic","Improve using compelling, optimistic language to convey confidence in the writing.","Change style","Rewrite this content as a poem using poetic techniques without losing the original meaning.","confident","simplifyLanguage","filter","translateChinese","Translate the content to Hindi language.","casual"];return(Be=function(){return e})()}!function(e){const t=He,n=e();for(;;)try{if(654517===parseInt(t(195))/1+parseInt(t(236))/2+-parseInt(t(253))/3+parseInt(t(205))/4+parseInt(t(244))/5*(-parseInt(t(284))/6)+parseInt(t(260))/7+-parseInt(t(213))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Be);class je extends e.Plugin{static get[Fe(301)](){return[$e,p]}static get[Fe(248)](){return Fe(221)}static get[Fe(288)](){return!0}static get[Fe(201)](){return!0}constructor(e){const t=Fe;super(e);const n=e[t(226)],r=e[t(292)];n[t(229)](t(297),!0),n[t(229)](t(239),function(e){const t=Fe;return[{groupId:t(246),groupLabel:v(e,t(216)),commands:[{id:t(264),label:v(e,t(241)),prompt:t(223)},{id:t(285),label:v(e,t(283)),prompt:t(232)},{id:t(194),label:v(e,t(204)),prompt:t(289)},{id:t(273),label:v(e,t(207)),prompt:t(267)}]},{groupId:t(254),groupLabel:v(e,t(208)),commands:[{id:t(298),label:v(e,t(300)),prompt:t(294)},{id:t(218),label:v(e,t(257)),prompt:t(242)}]},{groupId:t(293),groupLabel:v(e,t(251)),commands:[{id:t(212),label:v(e,t(210)),prompt:t(263)},{id:t(277),label:v(e,t(198)),prompt:t(265)},{id:t(231),label:v(e,t(209)),prompt:t(197)},{id:t(272),label:v(e,t(299)),prompt:t(269)},{id:t(249),label:v(e,t(199)),prompt:t(193)}]},{groupId:t(280),groupLabel:v(e,t(270)),commands:[{id:t(286),label:v(e,t(282)),prompt:t(240)},{id:t(296),label:v(e,t(258)),prompt:t(215)},{id:t(245),label:v(e,t(281)),prompt:t(196)},{id:t(255),label:v(e,t(268)),prompt:t(271)}]},{groupId:t(211),groupLabel:v(e,t(278)),commands:[{id:t(291),label:v(e,t(235)),prompt:t(247)},{id:t(279),label:v(e,t(225)),prompt:t(234)},{id:t(219),label:v(e,t(256)),prompt:t(287)},{id:t(290),label:v(e,t(252)),prompt:t(227)},{id:t(224),label:v(e,t(202)),prompt:t(200)},{id:t(275),label:v(e,t(206)),prompt:t(214)},{id:t(203),label:v(e,t(295)),prompt:t(276)},{id:t(230),label:v(e,t(217)),prompt:t(243)}]}]}(r)),n[t(229)](t(238),[]),n[t(229)](t(259),[]);let i=o(n[t(262)](t(239)),r);const s=n[t(262)](t(238)),a=n[t(262)](t(259));s[t(228)]((e=>{const n=t,r=i[n(250)]((t=>t[n(222)]===e[n(222)]));r?r[n(233)]=r[n(233)][n(261)](e[n(233)]):i[n(266)](e)})),i=i[t(274)]((e=>!a[t(220)](e[t(222)]))),i[t(228)]((e=>{const n=t;e[n(233)]=e[n(233)][n(274)]((e=>!a[n(220)](e.id)))})),n[t(237)](t(239),i)}}function He(e,t){const n=Be();return(He=function(e,t){return n[e-=193]})(e,t)}const qe=ze;function ze(e,t){const n=Ve();return(ze=function(e,t){return n[e-=487]})(e,t)}function Ve(){const e=["object","get","locale","assign","aborted","error","521418DzjpFl","application/json","AI_ERROR_GET_PARAMETERS","textAdapter","33732zVRHPW","4omkDJD","makeRequest","_prepareRequestHeaders","_prepareRequestParameters","sendRequest","init","resolve","catch","abort","382389NTnQBv","plugins","abortController","editor","requires","2424KxsOmc","AbortError","9105AHYiYq","84FkLjvK","18PKyUzU","signal","218999dzrKxC","522pnwcOD","870440qdJfIr","reject","name","AI_ERROR_GET_HEADERS","2221185JnwWWQ","aitextadapter-send-request-failed"];return(Ve=function(){return e})()}!function(e){const t=ze,n=e();for(;;)try{if(571836===-parseInt(t(506))/1+-parseInt(t(493))/2*(-parseInt(t(488))/3)+parseInt(t(511))/4*(-parseInt(t(498))/5)+-parseInt(t(490))/6*(parseInt(t(520))/7)+parseInt(t(525))/8*(parseInt(t(510))/9)+-parseInt(t(494))/10+parseInt(t(492))/11*(-parseInt(t(489))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ve);class Ge extends e.Plugin{[qe(522)];static get[qe(524)](){return[w]}constructor(e){const t=qe;super(e),this[t(522)]=new AbortController}[qe(516)](){const e=qe;this[e(523)][e(521)][e(501)](w)[e(509)]=this}[qe(519)](){const e=qe;this[e(522)][e(491)][e(504)]||(this[e(522)][e(519)](),this[e(522)]=new AbortController)}async[qe(512)](e){const t=qe;return this[t(515)](e)[t(518)]((e=>{const n=t;if(e instanceof b)return Promise[n(495)](e);if(n(487)==e[n(496)])return Promise[n(517)]();throw console[n(505)](e),new i.CKEditorError(n(499),null)}))}async[qe(513)](e,t){const n=qe,r=this[n(523)][n(502)],i={"Content-Type":n(507)};if(n(500)==typeof e)Object[n(503)](i,e);else if(e)try{const r=await e(t);Object[n(503)](i,r)}catch(e){return Promise[n(495)](new b(v(r,n(497))))}return i}async[qe(514)](e,t){const n=qe,r=this[n(523)][n(502)];if(n(500)==typeof e)return e;try{return await e(t)}catch(e){return Promise[n(495)](new b(v(r,n(508))))}}}const We=Je;function Ke(){const e=["prepareMessages","12cZtViY","config","sendRequest","ai.openAI.requestParameters","json","locale","https://api.openai.com/v1/chat/completions","59822GlUxJk","OpenAITextAdapter","system","AI_ERROR_MODERATION","59272QPSJbv","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.","body","_cleanUpData","ai.openAI.requestHeaders","map","abortController","1716JGQvqi","262910wTMHwf","includes","_prepareRequestParameters","content","filter","message","61446jTVJrX","gpt-3.5-turbo","split","editor","signal","Instruction:\n","Moderation","_isBufferIncomplete","parse","decode","text","stringify","_requestHeaders","1NYuTmD","AI_ERROR_CONTEXT_LENGTH","replace","read","2529DOZbXM","_apiUrl","4390pkbMiX","join","_requestParameters","get","_readStreamableResponse","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.","9361lYkSMK","reject","pluginName","getReader","_prepareRequestHeaders","data: ","[DONE]","context_length_exceeded","stream","90LGDzwA","150728PtMZyF","_readStaticResponse","length","resolve","\nYou must keep the text formatting.\n\nContent:\n","define","POST","ai.openAI.apiUrl","delta","choices","user"];return(Ke=function(){return e})()}function Je(e,t){const n=Ke();return(Je=function(e,t){return n[e-=320]})(e,t)}!function(e){const t=Je,n=e();for(;;)try{if(125624===parseInt(t(384))/1*(-parseInt(t(353))/2)+-parseInt(t(346))/3*(-parseInt(t(357))/4)+-parseInt(t(365))/5+-parseInt(t(333))/6*(-parseInt(t(371))/7)+parseInt(t(334))/8+-parseInt(t(388))/9*(parseInt(t(390))/10)+parseInt(t(324))/11*(parseInt(t(364))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ke);class Qe extends Ge{[We(389)];[We(383)];[We(320)];static get[We(326)](){return We(354)}constructor(e){const t=We;super(e),e[t(347)][t(339)](t(341),t(352)),e[t(347)][t(321)](t(349))||e[t(347)][t(339)](t(349),{model:t(372),max_tokens:2e3,temperature:1,top_p:1,stream:!0}),this[t(389)]=e[t(347)][t(321)](t(341)),this[t(383)]=e[t(347)][t(321)](t(361))||{},this[t(320)]=e[t(347)][t(321)](t(349))}async[We(348)]({query:e,context:t,onData:n,actionId:r}){const i=We,s=this[i(374)][i(351)],o=await this[i(345)](e,t,r),a=await this[i(328)](this[i(383)],r),c=await this[i(367)](this[i(320)],r),u={messages:o,...c},d={method:i(340),headers:a,body:JSON[i(382)](u),signal:this[i(363)][i(375)]},l=await fetch(this[i(389)],d);if(l.ok)return c[i(332)]?await this[i(322)](l,n):await this[i(335)](l,n),Promise[i(337)]();{const e=await l[i(381)]();return e[i(366)](i(331))?Promise[i(325)](new b(v(s,i(385)))):e[i(366)](i(377))?Promise[i(325)](new b(v(s,i(356)))):Promise[i(325)](new Error(e))}}async[We(345)](e,t,n){const r=We;let i,s;return t?(i=r(358),s=r(376)+e+r(338)+t):(i=r(323),s=e),[{role:r(355),content:i},{role:r(344),content:s}]}async[We(322)](e,t){const n=We,r=e[n(359)][n(327)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(387)](),d=s+i[n(380)](u);let l="";c=e;try{l=this[n(360)](d),s=""}catch(e){s=d;continue}o+=l,!c&&this[n(378)](o)||o&&(a+=o,o="",t(a))}return Promise[n(337)]()}async[We(335)](e,t){const n=We;return t((await e[n(350)]())[n(343)][0][n(370)][n(368)]),Promise[n(337)]()}[We(378)](e){const t=We,n=e[t(373)]("<")[t(336)]!==e[t(373)](">")[t(336)],r=e[t(336)]<30;return n&&r}[We(360)](e){const t=We;return e[t(373)](/\n(?![^{]*\})/g)[t(362)]((e=>e[t(386)](t(329),"")))[t(369)]((e=>e&&e[t(336)]>0&&t(330)!==e))[t(362)]((e=>{const n=t,{choices:r}=JSON[n(379)](e);if(r[0]?.[n(342)]?.[n(368)])return r[0][n(342)][n(368)]}))[t(369)]((e=>e))[t(391)]("")}}const Ze=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}};var Xe,Ye,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HEADER="header",e.QUERY="query"}(Ye||(Ye={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,st;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(st||(st={}));class ot{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new ot({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return ot.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!ot.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!ot.isInstance(r)||"node"!==e.runtime||r.headers.hasOwnProperty(lt))return t(n);const i=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o(i)&&o(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}});const pt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),mt=e=>pt.test(e)||e.startsWith("[")&&e.endsWith("]"),gt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),yt=(e,t=!1)=>{if(!t)return gt.test(e);const n=e.split(".");for(const e of n)if(!yt(e))return!1;return!0},wt={},bt="endpoints";function vt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${vt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(vt).join(", ")})`:JSON.stringify(e,null,2)}class kt extends Error{constructor(e){super(e),this.name="EndpointError"}}const St=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new kt(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new kt(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce(((n,r)=>{if("object"!=typeof n)throw new kt(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]}),e),At={[et.HTTP]:80,[et.HTTPS]:443},Et={booleanEquals:(e,t)=>e===t,getAttr:St,isSet:e=>null!=e,isValidHostLabel:yt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=mt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},It=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(St(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return It(e,n);if(e.fn)return _t(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new kt(`'${t}': ${String(e)} is not a string, function or reference.`)},_t=({fn:e,argv:t},n)=>{const r=t.map((e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n))),i=e.split(".");return i[0]in wt&&null!=i[1]?wt[i[0]][i[1]](...r):Et[e](...r)},Rt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new kt(`'${e}' is already defined in Reference Record.`);const r=_t(t,n);return n.logger?.debug?.(`${bt} evaluateCondition: ${vt(t)} = ${vt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Rt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${bt} assign: ${i.name} := ${vt(i.value)}`))}return{result:!0,referenceRecord:n}},Ct=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:r.map((e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new kt(`Header '${n}' value '${r}' is not a string`);return r}))})),{}),Mt=(e,t)=>{if(Array.isArray(e))return e.map((e=>Mt(e,t)));switch(typeof e){case"string":return It(e,t);case"object":if(null===e)throw new kt(`Unexpected endpoint property: ${e}`);return Tt(e,t);case"boolean":return e;default:throw new kt("Unexpected endpoint property type: "+typeof e)}},Tt=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:Mt(r,t)})),{}),Ot=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new kt("Endpoint URL must be a string, got "+typeof n)},Lt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${bt} Resolving endpoint from template: ${vt(r)}`),{...null!=u&&{headers:Ct(u,o)},...null!=c&&{properties:Tt(c,o)},url:Ot(a,o)}},Nt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)throw new kt(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},$t=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Lt(n,t);if(e)return e}else if("error"===n.type)Nt(n,t);else{if("tree"!==n.type)throw new kt(`Unknown endpoint rule: ${n}`);{const e=$t(n,t);if(e)return e}}throw new kt("Rules evaluation failed")},Dt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Dt(t))return!1;return!0}return!!yt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!mt(e)))};let Ft=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}'),Bt="";const jt={isVirtualHostableS3Bucket:Dt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;return"arn"!==n||""===r||""===i||""===a[0]?null:{partition:r,service:i,region:s,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},partition:e=>{const{partitions:t}=Ft;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};wt.aws=jt;const Ht="user-agent",qt="x-amz-user-agent",zt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Gt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Wt)||[],a=(await e.defaultUserAgentProvider()).map(Wt),c=e?.customUserAgent?.map(Wt)||[],u=(Bt?[Bt]:[]).concat([...a,...o,...c]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...c].join(" ");return"browser"!==e.runtime?(d&&(s[qt]=s[qt]?`${s[Ht]} ${d}`:d),s[Ht]=u):s[qt]=u,t({...r,request:i})},Wt=e=>{const t=e[0].split("/").map((e=>e.replace(zt,"-"))).join("/"),n=e[1]?.replace(Vt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Kt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Jt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Jt||(Jt={}));const Qt=e=>e[rt]||(e[rt]={}),Zt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Xt=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Yt=e=>Xt(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const en=(e,t)=>(n,r)=>async i=>{const s=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Qt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},tn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},nn={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},rn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function sn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>n=>async r=>{const{response:i}=await n(r);try{return{response:i,output:await t(i,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:i}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,n),nn),r.add(((e,t)=>(n,r)=>async i=>{const s=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:s});return n({...i,request:o})})(e,t),rn)}}}const on=e=>e=>{throw e},an=(e,t)=>{},cn={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},un=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Qt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||on)(i));return(o.successHandler||an)(a.response,i),a}),cn)}}),dn=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},ln={},hn=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);ln[n]=e,hn[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;ln[n]=r,hn[r]=n}for(let e=0;e<10;e++){ln[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;ln[t]=n,hn[n]=t}ln["+"]=62,hn[62]="+",ln["/"]=63,hn[63]="/";const fn=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in ln))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=ln[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},pn=e=>(new TextEncoder).encode(e);function mn(e){let t;t="string"==typeof e?pn(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=hn[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const gn=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class yn extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?yn.mutate(fn(e)):yn.mutate(pn(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,yn.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?mn(e):gn(e)}(this,e)}}const wn={},bn={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),wn[e]=t,bn[t]=e}function vn(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in bn))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=bn[r]}return t}function kn(e){let t="";for(let n=0;n<e.byteLength;n++)t+=wn[e[n]];return t}"function"==typeof ReadableStream&&ReadableStream;const Sn=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return yn.mutate(e);if(!e)return yn.mutate(new Uint8Array);const n=t.streamCollector(e);return yn.mutate(await n)};function An(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function En(e,t){return new In(e,t)}class In{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new ot({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,r){return this.resolvePathStack.push((i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map((e=>An(e))).join("/"):An(t))}return e})(i,this.input,e,t,n,r)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}class xn{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const _n=(Rn=3e5,e=>Pn(e)&&e.expiration.getTime()-Date.now()<Rn);var Rn;const Pn=e=>void 0!==e.expiration,Cn="content-length";const Mn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Tn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(ot.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Cn))try{const t=n(e);r.headers={...r.headers,[Cn]:String(t)}}catch(e){}}return e({...t,request:r})}),Mn)}}),On=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ln=/(\d+\.){3}\d+/,Nn=/\.\./,$n=e=>On.test(e)&&!Ln.test(e)&&!Nn.test(e),Un=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Dn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},Fn=async e=>{};const Bn=e=>{if("string"==typeof e)return Bn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},jn=e=>"object"==typeof e?"url"in e?Bn(e.url):e:Bn(e),Hn=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Dn(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Un(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!$n(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},qn=({config:e,instructions:t})=>(n,r)=>async i=>{e.endpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Fn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(jn(e)))}const i=await Hn(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Qt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},zn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:rn.name},Vn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(qn({config:e,instructions:t}),zn)}});var Gn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Gn||(Gn={}));const Wn=Gn.STANDARD,Kn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Jn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Qn=[500,502,503,504],Zn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Xn=e=>429===e.$metadata?.httpStatusCode||Kn.includes(e.name)||1==e.$retryable?.throttling,Yn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Jn.includes(e.name)||Zn.includes(e?.code||"")||Qn.includes(e.$metadata?.httpStatusCode||0)||void 0!==e.cause&&t<=10&&Yn(e.cause,t+1);class er{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>er.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Xn(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}er.setTimeoutFn=setTimeout;const tr=100,nr=2e4,rr="amz-sdk-invocation-id",ir="amz-sdk-request",sr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(nr,e),getRetryCost:()=>n});class or{constructor(e){this.maxAttempts=e,this.mode=Gn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=tr;return{computeNextBackoffDelay:t=>Math.floor(Math.min(nr,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return sr({retryDelay:tr,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:tr);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,sr({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class ar{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Gn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new er,this.standardRetryStrategy=new or(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const cr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ur;const dr=new Uint8Array(16);function lr(){if(!ur&&(ur="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ur))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ur(dr)}const hr=[];for(let e=0;e<256;++e)hr.push((e+256).toString(16).slice(1));function fr(e,t=0){return hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]}const pr=function(e,t,n){if(cr.randomUUID&&!t&&!e)return cr.randomUUID();const r=(e=e||{}).random||(e.rng||lr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return fr(r)},mr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const gr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},yr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,wr=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of gr(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of gr(t.name,t.aliases))o[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${yr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(c=r,c.sort(((e,t)=>br[t.step]-br[e.step]||vr[t.priority||"normal"]-vr[e.priority||"normal"]))).map(s).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=gr(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${yr(i,o)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${yr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${yr(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=gr(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${yr(i,o)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${yr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${yr(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(wr()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=gr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of gr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=gr(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(wr());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return yr(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},br={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},vr={high:3,normal:2,low:1};class kr{constructor(e){this.config=e,this.middlewareStack=wr()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then((e=>e.output));s(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Sr{constructor(){this.middlewareStack=wr()}static classBuilder(){return new Ar}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve((e=>p.handle(e.request,n||{})),f)}}class Ar{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Sr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Er="***SensitiveInformation***",Ir=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),xr=e=>_r(e,32),_r=(e,t)=>{const n=Ir(e);if(void 0!==n&&Rr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Rr=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Pr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Mr.warn(Cr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Cr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Mr={warn:console.warn};class Tr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Tr.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}}const Or=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Lr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Nr=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},$r=e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Ur=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},Dr=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},Fr=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Br=e=>({...$r(e),...Dr(e)}),jr=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};jr.from=e=>e&&"object"==typeof e&&(e instanceof jr||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?jr(String(e)):jr(JSON.stringify(e)),jr.fromObject=jr.from;class Hr{trace(){}debug(){}info(){}warn(){}error(){}}function qr(e,t,n){let r,i,s;if(void 0===t&&void 0===n)r={},s=e;else{if(r=e,"function"==typeof t)return i=t,s=n,Vr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Gr(r,null,s,e):r[e]=s[e];return r}const zr=(e,t)=>{const n={};for(const r in t)Gr(n,e,t,r);return n},Vr=(e,t,n)=>qr(e,Object.entries(n).reduce(((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e)),{})),Gr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Wr,o=Kr,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Wr=e=>null!=e,Kr=e=>e,Jr=e=>e?.body instanceof ReadableStream,Qr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Zr=e=>{const t={error:e,errorType:Xr(e)},n=ti(e.$response);return n&&(t.retryAfterHint=n),t},Xr=e=>Xn(e)?"THROTTLING":Yn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Yn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Yr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ei=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Qr(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[rr]=pr());;)try{d&&(u.headers[ir]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=Zr(t);if(o=mr(t),d&&Jr(u))throw(n.logger instanceof Hr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise((e=>setTimeout(e,s)))}}})(e),Yr)}}),ti=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)},ni=e=>encodeURIComponent(e).replace(/[!'()*]/g,ri),ri=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ii=e=>"string"==typeof e?pn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),si="X-Amz-Date",oi="X-Amz-Signature",ai="X-Amz-Security-Token",ci="authorization",ui=si.toLowerCase(),di=[ci,ui,"date"],li=oi.toLowerCase(),hi="x-amz-content-sha256",fi=ai.toLowerCase(),pi={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},mi=/^proxy-/,gi=/^sec-/,yi="AWS4-HMAC-SHA256",wi="AWS4-HMAC-SHA256-PAYLOAD",bi="aws4_request",vi={},ki=[],Si=(e,t,n)=>`${e}/${t}/${n}/${bi}`,Ai=(e,t,n)=>{const r=new e(t);return r.update(ii(n)),r.digest()},Ei=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in pi||t?.has(s)||mi.test(s)||gi.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Ii=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===hi)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(ii(t)),kn(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class xi{format(e){const t=[];for(const n of Object.keys(e)){const r=pn(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=pn(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Pi.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(vn(e.value.replace(/\-/g,"")),1),d}}}var _i;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(_i||(_i={}));const Ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Pi{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Ci(t),new Pi(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Ci(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Ci(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Mi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))di.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Ti=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Oi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.headerFormatter=new xi,this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=Zt(n),this.credentialProvider=Zt(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=Li(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Si(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=ot.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Mi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[ai]=d.sessionToken),m.query["X-Amz-Algorithm"]=yi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[si]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Ei(m,i,o);return m.query["X-Amz-SignedHeaders"]=Ni(g),m.query[oi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Ii(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=Li(n),u=Si(a,o,s??this.service),d=await Ii({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=kn(await l.digest()),f=[wi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=Li(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(ii(e)),kn(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=Mi(e),{longDate:u,shortDate:d}=Li(t),l=Si(d,a,s??this.service);c.headers[ui]=u,o.sessionToken&&(c.headers[fi]=o.sessionToken);const h=await Ii(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(hi,c.headers)&&this.applyChecksum&&(c.headers[hi]=h);const f=Ei(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[ci]=`${yi} Credential=${o.accessKeyId}/${l}, SignedHeaders=${Ni(f)}, Signature=${p}`,c}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===li)continue;const i=ni(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${ni(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce(((e,t)=>e.concat([`${i}=${ni(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n){const r=new this.sha256;r.update(ii(n));const i=await r.digest();return`${yi}\n${e}\n${t}\n${kn(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ni(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r),s=new this.sha256(await n);return s.update(ii(i)),kn(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${kn(await Ai(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in vi)return vi[s];for(ki.push(s);ki.length>50;)delete vi[ki.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,bi])o=await Ai(e,o,t);return vi[s]=o})(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const Li=e=>{const t=(n=e,Ti(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Ni=e=>Object.keys(e).sort().join(";"),$i=e=>{let t;e.credentials&&(t=((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(e.credentials,_n,Pn)),t||(t=e.credentialDefaultProvider?dn(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:i}=e;let s;return s=e.signer?dn(e.signer):e.regionInfoProvider?()=>dn(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([r,s])=>{const{signingRegion:o,signingService:a}=r;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(c)})):async r=>{const s=(r=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await dn(e.region)(),properties:{}},r)).signingRegion,o=r.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(a)},{...e,systemClockOffset:r,signingEscapePath:n,credentials:t,signer:s}},Ui=async(e,t,n)=>({operation:Qt(t).operation,region:await Zt(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Di=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Fi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Bi="3.621.0";var ji="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Hi(e){return e instanceof Uint8Array?e:"string"==typeof e?ji(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function qi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var zi={name:"SHA-256"},Vi={name:"HMAC",hash:zi},Gi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Wi={};function Ki(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Wi}var Ji=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!qi(e)){var t=Hi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Ki().crypto.subtle.sign(Vi,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):qi(this.toHash)?Promise.resolve(Gi):Promise.resolve().then((function(){return Ki().crypto.subtle.digest(zi,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){Ki().crypto.subtle.importKey("raw",Hi(e.secret),Vi,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Qi(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function Zi(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Xi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Yi=64,es=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ts=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ns=Math.pow(2,53)-1,rs=function(){function e(){this.state=Int32Array.from(ts),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ns)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Yi&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%Yi>=56){for(var r=this.bufferLength;r<Yi;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],d=0;d<Yi;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(es[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+p|0,s=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),is=function(){function e(e){this.secret=e,this.hash=new rs,this.reset()}return e.prototype.update=function(e){if(!qi(e)&&!this.error)try{this.hash.update(Hi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Qi(this,void 0,void 0,(function(){return Zi(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new rs,this.secret){this.outer=new rs;var e=function(e){var t=Hi(e);if(t.byteLength>Yi){var n=new rs;n.update(t),t=n.digest()}var r=new Uint8Array(Yi);return r.set(t),r}(this.secret),t=new Uint8Array(Yi);t.set(e);for(var n=0;n<Yi;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var ss=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function os(e){return e&&ss.every((function(t){return"function"==typeof e[t]}))}var as=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&os(e.crypto.subtle)}(Ki())?this.hash=new is(e):this.hash=new Ji(e)}return e.prototype.update=function(e,t){this.hash.update(Hi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),cs=n(369),us=n.n(cs);const ds=({serviceId:e,clientVersion:t})=>async()=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r};!function(){function e(){this.crc32=new hs}e.prototype.update=function(e){qi(e)||this.crc32.update(Hi(e))},e.prototype.digest=function(){return Qi(this,void 0,void 0,(function(){return Zi(this,(function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t}))}))},e.prototype.reset=function(){this.crc32=new hs}}();var ls,hs=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Xi(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^fs[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),fs=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class ps{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&ms(t),new ps(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&ms(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function ms(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class gs{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ps.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!xs.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(vn(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:ys,value:!0};break;case 1:t[i]={type:ys,value:!1};break;case 2:t[i]={type:ws,value:e.getInt8(n++)};break;case 3:t[i]={type:bs,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:vs,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:ks,value:new ps(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Ss,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const s=e.getUint16(n,!1);n+=2,t[i]={type:As,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Es,value:new Date(new ps(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:Is,value:`${kn(o.subarray(0,4))}-${kn(o.subarray(4,6))}-${kn(o.subarray(6,8))}-${kn(o.subarray(8,10))}-${kn(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(ls||(ls={}));const ys="boolean",ws="byte",bs="short",vs="integer",ks="long",Ss="binary",As="string",Es="timestamp",Is="uuid",xs=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class _s{constructor(e,t){this.headerMarshaller=new gs(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),s=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new hs;return s.setUint32(0,r,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),s.setUint32(r-4,o.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=r.getUint32(4,!1),o=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new hs).update(new Uint8Array(n,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,s),body:new Uint8Array(n,t+8+4+s,i-s-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Rs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Ps{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Cs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Ms{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Ts(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},s=await e(i);if(s.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw s[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class Os{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new _s(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const s=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const o=Math.min(t-n,c-u);r.set(e.slice(u,u+o),n),n+=o,u+=o,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new Cs({messageStream:new Rs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Ts(t,this.utfEncoder)})}serialize(e,t){return new Ps({messageStream:new Ms({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Ls{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Os({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Ns(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const Ns=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,$s=e=>new Ls(e);function Us(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const Ds={supported:void 0};class Fs{static create(e){return"function"==typeof e?.handle?e:new Fs(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Ds.supported&&(Ds.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ni(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${ni(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${ni(r)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:u}=e,d=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,l="GET"===u||"HEAD"===u?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(h.cache=this.config.cache),l&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),Ds.supported&&(h.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let f=()=>{};const p=new Request(d,h),m=[fetch(p).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),Us(n)];return t&&m.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),f=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(m).finally(f)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const Bs=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}))}(e),n=fn(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const js="function"==typeof TextEncoder?new TextEncoder:null,Hs=e=>{if("string"==typeof e){if(js)return js.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},qs=e=>new Date(Date.now()+e),zs=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Vs=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(qs(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Gs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Ws{async sign(e,t,n){if(!ot.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:r,signer:i,signingRegion:s,signingName:o}=await(async e=>{const t=Gs("context",e.context),n=Gs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Gs("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingName;return{config:n,signer:s,signingRegion:o,signingName:a}})(n);return await i.sign(e,{signingDate:qs(r.systemClockOffset),signingRegion:s,signingService:o})}errorHandler(e){return t=>{const n=t.ServerTime??zs(t.$response);if(n){const r=Gs("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Vs(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=zs(e);if(n){const e=Gs("config",t.config);e.systemClockOffset=Vs(n,e.systemClockOffset)}}}const Ks="required",Js="fn",Qs="argv",Zs="ref",Xs=!0,Ys="isSet",eo="booleanEquals",to="error",no="endpoint",ro="tree",io="PartitionResult",so={[Ks]:!1,type:"String"},oo={[Ks]:!0,default:!1,type:"Boolean"},ao={[Zs]:"Endpoint"},co={[Js]:eo,[Qs]:[{[Zs]:"UseFIPS"},!0]},uo={[Js]:eo,[Qs]:[{[Zs]:"UseDualStack"},!0]},lo={},ho={[Js]:"getAttr",[Qs]:[{[Zs]:io},"supportsFIPS"]},fo={[Js]:eo,[Qs]:[!0,{[Js]:"getAttr",[Qs]:[{[Zs]:io},"supportsDualStack"]}]},po=[co],mo=[uo],go=[{[Zs]:"Region"}],yo={version:"1.0",parameters:{Region:so,UseDualStack:oo,UseFIPS:oo,Endpoint:so},rules:[{conditions:[{[Js]:Ys,[Qs]:[ao]}],rules:[{conditions:po,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:to},{rules:[{conditions:mo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:to},{endpoint:{url:ao,properties:lo,headers:lo},type:no}],type:ro}],type:ro},{rules:[{conditions:[{[Js]:Ys,[Qs]:go}],rules:[{conditions:[{[Js]:"aws.partition",[Qs]:go,assign:io}],rules:[{conditions:[co,uo],rules:[{conditions:[{[Js]:eo,[Qs]:[Xs,ho]},fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:to}],type:ro},{conditions:po,rules:[{conditions:[{[Js]:eo,[Qs]:[ho,Xs]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS is enabled but this partition does not support FIPS",type:to}],type:ro},{conditions:mo,rules:[{conditions:[fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"DualStack is enabled but this partition does not support DualStack",type:to}],type:ro},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro}],type:ro},{error:"Invalid Configuration: Missing Region",type:to}],type:ro}]},wo=(e,t={})=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${bt} Initial EndpointParams: ${vt(n)}`);const o=Object.entries(i).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new kt(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${bt} Resolved endpoint: ${vt(c)}`),c})(yo,{endpointParams:e,logger:t.logger});wt.aws=jt;Error;const bo=["in-region","cross-region","mobile","standard","legacy"],vo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},ko=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await a()),r):async e=>(s&&!e?.forceRefresh||(r=await a()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await a(),r):r)})((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(vo()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${bo.join(", ")}, got ${t}`)}})))(e),n=()=>t().then(Nr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??fn,base64Encoder:e?.base64Encoder??mn,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??wo,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Di,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ws}],logger:e?.logger??new Hr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Bn,utf8Decoder:e?.utf8Decoder??pn,utf8Encoder:e?.utf8Encoder??gn}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ds({serviceId:r.serviceId,clientVersion:Bi}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??$s,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:Fs.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Wn),sha256:e?.sha256??as,streamCollector:e?.streamCollector??Bs,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},So=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Ao=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}},Eo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class Io extends kr{constructor(...[e]){const t=(e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(ko(e||{})),n=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Yt(t);const e=await t();return Yt(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Xt(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}})(t),r=(e=>{const t=e.tls??!0,{endpoint:n}=e,r=null!=n?async()=>jn(await Zt(n)()):void 0,i=!!n,s={...e,endpoint:r,tls:t,isCustomEndpoint:i,useDualstackEndpoint:Zt(e.useDualstackEndpoint??!1),useFipsEndpoint:Zt(e.useFipsEndpoint??!1)};let o;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!o&&(o=Fn(e.serviceId)),o),s})(n);var i;const s=(e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)}))((e=>{const{retryStrategy:t}=e,n=Zt(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await Zt(e.retryMode)()===Gn.ADAPTIVE?new ar(n):new or(n))}})((i=r,{...i,customUserAgent:"string"==typeof i.customUserAgent?[[i.customUserAgent]]:i.customUserAgent})));const o=((e,t)=>{const n={...So(e),...Br(e),...Ze(e),...Ao(e)};return t.forEach((e=>e.configure(n))),{...e,...(s=n,{region:s.region()}),...(i=n,{...Ur(i),...Fr(i)}),...(r=n,{httpHandler:r.httpHandler()}),...Eo(n)};var r,i,s})({...$i(s)},e?.extensions||[]);super(o),this.config=o,this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}}),dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use((e=>({applyToStack:t=>{t.add(Gt(e),Kt)}}))(this.config)),this.middlewareStack.use(ei(this.config)),this.middlewareStack.use(Tn(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(en(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),tn)}}))(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use(un(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return Ui}getIdentityProviderConfigProvider(){return async e=>new xn({"aws.auth#sigv4":e.credentials})}}class xo extends Tr{constructor(e){super(e),Object.setPrototypeOf(this,xo.prototype)}}class _o extends xo{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,_o.prototype)}}var Ro;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Ro||(Ro={}));class Po extends xo{constructor(e){super({name:"InternalServerException",$fault:"server",...e}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,Po.prototype)}}class Co extends xo{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Co.prototype)}}class Mo extends xo{constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,Mo.prototype)}}class To extends xo{constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,To.prototype)}}class Oo extends xo{constructor(e){super({name:"ValidationException",$fault:"client",...e}),this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype)}}var Lo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Lo||(Lo={}));var No;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));var $o,Uo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($o||($o={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):t._(e.$unknown[0],e.$unknown[1])}(Uo||(Uo={}));var Do;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));var Fo,Bo,jo,Ho,qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Fo||(Fo={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(qo||(qo={}));class zo extends xo{constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),this.name="ModelErrorException",this.$fault="client",Object.setPrototypeOf(this,zo.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Vo extends xo{constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),this.name="ModelNotReadyException",this.$fault="client",Object.setPrototypeOf(this,Vo.prototype)}}class Go extends xo{constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),this.name="ModelTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Go.prototype)}}class Wo extends xo{constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),this.name="ServiceUnavailableException",this.$fault="server",Object.setPrototypeOf(this,Wo.prototype)}}var Ko,Jo,Qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Ko||(Ko={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));class Zo extends xo{constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),this.name="ModelStreamErrorException",this.$fault="client",Object.setPrototypeOf(this,Zo.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(Qo||(Qo={}));var Xo;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(Xo||(Xo={}));const Yo=e=>({...e,...e.body&&{body:Er}}),ea=e=>({...e,...e.body&&{body:Er}}),ta=e=>({...e,...e.body&&{body:Er}}),na=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ra=(e,t)=>((e,t)=>Sn(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),ia=async(e,t)=>{const n=await ra(e,t);return n.message=n.message??n.Message,n},sa=async(e,t)=>{const n=En(e,t),r=qr({},Oa,{[$a]:e[Na]||"application/octet-stream",[La]:e[La],[za]:e[Fa],[Ha]:e[Ua],[qa]:e[Da]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},oa=async(e,t)=>{const n=En(e,t),r=qr({},Oa,{[$a]:e[Na]||"application/octet-stream",[Ba]:e[La],[za]:e[Fa],[Ha]:e[Ua],[qa]:e[Da]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},aa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=qr({$metadata:Ta(e),[Na]:[,e.headers[$a]]}),r=await Sn(e.body,t);return n.body=r,n},ca=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=qr({$metadata:Ta(e),[Na]:[,e.headers[ja]]}),r=e.body;return n.body=Aa(r,t),n},ua=async(e,t)=>{const n={...e,body:await ia(e.body,t)},r=((e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=(i=e.headers,s="x-amzn-errortype",Object.keys(i).find((e=>e.toLowerCase()===s.toLowerCase())));var i,s;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ha(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await fa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await wa(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await ba(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ka(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Sa(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await pa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await ma(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await ya(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await va(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await ga(n,t);default:const i=n.body;return da({output:e,parsedBody:i,errorCode:r})}},da=(la=xo,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Lr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw Or(o,t)})({output:e,parsedBody:t,exceptionCtor:la,errorCode:n})});var la;const ha=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new _o({$metadata:Ta(e),...n});return Or(s,e.body)},fa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Po({$metadata:Ta(e),...n});return Or(s,e.body)},pa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr,originalStatusCode:xr,resourceName:Pr});Object.assign(n,i);const s=new zo({$metadata:Ta(e),...n});return Or(s,e.body)},ma=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Vo({$metadata:Ta(e),...n});return Or(s,e.body)},ga=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr,originalMessage:Pr,originalStatusCode:xr});Object.assign(n,i);const s=new Zo({$metadata:Ta(e),...n});return Or(s,e.body)},ya=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Go({$metadata:Ta(e),...n});return Or(s,e.body)},wa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Co({$metadata:Ta(e),...n});return Or(s,e.body)},ba=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Mo({$metadata:Ta(e),...n});return Or(s,e.body)},va=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Wo({$metadata:Ta(e),...n});return Or(s,e.body)},ka=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new To({$metadata:Ta(e),...n});return Or(s,e.body)},Sa=async(e,t)=>{const n=qr({}),r=e.body,i=zr(r,{message:Pr});Object.assign(n,i);const s=new Oo({$metadata:Ta(e),...n});return Or(s,e.body)},Aa=(e,t)=>t.eventStreamMarshaller.deserialize(e,(async n=>null!=n.chunk?{chunk:await _a(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Ea(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Ia(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ca(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Pa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await xa(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ra(n.serviceUnavailableException,t)}:{$unknown:e})),Ea=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return fa(n,t)},Ia=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ga(n,t)},xa=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ya(n,t)},_a=async(e,t)=>{const n={},r=await ra(e.body,t);return Object.assign(n,Ma(r,t)),n},Ra=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return va(n,t)},Pa=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ka(n,t)},Ca=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return Sa(n,t)},Ma=(e,t)=>zr(e,{bytes:t.base64Decoder}),Ta=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Oa=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),La="accept",Na="contentType",$a="content-type",Ua="guardrailIdentifier",Da="guardrailVersion",Fa="trace",Ba="x-amzn-bedrock-accept",ja="x-amzn-bedrock-content-type",Ha="x-amzn-bedrock-guardrailidentifier",qa="x-amzn-bedrock-guardrailversion",za="x-amzn-bedrock-trace";class Va extends(Sr.classBuilder().ep({...Fi}).m((function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),Vn(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ta,na).ser(oa).de(ca).build()){}class Ga extends(Sr.classBuilder().ep({...Fi}).m((function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),Vn(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(Yo,ea).ser(sa).de(aa).build()){}function Wa(e,t){const n=Ka();return(Wa=function(e,t){return n[e-=413]})(e,t)}function Ka(){const e=["data","_prepareRequestParameters","AWSTextAdapter","\n[/INST]","1788384xmveaP","utf8","\n<</SYS>>\n[INST]\n","bytes","ai21.j2","decode","define","anthropic.claude-v2","21qOyNqL","generations","_readStreamableResponse","ai.aws.bedrockClientConfig","chunk","_getGeneratedText","_apiUrl","split","from","preparePrompt","\n\nAssistant:","\nYou must keep the text formatting.\n\nContent:\n","json","_requestHeaders","ai.aws.apiUrl","2210268hCGfgh","stringify","resolve","1523454BmaEZu","filter","_bedrockClientConfig","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.","signal","_readAsyncIterableResponse","completions","AI_ERROR_UNSUPPORTED_MODEL","test","abortController","_processAWSRequest","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.","parse","672737iKPJEE","completion","getModelFamily","cohere.command","_processProxyRequest","text","2KiHLoF","toString","application/json","1561950rztPiZ","ai.aws.requestHeaders","156FVmJvk","bedrock-2023-05-31","sendRequest","anthropic.claude","5023920menUGn","Instruction:\n","52629ENUudG","meta.llama","generation","read","join","55Mxhkvx","config","_prepareRequestHeaders","body","pluginName","_readStaticResponse","_requestParameters","locale","utf-8","18nrBLJR","map","POST","length","send","get","Human:\n","editor","<<SYS>>\n","ai.aws.requestParameters","getReader"];return(Ka=function(){return e})()}const Ja=Wa;!function(e){const t=Wa,n=e();for(;;)try{if(404872===parseInt(t(473))/1*(parseInt(t(479))/2)+-parseInt(t(490))/3*(parseInt(t(484))/4)+parseInt(t(482))/5+-parseInt(t(460))/6*(parseInt(t(442))/7)+-parseInt(t(434))/8*(-parseInt(t(419))/9)+-parseInt(t(488))/10+parseInt(t(495))/11*(parseInt(t(457))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ka);class Qa extends Ge{[Ja(448)];[Ja(455)];[Ja(462)];[Ja(416)];static get[Ja(414)](){return Ja(432)}constructor(e){const t=Ja;super(e),e[t(496)][t(424)](t(428))||e[t(496)][t(440)](t(428),{model:t(441),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(485),stream:!0}),this[t(448)]=e[t(496)][t(424)](t(456)),this[t(462)]=e[t(496)][t(424)](t(445)),this[t(455)]=e[t(496)][t(424)](t(483)),this[t(416)]=e[t(496)][t(424)](t(428))}async[Ja(486)]({query:e,context:t,onData:n,actionId:r}){const i=Ja,{model:s,stream:o,...a}=await this[i(431)](this[i(416)],r),c={prompt:await this[i(451)](e,t,s,r),...a};this[i(448)]?await this[i(477)](c,s,o,n,r):await this[i(470)](c,s,o,n)}async[Ja(451)](e,t,n,r){const i=Ja;let s,o;return t?(s=i(463),o=i(489)+e+i(453)+t):(s=i(471),o=e),i(491)==this[i(475)](n)?i(427)+s+i(436)+o+i(433):i(425)+s+"\n"+o+i(452)}[Ja(475)](e){const t=Ja;if(/^anthropic\.claude/[t(468)](e))return t(487);if(/^ai21\.j2/[t(468)](e))return t(438);if(/^cohere\.command/[t(468)](e))return t(476);if(/^meta\.llama/[t(468)](e))return t(491);throw new b(v(this[t(426)][t(417)],t(467),e))}async[Ja(477)](e,t,n,r,i){const s=Ja,o={method:s(421),headers:await this[s(497)](this[s(455)],i),body:JSON[s(458)]({...e,model:t,stream:n}),signal:this[s(469)][s(464)]},a=await fetch(this[s(448)],o);n?await this[s(444)](a,t,r):await this[s(415)](a,t,r)}async[Ja(470)](e,t,n,r){const i=Ja,s=new Io(this[i(462)]),o={body:JSON[i(458)](e),contentType:i(481),accept:i(481),modelId:t};let a;if(n){const e=new Va(o);a=await s[i(423)](e,{abortSignal:this[i(469)][i(464)]}),await this[i(465)](a,t,r)}else{const e=new Ga(o);a=await s[i(423)](e,{abortSignal:this[i(469)][i(464)]}),await this[i(415)](a,t,r)}}async[Ja(465)](e,t,n){const r=Ja,i=e[r(413)],s=new TextDecoder(r(418));let o="";for await(const e of i)if(e[r(446)]){const i=s[r(439)](e[r(446)][r(437)]),a=JSON[r(472)](i);o+=this[r(447)](a,t),n(o)}return Promise[r(459)]()}async[Ja(444)](e,t,n){const r=Ja,i=e[r(413)],s=new TextDecoder(r(418)),o=i[r(429)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(493)]();if(u=e,u)break;const d=(a+s[r(439)](i))[r(449)]("\n")[r(420)]((e=>{const t=r;try{return a="",JSON[t(472)](e)}catch(t){return a=e,null}}))[r(461)]((e=>null!==e));d[r(422)]&&(c+=d[r(420)]((e=>this[r(447)](e,t)))[r(494)](""),n(c))}return Promise[r(459)]()}async[Ja(415)](e,t,n){const r=Ja;let i;return i=e instanceof Response?await e[r(454)]():JSON[r(472)](Buffer[r(450)](e[r(413)])[r(480)](r(435))),n(this[r(447)](i,t)),Promise[r(459)]()}[Ja(447)](e,t){const n=Ja;switch(this[n(475)](t)){case n(487):return e[n(474)];case n(438):return e[n(466)][0][n(430)][n(478)];case n(476):return e[n(443)][0][n(478)];case n(491):return e[n(492)]}}}function Za(){var e=["22weYqMI","208yLftju","333888CreVwe","3171aumfNi","10TOHxxk","12592WlwpqM","68805PdqZdK","66DSWfhc","236420fRvUFi","258AmHdbf","11127cKTShX","10130khjiPL"];return(Za=function(){return e})()}function Xa(e,t){var n=Za();return(Xa=function(e,t){return n[e-=312]})(e,t)}!function(e){for(var t=Xa,n=e();;)try{if(105734===parseInt(t(313))/1+-parseInt(t(320))/2*(parseInt(t(318))/3)+-parseInt(t(316))/4*(parseInt(t(312))/5)+-parseInt(t(317))/6*(-parseInt(t(323))/7)+parseInt(t(321))/8*(parseInt(t(314))/9)+-parseInt(t(319))/10*(-parseInt(t(315))/11)+parseInt(t(322))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Za)})(),(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",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=a.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(o,(function(e){return t.isPlatform(e)}));if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(s>0){var h=Object.keys(i),f=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=o},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,s){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&o[d[0]]||(void 0!==s&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=s),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var s;if(r)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,o&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,s);else{var a=document.createTextNode(s),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var s={},o=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=s[u]||0,l="".concat(u," ").concat(d);s[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var s=r(e=e||[],i=i||{});return function(e){e=e||[];for(var o=0;o<s.length;o++){var a=n(s[o]);t[a].references--}for(var c=r(e,i),u=0;u<s.length;u++){var d=n(s[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}s=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),s=n(433),o=n.n(s)()(i());o.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=o},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>w,AIAssistant:()=>He,AIAssistantUI:()=>Le,AIRequestError:()=>b,AITextAdapter:()=>Ge,AWSTextAdapter:()=>Ya,OpenAITextAdapter:()=>Ye});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=h;!function(e){const t=h,n=e();for(;;)try{if(953056===parseInt(t(281))/1*(parseInt(t(289))/2)+-parseInt(t(293))/3*(-parseInt(t(277))/4)+-parseInt(t(261))/5+-parseInt(t(294))/6*(parseInt(t(269))/7)+-parseInt(t(290))/8*(-parseInt(t(319))/9)+-parseInt(t(321))/10*(-parseInt(t(250))/11)+parseInt(t(303))/12*(parseInt(t(306))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(f);const d=globalThis[u(310)],l=u(301);function h(e,t){const n=f();return(h=function(e,t){return n[e-=239]})(e,t)}function f(){const e=["16790AARlWo","40fOoRjT","deleteContent","isContent","1360191mZiWmz","6JmvNHZ","getSelectedBlocks","paste","ai.useTheme","getChildren","markerToHighlight","ck-fake-ai-selection","ai-ui","length","5334636iJaaqj","createPositionAfter","href","13fcpXlr","change","_prepareTableInsertBelowPosition","start","DataTransfer","getColumnIndexes","off","markerRange","pop","editing","lowest","filter","hideFakeVisualSelection","10827CMmtTt","plugins","353610FsfRtN","createRange","schema","addMarker","setSelection","contentInsertion","end","createSelection","getRows","parse","removeMarker","_getTableRowCountFromContent","config","markers","map","last","pluginName","showFakeVisualSelection","_getAISelection","data","AIAssistantEditing","getRowIndexes","getRange","insertContentBelow","addClass","isCollapsed","span","fromCharCode","ck-ai-assistant-ui_theme","ck-fake-ai-selection_collapsed","document","push","init","TableUtils","_resetContentOfSelectedTableCells","insertContent","resultRange","text/html","_getDefaultInsertBelowPosition","getLastMatchingPosition","editingDowncast","isAtEnd","341IZPSvY","for","setData","afterInit","isOfficialPlugin","has","model","markerToElement","updateMarker","insertRows","fire","5814555NcXwps","element","createUIElement","getLastPosition","join","forEach","_pasteHTMLUsingClipboard","getSelectedTableCells","3597167jGkDVG","getChild","once","conversion","findAncestor","editor","getMarkersGroup","canEditAt","8jbHrQD","get","getFirstRange","selection","21HjXNQA","getRanges","createPositionAt","table","first","from","_createEmptyTableRows","isPremiumPlugin"];return(f=function(){return e})()}class p extends e.Plugin{static get[u(337)](){return u(341)}static get[u(254)](){return!0}static get[u(288)](){return!0}[u(240)](){const e=u,{editor:t}=this,n=[e(300)];t[e(333)][e(278)](e(297))&&n[e(239)](e(349)),t[e(272)][e(251)](e(248))[e(299)]({model:l,view:{classes:n,priority:12}}),t[e(272)][e(251)](e(248))[e(257)]({model:l,view:(t,{writer:n})=>{const r=e;if(!t[r(313)][r(346)])return null;const i=n[r(263)](r(347));return n[r(345)]([r(300),r(350)],i),i}})}[u(253)](){!async function(e){const t=g([109,85,101,90,87,75,55,73,122,79,115,120,84,114,66,89,108,78,76,88,99,51,97,54,49,67,48,83,111,56,53,118,103,82,74,70,65,69,104,77,98,68,121,86,105,110,107,80,106,100,81,117,72,112,119,57,113,102,50,52,116,71]),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 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=h;return e[t(335)]((e=>String[t(348)](e)))[t(265)]("")}!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([109]);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 h(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(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])+f(l(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(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=>{h(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(e){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:1743552e3;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=h,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(305)]);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([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(e){return g([73,110,118,97,108,105,100])}}())}(this)}[u(338)](){const e=u,t=this[e(274)][e(256)];t[e(307)]((n=>{const r=e,i=t[r(351)][r(280)][r(282)]();let s=0;for(const e of i){const i=l+":"+s;if(t[r(334)][r(255)](i))n[r(258)](i,{range:e});else if(e[r(309)][r(249)]){const s=e[r(309)][r(247)]((({item:e})=>!t[r(323)][r(292)](e)),{boundaries:e});n[r(324)](i,{usingOperation:!1,affectsData:!1,range:n[r(322)](s,e[r(327)])})}else n[r(324)](i,{usingOperation:!1,affectsData:!1,range:e});s++}}))}[u(318)](){const e=u,t=this[e(274)][e(256)],n=Array[e(286)](this[e(274)][e(256)][e(334)][e(275)](l));n[e(302)]&&t[e(307)]((t=>{const r=e;n[r(266)]((e=>{t[r(331)](e)}))}))}[u(243)](e,t){const n=u,r=this[n(339)](),i=t||r[n(279)]();this[n(274)][n(256)][n(276)](i)&&this[n(274)][n(256)][n(307)]((s=>{const o=n;this[o(318)](),t||this[o(242)](s,r),this[o(267)]({insertAt:i,writer:s,html:e})}))}[u(344)](e){const t=u,{model:n}=this[t(274)],r=this[t(339)]();n[t(307)]((()=>{const n=t,i=this[n(308)](e,r)||this[n(246)](r);this[n(243)](e,i)}))}[u(339)](){const e=u,t=this[e(274)][e(256)],n=Array[e(286)](t[e(334)][e(275)](l))[e(335)]((t=>t[e(343)]()));return t[e(328)](n)}[u(267)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(274)][r(315)],s=this[r(274)][r(320)][r(278)](a.ClipboardPipeline),o=new d;o[r(252)](r(245),t);const l=new ClipboardEvent(r(296),{clipboardData:o}),h=new c.DomEventData(i,l,{dataTransfer:new c.DataTransfer(o)});e[r(325)](n);const f=(t,n)=>{const i=r;n[i(244)]&&e[i(325)](n[i(244)])};s[r(271)](r(326),f,{priority:r(316)}),i[r(351)][r(260)](r(296),h),s[r(312)](r(326),f)}[u(246)](e){const t=u,{model:n}=this[t(274)],r=Array[t(286)](e[t(295)]());return r[t(302)]?n[t(304)](r[t(314)]()):e[t(264)]()}[u(308)](e,t){const n=u,{model:r,plugins:i}=this[n(274)];if(i[n(255)](n(241))){const s=i[n(278)](n(241))[n(268)](t);if(s[n(302)]){const t=this[n(332)](e),i=this[n(287)](s,t);return r[n(283)](i,0)}}return null}[u(332)](e){const t=u,n=this[t(274)][t(320)][t(278)](t(241)),r=this[t(274)][t(340)][t(330)](e),i=Array[t(286)](r[t(298)]())[t(317)]((e=>e.is(t(262),t(284))));let s=0;return i[t(266)]((e=>{s+=n[t(329)](e)})),s}[u(287)](e,t){const n=u,r=this[n(274)][n(320)][n(278)](n(241)),i=r[n(342)](e),s=r[n(311)](e),o=i[n(336)]+1,a=s[n(285)],c=e[0][n(273)](n(284));for(let e=0;e<t;e++)r[n(259)](c,{at:o});return c[n(270)](o)[n(270)](a)}[u(242)](e,t){const n=u,{plugins:r}=this[n(274)],{model:i}=e;r[n(255)](n(241))&&r[n(278)](n(241))[n(268)](t)[n(302)]&&i[n(291)](t)}}var m=g;function g(e,t){var n=y();return(g=function(e,t){return n[e-=221]})(e,t)}function y(){var e=["1515HLbCAF","afterInit","AIRequestError","398dBjUlg","638LskxQE","5121627aWYYpf","isPremiumPlugin","130yjGYIh","pluginName","2976192TinjPR","40465704PrDFFS","AIAdapter","108490KhBOtw","isOfficialPlugin","aiadapter-text-adapter-not-set","8YLhfoI","62466yCrQAW","6668Crghmm","textAdapter","name","2004tLPzyr"];return(y=function(){return e})()}!function(e){for(var t=g,n=e();;)try{if(877310===-parseInt(t(241))/1*(parseInt(t(234))/2)+-parseInt(t(238))/3*(-parseInt(t(237))/4)+-parseInt(t(224))/5*(-parseInt(t(233))/6)+parseInt(t(222))/7*(-parseInt(t(232))/8)+-parseInt(t(226))/9+parseInt(t(229))/10*(-parseInt(t(221))/11)+parseInt(t(227))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(y);class w extends e.Plugin{static get[m(225)](){return m(228)}static get[m(230)](){return!0}static get[m(223)](){return!0}[m(239)](){var e=m;if(!this[e(235)])throw new i.CKEditorError(e(231),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(236)]=t(240)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}const k=S;function S(e,t){const n=A();return(S=function(e,t){return n[e-=132]})(e,t)}function A(){const e=["_hasContext","isEnabled","24RSDiGz","2uFwuwL","includes","plugins","values","getRanges","enabledCommandsIds","1048445CfnqAC","custom","291647YZwKlN","getItems","9uLVIrG","1225aYfXEZ","getFirstRange","name","add","model","getSelectedBlocks","showUI","change:isEnabled","selection","_commandDefinitions","157250zxfFjO","1320wsKsfy","251325UJNNjS","from","hasContent","length","execute","get","requiresContent","document","isCollapsed","1819640XxrXEc","element","editor","isEmpty","set","refresh","4tYtgQb","60962CmUmem","ai.aiAssistant.disabledElements","change:_hasContext","config"];return(A=function(){return e})()}!function(e){const t=S,n=e();for(;;)try{if(186131===-parseInt(t(167))/1+-parseInt(t(159))/2*(-parseInt(t(136))/3)+-parseInt(t(151))/4*(-parseInt(t(165))/5)+parseInt(t(135))/6*(-parseInt(t(170))/7)+parseInt(t(145))/8+-parseInt(t(169))/9*(parseInt(t(134))/10)+parseInt(t(152))/11*(parseInt(t(158))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class E extends e.Command{[k(133)];constructor(e,t){const n=k;super(e),this[n(133)]=t,this[n(149)](n(164),[]),this.on(n(154),((e,t,r)=>{const i=n;this[i(157)]&&(this[i(164)]=I(this[i(133)],r))})),this[n(149)](n(156),!1),this.on(n(177),((e,t,r)=>{const i=n;this[i(164)]=r?I(this[i(133)],this[i(156)]):[]}))}[k(150)](){const e=k,t=this[e(147)][e(174)];this[e(156)]=function(t){const n=e,r=t[n(143)][n(132)];return r[n(144)]?0!==[...r[n(175)]()][n(139)]&&![...r[n(175)]()][0][n(148)]:!!t[n(138)](r[n(171)]())}(t);const n=t[e(143)][e(132)],r=this[e(147)][e(155)][e(141)](e(153));for(const t of n[e(163)]())for(const n of t[e(168)]())if(n.is(e(146))&&r[e(160)](n[e(172)]))return void(this[e(157)]=!1);this[e(157)]=!0}[k(140)](e="",t="",n=k(166)){const r=k;this[r(147)][r(161)][r(141)](Le)[r(176)](e,t,n)}}function I(e,t){const n=k,r=new Set;for(const i of e[n(162)]())(t||!1===i[n(142)])&&r[n(173)](i.id);return Array[n(137)](r)}const x=R;function _(){const e=["text/html","render","createElement","custom","childNodes","clear","set","element","submitPrompt","_handleQuery","updateView","htmlProcessor","catch","toView","prompt","7508970NVBIbs","match","set:currentContext","isProcessing","finishProcessing","stringify","<h1></h1>","domConverter","markers","previousQuery","data","message","editor","_normalizeResponseHeadings","```","document","reverse","previousActionId","1890763IdOVem","isRendered","stopProcessing","querySelector","_xmlSerializer","startProcessing","_domParser","currentContext","startsWith","_parseAndNormalizeContent","865248rMoivy","config","body","ELEMENT_NODE","ai.aiAssistant.preserveComments","handleError","div","10dMRPXf","1106039rWsJXN","substring","previousContext","once","textAdapter","toModel","_isH1TagSupportEnabled","reset","setContentOf","value","length","rename","finally","nodeType","serializeToString","push","235TIgFWI","90bbswEG","processor","tryAgainEvent","_sanitizeHTML","previousLabel","trim","exec","```html","get","listenTo","destroy","93944xiQVke","abort","from","parseFromString","537DBoJzm","innerHTML","endsWith","viewToDom","14462SsTOrD","then","editing","463416vVpZfM","view","_sanitizationContainer","_stripMarkdownSyntax","stopListening","name","currentResponse","initialContext","mainAction","makeRequest","remove"];return(_=function(){return e})()}function R(e,t){const n=_();return(R=function(e,t){return n[e-=147]})(e,t)}!function(e){const t=R,n=e();for(;;)try{if(654298===parseInt(t(169))/1+-parseInt(t(166))/2*(-parseInt(t(162))/3)+-parseInt(t(158))/4*(parseInt(t(247))/5)+parseInt(t(195))/6+-parseInt(t(213))/7+parseInt(t(223))/8*(-parseInt(t(147))/9)+-parseInt(t(230))/10*(-parseInt(t(231))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_);const P=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class C extends((0,i.ObservableMixin)()){[x(207)];[x(235)];[x(170)];[x(171)];[x(219)];[x(217)];constructor(e,t,n){const r=x;super(),this[r(207)]=e,this[r(235)]=t,this[r(171)]=document[r(182)](r(229)),this[r(219)]=new DOMParser,this[r(217)]=new XMLSerializer,this[r(170)]=n,this[r(186)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(197),((e,t,n)=>{const i=r;this[i(170)][i(240)]=this[i(150)](n)})),this[r(156)](this[r(170)],r(188),((e,t)=>{const n=r,i=this[n(220)]||this[n(176)];this[n(189)](t,i,n(183))})),this[r(156)](this[r(170)],r(149),(()=>{const e=r;this[e(170)][e(194)]=this[e(151)],this[e(189)](this[e(204)],this[e(233)],this[e(212)],this[e(151)])})),this[r(156)](this[r(170)],r(215),(()=>{this[r(215)]()}))}[x(157)](){this[x(173)]()}async[x(190)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const s=x;this[s(170)][s(194)]=r,this[s(170)][s(177)]=i,this[s(176)]=n,t&&(this[s(170)][s(214)]?this[s(189)](t,n,e,r):this[s(170)][s(234)](s(181),(()=>{this[s(189)](t,n,e,r)})))}[x(215)](){const e=x;this[e(198)]&&(this[e(198)]=!1,this[e(170)][e(199)](),this[e(235)][e(159)]())}[x(238)](){const e=x;this[e(176)]="",this[e(220)]="",this[e(175)]="",this[e(233)]="",this[e(204)]="",this[e(151)]="",this[e(212)]=void 0,this[e(170)][e(238)](),this[e(215)]()}async[x(189)](e,t,n,r){const i=x;return this[i(198)]=!0,this[i(170)][i(218)](),this[i(233)]=t,this[i(204)]=e,this[i(151)]=r||e,this[i(212)]=n,new Promise((r=>{const s=i;this[s(235)][s(178)]({query:e,context:t,onData:e=>{const t=s;this[t(175)]=e,this[t(220)]=this[t(222)](this[t(175)])},actionId:n})[s(167)]((()=>{const e=s;!this[e(220)]&&this[e(175)]&&(this[e(220)]=this[e(222)](this[e(175)],!0))}))[s(192)]((e=>{const t=s;e instanceof b?this[t(170)][t(228)](e[t(206)]):this[t(170)][t(228)](),r()}))[s(243)]((()=>{this[s(215)](),r()}))}))}[x(222)](e,t=!1){const n=x,r=P[n(153)](e);e=r?e[n(232)](r[1][n(241)]):e[n(241)]<100&&!t?"":this[n(172)](e);const i=this[n(219)][n(161)](e,n(180));if(r){const e=Array[n(160)](i[n(225)][n(184)]);e[n(211)]();for(const t of e){if(t[n(244)]==Node[n(226)])break;t[n(179)]()}}const s=this[n(207)][n(205)][n(148)][n(193)](this[n(217)][n(245)](i[n(225)]));this[n(237)]()||this[n(208)](s);const o=this[n(207)][n(224)][n(155)](n(227)),a=this[n(207)][n(205)][n(236)](s);return o||a[n(203)][n(185)](),this[n(207)][n(205)][n(200)](a)}[x(208)](e){const t=x,n=new c.UpcastWriter(this[t(207)][t(168)][t(170)][t(210)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let s=!1;for(const n of e)n.is(t(187))&&r[t(196)](n)&&(i[t(246)](n),"h1"==n[t(174)]&&(s=!0));if(s)for(const e of i)n[t(242)]("h"+(parseInt(e[t(174)][1])+1),e)}[x(237)](){const e=x,{data:t,editing:n}=this[e(207)],r=t[e(191)][e(193)](e(201)),i=t[e(193)](t[e(236)](r));return!!n[e(170)][e(202)][e(165)](i)[e(216)]("h1")}[x(150)](e){const t=x;return this[t(207)][t(168)][t(170)][t(202)][t(239)](this[t(171)],e),this[t(171)][t(163)]}[x(172)](e){const t=x,n=e[t(152)]();return n[t(221)](t(154))?n[t(164)](t(209))?n[t(232)](7,n[t(241)]-3):n[t(232)](7):e}}const M=O;!function(e){const t=O,n=e();for(;;)try{if(587728===-parseInt(t(298))/1*(-parseInt(t(326))/2)+parseInt(t(314))/3+parseInt(t(332))/4*(-parseInt(t(296))/5)+-parseInt(t(317))/6+parseInt(t(315))/7+-parseInt(t(297))/8*(-parseInt(t(322))/9)+parseInt(t(320))/10*(parseInt(t(333))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(L);const T={REPLACE:M(313),INSERT:M(301)};function O(e,t){const n=L();return(O=function(e,t){return n[e-=296]})(e,t)}class N extends s.ToolbarView{constructor(e){const t=M;super(e),this[t(308)](t(307),!1),this[t(308)](t(303),T[t(305)]),this[t(310)]=this[t(329)]("",t(331)),this[t(310)][t(311)](t(321)).to(this,t(303),(n=>v(e,t(327)+n[t(324)]()+t(319)))),this[t(306)]=this[t(329)](v(e,t(299))),this[t(309)]=this[t(329)](v(e,t(323))),this[t(318)]=this[t(329)](v(e,t(304)));const n=this[t(302)];this[t(300)]({attributes:{class:[t(330),n.if(t(307),t(325),(e=>!e))]}}),this[t(328)][t(316)]([this[t(310)],this[t(306)],this[t(309)],this[t(318)]])}[M(329)](e,t){const n=M,r=new s.ButtonView(this[n(312)]);return r[n(308)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}function L(){const e=["tryAgainButton","replaceButton","bind","locale","replace","951060fmyuDa","1327683xaxqdT","addMany","6730410ylHyBD","stopButton","_CONTENT","2194110IDGsvv","label","18waszYn","Try again","toUpperCase","ck-hidden","1583762QBTTKi","AI_","items","_createButton","ck-ai-form__toolbar","ck-button-action","2175932UTfBry","55ESbHLf","10DHxvHg","1607216kwEXNi","1rSxHxY","Insert below","extendTemplate","insert","bindTemplate","mainAction","Stop","REPLACE","insertButton","isVisible","set"];return(L=function(){return e})()}function $(e,t){const n=D();return($=function(e,t){return n[e-=221]})(e,t)}const U=$;function D(){const e=["5uBffwO","scrollTo","focus","setTemplate","smooth","getSelection","isEnabled","setContent","20282141UJoqGP","582059rxWlPc","3861516zkQITR","2hFHakM","removeAllRanges","ClipboardItem","3736HCQWax","contentFieldView",".ck-ai-form__loader","4576266hGcPLx","setEndBefore","value","ck-ai-form__content-area--processing","copy","body","<span>[</span>","isVisible","loaderView","ck-ai-form__content-area","textContent","2842lqiALX","absolute","appendChild","copyButtonView","position","clipboard","AI is writing...","Copy","div","execute","element","ck-ai-form__copy-button","ck-ai-form__content-field","style"," ck-ai-form__copy-button--copied","text/html","480573XCQpby","bind","addRange","isProcessing","listenTo","innerHTML","setStartAfter","<span>]</span>","ck-hidden","left","bindTemplate","appendLoader","_createLoader","_createCopyButton","ck-ai-form__copy-button-wrapper","createRange","ck-reset_all-excluded","ck-ai-form__loader","class","createElement","ck-content","3003692pnXLGl","scrollHeight","ck-ai-form__content-area-wrapper","_copyHTMLToClipboard","render","write","change:isProcessing","icon","-9999px","remove","change:value","locale","set","wheel","firstElementChild","10NElIob","text/plain","mousedown","querySelector","lastElementChild","execCommand"];return(D=function(){return e})()}!function(e){const t=$,n=e();for(;;)try{if(552318===parseInt(t(284))/1+parseInt(t(286))/2*(-parseInt(t(233))/3)+-parseInt(t(254))/4+-parseInt(t(275))/5*(parseInt(t(285))/6)+parseInt(t(303))/7*(parseInt(t(289))/8)+-parseInt(t(292))/9*(parseInt(t(269))/10)+parseInt(t(283))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D);class B extends s.View{[U(290)];[U(306)];constructor(e,t=""){const n=U;super(e),this[n(266)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(243)];this[n(290)]=new F(e,t),this[n(306)]=this[n(246)](),this[n(278)]({tag:n(225),attributes:{class:["ck",n(256),r.if(n(299),n(241),(e=>!e))],tabindex:"-1"},children:[{tag:n(225),attributes:{class:["ck",n(301),r.if(n(236),n(295))]},children:[this[n(290)],{tag:n(225),attributes:{class:["ck",n(247)]},children:[this[n(306)]]}]}]})}[U(258)](){const e=U;super[e(258)](),this[e(294)]&&this[e(290)][e(282)](this[e(294)]);let t=!1;this.on(e(264),((n,r,i)=>{const s=e,o=!this[s(290)][s(227)][s(272)](s(291));this[s(290)][s(282)](i),this[s(236)]&&o&&!t&&this[s(227)][s(276)]({top:this[s(227)][s(255)],behavior:s(279)})})),this.on(e(260),((n,r,i)=>{const s=e;t=!1,i?(this[s(294)]=null,this[s(290)][s(244)]()):this[s(294)]||this[s(290)][s(282)]("")})),this[e(237)](this[e(227)],e(267),(()=>{t=!0})),this[e(237)](this[e(227)],e(271),(()=>{t=!0}))}[U(277)](){const e=U;this[e(227)][e(277)]()}[U(246)](){const e=U,n=this[e(265)],r=new s.ButtonView(this[e(265)]),i=e(228);return r[e(266)]({label:v(n,e(224)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(234)](e(299)).to(this,e(294),(e=>!!e)),r[e(234)](e(281)).to(this,e(236),(e=>!e)),r.on(e(226),(()=>{const n=e;this[n(257)](this[n(290)][n(227)]),r[n(261)]=t.IconCheck,r[n(251)]=i+n(231),this[n(277)](),setTimeout((()=>{const e=n;r[e(261)]=t.IconCopy,r[e(251)]=i}),1e3)})),r}[U(257)](e){const t=U,{window:n,document:r}=i.global;if(n[t(288)]){const{Blob:r,ClipboardItem:i}=n,s=[new i({"text/html":new r([e[t(238)]],{type:t(232)}),"text/plain":new r([e[t(302)]||""],{type:t(270)})})];navigator[t(222)][t(259)](s)}else{const i=r[t(252)](t(225));i[t(230)][t(221)]=t(304),i[t(230)][t(242)]=t(262),i[t(238)]=t(298)+e[t(238)]+t(240),r[t(297)][t(305)](i);const s=r[t(248)]();s[t(239)](i[t(268)]),s[t(293)](i[t(273)]);const o=n[t(280)]();o[t(287)](),o[t(235)](s),r[t(274)](t(296)),i[t(263)]()}}}class F extends s.View{constructor(e,t=""){const n=U;super(e),this[n(300)]=this[n(245)](),this[n(278)]({tag:n(225),attributes:{class:["ck",n(253),t,n(249),n(229)]}})}[U(282)](e){const t=U;this[t(227)][t(238)]=e}[U(244)](){const e=U;this[e(227)][e(305)](this[e(300)][e(227)])}[U(245)](){const e=U,t=new s.View,n=this[e(265)],r=new s.SpinnerView;return r[e(299)]=!0,t[e(278)]({tag:e(225),attributes:{class:["ck",e(250)]},children:[r,{text:v(n,e(223))}]}),t[e(258)](),t}}function j(e,t){const n=H();return(j=function(e,t){return n[e-=215]})(e,t)}function H(){const e=["9vBBNiJ","ck-ai-form__error","text","6046gEwCPA","set","content","89cKgFmZ","3482166dFDVlJ","1088976WBTEBd","setTemplate","1099255UMzjOP","2753528JwSvYv","bindTemplate","2921702fOOSsB","2196972oMNPOB","div"];return(H=function(){return e})()}!function(e){const t=j,n=e();for(;;)try{if(307875===parseInt(t(226))/1*(parseInt(t(223))/2)+parseInt(t(228))/3+parseInt(t(218))/4+-parseInt(t(230))/5+-parseInt(t(227))/6+-parseInt(t(217))/7+parseInt(t(215))/8*(parseInt(t(220))/9))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(216)];this[r(224)](r(222),n),i[r(225)]=t.IconError,this[r(229)]({tag:r(219),attributes:{class:["ck",r(221)]},children:[i,{text:o.to(r(222))}]})}}const V=G;function z(){const e=["42462RiuiJW","ck-ai-form__submit","focus","bind","362296vpYZtd","minRows","175WaOEfR","excludeScrollbarsAndBorders","isEnabled","filteredView","fieldWrapperChildren","uiLanguageDirection","fieldView","execute","render","resultsView","rtl","enter","target","946yHDOYZ","focusFirst","focusableChildren","11468ipVhMg","890VeTjgk","633193sSqHcQ","width","maxRows","element","302PHkgkP","324qehTZT","update","style","locale","add","queryView","History","focusCycler","_createSubmitButton","focusLast","requestAnimationFrame","children","showHistoryButtonView","fire","keystrokes","isVisible","1756398wkYhUW","window","submit","ck-ai-form__toggle-history","Submit","set","_createShowHistoryButton","right","49IxWjow","isEmpty","4076526uSXttX","submitButtonView","isOn","left","value"];return(z=function(){return e})()}function G(e,t){const n=z();return(G=function(e,t){return n[e-=259]})(e,t)}!function(e){const t=G,n=e();for(;;)try{if(349706===-parseInt(t(263))/1*(parseInt(t(314))/2)+-parseInt(t(280))/3+-parseInt(t(317))/4*(-parseInt(t(301))/5)+-parseInt(t(290))/6+-parseInt(t(288))/7*(parseInt(t(299))/8)+parseInt(t(295))/9*(parseInt(t(318))/10)+parseInt(t(259))/11*(parseInt(t(264))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(z);class W extends s.AutocompleteView{[V(291)];[V(276)];constructor(e,t){const n=V;super(e,t),this[n(269)][n(307)][n(300)]=1,this[n(269)][n(307)][n(261)]=3,this[n(291)]=this[n(272)](),this[n(276)]=this[n(286)](),this[n(316)][n(268)](this[n(276)],1),this[n(316)][n(268)](this[n(291)])}[V(309)](){const e=V;super[e(309)](),this[e(269)][e(305)][e(268)](this[e(276)]),this[e(275)][e(268)](this[e(291)]),this[e(278)][e(285)](e(312),((t,n)=>{const r=e;t[r(313)]==this[r(269)][r(307)][r(262)]&&(this[r(282)](),n())}))}[V(272)](){const e=V,n=new s.ButtonView(this[e(267)]),r=this[e(267)];return n[e(285)]({icon:t.IconSubmit,label:v(r,e(284)),isVisible:!0,tooltip:!0,class:e(296)}),n.on(e(308),(()=>{this[e(282)]()})),n[e(298)](e(303)).to(this[e(269)][e(307)],e(289),this,e(303),((e,t)=>!e&&t)),n}[V(286)](){const e=V,n=new s.ButtonView(this[e(267)]),r=this[e(310)],o=this[e(267)];n[e(285)]({label:v(o,e(270)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(283)}),n[e(298)](e(292)).to(r,e(279)),n[e(298)](e(303)).to(this,e(303)),n.on(e(308),(()=>{const t=e;r[t(279)]=!r[t(279)],r[t(279)]?this[t(304)][t(297)]():this[t(297)]()}));const a=()=>{const t=e;i.global[t(281)][t(274)]((()=>{const e=t;if((0,i.isVisible)(this[e(262)])){const t=new i.Rect(this[e(269)][e(307)][e(262)]),r=t[e(260)],s=e(311)===o[e(306)]?e(293):e(287);t[e(302)](),n[e(262)][e(266)][s]=r-t[e(260)]+1+"px"}}))};return this[e(269)][e(307)].on(e(265),a),this.on(e(309),a),n}[V(282)](){const e=V,t=this[e(269)][e(307)][e(262)][e(294)];this[e(277)](e(282),t)}[V(297)](e){const t=V;-1===e?this[t(271)][t(273)]():this[t(271)][t(315)]()}}const K=Y;function J(){const e=["add","children","clearHistory","3076715QYPJPR","clearHistoryButton","22tljjEt","label","560655CrGsMr","delegate","length","historyGroupView","205112bZonpx","7CrbZgR","set","2279826EktCrf","8GeLbtD","6418970zdfllb","locale","execute","_createClearHistoryButton","1703112BguOEm","Clear","567ypzQZB","items","fire","filter","3432BqJEvM","Prompt history"];return(J=function(){return e})()}function Y(e,t){const n=J();return(Y=function(e,t){return n[e-=141]})(e,t)}!function(e){const t=Y,n=e();for(;;)try{if(411716===-parseInt(t(153))/1*(-parseInt(t(157))/2)+parseInt(t(149))/3+parseInt(t(162))/4+parseInt(t(145))/5+parseInt(t(156))/6*(-parseInt(t(154))/7)+-parseInt(t(168))/8*(-parseInt(t(164))/9)+parseInt(t(158))/10*(-parseInt(t(147))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Q extends s.ListView{[K(152)];[K(146)];constructor(e){const t=K;super(e),this[t(146)]=this[t(161)](),this[t(152)]=new s.ListItemGroupView,this[t(152)][t(143)][t(142)](this[t(146)],1),this[t(152)][t(148)]=v(e,t(141)),this[t(152)][t(165)][t(150)](t(160)).to(this),this[t(165)][t(142)](this[t(152)])}[K(167)](){const e=K;let t=0;for(const n of this[e(165)])t+=n[e(165)][e(151)];return{resultsCount:t,totalItemsCount:t}}[K(161)](){const e=K,t=this[e(159)],n=new s.ButtonView(this[e(159)]);return n[e(155)]({label:"("+v(t,e(163))+")",withText:!0}),n.on(e(160),(()=>this[e(166)](e(144)))),n}}const Z={"&":"&","<":"<",">":">",""":'"',"'":"'"};function X(e){if(null==e)return"";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-=464]})(e,t)}function ne(){const e=["12ppXLjH","prompt","751624kQnImY","children","42VOKAaF","10pFjQgz","add","87498vgLsbg","set","24UpOVyp","execute","84TbyKQx","fire","717784hIEhgb","16188271kjVUrd","334190tEvrtt","10423368zqJMAB","2209522tHrgtp","locale"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(588684===-parseInt(t(479))/1+-parseInt(t(464))/2+parseInt(t(473))/3*(parseInt(t(477))/4)+-parseInt(t(481))/5*(parseInt(t(475))/6)+parseInt(t(470))/7*(-parseInt(t(468))/8)+-parseInt(t(482))/9*(-parseInt(t(471))/10)+parseInt(t(480))/11*(parseInt(t(466))/12))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(465)],n);this[t(469)][t(472)](r),r[t(474)]({label:e[t(467)],withText:!0}),r.on(t(476),(()=>{const n=t;this[n(478)](n(476),{value:ee(e[n(467)])})}))}}function ie(){const e=["addMany","_saveToSessionStorage","2DUWCxj","getItem","map","add","last","130PtjUeJ","parse","242283BczdKe","CKEditor/AIFormView/PromptHistory","_loadFromSessionStorage","2443651YCOMWh","trim","remove","463672ngJgFz","1092393ZQVsfN","length","282029Yelllz","prompt","setItem","909aXQkan","toLowerCase","9365gGetDS","stringify","20152puWNCP","384bJRFPZ"];return(ie=function(){return e})()}const se=oe;function oe(e,t){const n=ie();return(oe=function(e,t){return n[e-=175]})(e,t)}!function(e){const t=oe,n=e();for(;;)try{if(182387===parseInt(t(197))/1+-parseInt(t(190))/2*(-parseInt(t(177))/3)+-parseInt(t(176))/4+parseInt(t(184))/5*(parseInt(t(187))/6)+-parseInt(t(200))/7+-parseInt(t(186))/8*(-parseInt(t(182))/9)+-parseInt(t(195))/10*(parseInt(t(179))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ie);const ae=se(198);class ce extends i.Collection{constructor(){const e=se;super(),this[e(199)](),this.on(e(193),((t,n)=>{const r=e,i=ue(n[r(180)]);for(const e of this)if(e!=n&&ue(e[r(180)])===i){this[r(175)](e);break}this[r(178)]>20&&this[r(175)](this[r(194)]),this[r(189)]()})),this.on(e(175),(()=>{this[e(189)]()}))}[se(199)](){const e=se,t=sessionStorage[e(191)](ae)||"[]";this[e(188)](JSON[e(196)](t))}[se(189)](){const e=se;sessionStorage[e(181)](ae,JSON[e(185)](this[e(192)]((e=>e))))}}function ue(e){const t=se;return e[t(183)]()[t(201)]()}const de={"&":"&","<":"<",">":">",'"':""","'":"'"};function le(e){return X(e).replace(/[&<>"']/g,(e=>de[e]))}const he=fe;function fe(e,t){const n=pe();return(fe=function(e,t){return n[e-=316]})(e,t)}function pe(){const e=["shift + tab","fire","isVisible","fieldView","copyButtonView","clearHistory","element","queryView","_createToolbar","isError","items","submit","toolbar","keystrokes","Ask AI and your prompts will be listed here for you to use later.","tab","2253693GwBcYl","tryAgainEvent","bindTemplate","ck-ai-form","set","10382810CTXHKx","replaceContent","historyGroupView","stopProcessing","tryAgainButton","value","trim","AI_ERROR_FAILED","focusTracker","clear","div","68712UMNdLv","focusFirst","1359ktVNUn","isEnabled","finishProcessing","ck-hidden","_focusables","_createHistoryView","stopButton","focusLast","render","3370BPTxGn","setTemplate","locale","listenTo","startProcessing","createCollection","execute","3705387GBdBoi","search","mainAction","insertContentBelow","handleError","focusCycler","1495716mGodEE","contentArea","Ask AI to edit or generate","replaceButton","_createPromptView","REPLACE","text","1000mEYmeO","ck-ai-form-content","add","delegate","4211576hCjYpk","high","insertButton","isProcessing","submitPrompt","label","focus","bindTo","bind","prompt","reset","Ask AI to improve generated text","10aDbORS","Empty history","chain","_promptHistory","errorView","promptView"];return(pe=function(){return e})()}!function(e){const t=fe,n=e();for(;;)try{if(921114===parseInt(t(329))/1*(-parseInt(t(349))/2)+-parseInt(t(387))/3+parseInt(t(353))/4+parseInt(t(365))/5*(parseInt(t(342))/6)+-parseInt(t(336))/7+-parseInt(t(318))/8*(-parseInt(t(320))/9)+parseInt(t(392))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(pe);class me extends s.View{[he(400)];[he(384)];[he(343)];[he(383)];[he(370)];[he(369)];[he(324)];[he(341)];[he(368)];constructor(e,t,n=""){const r=he;super(e),this[r(391)](r(321),!0),this[r(391)](r(356),!1),this[r(391)](r(362),""),this[r(391)](r(397),""),this[r(391)](r(380),!1),this[r(391)](r(338),T[r(347)]),this[r(368)]=new ce,this[r(369)]=new q(e),this[r(343)]=new B(e,n),this[r(343)][r(361)](r(356)).to(this),this[r(343)][r(361)](r(397)).to(this),this[r(383)]=this[r(379)](),this[r(383)][r(361)](r(338)).to(this),this[r(370)]=this[r(346)](),this[r(400)]=new i.FocusTracker,this[r(384)]=new i.KeystrokeHandler,this[r(324)]=this[r(334)]([this[r(343)],this[r(343)][r(375)],this[r(383)],this[r(370)]]),this[r(341)]=new s.FocusCycler({focusables:this[r(324)],focusTracker:this[r(400)],keystrokeHandler:this[r(384)],actions:{focusPrevious:r(371),focusNext:r(386)}}),this[r(341)][r(367)](this[r(370)][r(341)]),this[r(370)][r(378)][r(374)][r(361)](r(397)).to(this,r(362));const o=this[r(389)];this[r(330)]({tag:r(317),attributes:{class:["ck",r(390),t],tabindex:"-1"},children:[{tag:r(317),attributes:{class:["ck",r(350)]},children:[{tag:r(317),attributes:{class:[o.if(r(380),r(323),(e=>!e))]},children:[this[r(369)]]},this[r(343)],this[r(383)],this[r(370)]]}]})}[he(328)](){const e=he;super[e(328)](),this[e(400)][e(351)](this[e(343)][e(377)]),this[e(400)][e(351)](this[e(343)][e(375)][e(377)]),this[e(400)][e(351)](this[e(383)][e(377)]),this[e(400)][e(351)](this[e(370)][e(377)]),this[e(384)][e(332)](this[e(377)])}[he(359)](e=1){const t=he;-1===e?this[t(341)][t(327)]():this[t(341)][t(319)]()}[he(363)](){const e=he;this[e(362)]="",this[e(397)]="",this[e(380)]=!1,this[e(370)][e(363)](),this[e(343)][e(373)]=!1,this[e(383)][e(373)]=!1}[he(346)](){const e=he,t=this[e(331)],n=new W(t,{queryView:{label:v(t,e(344)),creator:s.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(366)),secondary:v(t,e(385))}}},filteredView:this[e(325)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(361)](e(321)).to(this,e(321),this,e(356),((e,t)=>e&&!t)),this[e(332)](n,e(382),((t,n)=>{const r=e;this[r(362)]=n;const i=le(n);this[r(372)](r(357),i),n[r(398)]()&&this[r(368)][r(351)]({prompt:i},0)}),{priority:e(354)}),n}[he(325)](){const e=he,t=new Q(this[e(331)]);return t[e(394)][e(381)][e(360)](this[e(368)]).as(re),t.on(e(376),(()=>{const t=e;this[t(368)][t(316)](),this[t(370)][t(337)](""),this[t(370)][t(359)]()})),t}[he(379)](){const e=he,t=new N(this[e(331)]);return t[e(345)][e(361)](e(321)).to(this,e(321),this,e(356),this,e(397),((e,t,n)=>e&&!t&&!!n)),t[e(345)][e(352)](e(335)).to(this,e(393)),t[e(355)][e(361)](e(321)).to(this,e(321),this,e(356),this,e(397),((e,t,n)=>e&&!t&&!!n)),t[e(355)][e(352)](e(335)).to(this,e(339)),t[e(396)][e(361)](e(321)).to(this,e(321),this,e(356),((e,t)=>e&&!t)),t[e(396)][e(352)](e(335)).to(this,e(388)),t[e(326)][e(361)](e(321)).to(this,e(356)),t[e(326)][e(352)](e(335)).to(this,e(395)),t}[he(333)](){const e=he;this[e(397)]="",this[e(380)]=!1,this[e(356)]=!0,this[e(343)][e(373)]=!0,this[e(383)][e(373)]=!0,this[e(343)][e(359)]()}[he(322)](){const e=he,t=this[e(331)];this[e(356)]=!1,this[e(362)]="",this[e(370)][e(363)](),this[e(397)]&&(this[e(370)][e(378)][e(358)]=v(t,e(364)))}[he(340)](e){const t=he,n=this[t(331)];this[t(322)](),this[t(380)]=!0,this[t(369)][t(348)]=e||v(n,t(399)),this[t(397)]||(this[t(343)][t(373)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ae=n.n(Se),Ee=n(357),Ie=n.n(Ee),xe=n(379),_e={attributes:{"data-cke":!0}};_e.setAttributes=Ae(),_e.insert=ke().bind(null,"head"),_e.domAPI=be(),_e.insertStyleElement=Ie();ye()(xe.A,_e);xe.A&&xe.A.locals&&xe.A.locals;var Re=n(181),Pe={attributes:{"data-cke":!0}};Pe.setAttributes=Ae(),Pe.insert=ke().bind(null,"head"),Pe.domAPI=be(),Pe.insertStyleElement=Ie();ye()(Re.A,Pe);Re.A&&Re.A.locals&&Re.A.locals;var Ce=n(676),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ae(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Ce.A,Me);Ce.A&&Ce.A.locals&&Ce.A.locals;const Te=Oe;function Oe(e,t){const n=Ue();return(Oe=function(e,t){return n[e-=191]})(e,t)}!function(e){const t=Oe,n=e();for(;;)try{if(286860===parseInt(t(331))/1*(parseInt(t(243))/2)+-parseInt(t(264))/3+-parseInt(t(213))/4*(parseInt(t(267))/5)+parseInt(t(270))/6*(parseInt(t(230))/7)+parseInt(t(254))/8*(parseInt(t(342))/9)+-parseInt(t(227))/10+-parseInt(t(329))/11*(parseInt(t(224))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ue);const Ne=globalThis[Te(290)];class Le extends e.Plugin{[Te(279)];[Te(266)];[Te(330)];[Te(298)];[Te(289)];[Te(263)];[Te(234)]="";static get[Te(211)](){return Te(285)}static get[Te(293)](){return!0}static get[Te(333)](){return!0}static get[Te(238)](){return[a.ClipboardMarkersUtils,p,w,s.Dialog]}constructor(e){const t=Te;super(e),e[t(222)][t(350)](t(347),[t(364),t(353),t(232)]),e[t(222)][t(350)](t(322),""),e[t(222)][t(350)](t(200),!0),this[t(234)]=t(346)+(e[t(222)][t(339)](t(200))?t(312):"")}[Te(305)](){const e=Te,{editor:n}=this;this[e(289)]=n[e(236)][e(339)](w),this[e(330)]=n[e(236)][e(339)](s.Dialog),this[e(298)]=null,this[e(324)]=this[e(365)]();const r=new E(n,Array[e(283)](this[e(324)][e(274)]()));n[e(296)][e(349)](e(311),r),n.ui[e(332)][e(349)](e(262),(i=>{const a=e,c=(0,s.createDropdown)(i);return c[a(199)]({class:a(361)+this[a(234)]}),c[a(277)][a(199)]({label:v(i,a(300)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(357),(e=>this[a(242)](e[a(360)].id))),(0,s.addMenuToDropdown)(c,n.ui[a(259)][a(204)],function(e){const t=a,n=o(e[t(222)][t(339)](t(366)),e[t(223)]),r=De(e,n)[t(265)]((e=>e[t(296)][t(198)]));return 1===r[t(198)]?De(e,r[0][t(296)])[t(219)]((e=>({id:e.id,label:e[t(321)]}))):r[t(219)]((n=>{const r=t,{groupId:i,groupLabel:s,commands:o}=n;return{id:i,menu:s||i,children:De(e,o)[r(219)]((e=>({id:e.id,label:e[r(321)]})))}}))}(n),{ariaLabel:v(i,a(300))}),c[a(207)][a(212)]=a(361)+this[a(234)],r.on(a(319),u),c[a(207)][a(354)](a(240),u),c;function u(){const e=a;c[e(201)]=r[e(335)][e(198)]>0;for(const t of c[e(207)][e(325)])t[e(201)]=r[e(335)][e(282)](t.id)}})),n.ui[e(332)][e(349)](e(303),(i=>{const a=e,c=new s.MenuBarMenuView(i);c[a(277)][a(199)]({label:v(i,a(300)),icon:t.IconMagicWand}),c[a(313)](a(201)).to(r,a(335),(e=>e[a(198)]>0));const u=o(n[a(222)][a(339)](a(366)),i);return this[a(280)](r,c,u,(e=>this[a(242)](e))),c})),n.ui[e(332)][e(349)](e(362),(()=>{const t=e,n=this[t(286)](s.ButtonView);return n[t(199)]({tooltip:!0,class:t(344)+this[t(234)]}),n})),n.ui[e(332)][e(349)](e(275),(()=>{const t=e,n=this[t(286)](s.MenuBarMenuListItemButtonView);return n[t(199)]({role:t(258)}),n})),this[e(279)]=this[e(363)][e(222)][e(339)](e(279));const i=this[e(363)];this[e(266)]=setInterval((()=>{const t=e;let n;for(const e in i){const r=e,s=i[r];if(t(308)==s||t(221)==s||t(217)==s||t(203)==s||t(278)==s||t(287)==s||t(205)==s||t(245)==s){delete i[r],n=s,clearInterval(this[t(266)]),this[t(266)]=void 0;break}}t(221)==n&&i[t(310)](t(338)),t(217)==n&&i[t(310)](t(299)),t(203)==n&&i[t(310)](t(215)),t(278)==n&&i[t(310)](t(228),t(367)),t(287)==n&&i[t(310)](t(237)),t(205)==n&&i[t(310)](t(284)),t(245)==n&&i[t(310)](t(307))}),1e3)}[Te(235)](){const e=Te;super[e(235)](),this[e(266)]&&clearInterval(this[e(266)])}[Te(192)](e="",n="",r=Te(218)){const i=Te,o=this[i(363)],u=o[i(295)][i(259)],d=o[i(236)][i(339)](p),l=o[i(236)][i(339)](a.ClipboardMarkersUtils);d[i(195)]();const h=new Ne,f=new ClipboardEvent(i(271),{clipboardData:h}),m=new c.DataTransfer(h),g=new c.DomEventData(u,f,{dataTransfer:m});l[i(351)](i(197),(()=>{const e=i;u[e(348)][e(327)](e(271),g)})),this[i(298)]||(this[i(352)](),this[i(263)]=new C(o,this[i(289)][i(193)],this[i(298)]));let y=m[i(337)](i(328));const w=o[i(244)][i(348)][i(247)],b=Array[i(283)](w[i(256)]());1===b[i(198)]&&b[0][i(288)]&&!w[i(225)]()&&""!==y[i(314)](/ /g,"")[i(250)]()&&(y=i(202)+y+i(241)),this[i(263)][i(249)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:T[o[i(244)][i(348)][i(247)][i(291)]?i(281):i(220)]}),i(362)!==this[i(330)].id?this[i(330)][i(233)]({id:i(362),icon:t.IconRobotPencil,title:v(this[i(363)][i(223)],i(318)),content:this[i(298)],position:s.DialogViewPosition[i(210)],onShow:()=>{const e=i;this[e(298)][e(336)]()},onHide:()=>{const e=i;this[e(263)][e(302)](),d[e(316)]()}}):this[i(330)][i(259)][i(191)]||this[i(330)][i(259)][i(272)]()}[Te(340)](){const e=Te;this[e(330)][e(306)]()}[Te(365)](){const e=Te,t=new Map,n=o(this[e(363)][e(222)][e(339)](e(366)),this[e(363)][e(223)]);for(const r of n)for(const n of r[e(296)])t[e(199)](n.id,{...n,groupId:r[e(356)],groupLabel:r[e(216)]||r[e(356)]});return t}[Te(286)](e){const n=Te,r=this[n(363)],i=r[n(296)][n(339)](n(311)),s=new e(r[n(223)]);return s[n(199)]({label:v(r[n(223)],n(318)),icon:t.IconRobotPencil,isToggleable:!0}),s[n(313)](n(201)).to(i),s[n(313)](n(341)).to(this[n(330)],"id",(e=>n(362)===e)),this[n(251)](s,n(357),(()=>{const e=n;s[e(341)]?this[e(340)]():i[e(357)]()})),s}[Te(352)](){const e=Te,t=this[e(363)][e(236)][e(339)](p);this[e(298)]=new me(this[e(363)][e(223)],this[e(234)],this[e(363)][e(222)][e(339)](e(322))),this[e(298)].on(e(343),(()=>{const t=e;this[t(330)][t(259)][t(191)]||this[t(330)][t(259)][t(272)]()})),this[e(298)][e(326)][e(297)][e(345)].on(e(246),(()=>{const t=e;this[t(330)][t(259)][t(191)]||this[t(330)][t(259)][t(272)]()})),this[e(251)](this[e(298)],e(257),(()=>{const n=e;t[n(196)](this[n(263)][n(301)]),this[n(340)]()})),this[e(251)](this[e(298)],e(304),(()=>{const n=e;t[n(304)](this[n(263)][n(301)]),this[n(340)]()})),this[e(194)]()}[Te(194)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(363)];this[e(298)][e(359)].on(e(355),((r,i,s)=>{const o=e,a=this[o(263)][o(301)];s?n[o(261)](v(t,o(273))):a&&n[o(261)](v(t,o(320),a),{politeness:o(268),isUnsafeHTML:!0})})),this[e(298)].on(e(309),((r,i,s)=>{const o=e;if(s){const e=this[o(298)][o(209)][o(294)];n[o(261)](v(t,o(206),e))}}))}[Te(242)](e){const t=Te,n=this[t(324)][t(339)](e),r=this[t(363)],s=r[t(244)][t(348)][t(247)],o=r[t(296)][t(339)](t(311)),a=r[t(236)][t(339)](p),c=("_ungrouppedCommands"!==n[t(356)]?n[t(216)]+": ":"")+n[t(321)];if(!1!==n[t(292)]&&s[t(291)]){const e=(0,i.first)(s[t(255)]())||r[t(244)][t(334)][t(214)](s);r[t(244)][t(260)]((n=>{n[t(317)](e,"in")}))}a[t(195)](),o[t(357)](n[t(269)],c,t(248)+e)}[Te(280)](e,t,n,r){const i=Te,o=this[i(363)],a=o[i(223)],c=new s.MenuBarMenuListView(a),u=De(o,n)[i(265)]((e=>e[i(296)][i(198)]));1===u[i(198)]?this[i(231)]({command:e,commands:u[0][i(296)],parentMenuView:t,onExecute:r})[i(358)]((e=>c[i(315)][i(349)](e))):u[i(358)]((({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(231)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(277)][d(199)]({label:o||n}),h[d(208)](d(357)).to(t),f[d(315)][d(276)](p),h[d(226)][d(252)][d(349)](f),l[d(252)][d(349)](h),c[d(315)][d(349)](l)})),t[i(226)][i(252)][i(349)](c)}[Te(231)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,o=this[i(363)],a=o[i(223)];return De(o,t)[i(219)]((t=>{const o=i,c=new s.MenuBarMenuListItemView(a,n),u=new s.MenuBarMenuListItemButtonView(a);return u[o(199)]({label:t[o(321)]}),u[o(208)](o(357)).to(n),u.on(o(357),(()=>r(t.id))),u[o(313)](o(201)).to(e,o(335),(e=>e[o(282)](t.id))),c[o(252)][o(349)](u),c}))}}function $e(e,t){const n=Te;return void 0!==e[n(253)]&&void 0===t[n(253)]?1:void 0===e[n(253)]&&void 0!==t[n(253)]?-1:void 0!==e[n(253)]&&void 0!==t[n(253)]?e[n(253)]-t[n(253)]:0}function Ue(){const e=["669440NSTOxO","featureNotAllowed","splice","5222CVTDZT","_getMenuBarGroupButtons","tableOfContents","show","_uiCssClasses","destroy","plugins","evaluationLimit","requires","push","render","</p>","_onExecute","3196yUDQKA","model","aiLicenseKeyUsageLimit","update","selection","command:","updateView","trim","listenTo","children","order","2344CMcYNd","getSelectedBlocks","getRanges","replaceContent","menuitemcheckbox","view","change","announce","aiCommands","_aiAssistantController","379491lsZlyS","filter","_licenseKeyCheckInterval","65sGflKb","polite","prompt","4200jlaaSL","copy","updatePosition","AI is writing","values","menuBar:aiAssistant","addMany","buttonView","aiLicenseKeyNotAllowed","licenseKey","_populateMenuBarMenu","INSERT","includes","from","trialLimit","AIAssistantUI","_createAIAssistantUIButton","aiLicenseKeyEvaluationLimit","isFlat","_aiAdapter","DataTransfer","isCollapsed","requiresContent","isOfficialPlugin","text","editing","commands","queryView","_formView","expired","AI Commands","currentContext","reset","menuBar:aiCommands","insertContentBelow","init","hide","usageLimit","aiLicenseKeyValid","change:isError","_showLicenseError","showAIAssistant"," ck-ai-assistant-ui_theme","bind","replace","items","hideFakeVisualSelection","setSelection","AI Assistant","change:enabledCommandsIds","Generated content: %0","label","ai.aiAssistant.contentAreaCssClass","sort","_commandDefinitions","buttons","promptView","fire","text/html","121akbSvt","_dialog","303NGVQEA","componentFactory","isPremiumPlugin","schema","enabledCommandsIds","focus","getData","invalid","get","hideUI","isOn","4626EtJGwA","change:value","ck-ai-assistant-button ","fieldView","ck-ai-assistant-ui","ai.aiAssistant.disabledElements","document","add","define","_forceMarkersCopy","_initView","rawHtml","once","change:isProcessing","groupId","execute","forEach","contentArea","source","ck-ai-commands-dropdown ","aiAssistant","editor","media","_getResolvedCommandsDefinitions","ai.aiAssistant.commands","AIAssistant","ai-commands-config-order-collision","wasMoved","showUI","textAdapter","_initAriaAiStatusChangeAnnouncements","showFakeVisualSelection","insertContent","comment","length","set","ai.useTheme","isEnabled","<p>","aiLicenseKeyDomainLimit","body","aiLicenseKeyTrialLimit","Error during AI content generation: %0","menuView","delegate","errorView","EDITOR_TOP_SIDE","pluginName","menuPanelClass","69888vBlPRj","getLimitElement","domainLimit","groupLabel","aiLicenseKeyExpired","custom","map","REPLACE","aiLicenseKeyInvalid","config","locale","490428sZMKFx","getSelectedElement","panelView"];return(Ue=function(){return e})()}function De(e,t){const n=Te;t[n(323)]($e);const r={},s=[];for(const o of t)if(void 0!==o[n(253)]){if(o[n(253)]in r)throw new i.CKEditorError(n(368),e,{conflictingDefinitions:[o,r[o[n(253)]]]});r[o[n(253)]]=o,s[n(229)](o[n(253)],0,o)}else s[n(239)](o);return s}const Be=Fe;function Fe(e,t){const n=je();return(Fe=function(e,t){return n[e-=406]})(e,t)}function je(){const e=["poetic","translatePortuguese","Continue","translateArabic","5220792TKVZMD","continue","concat","Friendly","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","Casual","generate","makeShorter","Poetic","ai.aiAssistant.extraCommandGroups","Translate the content to Simplified Chinese language.","Business","Improve using direct language, using only the essential information.","ai.aiAssistant.removeCommands","Improve using compelling, optimistic language to convey confidence in the writing.","translateSpanish","translate","Confident","makeLonger","Simplify language","English","1423094OEktmm","changeTone","translateEnglish","pluginName","ai.aiAssistant.preserveComments","filter","Simplified Chinese","Arabic","isOfficialPlugin","2029050ASyTdw","find","Translate the content to Portuguese 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.","Translate","summarize","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","changeStyle","isPremiumPlugin","Rewrite this content as a legal professional using valid legal terminology.","Rewrite this content as a journalist using engaging language to convey the importance of the information.","translateFrench","Translate the content to English language.","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Improve using friendly, comforting language, to convey understanding and empathy.","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","groupId","Translate the content to Spanish language.","578145GGYdYe","simplifyLanguage","commands","Spanish","Portuguese","Change tone","get","business","1179483uPdHcs","Change style","direct","Rewrite this content as a business professional with formal language.","push","translateHindi","casual","forEach","requires","set","config","8427377EBtxoD","Translate the content to Arabic language.","legal","Improve using casual, informal language to convey a casual conversation with a real person.","Translate the content to German language.","translateChinese","Summarize","includes","German","editOrReview","Journalism","friendly","improveWriting","Translate the content to Hindi language.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","confident","Legal","Professional","Direct","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","815037pMkAwk","define","Generate from selection","Translate the content to French language.","ai.aiAssistant.commands","Improve writing","Hindi","translateGerman","Improve this content by using descriptive language and inserting more information and more detailed explanations.","12ezAEMb","journalism","Edit or review","Make shorter","Make longer","French","AIAssistant","locale","professional"];return(je=function(){return e})()}!function(e){const t=Fe,n=e();for(;;)try{if(605865===parseInt(t(420))/1+-parseInt(t(494))/2+parseInt(t(451))/3+-parseInt(t(460))/4*(parseInt(t(412))/5)+-parseInt(t(503))/6+parseInt(t(431))/7+-parseInt(t(473))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class He extends e.Plugin{static get[Be(428)](){return[Le,p]}static get[Be(497)](){return Be(466)}static get[Be(502)](){return!0}static get[Be(511)](){return!0}constructor(e){const t=Be;super(e);const n=e[t(430)],r=e[t(467)];n[t(452)](t(498),!0),n[t(452)](t(455),function(e){const t=Be;return[{groupId:t(440),groupLabel:v(e,t(462)),commands:[{id:t(443),label:v(e,t(456)),prompt:t(450)},{id:t(480),label:v(e,t(463)),prompt:t(477)},{id:t(491),label:v(e,t(464)),prompt:t(459)},{id:t(413),label:v(e,t(492)),prompt:t(409)}]},{groupId:t(479),groupLabel:v(e,t(453)),commands:[{id:t(508),label:v(e,t(437)),prompt:t(506)},{id:t(474),label:v(e,t(471)),prompt:t(509)}]},{groupId:t(495),groupLabel:v(e,t(417)),commands:[{id:t(468),label:v(e,t(448)),prompt:t(445)},{id:t(426),label:v(e,t(478)),prompt:t(434)},{id:t(422),label:v(e,t(449)),prompt:t(485)},{id:t(446),label:v(e,t(490)),prompt:t(487)},{id:t(442),label:v(e,t(476)),prompt:t(408)}]},{groupId:t(510),groupLabel:v(e,t(421)),commands:[{id:t(419),label:v(e,t(484)),prompt:t(423)},{id:t(433),label:v(e,t(447)),prompt:t(512)},{id:t(461),label:v(e,t(441)),prompt:t(513)},{id:t(469),label:v(e,t(481)),prompt:t(407)}]},{groupId:t(489),groupLabel:v(e,t(507)),commands:[{id:t(496),label:v(e,t(493)),prompt:t(406)},{id:t(488),label:v(e,t(415)),prompt:t(411)},{id:t(470),label:v(e,t(416)),prompt:t(505)},{id:t(458),label:v(e,t(439)),prompt:t(435)},{id:t(514),label:v(e,t(465)),prompt:t(454)},{id:t(436),label:v(e,t(500)),prompt:t(483)},{id:t(425),label:v(e,t(457)),prompt:t(444)},{id:t(472),label:v(e,t(501)),prompt:t(432)}]}]}(r)),n[t(452)](t(482),[]),n[t(452)](t(486),[]);let i=o(n[t(418)](t(455)),r);const s=n[t(418)](t(482)),a=n[t(418)](t(486));s[t(427)]((e=>{const n=t,r=i[n(504)]((t=>t[n(410)]===e[n(410)]));r?r[n(414)]=r[n(414)][n(475)](e[n(414)]):i[n(424)](e)})),i=i[t(499)]((e=>!a[t(438)](e[t(410)]))),i[t(427)]((e=>{const n=t;e[n(414)]=e[n(414)][n(499)]((e=>!a[n(438)](e.id)))})),n[t(429)](t(455),i)}}const qe=ze;function Ve(){const e=["error","get","requires","application/json","26071ujOFmk","1616094wkFOcB","name","plugins","editor","165220YhrPib","_prepareRequestParameters","init","signal","8659qSqNuP","sendRequest","4tudFZM","aitextadapter-send-request-failed","aborted","textAdapter","locale","230lVwLNg","AI_ERROR_GET_HEADERS","_prepareRequestHeaders","AI_ERROR_GET_PARAMETERS","catch","reject","abort","1876284VvRDVM","754025JUENTN","10GPIlzK","966cFIKJn","assign","4311048CdfdAw","abortController","object","AbortError","resolve","makeRequest"];return(Ve=function(){return e})()}function ze(e,t){const n=Ve();return(ze=function(e,t){return n[e-=221]})(e,t)}!function(e){const t=ze,n=e();for(;;)try{if(315874===parseInt(t(235))/1*(parseInt(t(222))/2)+parseInt(t(236))/3*(-parseInt(t(246))/4)+-parseInt(t(221))/5+-parseInt(t(223))/6*(-parseInt(t(244))/7)+parseInt(t(225))/8+-parseInt(t(258))/9+parseInt(t(251))/10*(parseInt(t(240))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ve);class Ge extends e.Plugin{[qe(226)];static get[qe(233)](){return[w]}constructor(e){const t=qe;super(e),this[t(226)]=new AbortController}[qe(242)](){const e=qe;this[e(239)][e(238)][e(232)](w)[e(249)]=this}[qe(257)](){const e=qe;this[e(226)][e(243)][e(248)]||(this[e(226)][e(257)](),this[e(226)]=new AbortController)}async[qe(230)](e){const t=qe;return this[t(245)](e)[t(255)]((e=>{const n=t;if(e instanceof b)return Promise[n(256)](e);if(n(228)==e[n(237)])return Promise[n(229)]();throw console[n(231)](e),new i.CKEditorError(n(247),null)}))}async[qe(253)](e,t){const n=qe,r=this[n(239)][n(250)],i={"Content-Type":n(234)};if(n(227)==typeof e)Object[n(224)](i,e);else if(e)try{const r=await e(t);Object[n(224)](i,r)}catch(e){return Promise[n(256)](new b(v(r,n(252))))}return i}async[qe(241)](e,t){const n=qe,r=this[n(239)][n(250)];if(n(227)==typeof e)return e;try{return await e(t)}catch(e){return Promise[n(256)](new b(v(r,n(254))))}}}function We(e,t){const n=Ke();return(We=function(e,t){return n[e-=390]})(e,t)}function Ke(){const e=["parse","_requestHeaders","filter","\nYou must keep the text formatting.\n\nContent:\n","content","length","context_length_exceeded","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.","2UdckNT","5291885KdzTqh","json","AI_ERROR_CONTEXT_LENGTH","2291096TcUrJN","editor","getReader","sendRequest","POST","AI_ERROR_MODERATION","_apiUrl","signal","ai.openAI.apiUrl","resolve","Instruction:\n","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","split","Moderation","get","user","config","delta","_prepareRequestParameters","8kPGKMM","message","_cleanUpData","_readStreamableResponse","decode","read","[DONE]","body","9962771INnSXv","50570HaJdCJ","locale","_readStaticResponse","OpenAITextAdapter","ai.openAI.requestHeaders","includes","text","choices","map","stream","ai.openAI.requestParameters","41162vWlpSN","join","156QevoDc","3149509FqtASp","pluginName","replace","6ACTOSJ","reject","stringify","data: ","system","630YCslyK","prepareMessages","_isBufferIncomplete","gpt-3.5-turbo","https://api.openai.com/v1/chat/completions","define","2306076KuJIdl","_requestParameters","abortController","_prepareRequestHeaders"];return(Ke=function(){return e})()}const Je=We;!function(e){const t=We,n=e();for(;;)try{if(731771===parseInt(t(440))/1+-parseInt(t(397))/2*(parseInt(t(457))/3)+parseInt(t(401))/4+parseInt(t(398))/5*(-parseInt(t(446))/6)+parseInt(t(428))/7*(-parseInt(t(420))/8)+parseInt(t(451))/9*(-parseInt(t(429))/10)+-parseInt(t(443))/11*(-parseInt(t(442))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ke);class Ye extends Ge{[Je(407)];[Je(390)];[Je(458)];static get[Je(444)](){return Je(432)}constructor(e){const t=Je;super(e),e[t(417)][t(456)](t(409),t(455)),e[t(417)][t(415)](t(439))||e[t(417)][t(456)](t(439),{model:t(454),max_tokens:2e3,temperature:1,top_p:1,stream:!0}),this[t(407)]=e[t(417)][t(415)](t(409)),this[t(390)]=e[t(417)][t(415)](t(433))||{},this[t(458)]=e[t(417)][t(415)](t(439))}async[Je(404)]({query:e,context:t,onData:n,actionId:r}){const i=Je,s=this[i(402)][i(430)],o=await this[i(452)](e,t,r),a=await this[i(460)](this[i(390)],r),c=await this[i(419)](this[i(458)],r),u={messages:o,...c},d={method:i(405),headers:a,body:JSON[i(448)](u),signal:this[i(459)][i(408)]},l=await fetch(this[i(407)],d);if(l.ok)return c[i(438)]?await this[i(423)](l,n):await this[i(431)](l,n),Promise[i(410)]();{const e=await l[i(435)]();return e[i(434)](i(395))?Promise[i(447)](new b(v(s,i(400)))):e[i(434)](i(414))?Promise[i(447)](new b(v(s,i(406)))):Promise[i(447)](new Error(e))}}async[Je(452)](e,t,n){const r=Je;let i,s;return t?(i=r(412),s=r(411)+e+r(392)+t):(i=r(396),s=e),[{role:r(450),content:i},{role:r(416),content:s}]}async[Je(423)](e,t){const n=Je,r=e[n(427)][n(403)](),i=new TextDecoder;let s="",o="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(425)](),d=s+i[n(424)](u);let l="";c=e;try{l=this[n(422)](d),s=""}catch(e){s=d;continue}o+=l,!c&&this[n(453)](o)||o&&(a+=o,o="",t(a))}return Promise[n(410)]()}async[Je(431)](e,t){const n=Je;return t((await e[n(399)]())[n(436)][0][n(421)][n(393)]),Promise[n(410)]()}[Je(453)](e){const t=Je,n=e[t(413)]("<")[t(394)]!==e[t(413)](">")[t(394)],r=e[t(394)]<30;return n&&r}[Je(422)](e){const t=Je;return e[t(413)](/\n(?![^{]*\})/g)[t(437)]((e=>e[t(445)](t(449),"")))[t(391)]((e=>e&&e[t(394)]>0&&t(426)!==e))[t(437)]((e=>{const n=t,{choices:r}=JSON[n(461)](e);if(r[0]?.[n(418)]?.[n(393)])return r[0][n(418)][n(393)]}))[t(391)]((e=>e))[t(441)]("")}}const Qe=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}};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||r.headers.hasOwnProperty(lt))return t(n);const i=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o(i)&&o(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}});const pt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),mt=e=>pt.test(e)||e.startsWith("[")&&e.endsWith("]"),gt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),yt=(e,t=!1)=>{if(!t)return gt.test(e);const n=e.split(".");for(const e of n)if(!yt(e))return!1;return!0},wt={},bt="endpoints";function vt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${vt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(vt).join(", ")})`:JSON.stringify(e,null,2)}class kt extends Error{constructor(e){super(e),this.name="EndpointError"}}const St=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new kt(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new kt(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce(((n,r)=>{if("object"!=typeof n)throw new kt(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]}),e),At={[et.HTTP]:80,[et.HTTPS]:443},Et={booleanEquals:(e,t)=>e===t,getAttr:St,isSet:e=>null!=e,isValidHostLabel:yt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=mt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},It=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(St(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return It(e,n);if(e.fn)return _t(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new kt(`'${t}': ${String(e)} is not a string, function or reference.`)},_t=({fn:e,argv:t},n)=>{const r=t.map((e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n))),i=e.split(".");return i[0]in wt&&null!=i[1]?wt[i[0]][i[1]](...r):Et[e](...r)},Rt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new kt(`'${e}' is already defined in Reference Record.`);const r=_t(t,n);return n.logger?.debug?.(`${bt} evaluateCondition: ${vt(t)} = ${vt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Rt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${bt} assign: ${i.name} := ${vt(i.value)}`))}return{result:!0,referenceRecord:n}},Ct=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:r.map((e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new kt(`Header '${n}' value '${r}' is not a string`);return r}))})),{}),Mt=(e,t)=>{if(Array.isArray(e))return e.map((e=>Mt(e,t)));switch(typeof e){case"string":return It(e,t);case"object":if(null===e)throw new kt(`Unexpected endpoint property: ${e}`);return Tt(e,t);case"boolean":return e;default:throw new kt("Unexpected endpoint property type: "+typeof e)}},Tt=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:Mt(r,t)})),{}),Ot=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new kt("Endpoint URL must be a string, got "+typeof n)},Nt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${bt} Resolving endpoint from template: ${vt(r)}`),{...null!=u&&{headers:Ct(u,o)},...null!=c&&{properties:Tt(c,o)},url:Ot(a,o)}},Lt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)throw new kt(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},$t=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Nt(n,t);if(e)return e}else if("error"===n.type)Lt(n,t);else{if("tree"!==n.type)throw new kt(`Unknown endpoint rule: ${n}`);{const e=$t(n,t);if(e)return e}}throw new kt("Rules evaluation failed")},Dt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Dt(t))return!1;return!0}return!!yt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!mt(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)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}'),Ft="";const jt={isVirtualHostableS3Bucket:Dt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;return"arn"!==n||""===r||""===i||""===a[0]?null:{partition:r,service:i,region:s,accountId:o,resourceId:a[0].includes("/")?a[0].split("/"):a}},partition:e=>{const{partitions:t}=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}}};wt.aws=jt;const Ht="user-agent",qt="x-amz-user-agent",Vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,zt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Gt=e=>(t,n)=>async r=>{const{request:i}=r;if(!ot.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Wt)||[],a=(await e.defaultUserAgentProvider()).map(Wt),c=e?.customUserAgent?.map(Wt)||[],u=(Ft?[Ft]:[]).concat([...a,...o,...c]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...c].join(" ");return"browser"!==e.runtime?(d&&(s[qt]=s[qt]?`${s[Ht]} ${d}`:d),s[Ht]=u):s[qt]=u,t({...r,request:i})},Wt=e=>{const t=e[0].split("/").map((e=>e.replace(Vt,"-"))).join("/"),n=e[1]?.replace(zt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Kt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Jt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Jt||(Jt={}));const Yt=e=>e[rt]||(e[rt]={}),Qt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Zt=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Xt=e=>Zt(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const en=(e,t)=>(n,r)=>async i=>{const s=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Yt(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},tn={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},nn={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},rn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function sn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>n=>async r=>{const{response:i}=await n(r);try{return{response:i,output:await t(i,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:i}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,n),nn),r.add(((e,t)=>(n,r)=>async i=>{const s=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:s});return n({...i,request:o})})(e,t),rn)}}}const on=e=>e=>{throw e},an=(e,t)=>{},cn={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},un=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!ot.isInstance(n.request))return e(n);const r=Yt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||on)(i));return(o.successHandler||an)(a.response,i),a}),cn)}}),dn=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},ln={},hn=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);ln[n]=e,hn[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;ln[n]=r,hn[r]=n}for(let e=0;e<10;e++){ln[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;ln[t]=n,hn[n]=t}ln["+"]=62,hn[62]="+",ln["/"]=63,hn[63]="/";const fn=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in ln))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=ln[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},pn=e=>(new TextEncoder).encode(e);function mn(e){let t;t="string"==typeof e?pn(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=hn[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}const gn=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class yn extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?yn.mutate(fn(e)):yn.mutate(pn(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,yn.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?mn(e):gn(e)}(this,e)}}const wn={},bn={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),wn[e]=t,bn[t]=e}function vn(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in bn))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=bn[r]}return t}function kn(e){let t="";for(let n=0;n<e.byteLength;n++)t+=wn[e[n]];return t}"function"==typeof ReadableStream&&ReadableStream;const Sn=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return yn.mutate(e);if(!e)return yn.mutate(new Uint8Array);const n=t.streamCollector(e);return yn.mutate(await n)};function An(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function En(e,t){return new In(e,t)}class In{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new ot({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,r){return this.resolvePathStack.push((i=>{this.path=((e,t,n,r,i,s)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,s?t.split("/").map((e=>An(e))).join("/"):An(t))}return e})(i,this.input,e,t,n,r)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}class xn{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const _n=(Rn=3e5,e=>Pn(e)&&e.expiration.getTime()-Date.now()<Rn);var Rn;const Pn=e=>void 0!==e.expiration,Cn="content-length";const Mn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Tn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(ot.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Cn))try{const t=n(e);r.headers={...r.headers,[Cn]:String(t)}}catch(e){}}return e({...t,request:r})}),Mn)}}),On=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Nn=/(\d+\.){3}\d+/,Ln=/\.\./,$n=e=>On.test(e)&&!Nn.test(e)&&!Ln.test(e),Un=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Dn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},Bn=async e=>{};const Fn=e=>{if("string"==typeof e)return Fn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},jn=e=>"object"==typeof e?"url"in e?Fn(e.url):e:Fn(e),Hn=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Dn(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Un(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!$n(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},qn=({config:e,instructions:t})=>(n,r)=>async i=>{e.endpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Bn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(jn(e)))}const i=await Hn(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Yt(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})},Vn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:rn.name},zn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(qn({config:e,instructions:t}),Vn)}});var Gn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Gn||(Gn={}));const Wn=Gn.STANDARD,Kn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Jn=["TimeoutError","RequestTimeout","RequestTimeoutException"],Yn=[500,502,503,504],Qn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Zn=e=>429===e.$metadata?.httpStatusCode||Kn.includes(e.name)||1==e.$retryable?.throttling,Xn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Jn.includes(e.name)||Qn.includes(e?.code||"")||Yn.includes(e.$metadata?.httpStatusCode||0)||void 0!==e.cause&&t<=10&&Xn(e.cause,t+1);class er{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>er.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Zn(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}er.setTimeoutFn=setTimeout;const tr=100,nr=2e4,rr="amz-sdk-invocation-id",ir="amz-sdk-request",sr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(nr,e),getRetryCost:()=>n});class or{constructor(e){this.maxAttempts=e,this.mode=Gn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=tr;return{computeNextBackoffDelay:t=>Math.floor(Math.min(nr,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return sr({retryDelay:tr,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:tr);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,sr({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class ar{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Gn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new er,this.standardRetryStrategy=new or(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const cr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ur;const dr=new Uint8Array(16);function lr(){if(!ur&&(ur="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ur))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ur(dr)}const hr=[];for(let e=0;e<256;++e)hr.push((e+256).toString(16).slice(1));function fr(e,t=0){return hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]}const pr=function(e,t,n){if(cr.randomUUID&&!t&&!e)return cr.randomUUID();const r=(e=e||{}).random||(e.rng||lr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return fr(r)},mr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const gr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},yr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,wr=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of gr(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of gr(t.name,t.aliases))o[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${yr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(c=r,c.sort(((e,t)=>br[t.step]-br[e.step]||vr[t.priority||"normal"]-vr[e.priority||"normal"]))).map(s).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=gr(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${yr(i,o)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${yr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${yr(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=gr(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${yr(i,o)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${yr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${yr(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(wr()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=gr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of gr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=gr(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(wr());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return yr(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},br={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},vr={high:3,normal:2,low:1};class kr{constructor(e){this.config=e,this.middlewareStack=wr()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then((e=>e.output));s(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Sr{constructor(){this.middlewareStack=wr()}static classBuilder(){return new Ar}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve((e=>p.handle(e.request,n||{})),f)}}class Ar{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Sr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Er="***SensitiveInformation***",Ir=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),xr=e=>_r(e,32),_r=(e,t)=>{const n=Ir(e);if(void 0!==n&&Rr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Rr=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Pr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Mr.warn(Cr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Cr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Mr={warn:console.warn};class Tr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Tr.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}}const Or=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Nr=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"]}),Lr=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},$r=e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Ur=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},Dr=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},Br=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Fr=e=>({...$r(e),...Dr(e)}),jr=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};jr.from=e=>e&&"object"==typeof e&&(e instanceof jr||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?jr(String(e)):jr(JSON.stringify(e)),jr.fromObject=jr.from;class Hr{trace(){}debug(){}info(){}warn(){}error(){}}function qr(e,t,n){let r,i,s;if(void 0===t&&void 0===n)r={},s=e;else{if(r=e,"function"==typeof t)return i=t,s=n,zr(r,i,s);s=t}for(const e of Object.keys(s))Array.isArray(s[e])?Gr(r,null,s,e):r[e]=s[e];return r}const Vr=(e,t)=>{const n={};for(const r in t)Gr(n,e,t,r);return n},zr=(e,t,n)=>qr(e,Object.entries(n).reduce(((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e)),{})),Gr=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Wr,o=Kr,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Wr=e=>null!=e,Kr=e=>e,Jr=e=>e?.body instanceof ReadableStream,Yr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Qr=e=>{const t={error:e,errorType:Zr(e)},n=ti(e.$response);return n&&(t.retryAfterHint=n),t},Zr=e=>Zn(e)?"THROTTLING":Xn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Xn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Xr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ei=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Yr(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,d=ot.isInstance(u);for(d&&(u.headers[rr]=pr());;)try{d&&(u.headers[ir]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=Qr(t);if(o=mr(t),d&&Jr(u))throw(n.logger instanceof Hr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise((e=>setTimeout(e,s)))}}})(e),Xr)}}),ti=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)},ni=e=>encodeURIComponent(e).replace(/[!'()*]/g,ri),ri=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,ii=e=>"string"==typeof e?pn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),si="X-Amz-Date",oi="X-Amz-Signature",ai="X-Amz-Security-Token",ci="authorization",ui=si.toLowerCase(),di=[ci,ui,"date"],li=oi.toLowerCase(),hi="x-amz-content-sha256",fi=ai.toLowerCase(),pi={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},mi=/^proxy-/,gi=/^sec-/,yi="AWS4-HMAC-SHA256",wi="AWS4-HMAC-SHA256-PAYLOAD",bi="aws4_request",vi={},ki=[],Si=(e,t,n)=>`${e}/${t}/${n}/${bi}`,Ai=(e,t,n)=>{const r=new e(t);return r.update(ii(n)),r.digest()},Ei=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in pi||t?.has(s)||mi.test(s)||gi.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Ii=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===hi)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(ii(t)),kn(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class xi{format(e){const t=[];for(const n of Object.keys(e)){const r=pn(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=pn(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Pi.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(vn(e.value.replace(/\-/g,"")),1),d}}}var _i;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(_i||(_i={}));const Ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Pi{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Ci(t),new Pi(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Ci(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Ci(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Mi=e=>{e=ot.clone(e);for(const t of Object.keys(e.headers))di.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Ti=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Oi{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.headerFormatter=new xi,this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=Qt(n),this.credentialProvider=Qt(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=Ni(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Si(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=ot.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Mi(e),{unhoistableHeaders:s,hoistableHeaders:a});d.sessionToken&&(m.query[ai]=d.sessionToken),m.query["X-Amz-Algorithm"]=yi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[si]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=Ei(m,i,o);return m.query["X-Amz-SignedHeaders"]=Li(g),m.query[oi]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await Ii(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=Ni(n),u=Si(a,o,s??this.service),d=await Ii({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=kn(await l.digest()),f=[wi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=Ni(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(ii(e)),kn(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=Mi(e),{longDate:u,shortDate:d}=Ni(t),l=Si(d,a,s??this.service);c.headers[ui]=u,o.sessionToken&&(c.headers[fi]=o.sessionToken);const h=await Ii(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(hi,c.headers)&&this.applyChecksum&&(c.headers[hi]=h);const f=Ei(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(o,a,d,s),this.createCanonicalRequest(c,f,h));return c.headers[ci]=`${yi} Credential=${o.accessKeyId}/${l}, SignedHeaders=${Li(f)}, Signature=${p}`,c}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===li)continue;const i=ni(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${ni(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce(((e,t)=>e.concat([`${i}=${ni(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n){const r=new this.sha256;r.update(ii(n));const i=await r.digest();return`${yi}\n${e}\n${t}\n${kn(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ni(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r),s=new this.sha256(await n);return s.update(ii(i)),kn(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${kn(await Ai(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in vi)return vi[s];for(ki.push(s);ki.length>50;)delete vi[ki.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,bi])o=await Ai(e,o,t);return vi[s]=o})(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const Ni=e=>{const t=(n=e,Ti(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Li=e=>Object.keys(e).sort().join(";"),$i=e=>{let t;e.credentials&&(t=((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(e.credentials,_n,Pn)),t||(t=e.credentialDefaultProvider?dn(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:i}=e;let s;return s=e.signer?dn(e.signer):e.regionInfoProvider?()=>dn(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([r,s])=>{const{signingRegion:o,signingService:a}=r;e.signingRegion=e.signingRegion||o||s,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(c)})):async r=>{const s=(r=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await dn(e.region)(),properties:{}},r)).signingRegion,o=r.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||Oi)(a)},{...e,systemClockOffset:r,signingEscapePath:n,credentials:t,signer:s}},Ui=async(e,t,n)=>({operation:Yt(t).operation,region:await Qt(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Di=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Bi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Fi="3.621.0";var ji="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Hi(e){return e instanceof Uint8Array?e:"string"==typeof e?ji(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function qi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Vi={name:"SHA-256"},zi={name:"HMAC",hash:Vi},Gi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Wi={};function Ki(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Wi}var Ji=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!qi(e)){var t=Hi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Ki().crypto.subtle.sign(zi,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):qi(this.toHash)?Promise.resolve(Gi):Promise.resolve().then((function(){return Ki().crypto.subtle.digest(Vi,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){Ki().crypto.subtle.importKey("raw",Hi(e.secret),zi,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Yi(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 Qi(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Zi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Xi=64,es=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ts=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ns=Math.pow(2,53)-1,rs=function(){function e(){this.state=Int32Array.from(ts),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ns)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Xi&&(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%Xi>=56){for(var r=this.bufferLength;r<Xi;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<Xi;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(es[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+p|0,s=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),is=function(){function e(e){this.secret=e,this.hash=new rs,this.reset()}return e.prototype.update=function(e){if(!qi(e)&&!this.error)try{this.hash.update(Hi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Yi(this,void 0,void 0,(function(){return Qi(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new rs,this.secret){this.outer=new rs;var e=function(e){var t=Hi(e);if(t.byteLength>Xi){var n=new rs;n.update(t),t=n.digest()}var r=new Uint8Array(Xi);return r.set(t),r}(this.secret),t=new Uint8Array(Xi);t.set(e);for(var n=0;n<Xi;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var ss=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function os(e){return e&&ss.every((function(t){return"function"==typeof e[t]}))}var as=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&os(e.crypto.subtle)}(Ki())?this.hash=new is(e):this.hash=new Ji(e)}return e.prototype.update=function(e,t){this.hash.update(Hi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),cs=n(369),us=n.n(cs);const ds=({serviceId:e,clientVersion:t})=>async()=>{const n="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r};!function(){function e(){this.crc32=new hs}e.prototype.update=function(e){qi(e)||this.crc32.update(Hi(e))},e.prototype.digest=function(){return Yi(this,void 0,void 0,(function(){return Qi(this,(function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t}))}))},e.prototype.reset=function(){this.crc32=new hs}}();var ls,hs=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Zi(e),i=r.next();!i.done;i=r.next()){var s=i.value;this.checksum=this.checksum>>>8^fs[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),fs=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class ps{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&ms(t),new ps(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&ms(e),parseInt(kn(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function ms(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class gs{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ps.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!xs.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(vn(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:ys,value:!0};break;case 1:t[i]={type:ys,value:!1};break;case 2:t[i]={type:ws,value:e.getInt8(n++)};break;case 3:t[i]={type:bs,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:vs,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:ks,value:new ps(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Ss,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const s=e.getUint16(n,!1);n+=2,t[i]={type:As,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:t[i]={type:Es,value:new Date(new ps(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const o=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:Is,value:`${kn(o.subarray(0,4))}-${kn(o.subarray(4,6))}-${kn(o.subarray(6,8))}-${kn(o.subarray(8,10))}-${kn(o.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(ls||(ls={}));const ys="boolean",ws="byte",bs="short",vs="integer",ks="long",Ss="binary",As="string",Es="timestamp",Is="uuid",xs=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class _s{constructor(e,t){this.headerMarshaller=new gs(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),s=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new hs;return s.setUint32(0,r,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),s.setUint32(r-4,o.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const s=r.getUint32(4,!1),o=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new hs).update(new Uint8Array(n,t,8));if(o!==c.digest())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,s),body:new Uint8Array(n,t+8+4+s,i-s-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Rs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Ps{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Cs{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Ms{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Ts(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},s=await e(i);if(s.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw s[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class Os{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new _s(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const s=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await o.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;s(new DataView(i.buffer).getUint32(0,!1)),i=null}const o=Math.min(t-n,c-u);r.set(e.slice(u,u+o),n),n+=o,u+=o,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new Cs({messageStream:new Rs({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Ts(t,this.utfEncoder)})}serialize(e,t){return new Ps({messageStream:new Ms({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class Ns{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Os({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Ls(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 Ls=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,$s=e=>new Ns(e);function Us(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const Ds={supported:void 0};class Bs{static create(e){return"function"==typeof e?.handle?e:new Bs(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Ds.supported&&(Ds.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=ni(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${ni(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${ni(r)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:u}=e,d=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,l="GET"===u||"HEAD"===u?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(h.cache=this.config.cache),l&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),Ds.supported&&(h.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let f=()=>{};const p=new Request(d,h),m=[fetch(p).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),Us(n)];return t&&m.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),f=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(m).finally(f)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const Fs=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}))}(e),n=fn(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const js="function"==typeof TextEncoder?new TextEncoder:null,Hs=e=>{if("string"==typeof e){if(js)return js.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},qs=e=>new Date(Date.now()+e),Vs=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(qs(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Gs=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Ws{async sign(e,t,n){if(!ot.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:r,signer:i,signingRegion:s,signingName:o}=await(async e=>{const t=Gs("context",e.context),n=Gs("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Gs("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingName;return{config:n,signer:s,signingRegion:o,signingName:a}})(n);return await i.sign(e,{signingDate:qs(r.systemClockOffset),signingRegion:s,signingService:o})}errorHandler(e){return t=>{const n=t.ServerTime??Vs(t.$response);if(n){const r=Gs("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=Vs(e);if(n){const e=Gs("config",t.config);e.systemClockOffset=zs(n,e.systemClockOffset)}}}const Ks="required",Js="fn",Ys="argv",Qs="ref",Zs=!0,Xs="isSet",eo="booleanEquals",to="error",no="endpoint",ro="tree",io="PartitionResult",so={[Ks]:!1,type:"String"},oo={[Ks]:!0,default:!1,type:"Boolean"},ao={[Qs]:"Endpoint"},co={[Js]:eo,[Ys]:[{[Qs]:"UseFIPS"},!0]},uo={[Js]:eo,[Ys]:[{[Qs]:"UseDualStack"},!0]},lo={},ho={[Js]:"getAttr",[Ys]:[{[Qs]:io},"supportsFIPS"]},fo={[Js]:eo,[Ys]:[!0,{[Js]:"getAttr",[Ys]:[{[Qs]:io},"supportsDualStack"]}]},po=[co],mo=[uo],go=[{[Qs]:"Region"}],yo={version:"1.0",parameters:{Region:so,UseDualStack:oo,UseFIPS:oo,Endpoint:so},rules:[{conditions:[{[Js]:Xs,[Ys]:[ao]}],rules:[{conditions:po,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:to},{rules:[{conditions:mo,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:to},{endpoint:{url:ao,properties:lo,headers:lo},type:no}],type:ro}],type:ro},{rules:[{conditions:[{[Js]:Xs,[Ys]:go}],rules:[{conditions:[{[Js]:"aws.partition",[Ys]:go,assign:io}],rules:[{conditions:[co,uo],rules:[{conditions:[{[Js]:eo,[Ys]:[Zs,ho]},fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:to}],type:ro},{conditions:po,rules:[{conditions:[{[Js]:eo,[Ys]:[ho,Zs]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"FIPS is enabled but this partition does not support FIPS",type:to}],type:ro},{conditions:mo,rules:[{conditions:[fo],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro},{error:"DualStack is enabled but this partition does not support DualStack",type:to}],type:ro},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:lo,headers:lo},type:no}],type:ro}],type:ro}],type:ro},{error:"Invalid Configuration: Missing Region",type:to}],type:ro}]},wo=(e,t={})=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${bt} Initial EndpointParams: ${vt(n)}`);const o=Object.entries(i).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new kt(`Missing required parameter: '${e}'`);const c=Ut(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${bt} Resolved endpoint: ${vt(c)}`),c})(yo,{endpointParams:e,logger:t.logger});wt.aws=jt;Error;const bo=["in-region","cross-region","mobile","standard","legacy"],vo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?us().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},ko=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await a()),r):async e=>(s&&!e?.forceRefresh||(r=await a()),o?r:n&&!n(r)?(o=!0,r):t(r)?(await a(),r):r)})((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(vo()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${bo.join(", ")}, got ${t}`)}})))(e),n=()=>t().then(Lr),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??fn,base64Encoder:e?.base64Encoder??mn,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??wo,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Di,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ws}],logger:e?.logger??new Hr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??Fn,utf8Decoder:e?.utf8Decoder??pn,utf8Encoder:e?.utf8Encoder??gn}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ds({serviceId:r.serviceId,clientVersion:Fi}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??$s,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:Bs.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Wn),sha256:e?.sha256??as,streamCollector:e?.streamCollector??Fs,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},So=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Ao=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}},Eo=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class Io extends kr{constructor(...[e]){const t=(e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(ko(e||{})),n=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Xt(t);const e=await t();return Xt(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Zt(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}})(t),r=(e=>{const t=e.tls??!0,{endpoint:n}=e,r=null!=n?async()=>jn(await Qt(n)()):void 0,i=!!n,s={...e,endpoint:r,tls:t,isCustomEndpoint:i,useDualstackEndpoint:Qt(e.useDualstackEndpoint??!1),useFipsEndpoint:Qt(e.useFipsEndpoint??!1)};let o;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!o&&(o=Bn(e.serviceId)),o),s})(n);var i;const s=(e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)}))((e=>{const{retryStrategy:t}=e,n=Qt(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await Qt(e.retryMode)()===Gn.ADAPTIVE?new ar(n):new or(n))}})((i=r,{...i,customUserAgent:"string"==typeof i.customUserAgent?[[i.customUserAgent]]:i.customUserAgent})));const o=((e,t)=>{const n={...So(e),...Fr(e),...Qe(e),...Ao(e)};return t.forEach((e=>e.configure(n))),{...e,...(s=n,{region:s.region()}),...(i=n,{...Ur(i),...Br(i)}),...(r=n,{httpHandler:r.httpHandler()}),...Eo(n)};var r,i,s})({...$i(s)},e?.extensions||[]);super(o),this.config=o,this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return o?.info?.({clientName:i,commandName:s,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}}),dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use((e=>({applyToStack:t=>{t.add(Gt(e),Kt)}}))(this.config)),this.middlewareStack.use(ei(this.config)),this.middlewareStack.use(Tn(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(en(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),tn)}}))(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use(un(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return Ui}getIdentityProviderConfigProvider(){return async e=>new xn({"aws.auth#sigv4":e.credentials})}}class xo extends Tr{constructor(e){super(e),Object.setPrototypeOf(this,xo.prototype)}}class _o extends xo{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,_o.prototype)}}var Ro;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Ro||(Ro={}));class Po extends xo{constructor(e){super({name:"InternalServerException",$fault:"server",...e}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,Po.prototype)}}class Co extends xo{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Co.prototype)}}class Mo extends xo{constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,Mo.prototype)}}class To extends xo{constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,To.prototype)}}class Oo extends xo{constructor(e){super({name:"ValidationException",$fault:"client",...e}),this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype)}}var No;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(No||(No={}));var Lo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(Lo||(Lo={}));var $o,Uo;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($o||($o={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):t._(e.$unknown[0],e.$unknown[1])}(Uo||(Uo={}));var Do;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));var Bo,Fo,jo,Ho,qo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(Fo||(Fo={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(jo||(jo={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):t._(e.$unknown[0],e.$unknown[1])}(Ho||(Ho={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(qo||(qo={}));class Vo extends xo{constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),this.name="ModelErrorException",this.$fault="client",Object.setPrototypeOf(this,Vo.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class zo extends xo{constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),this.name="ModelNotReadyException",this.$fault="client",Object.setPrototypeOf(this,zo.prototype)}}class Go extends xo{constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),this.name="ModelTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Go.prototype)}}class Wo extends xo{constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),this.name="ServiceUnavailableException",this.$fault="server",Object.setPrototypeOf(this,Wo.prototype)}}var Ko,Jo,Yo;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Ko||(Ko={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));class Qo extends xo{constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),this.name="ModelStreamErrorException",this.$fault="client",Object.setPrototypeOf(this,Qo.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])}(Yo||(Yo={}));var Zo;!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])}(Zo||(Zo={}));const Xo=e=>({...e,...e.body&&{body:Er}}),ea=e=>({...e,...e.body&&{body:Er}}),ta=e=>({...e,...e.body&&{body:Er}}),na=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ra=(e,t)=>((e,t)=>Sn(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),ia=async(e,t)=>{const n=await ra(e,t);return n.message=n.message??n.Message,n},sa=async(e,t)=>{const n=En(e,t),r=qr({},Oa,{[$a]:e[La]||"application/octet-stream",[Na]:e[Na],[Va]:e[Ba],[Ha]:e[Ua],[qa]:e[Da]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},oa=async(e,t)=>{const n=En(e,t),r=qr({},Oa,{[$a]:e[La]||"application/octet-stream",[Fa]:e[Na],[Va]:e[Ba],[Ha]:e[Ua],[qa]:e[Da]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",(()=>e.modelId),"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},aa=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=qr({$metadata:Ta(e),[La]:[,e.headers[$a]]}),r=await Sn(e.body,t);return n.body=r,n},ca=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ua(e,t);const n=qr({$metadata:Ta(e),[La]:[,e.headers[ja]]}),r=e.body;return n.body=Aa(r,t),n},ua=async(e,t)=>{const n={...e,body:await ia(e.body,t)},r=((e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=(i=e.headers,s="x-amzn-errortype",Object.keys(i).find((e=>e.toLowerCase()===s.toLowerCase())));var i,s;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ha(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await fa(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await wa(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await ba(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await ka(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Sa(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await pa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await ma(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await ya(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await va(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await ga(n,t);default:const i=n.body;return da({output:e,parsedBody:i,errorCode:r})}},da=(la=xo,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Nr(e),s=i.httpStatusCode?i.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||r||s||"UnknownError",$fault:"client",$metadata:i});throw Or(o,t)})({output:e,parsedBody:t,exceptionCtor:la,errorCode:n})});var la;const ha=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new _o({$metadata:Ta(e),...n});return Or(s,e.body)},fa=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new Po({$metadata:Ta(e),...n});return Or(s,e.body)},pa=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr,originalStatusCode:xr,resourceName:Pr});Object.assign(n,i);const s=new Vo({$metadata:Ta(e),...n});return Or(s,e.body)},ma=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new zo({$metadata:Ta(e),...n});return Or(s,e.body)},ga=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr,originalMessage:Pr,originalStatusCode:xr});Object.assign(n,i);const s=new Qo({$metadata:Ta(e),...n});return Or(s,e.body)},ya=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new Go({$metadata:Ta(e),...n});return Or(s,e.body)},wa=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new Co({$metadata:Ta(e),...n});return Or(s,e.body)},ba=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new Mo({$metadata:Ta(e),...n});return Or(s,e.body)},va=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new Wo({$metadata:Ta(e),...n});return Or(s,e.body)},ka=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new To({$metadata:Ta(e),...n});return Or(s,e.body)},Sa=async(e,t)=>{const n=qr({}),r=e.body,i=Vr(r,{message:Pr});Object.assign(n,i);const s=new Oo({$metadata:Ta(e),...n});return Or(s,e.body)},Aa=(e,t)=>t.eventStreamMarshaller.deserialize(e,(async n=>null!=n.chunk?{chunk:await _a(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await Ea(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await Ia(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ca(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Pa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await xa(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ra(n.serviceUnavailableException,t)}:{$unknown:e})),Ea=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return fa(n,t)},Ia=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ga(n,t)},xa=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ya(n,t)},_a=async(e,t)=>{const n={},r=await ra(e.body,t);return Object.assign(n,Ma(r,t)),n},Ra=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return va(n,t)},Pa=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return ka(n,t)},Ca=async(e,t)=>{const n={...e,body:await ra(e.body,t)};return Sa(n,t)},Ma=(e,t)=>Vr(e,{bytes:t.base64Decoder}),Ta=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Oa=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),Na="accept",La="contentType",$a="content-type",Ua="guardrailIdentifier",Da="guardrailVersion",Ba="trace",Fa="x-amzn-bedrock-accept",ja="x-amzn-bedrock-content-type",Ha="x-amzn-bedrock-guardrailidentifier",qa="x-amzn-bedrock-guardrailversion",Va="x-amzn-bedrock-trace";class za extends(Sr.classBuilder().ep({...Bi}).m((function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),zn(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(ta,na).ser(oa).de(ca).build()){}class Ga extends(Sr.classBuilder().ep({...Bi}).m((function(e,t,n,r){return[sn(n,this.serialize,this.deserialize),zn(n,e.getEndpointParameterInstructions())]})).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(Xo,ea).ser(sa).de(aa).build()){}function Wa(e,t){const n=Ja();return(Wa=function(e,t){return n[e-=419]})(e,t)}const Ka=Wa;function Ja(){const e=["ai.aws.apiUrl","Instruction:\n","Human:\n","utf8","preparePrompt","abortController","filter","bedrock-2023-05-31","from","3353365tsOlmL","<<SYS>>\n","meta.llama","config","utf-8","stringify","bytes","parse","decode","_processProxyRequest","_processAWSRequest","anthropic.claude","_requestHeaders","editor","593071lWZfSd","AI_ERROR_UNSUPPORTED_MODEL","toString","get","POST","map","35602KsLfOM","signal","test","4402236WUBKRC","_prepareRequestParameters","text","4TSYNfd","_prepareRequestHeaders","ai.aws.requestParameters","_readStreamableResponse","define","resolve","ai.aws.bedrockClientConfig","AWSTextAdapter","63oHwUEK","\n[/INST]","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.","16bPrRiC","split","getReader","2905420CVNeoR","join","send","9WDUpJs","ai.aws.requestHeaders","locale","completion","sendRequest","json","completions","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.","_bedrockClientConfig","ai21.j2","cohere.command","body","\n<</SYS>>\n[INST]\n","165466IExUoo","\n\nAssistant:","2748LQbRzV","read","\nYou must keep the text formatting.\n\nContent:\n","application/json","_requestParameters","generations","data","getModelFamily","chunk","_getGeneratedText","length","41052HsHYuO","generation","pluginName","_apiUrl","_readAsyncIterableResponse","anthropic.claude-v2","_readStaticResponse"];return(Ja=function(){return e})()}!function(e){const t=Wa,n=e();for(;;)try{if(754959===parseInt(t(448))/1+parseInt(t(454))/2*(parseInt(t(468))/3)+parseInt(t(460))/4*(-parseInt(t(434))/5)+-parseInt(t(457))/6+-parseInt(t(490))/7*(-parseInt(t(471))/8)+-parseInt(t(477))/9*(-parseInt(t(474))/10)+parseInt(t(503))/11*(parseInt(t(492))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ja);class Ya extends Ge{[Ka(421)];[Ka(446)];[Ka(485)];[Ka(496)];static get[Ka(420)](){return Ka(467)}constructor(e){const t=Ka;super(e),e[t(437)][t(451)](t(462))||e[t(437)][t(464)](t(462),{model:t(423),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(432),stream:!0}),this[t(421)]=e[t(437)][t(451)](t(425)),this[t(485)]=e[t(437)][t(451)](t(466)),this[t(446)]=e[t(437)][t(451)](t(478)),this[t(496)]=e[t(437)][t(451)](t(462))}async[Ka(481)]({query:e,context:t,onData:n,actionId:r}){const i=Ka,{model:s,stream:o,...a}=await this[i(458)](this[i(496)],r),c={prompt:await this[i(429)](e,t,s,r),...a};this[i(421)]?await this[i(443)](c,s,o,n,r):await this[i(444)](c,s,o,n)}async[Ka(429)](e,t,n,r){const i=Ka;let s,o;return t?(s=i(470),o=i(426)+e+i(494)+t):(s=i(484),o=e),i(436)==this[i(499)](n)?i(435)+s+i(489)+o+i(469):i(427)+s+"\n"+o+i(491)}[Ka(499)](e){const t=Ka;if(/^anthropic\.claude/[t(456)](e))return t(445);if(/^ai21\.j2/[t(456)](e))return t(486);if(/^cohere\.command/[t(456)](e))return t(487);if(/^meta\.llama/[t(456)](e))return t(436);throw new b(v(this[t(447)][t(479)],t(449),e))}async[Ka(443)](e,t,n,r,i){const s=Ka,o={method:s(452),headers:await this[s(461)](this[s(446)],i),body:JSON[s(439)]({...e,model:t,stream:n}),signal:this[s(430)][s(455)]},a=await fetch(this[s(421)],o);n?await this[s(463)](a,t,r):await this[s(424)](a,t,r)}async[Ka(444)](e,t,n,r){const i=Ka,s=new Io(this[i(485)]),o={body:JSON[i(439)](e),contentType:i(495),accept:i(495),modelId:t};let a;if(n){const e=new za(o);a=await s[i(476)](e,{abortSignal:this[i(430)][i(455)]}),await this[i(422)](a,t,r)}else{const e=new Ga(o);a=await s[i(476)](e,{abortSignal:this[i(430)][i(455)]}),await this[i(424)](a,t,r)}}async[Ka(422)](e,t,n){const r=Ka,i=e[r(488)],s=new TextDecoder(r(438));let o="";for await(const e of i)if(e[r(500)]){const i=s[r(442)](e[r(500)][r(440)]),a=JSON[r(441)](i);o+=this[r(501)](a,t),n(o)}return Promise[r(465)]()}async[Ka(463)](e,t,n){const r=Ka,i=e[r(488)],s=new TextDecoder(r(438)),o=i[r(473)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await o[r(493)]();if(u=e,u)break;const d=(a+s[r(442)](i))[r(472)]("\n")[r(453)]((e=>{const t=r;try{return a="",JSON[t(441)](e)}catch(t){return a=e,null}}))[r(431)]((e=>null!==e));d[r(502)]&&(c+=d[r(453)]((e=>this[r(501)](e,t)))[r(475)](""),n(c))}return Promise[r(465)]()}async[Ka(424)](e,t,n){const r=Ka;let i;return i=e instanceof Response?await e[r(482)]():JSON[r(441)](Buffer[r(433)](e[r(488)])[r(450)](r(428))),n(this[r(501)](i,t)),Promise[r(465)]()}[Ka(501)](e,t){const n=Ka;switch(this[n(499)](t)){case n(445):return e[n(480)];case n(486):return e[n(483)][0][n(498)][n(459)];case n(487):return e[n(497)][0][n(459)];case n(436):return e[n(419)]}}}function Qa(e,t){var n=Za();return(Qa=function(e,t){return n[e-=274]})(e,t)}function Za(){var e=["4875305hIACrg","8265660fkUxco","24ZtewMU","1003077QzgzDv","532vipBCn","5388ueyIRm","4336185kJESgV","2748634wURmnp","4658715rWixrV"];return(Za=function(){return e})()}!function(e){for(var t=Qa,n=e();;)try{if(719305===parseInt(t(281))/1+parseInt(t(276))/2+-parseInt(t(274))/3*(parseInt(t(282))/4)+-parseInt(t(278))/5+-parseInt(t(279))/6+-parseInt(t(275))/7+parseInt(t(280))/8*(parseInt(t(277))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Za)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
|