dynamic-mui 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -20
  3. package/dist/components/DynamicComponent.d.ts +0 -1
  4. package/dist/components/FormGenerator.d.ts +1 -2
  5. package/dist/components/charts/Bar/bar.d.ts +0 -1
  6. package/dist/components/charts/Line/line.d.ts +0 -1
  7. package/dist/components/charts/Mixchart/mixChart.d.ts +0 -1
  8. package/dist/components/charts/Pie/pie.d.ts +0 -1
  9. package/dist/components/controls/Accordion/accordion.d.ts +0 -1
  10. package/dist/components/controls/Autocomplete/autocomplete.d.ts +1 -2
  11. package/dist/components/controls/CheckBox/checkbox.d.ts +1 -2
  12. package/dist/components/controls/Chip/chip.d.ts +0 -1
  13. package/dist/components/controls/DataTable/datatable.d.ts +0 -1
  14. package/dist/components/controls/DateTime/datetime.d.ts +1 -2
  15. package/dist/components/controls/DateTimePicker/datetimepicker.d.ts +1 -2
  16. package/dist/components/controls/Divider/divider.d.ts +0 -1
  17. package/dist/components/controls/Group/group.d.ts +0 -1
  18. package/dist/components/controls/Hyperlink/hyperlink.d.ts +2 -0
  19. package/dist/components/controls/ImageList/imagelist.d.ts +0 -1
  20. package/dist/components/controls/List/list.d.ts +0 -1
  21. package/dist/components/controls/MultiTextbox/multitextbox.d.ts +1 -2
  22. package/dist/components/controls/NumberField/numberfield.d.ts +1 -2
  23. package/dist/components/controls/Radio/radio.d.ts +1 -2
  24. package/dist/components/controls/Select/select.d.ts +1 -2
  25. package/dist/components/controls/Signature/signature.d.ts +1 -2
  26. package/dist/components/controls/Stepper/stepper.d.ts +0 -1
  27. package/dist/components/controls/Switch/switch.d.ts +1 -2
  28. package/dist/components/controls/Tabs/tabs.d.ts +0 -1
  29. package/dist/components/controls/TextField/textfield.d.ts +0 -1
  30. package/dist/components/controls/TimePicker/timepicker.d.ts +1 -2
  31. package/dist/components/controls/Typography/typography.d.ts +0 -1
  32. package/dist/components/controls/index.d.ts +2 -1
  33. package/dist/dynamic-mui.cjs.js +1 -496
  34. package/dist/dynamic-mui.es.js +7 -82173
  35. package/dist/index-BFycuK80.js +465 -0
  36. package/dist/index-CJMUh0I6.js +1 -0
  37. package/dist/index-DvtivzW0.mjs +101901 -0
  38. package/dist/index-ipsOTYQY.mjs +153 -0
  39. package/dist/loadCognitoIdentity-BwoR11En.js +1 -0
  40. package/dist/loadCognitoIdentity-Cqci1Eff.mjs +935 -0
  41. package/dist/playground/Canvas.d.ts +0 -1
  42. package/dist/playground/PropertiesEditor.d.ts +0 -1
  43. package/dist/playground/templates.d.ts +0 -1
  44. package/dist/playground/testData.d.ts +0 -1
  45. package/dist/test/setup.d.ts +0 -1
  46. package/dist/util/helper.d.ts +4 -1
  47. package/dist/util/s3Upload.d.ts +13 -0
  48. package/dist/util/useUpdateEffect.d.ts +0 -1
  49. package/package.json +33 -36
@@ -0,0 +1,153 @@
1
+ import { t as z, s as x } from "./index-DvtivzW0.mjs";
2
+ class T {
3
+ marshaller;
4
+ serializer;
5
+ deserializer;
6
+ serdeContext;
7
+ defaultContentType;
8
+ constructor({ marshaller: i, serializer: n, deserializer: o, serdeContext: c, defaultContentType: y }) {
9
+ this.marshaller = i, this.serializer = n, this.deserializer = o, this.serdeContext = c, this.defaultContentType = y;
10
+ }
11
+ async serializeEventStream({ eventStream: i, requestSchema: n, initialRequest: o }) {
12
+ const c = this.marshaller, y = n.getEventStreamMember(), p = n.getMemberSchema(y), d = this.serializer, f = this.defaultContentType, h = /* @__PURE__ */ Symbol("initialRequestMarker"), S = {
13
+ async *[Symbol.asyncIterator]() {
14
+ if (o) {
15
+ const r = {
16
+ ":event-type": { type: "string", value: "initial-request" },
17
+ ":message-type": { type: "string", value: "event" },
18
+ ":content-type": { type: "string", value: f }
19
+ };
20
+ d.write(n, o);
21
+ const t = d.flush();
22
+ yield {
23
+ [h]: !0,
24
+ headers: r,
25
+ body: t
26
+ };
27
+ }
28
+ for await (const r of i)
29
+ yield r;
30
+ }
31
+ };
32
+ return c.serialize(S, (r) => {
33
+ if (r[h])
34
+ return {
35
+ headers: r.headers,
36
+ body: r.body
37
+ };
38
+ const t = Object.keys(r).find((s) => s !== "__type") ?? "", { additionalHeaders: e, body: a, eventType: l, explicitPayloadContentType: m } = this.writeEventBody(t, p, r);
39
+ return {
40
+ headers: {
41
+ ":event-type": { type: "string", value: l },
42
+ ":message-type": { type: "string", value: "event" },
43
+ ":content-type": { type: "string", value: m ?? f },
44
+ ...e
45
+ },
46
+ body: a
47
+ };
48
+ });
49
+ }
50
+ async deserializeEventStream({ response: i, responseSchema: n, initialResponseContainer: o }) {
51
+ const c = this.marshaller, y = n.getEventStreamMember(), d = n.getMemberSchema(y).getMemberSchemas(), f = /* @__PURE__ */ Symbol("initialResponseMarker"), h = c.deserialize(i.body, async (t) => {
52
+ const e = Object.keys(t).find((l) => l !== "__type") ?? "", a = t[e].body;
53
+ if (e === "initial-response") {
54
+ const l = await this.deserializer.read(n, a);
55
+ return delete l[y], {
56
+ [f]: !0,
57
+ ...l
58
+ };
59
+ } else if (e in d) {
60
+ const l = d[e];
61
+ if (l.isStructSchema()) {
62
+ const m = {};
63
+ let u = !1;
64
+ for (const [s, g] of l.structIterator()) {
65
+ const { eventHeader: v, eventPayload: w } = g.getMergedTraits();
66
+ if (u = u || !!(v || w), w)
67
+ g.isBlobSchema() ? m[s] = a : g.isStringSchema() ? m[s] = (this.serdeContext?.utf8Encoder ?? z)(a) : g.isStructSchema() && (m[s] = await this.deserializer.read(g, a));
68
+ else if (v) {
69
+ const b = t[e].headers[s]?.value;
70
+ b != null && (g.isNumericSchema() ? b && typeof b == "object" && "bytes" in b ? m[s] = BigInt(b.toString()) : m[s] = Number(b) : m[s] = b);
71
+ }
72
+ }
73
+ if (u)
74
+ return {
75
+ [e]: m
76
+ };
77
+ if (a.byteLength === 0)
78
+ return {
79
+ [e]: {}
80
+ };
81
+ }
82
+ return {
83
+ [e]: await this.deserializer.read(l, a)
84
+ };
85
+ } else
86
+ return {
87
+ $unknown: t
88
+ };
89
+ }), S = h[Symbol.asyncIterator](), r = await S.next();
90
+ if (r.done)
91
+ return h;
92
+ if (r.value?.[f]) {
93
+ if (!n)
94
+ throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
95
+ for (const [t, e] of Object.entries(r.value))
96
+ o[t] = e;
97
+ }
98
+ return {
99
+ async *[Symbol.asyncIterator]() {
100
+ for (r?.value?.[f] || (yield r.value); ; ) {
101
+ const { done: t, value: e } = await S.next();
102
+ if (t)
103
+ break;
104
+ yield e;
105
+ }
106
+ }
107
+ };
108
+ }
109
+ writeEventBody(i, n, o) {
110
+ const c = this.serializer;
111
+ let y = i, p = null, d;
112
+ const f = n.getSchema()[4].includes(i), h = {};
113
+ if (f) {
114
+ const t = n.getMemberSchema(i);
115
+ if (t.isStructSchema()) {
116
+ for (const [e, a] of t.structIterator()) {
117
+ const { eventHeader: l, eventPayload: m } = a.getMergedTraits();
118
+ if (m)
119
+ p = e;
120
+ else if (l) {
121
+ const u = o[i][e];
122
+ let s = "binary";
123
+ a.isNumericSchema() ? (-2) ** 31 <= u && u <= 2 ** 31 - 1 ? s = "integer" : s = "long" : a.isTimestampSchema() ? s = "timestamp" : a.isStringSchema() ? s = "string" : a.isBooleanSchema() && (s = "boolean"), u != null && (h[e] = {
124
+ type: s,
125
+ value: u
126
+ }, delete o[i][e]);
127
+ }
128
+ }
129
+ if (p !== null) {
130
+ const e = t.getMemberSchema(p);
131
+ e.isBlobSchema() ? d = "application/octet-stream" : e.isStringSchema() && (d = "text/plain"), c.write(e, o[i][p]);
132
+ } else
133
+ c.write(t, o[i]);
134
+ } else if (t.isUnitSchema())
135
+ c.write(t, {});
136
+ else
137
+ throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
138
+ } else {
139
+ const [t, e] = o[i];
140
+ y = t, c.write(15, e);
141
+ }
142
+ const S = c.flush();
143
+ return {
144
+ body: typeof S == "string" ? (this.serdeContext?.utf8Decoder ?? x)(S) : S,
145
+ eventType: y,
146
+ explicitPayloadContentType: d,
147
+ additionalHeaders: h
148
+ };
149
+ }
150
+ }
151
+ export {
152
+ T as EventStreamSerde
153
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-BFycuK80.js");class Se extends s.HttpProtocol{async serializeRequest(t,e,o){const r=this.serializer,a={},n={},c=await o.endpoint(),u=s.NormalizedSchema.of(t?.input),l=u.getSchema();let p;const h=new s.HttpRequest({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:a,headers:n,body:void 0});c&&(this.updateServiceEndpoint(h,c),this.setHostPrefix(h,t,e));const f={...e};if(e){const m=u.getEventStreamMember();if(m){if(f[m]){const y={};for(const[A,ye]of u.structIterator())A!==m&&f[A]&&(r.write(ye,f[A]),y[A]=r.flush());p=await this.serializeEventStream({eventStream:f[m],requestSchema:u,initialRequest:y})}}else r.write(l,f),p=r.flush()}return h.headers=n,h.query=a,h.body=p,h.method="POST",h}async deserializeResponse(t,e,o){const r=this.deserializer,a=s.NormalizedSchema.of(t.output),n={};if(o.statusCode>=300){const u=await s.collectBody(o.body,e);throw u.byteLength>0&&Object.assign(n,await r.read(15,u)),await this.handleError(t,e,o,n,this.deserializeMetadata(o)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const u in o.headers){const l=o.headers[u];delete o.headers[u],o.headers[u.toLowerCase()]=l}const c=a.getEventStreamMember();if(c)n[c]=await this.deserializeEventStream({response:o,responseSchema:a,initialResponseContainer:n});else{const u=await s.collectBody(o.body,e);u.byteLength>0&&Object.assign(n,await r.read(a,u))}return n.$metadata=this.deserializeMetadata(o),n}}class Ee{async sign(t,e,o){return t}}function we(i,t,e){if(e?.source){const o=e.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||o!==String(t)))return o.includes(".")?new s.NumericValue(o,"bigDecimal"):BigInt(o)}return t}const Ie=(i,t)=>s.collectBody(i,t).then(e=>(t?.utf8Encoder??s.toUtf8)(e)),xe=(i,t)=>Ie(i,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(o){throw o?.name==="SyntaxError"&&Object.defineProperty(o,"$responseBodyText",{value:e}),o}return{}}),be=(i,t)=>{const e=(a,n)=>Object.keys(a).find(c=>c.toLowerCase()===n.toLowerCase()),o=a=>{let n=a;return typeof n=="number"&&(n=n.toString()),n.indexOf(",")>=0&&(n=n.split(",")[0]),n.indexOf(":")>=0&&(n=n.split(":")[0]),n.indexOf("#")>=0&&(n=n.split("#")[1]),n},r=e(i.headers,"x-amzn-errortype");if(r!==void 0)return o(i.headers[r]);if(t&&typeof t=="object"){const a=e(t,"code");if(a&&t[a]!==void 0)return o(t[a]);if(t.__type!==void 0)return o(t.__type)}};class Ce extends s.SerdeContextConfig{settings;constructor(t){super(),this.settings=t}async read(t,e){return this._read(t,typeof e=="string"?JSON.parse(e,we):await xe(e,this.serdeContext))}readObject(t,e){return this._read(t,e)}_read(t,e){const o=e!==null&&typeof e=="object",r=s.NormalizedSchema.of(t);if(o){if(r.isStructSchema()){const n=e,c=r.isUnionSchema(),u={};let l;const{jsonName:p}=this.settings;p&&(l={});let h;c&&(h=new s.UnionSerde(n,u));for(const[f,m]of r.structIterator()){let y=f;p&&(y=m.getMergedTraits().jsonName??y,l[y]=f),c&&h.mark(y),n[y]!=null&&(u[f]=this._read(m,n[y]))}if(c)h.writeUnknown();else if(typeof n.__type=="string")for(const[f,m]of Object.entries(n)){const y=p?l[f]??f:f;y in u||(u[y]=m)}return u}if(Array.isArray(e)&&r.isListSchema()){const n=r.getValueSchema(),c=[],u=!!r.getMergedTraits().sparse;for(const l of e)(u||l!=null)&&c.push(this._read(n,l));return c}if(r.isMapSchema()){const n=r.getValueSchema(),c={},u=!!r.getMergedTraits().sparse;for(const[l,p]of Object.entries(e))(u||p!=null)&&(c[l]=this._read(n,p));return c}}if(r.isBlobSchema()&&typeof e=="string")return s.fromBase64(e);const a=r.getMergedTraits().mediaType;if(r.isStringSchema()&&typeof e=="string"&&a)return a==="application/json"||a.endsWith("+json")?s.LazyJsonString.from(e):e;if(r.isTimestampSchema()&&e!=null)switch(s.determineTimestampFormat(r,this.settings)){case 5:return s.parseRfc3339DateTimeWithOffset(e);case 6:return s.parseRfc7231DateTime(e);case 7:return s.parseEpochTimestamp(e);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",e),new Date(e)}if(r.isBigIntegerSchema()&&(typeof e=="number"||typeof e=="string"))return BigInt(e);if(r.isBigDecimalSchema()&&e!=null){if(e instanceof s.NumericValue)return e;const n=e;return n.type==="bigDecimal"&&"string"in n?new s.NumericValue(n.string,n.type):new s.NumericValue(String(e),"bigDecimal")}if(r.isNumericSchema()&&typeof e=="string"){switch(e){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return e}if(r.isDocumentSchema())if(o){const n=Array.isArray(e)?[]:{};for(const[c,u]of Object.entries(e))u instanceof s.NumericValue?n[c]=u:n[c]=this._read(r,u);return n}else return structuredClone(e);return e}}const W="Ν";class Pe{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(t,e)=>{if(e instanceof s.NumericValue){const o=`${W+"nv"+this.counter++}_`+e.string;return this.values.set(`"${o}"`,e.string),o}if(typeof e=="bigint"){const o=e.toString(),r=`${W+"b"+this.counter++}_`+o;return this.values.set(`"${r}"`,o),r}return e}}replaceInJson(t){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return t;for(const[e,o]of this.values)t=t.replace(e,o);return t}}class Re extends s.SerdeContextConfig{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,e){this.rootSchema=s.NormalizedSchema.of(t),this.buffer=this._write(this.rootSchema,e)}writeDiscriminatedDocument(t,e){this.write(t,e),typeof this.buffer=="object"&&(this.buffer.__type=s.NormalizedSchema.of(t).getName(!0))}flush(){const{rootSchema:t,useReplacer:e}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t?.isStructSchema()||t?.isDocumentSchema()){if(!e)return JSON.stringify(this.buffer);const o=new Pe;return o.replaceInJson(JSON.stringify(this.buffer,o.createReplacer(),0))}return this.buffer}_write(t,e,o){const r=e!==null&&typeof e=="object",a=s.NormalizedSchema.of(t);if(r){if(a.isStructSchema()){const n=e,c={},{jsonName:u}=this.settings;let l;u&&(l={});for(const[p,h]of a.structIterator()){const f=this._write(h,n[p],a);if(f!==void 0){let m=p;u&&(m=h.getMergedTraits().jsonName??p,l[p]=m),c[m]=f}}if(a.isUnionSchema()&&Object.keys(c).length===0){const{$unknown:p}=n;if(Array.isArray(p)){const[h,f]=p;c[h]=this._write(15,f)}}else if(typeof n.__type=="string")for(const[p,h]of Object.entries(n)){const f=u?l[p]??p:p;f in c||(c[f]=this._write(15,h))}return c}if(Array.isArray(e)&&a.isListSchema()){const n=a.getValueSchema(),c=[],u=!!a.getMergedTraits().sparse;for(const l of e)(u||l!=null)&&c.push(this._write(n,l));return c}if(a.isMapSchema()){const n=a.getValueSchema(),c={},u=!!a.getMergedTraits().sparse;for(const[l,p]of Object.entries(e))(u||p!=null)&&(c[l]=this._write(n,p));return c}if(e instanceof Uint8Array&&(a.isBlobSchema()||a.isDocumentSchema()))return a===this.rootSchema?e:(this.serdeContext?.base64Encoder??s.toBase64)(e);if(e instanceof Date&&(a.isTimestampSchema()||a.isDocumentSchema()))switch(s.determineTimestampFormat(a,this.settings)){case 5:return e.toISOString().replace(".000Z","Z");case 6:return s.dateToUtcString(e);case 7:return e.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",e),e.getTime()/1e3}e instanceof s.NumericValue&&(this.useReplacer=!0)}if(!(e===null&&o?.isStructSchema())){if(a.isStringSchema()){if(typeof e>"u"&&a.isIdempotencyToken())return s.v4();const n=a.getMergedTraits().mediaType;return e!=null&&n&&(n==="application/json"||n.endsWith("+json"))?s.LazyJsonString.from(e):e}if(typeof e=="number"&&a.isNumericSchema())return Math.abs(e)===1/0||isNaN(e)?String(e):e;if(typeof e=="string"&&a.isBlobSchema())return a===this.rootSchema?e:(this.serdeContext?.base64Encoder??s.toBase64)(e);if(typeof e=="bigint"&&(this.useReplacer=!0),a.isDocumentSchema())if(r){const n=Array.isArray(e)?[]:{};for(const[c,u]of Object.entries(e))u instanceof s.NumericValue?(this.useReplacer=!0,n[c]=u):n[c]=this._write(a,u);return n}else return structuredClone(e);return e}}}class Ae extends s.SerdeContextConfig{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new Re(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Ce(this.settings);return t.setSerdeContext(this.serdeContext),t}}class _e extends Se{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,serviceTarget:e,awsQueryCompatible:o,jsonCodec:r}){super({defaultNamespace:t}),this.serviceTarget=e,this.codec=r??new Ae({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!o,this.mixin=new s.ProtocolLib(this.awsQueryCompatible)}async serializeRequest(t,e,o){const r=await super.serializeRequest(t,e,o);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${t.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),(s.deref(t.input)==="unit"||!r.body)&&(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(t,e,o,r,a){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,o);const n=be(o,r)??"Unknown",{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(n,this.options.defaultNamespace,o,r,a,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),l=s.NormalizedSchema.of(c),p=r.message??r.Message??"Unknown",h=s.TypeRegistry.for(c[1]).getErrorCtor(c)??Error,f=new h(p),m={};for(const[y,A]of l.structIterator())r[y]!=null&&(m[y]=this.codec.createDeserializer().readObject(A,r[y]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,m),this.mixin.decorateServiceException(Object.assign(f,u,{$fault:l.getMergedTraits().error,message:p},m),r)}}class ve extends _e{constructor({defaultNamespace:t,serviceTarget:e,awsQueryCompatible:o,jsonCodec:r}){super({defaultNamespace:t,serviceTarget:e,awsQueryCompatible:o,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const ke=async(i,t,e)=>({operation:s.getSmithyContext(t).operation,region:await s.normalizeProvider(i.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Te(i){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:i.region},propertiesExtractor:(t,e)=>({signingProperties:{config:t,context:e}})}}function O(i){return{schemeId:"smithy.api#noAuth"}}const De=i=>{const t=[];switch(i.operation){case"GetCredentialsForIdentity":{t.push(O());break}case"GetId":{t.push(O());break}case"GetOpenIdToken":{t.push(O());break}case"UnlinkIdentity":{t.push(O());break}default:t.push(Te(i))}return t},Oe=i=>{const t=s.resolveAwsSdkSigV4Config(i);return Object.assign(t,{authSchemePreference:s.normalizeProvider(i.authSchemePreference??[])})},Ne=i=>Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),ne={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Me="3.980.0",ze={version:Me},ae=(i,t=!1)=>{if(t){for(const e of i.split("."))if(!ae(e))return!1;return!0}return!(!s.isValidHostLabel(i)||i.length<3||i.length>63||i!==i.toLowerCase()||s.isIpAddress(i))},K=":",Fe="/",$e=i=>{const t=i.split(K);if(t.length<6)return null;const[e,o,r,a,n,...c]=t;if(e!=="arn"||o===""||r===""||c.join(K)==="")return null;const u=c.map(l=>l.split(Fe)).flat();return{partition:o,service:r,region:a,accountId:n,resourceId:u}},Ue=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],je={partitions:Ue};let Ge=je;const Le=i=>{const{partitions:t}=Ge;for(const o of t){const{regions:r,outputs:a}=o;for(const[n,c]of Object.entries(r))if(n===i)return{...a,...c}}for(const o of t){const{regionRegex:r,outputs:a}=o;if(new RegExp(r).test(i))return{...a}}const e=t.find(o=>o.id==="aws");if(!e)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...e.outputs}},ce={isVirtualHostableS3Bucket:ae,parseArn:$e,partition:Le};s.customEndpointFunctions.aws=ce;const ue="required",S="fn",E="argv",v="ref",Q=!0,Z="isSet",D="booleanEquals",_="error",b="endpoint",R="tree",N="PartitionResult",M="getAttr",k="stringEquals",X={[ue]:!1,type:"string"},Y={[ue]:!0,default:!1,type:"boolean"},ee={[v]:"Endpoint"},de={[S]:D,[E]:[{[v]:"UseFIPS"},!0]},pe={[S]:D,[E]:[{[v]:"UseDualStack"},!0]},g={},T={[v]:"Region"},te={[S]:M,[E]:[{[v]:N},"supportsFIPS"]},le={[v]:N},se={[S]:D,[E]:[!0,{[S]:M,[E]:[le,"supportsDualStack"]}]},ie=[de],re=[pe],oe=[T],He={parameters:{Region:X,UseDualStack:Y,UseFIPS:Y,Endpoint:X},rules:[{conditions:[{[S]:Z,[E]:[ee]}],rules:[{conditions:ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:_},{conditions:re,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:_},{endpoint:{url:ee,properties:g,headers:g},type:b}],type:R},{conditions:[{[S]:Z,[E]:oe}],rules:[{conditions:[{[S]:"aws.partition",[E]:oe,assign:N}],rules:[{conditions:[de,pe],rules:[{conditions:[{[S]:D,[E]:[Q,te]},se],rules:[{conditions:[{[S]:k,[E]:[T,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:g,headers:g},type:b},{conditions:[{[S]:k,[E]:[T,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:g,headers:g},type:b},{conditions:[{[S]:k,[E]:[T,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:g,headers:g},type:b},{conditions:[{[S]:k,[E]:[T,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:g,headers:g},type:b},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},type:b}],type:R},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:_}],type:R},{conditions:ie,rules:[{conditions:[{[S]:D,[E]:[te,Q]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},type:b}],type:R},{error:"FIPS is enabled but this partition does not support FIPS",type:_}],type:R},{conditions:re,rules:[{conditions:[se],rules:[{conditions:[{[S]:k,[E]:["aws",{[S]:M,[E]:[le,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:g,headers:g},type:b},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},type:b}],type:R},{error:"DualStack is enabled but this partition does not support DualStack",type:_}],type:R},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},type:b}],type:R}],type:R},{error:"Invalid Configuration: Missing Region",type:_}]},Be=He,Je=new s.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ve=(i,t={})=>Je.get(i,()=>s.resolveEndpoint(Be,{endpointParams:i,logger:t.logger}));s.customEndpointFunctions.aws=ce;const qe=i=>({apiVersion:"2014-06-30",base64Decoder:i?.base64Decoder??s.fromBase64,base64Encoder:i?.base64Encoder??s.toBase64,disableHostPrefix:i?.disableHostPrefix??!1,endpointProvider:i?.endpointProvider??Ve,extensions:i?.extensions??[],httpAuthSchemeProvider:i?.httpAuthSchemeProvider??De,httpAuthSchemes:i?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new s.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ee}],logger:i?.logger??new s.NoOpLogger,protocol:i?.protocol??ve,protocolSettings:i?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:i?.serviceId??"Cognito Identity",urlParser:i?.urlParser??s.parseUrl,utf8Decoder:i?.utf8Decoder??s.fromUtf8,utf8Encoder:i?.utf8Encoder??s.toUtf8}),We=i=>{const t=s.resolveDefaultsModeConfig(i),e=()=>t().then(s.loadConfigsForDefaultMode),o=qe(i);return{...o,...i,runtime:"browser",defaultsMode:t,bodyLengthChecker:i?.bodyLengthChecker??s.calculateBodyLength,credentialDefaultProvider:i?.credentialDefaultProvider??(r=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:i?.defaultUserAgentProvider??s.createDefaultUserAgentProvider({serviceId:o.serviceId,clientVersion:ze.version}),maxAttempts:i?.maxAttempts??s.DEFAULT_MAX_ATTEMPTS,region:i?.region??s.invalidProvider("Region is missing"),requestHandler:s.FetchHttpHandler.create(i?.requestHandler??e),retryMode:i?.retryMode??(async()=>(await e()).retryMode||s.DEFAULT_RETRY_MODE),sha256:i?.sha256??s.Sha256,streamCollector:i?.streamCollector??s.streamCollector,useDualstackEndpoint:i?.useDualstackEndpoint??(()=>Promise.resolve(s.DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:i?.useFipsEndpoint??(()=>Promise.resolve(s.DEFAULT_USE_FIPS_ENDPOINT))}},Ke=i=>{const t=i.httpAuthSchemes;let e=i.httpAuthSchemeProvider,o=i.credentials;return{setHttpAuthScheme(r){const a=t.findIndex(n=>n.schemeId===r.schemeId);a===-1?t.push(r):t.splice(a,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){e=r},httpAuthSchemeProvider(){return e},setCredentials(r){o=r},credentials(){return o}}},Qe=i=>({httpAuthSchemes:i.httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()}),Ze=(i,t)=>{const e=Object.assign(s.getAwsRegionExtensionConfiguration(i),s.getDefaultExtensionConfiguration(i),s.getHttpHandlerExtensionConfiguration(i),Ke(i));return t.forEach(o=>o.configure(e)),Object.assign(i,s.resolveAwsRegionExtensionConfiguration(e),s.resolveDefaultRuntimeConfig(e),s.resolveHttpHandlerRuntimeConfig(e),Qe(e))};class Xe extends s.Client{config;constructor(...[t]){const e=We(t||{});super(e),this.initConfig=e;const o=Ne(e),r=s.resolveUserAgentConfig(o),a=s.resolveRetryConfig(r),n=s.resolveRegionConfig(a),c=s.resolveHostHeaderConfig(n),u=s.resolveEndpointConfig(c),l=Oe(u),p=Ze(l,t?.extensions||[]);this.config=p,this.middlewareStack.use(s.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(s.getUserAgentPlugin(this.config)),this.middlewareStack.use(s.getRetryPlugin(this.config)),this.middlewareStack.use(s.getContentLengthPlugin(this.config)),this.middlewareStack.use(s.getHostHeaderPlugin(this.config)),this.middlewareStack.use(s.getLoggerPlugin(this.config)),this.middlewareStack.use(s.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(s.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ke,identityProviderConfigProvider:async h=>new s.DefaultIdentityProviderConfig({"aws.auth#sigv4":h.credentials})})),this.middlewareStack.use(s.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class w extends s.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,w.prototype)}}class z extends w{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,z.prototype)}}class F extends w{name="InvalidParameterException";$fault="client";constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,F.prototype)}}class $ extends w{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,$.prototype)}}class U extends w{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class j extends w{name="ResourceConflictException";$fault="client";constructor(t){super({name:"ResourceConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,j.prototype)}}class G extends w{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,G.prototype)}}class L extends w{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,L.prototype)}}class H extends w{name="ExternalServiceException";$fault="client";constructor(t){super({name:"ExternalServiceException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}class B extends w{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,B.prototype)}}class J extends w{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(t){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...t}),Object.setPrototypeOf(this,J.prototype)}}class V extends w{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,V.prototype)}}const Ye="AccountId",et="AccessKeyId",fe="Credentials",tt="ConcurrentModificationException",st="CustomRoleArn",it="DeveloperUserAlreadyRegisteredException",rt="Expiration",ot="ExternalServiceException",nt="GetCredentialsForIdentity",at="GetCredentialsForIdentityInput",ct="GetCredentialsForIdentityResponse",ut="GetId",dt="GetIdInput",pt="GetIdResponse",lt="InternalErrorException",q="IdentityId",ft="InvalidIdentityPoolConfigurationException",ht="InvalidParameterException",gt="IdentityPoolId",mt="IdentityProviderToken",he="Logins",yt="LimitExceededException",St="LoginsMap",Et="NotAuthorizedException",wt="ResourceConflictException",It="ResourceNotFoundException",xt="SecretKey",bt="SecretKeyString",Ct="SessionToken",Pt="TooManyRequestsException",C="client",I="error",P="httpError",x="message",Rt="server",ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",d="com.amazonaws.cognitoidentity";var At=[0,d,mt,8,0],_t=[0,d,bt,8,0],vt=[-3,d,tt,{[I]:C,[P]:400},[x],[0]];s.TypeRegistry.for(d).registerError(vt,V);var kt=[3,d,fe,0,[et,xt,Ct,rt],[0,[()=>_t,0],0,4]],Tt=[-3,d,it,{[I]:C,[P]:400},[x],[0]];s.TypeRegistry.for(d).registerError(Tt,J);var Dt=[-3,d,ot,{[I]:C,[P]:400},[x],[0]];s.TypeRegistry.for(d).registerError(Dt,H);var Ot=[3,d,at,0,[q,he,st],[0,[()=>me,0],0],1],Nt=[3,d,ct,0,[q,fe],[0,[()=>kt,0]]],Mt=[3,d,dt,0,[gt,Ye,he],[0,0,[()=>me,0]],1],zt=[3,d,pt,0,[q],[0]],Ft=[-3,d,lt,{[I]:Rt},[x],[0]];s.TypeRegistry.for(d).registerError(Ft,z);var $t=[-3,d,ft,{[I]:C,[P]:400},[x],[0]];s.TypeRegistry.for(d).registerError($t,B);var Ut=[-3,d,ht,{[I]:C,[P]:400},[x],[0]];s.TypeRegistry.for(d).registerError(Ut,F);var jt=[-3,d,yt,{[I]:C,[P]:400},[x],[0]];s.TypeRegistry.for(d).registerError(jt,$);var Gt=[-3,d,Et,{[I]:C,[P]:403},[x],[0]];s.TypeRegistry.for(d).registerError(Gt,U);var Lt=[-3,d,wt,{[I]:C,[P]:409},[x],[0]];s.TypeRegistry.for(d).registerError(Lt,j);var Ht=[-3,d,It,{[I]:C,[P]:404},[x],[0]];s.TypeRegistry.for(d).registerError(Ht,L);var Bt=[-3,d,Pt,{[I]:C,[P]:429},[x],[0]];s.TypeRegistry.for(d).registerError(Bt,G);var Jt=[-3,ge,"CognitoIdentityServiceException",0,[],[]];s.TypeRegistry.for(ge).registerError(Jt,w);var me=[2,d,St,0,[0,0],[()=>At,0]],Vt=[9,d,nt,0,()=>Ot,()=>Nt],qt=[9,d,ut,0,()=>Mt,()=>zt];class Wt extends s.Command.classBuilder().ep(ne).m(function(t,e,o,r){return[s.getEndpointPlugin(o,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Vt).build(){}class Kt extends s.Command.classBuilder().ep(ne).m(function(t,e,o,r){return[s.getEndpointPlugin(o,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(qt).build(){}exports.CognitoIdentityClient=Xe;exports.GetCredentialsForIdentityCommand=Wt;exports.GetIdCommand=Kt;