quantum-component-library 1.0.0-qa → 1.4.45-dev.13

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 (69) hide show
  1. package/dist/components/copy-activity-form/index.d.ts +6 -4
  2. package/dist/components.cjs +1 -13
  3. package/dist/components.js +1060 -1006
  4. package/dist/{dnd-core-vendor-bgjKfDi6.cjs → dnd-core-vendor-2Ve0kqUN.cjs} +1 -1
  5. package/dist/{dnd-core-vendor-q7mfiuVu.js → dnd-core-vendor-CErAmYu_.js} +2 -2
  6. package/dist/emotion-react-vendor-CHdBBD18.cjs +1 -0
  7. package/dist/emotion-react-vendor-CSrsXjBq.js +81 -0
  8. package/dist/emotion-vendor-D6PQH2K8.cjs +1 -0
  9. package/dist/emotion-vendor-DNnoMT20.js +546 -0
  10. package/dist/floating-ui-vendor-BcB50aec.js +246 -0
  11. package/dist/floating-ui-vendor-Dsd5TAjM.cjs +1 -0
  12. package/dist/generated/gql.d.ts +5 -0
  13. package/dist/generated/graphql.d.ts +19 -0
  14. package/dist/{generated-ChsGaiYd.cjs → generated-B5QGMyhw.cjs} +1 -1
  15. package/dist/{generated-GfcSQz21.js → generated-esGwfMXj.js} +21 -20
  16. package/dist/graphql/mutations/actions.d.ts +3 -0
  17. package/dist/{graphql-DiUes2Np.js → graphql-DpdZo65w.js} +35 -28
  18. package/dist/{graphql-CqPvuCvr.cjs → graphql-KvyVlavd.cjs} +18 -12
  19. package/dist/graphql-vendor-BWnD0b-j.js +1285 -0
  20. package/dist/graphql-vendor-CL0XsjHb.cjs +19 -0
  21. package/dist/hoist-non-react-statics-vendor-C5vG1oEE.cjs +1 -0
  22. package/dist/hoist-non-react-statics-vendor-DJU3S3cV.js +68 -0
  23. package/dist/hooks.cjs +1 -1
  24. package/dist/hooks.js +45 -46
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +115 -115
  28. package/dist/{lodash-vendor-D5A6v3mw.cjs → lodash-vendor-CR237hSU.cjs} +1 -1
  29. package/dist/{lodash-vendor-Dz4vW7Gd.js → lodash-vendor-D4ZPCr77.js} +1 -1
  30. package/dist/moment-vendor-1cRqq0AH.cjs +10 -0
  31. package/dist/moment-vendor-DMLRxgRE.js +2589 -0
  32. package/dist/{other-TR0ap-t4.cjs → other-Dp3RPYfF.cjs} +1 -1
  33. package/dist/providers.cjs +1 -1
  34. package/dist/providers.js +8 -8
  35. package/dist/quantum-component-library.css +1 -1
  36. package/dist/react-dnd-vendor-BPzSDojS.cjs +2 -0
  37. package/dist/{react-dnd-vendor-BZs2igAJ.js → react-dnd-vendor-D4nn9Mqx.js} +22 -21
  38. package/dist/react-is-vendor-CosIbvzW.cjs +15 -0
  39. package/dist/react-is-vendor-DpFLFzFZ.js +174 -0
  40. package/dist/react-jsx-runtime-vendor-Dszzpdy0.cjs +22 -0
  41. package/dist/react-jsx-runtime-vendor-OVHDjVDe.js +284 -0
  42. package/dist/react-select-vendor-BPaBUHFp.cjs +4 -0
  43. package/dist/{react-select-vendor-eBH7yy3O.js → react-select-vendor-C_DuqfB7.js} +13 -10
  44. package/dist/services.cjs +1 -1
  45. package/dist/services.js +1 -1
  46. package/dist/stylis-vendor-CdCMw5Aa.js +334 -0
  47. package/dist/stylis-vendor-DzcTLVj9.cjs +1 -0
  48. package/dist/tailwind-vendor-B4y94WzT.js +2740 -0
  49. package/dist/tailwind-vendor-C0M23-WD.cjs +1 -0
  50. package/dist/types.cjs +1 -1
  51. package/dist/types.js +2 -2
  52. package/dist/ufuzzy-vendor-7qHa_k39.cjs +1 -0
  53. package/dist/ufuzzy-vendor-Dl0ZI6Av.js +456 -0
  54. package/dist/utils.cjs +1 -1
  55. package/dist/utils.js +31 -30
  56. package/dist/vendor-BjLvygDR.cjs +1 -0
  57. package/dist/vendor-VALJ9W3p.js +526 -0
  58. package/package.json +14 -10
  59. package/dist/graphql-vendor-JsvuUrRs.cjs +0 -14
  60. package/dist/graphql-vendor-YnA_qhJA.js +0 -669
  61. package/dist/react-dnd-vendor-BWqlt2EC.cjs +0 -2
  62. package/dist/react-select-vendor-By3h6JjH.cjs +0 -4
  63. package/dist/styled-components-vendor-Bvwhddj9.js +0 -1154
  64. package/dist/styled-components-vendor-D09ATioU.cjs +0 -60
  65. package/dist/vendor-BeqUcSbw.cjs +0 -45
  66. package/dist/vendor-DvX9OX-j.js +0 -7876
  67. package/dist/{providers → lib/providers}/index.d.ts +0 -0
  68. package/dist/{providers → lib/providers}/quantum-library-provider.d.ts +0 -0
  69. package/dist/{other-CmpBz5tg.js → other-C4VnLmM6.js} +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantum-component-library",
3
- "version": "1.0.0-qa",
3
+ "version": "1.4.45-dev.13",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.cjs",
@@ -40,7 +40,7 @@
40
40
  "require": "./dist/services.cjs"
41
41
  },
42
42
  "./providers": {
43
- "types": "./dist/providers/index.d.ts",
43
+ "types": "./dist/lib/providers/index.d.ts",
44
44
  "import": "./dist/providers.js",
45
45
  "require": "./dist/providers.cjs"
46
46
  },
@@ -71,37 +71,41 @@
71
71
  },
72
72
  "dependencies": {
73
73
  "@chakra-ui/react": "^2.10.9",
74
- "@emotion/styled": "^11.14.1",
74
+ "@emotion/react": "^11.14.0",
75
+ "@emotion/styled": "^11.14.0",
75
76
  "@leeoniya/ufuzzy": "^1.0.19",
76
77
  "@tailwindcss/vite": "^4.1.12",
77
- "@urql/exchange-auth": "^2.2.1",
78
- "chakra": "^0.0.3",
78
+ "@urql/exchange-auth": "^2.2.0",
79
+ "@urql/exchange-graphcache": "^7.2.2",
80
+ "ajv": "^8.17.1",
79
81
  "chakra-react-select": "^4.10.1",
80
- "lucide-react": "^0.541.0",
81
82
  "class-variance-authority": "^0.7.1",
82
83
  "clsx": "^2.1.1",
84
+ "framer-motion": "^12.23.12",
83
85
  "graphql": "^16.11.0",
86
+ "hoist-non-react-statics": "^3.3.2",
87
+ "lucide-react": "^0.541.0",
84
88
  "moment": "^2.30.1",
85
89
  "react": "^19.1.1",
86
90
  "react-dnd": "^16.0.1",
87
91
  "react-dnd-html5-backend": "^16.0.1",
88
92
  "react-dom": "^19.1.1",
89
93
  "react-icons": "^5.5.0",
90
- "styled-components": "^6.1.19",
91
94
  "tailwind-merge": "^3.3.1",
92
95
  "tailwindcss": "^4.1.12",
93
- "urql": "^4.2.2"
96
+ "urql": "4.2.1"
94
97
  },
95
98
  "devDependencies": {
96
99
  "@eslint/js": "^9.33.0",
97
- "@graphql-codegen/cli": "^5.0.7",
100
+ "@graphql-codegen/cli": "^6.0.0",
98
101
  "@graphql-codegen/introspection": "^4.0.3",
99
102
  "@storybook/react-vite": "^9.1.4",
103
+ "@types/hoist-non-react-statics": "^3.3.7",
100
104
  "@types/node": "^24.3.0",
101
105
  "@types/react": "^19.1.10",
102
106
  "@types/react-dom": "^19.1.7",
103
107
  "@vitejs/plugin-react": "^5.0.0",
104
- "copyfiles": "^2.4.1",
108
+ "copyfiles": "^2.1.0",
105
109
  "eslint": "^9.33.0",
106
110
  "eslint-plugin-react-hooks": "^5.2.0",
107
111
  "eslint-plugin-react-refresh": "^0.4.20",
@@ -1,14 +0,0 @@
1
- "use strict";const A=require("./vendor-BeqUcSbw.cjs");var Z={OPERATION_DEFINITION:"OperationDefinition"};class J extends Error{constructor(t,n,a,c,l,s,f){super(t),this.name="GraphQLError",this.message=t,l&&(this.path=l),n&&(this.nodes=Array.isArray(n)?n:[n]),a&&(this.source=a),c&&(this.positions=c),s&&(this.originalError=s);var p=f;if(!p&&s){var v=s.extensions;v&&typeof v=="object"&&(p=v)}this.extensions=p||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var i,r;function m(e){return new J(`Syntax Error: Unexpected token at ${r} in ${e}`)}function R(e){if(e.lastIndex=r,e.test(i))return i.slice(r,r=e.lastIndex)}var _=/ +(?=[^\s])/y;function ee(e){for(var t=e.split(`
2
- `),n="",a=0,c=0,l=t.length-1,s=0;s<t.length;s++)_.lastIndex=0,_.test(t[s])&&(s&&(!a||_.lastIndex<a)&&(a=_.lastIndex),c=c||s,l=s);for(var f=c;f<=l;f++)f!==c&&(n+=`
3
- `),n+=t[f].slice(a).replace(/\\"""/g,'"""');return n}function u(){for(var e=0|i.charCodeAt(r++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|i.charCodeAt(r++))if(e===35)for(;(e=0|i.charCodeAt(r++))&&e!==10&&e!==13;);r--}function M(){for(var e=r,t=0|i.charCodeAt(r++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|i.charCodeAt(r++));if(e===r-1)throw m("Name");var n=i.slice(e,--r);return u(),n}function k(){return{kind:"Name",value:M()}}var te=/(?:"""|(?:[\s\S]*?[^\\])""")/y,re=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function x(e){var t;switch(i.charCodeAt(r)){case 91:r++,u();for(var n=[];i.charCodeAt(r)!==93;)n.push(x(e));return r++,u(),{kind:"ListValue",values:n};case 123:r++,u();for(var a=[];i.charCodeAt(r)!==125;){var c=k();if(i.charCodeAt(r++)!==58)throw m("ObjectField");u(),a.push({kind:"ObjectField",name:c,value:x(e)})}return r++,u(),{kind:"ObjectValue",fields:a};case 36:if(e)throw m("Variable");return r++,{kind:"Variable",name:k()};case 34:if(i.charCodeAt(r+1)===34&&i.charCodeAt(r+2)===34){if(r+=3,(t=R(te))==null)throw m("StringValue");return u(),{kind:"StringValue",value:ee(t.slice(0,-3)),block:!0}}else{var l=r,s;r++;var f=!1;for(s=0|i.charCodeAt(r++);s===92&&(r++,f=!0)||s!==10&&s!==13&&s!==34&&s;s=0|i.charCodeAt(r++));if(s!==34)throw m("StringValue");return t=i.slice(l,r),u(),{kind:"StringValue",value:f?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var p=r++,v;(v=0|i.charCodeAt(r++))>=48&&v<=57;);var h=i.slice(p,--r);if((v=i.charCodeAt(r))===46||v===69||v===101){if((t=R(re))==null)throw m("FloatValue");return u(),{kind:"FloatValue",value:h+t}}else return u(),{kind:"IntValue",value:h};case 110:if(i.charCodeAt(r+1)===117&&i.charCodeAt(r+2)===108&&i.charCodeAt(r+3)===108)return r+=4,u(),{kind:"NullValue"};break;case 116:if(i.charCodeAt(r+1)===114&&i.charCodeAt(r+2)===117&&i.charCodeAt(r+3)===101)return r+=4,u(),{kind:"BooleanValue",value:!0};break;case 102:if(i.charCodeAt(r+1)===97&&i.charCodeAt(r+2)===108&&i.charCodeAt(r+3)===115&&i.charCodeAt(r+4)===101)return r+=5,u(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:M()}}function W(e){if(i.charCodeAt(r)===40){var t=[];r++,u();do{var n=k();if(i.charCodeAt(r++)!==58)throw m("Argument");u(),t.push({kind:"Argument",name:n,value:x(e)})}while(i.charCodeAt(r)!==41);return r++,u(),t}}function b(e){if(i.charCodeAt(r)===64){var t=[];do r++,t.push({kind:"Directive",name:k(),arguments:W(e)});while(i.charCodeAt(r)===64);return t}}function ne(){for(var e=0;i.charCodeAt(r)===91;)e++,r++,u();var t={kind:"NamedType",name:k()};do if(i.charCodeAt(r)===33&&(r++,u(),t={kind:"NonNullType",type:t}),e){if(i.charCodeAt(r++)!==93)throw m("NamedType");u(),t={kind:"ListType",type:t}}while(e--);return t}function j(){if(i.charCodeAt(r++)!==123)throw m("SelectionSet");return u(),L()}function L(){var e=[];do if(i.charCodeAt(r)===46){if(i.charCodeAt(++r)!==46||i.charCodeAt(++r)!==46)throw m("SelectionSet");switch(r++,u(),i.charCodeAt(r)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:b(!1),selectionSet:j()});break;case 111:i.charCodeAt(r+1)===110?(r+=2,u(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:k()},directives:b(!1),selectionSet:j()})):e.push({kind:"FragmentSpread",name:k(),directives:b(!1)});break;case 123:r++,u(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:L()});break;default:e.push({kind:"FragmentSpread",name:k(),directives:b(!1)})}}else{var t=k(),n=void 0;i.charCodeAt(r)===58&&(r++,u(),n=t,t=k());var a=W(!1),c=b(!1),l=void 0;i.charCodeAt(r)===123&&(r++,u(),l=L()),e.push({kind:"Field",alias:n,name:t,arguments:a,directives:c,selectionSet:l})}while(i.charCodeAt(r)!==125);return r++,u(),{kind:"SelectionSet",selections:e}}function ie(){if(u(),i.charCodeAt(r)===40){var e=[];r++,u();do{var t=void 0;if(i.charCodeAt(r)===34&&(t=x(!0)),i.charCodeAt(r++)!==36)throw m("Variable");var n=k();if(i.charCodeAt(r++)!==58)throw m("VariableDefinition");u();var a=ne(),c=void 0;i.charCodeAt(r)===61&&(r++,u(),c=x(!0)),u();var l={kind:"VariableDefinition",variable:{kind:"Variable",name:n},type:a,defaultValue:c,directives:b(!0)};t&&(l.description=t),e.push(l)}while(i.charCodeAt(r)!==41);return r++,u(),e}}function ae(e){var t=k();if(i.charCodeAt(r++)!==111||i.charCodeAt(r++)!==110)throw m("FragmentDefinition");u();var n={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:k()},directives:b(!1),selectionSet:j()};return e&&(n.description=e),n}function B(){var e=[];do{var t=void 0;if(i.charCodeAt(r)===34&&(t=x(!0)),i.charCodeAt(r)===123){if(t)throw m("Document");r++,u(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:L()})}else{var n=M();switch(n){case"fragment":e.push(ae(t));break;case"query":case"mutation":case"subscription":var a,c=void 0;(a=i.charCodeAt(r))!==40&&a!==64&&a!==123&&(c=k());var l={kind:"OperationDefinition",operation:n,name:c,variableDefinitions:ie(),directives:b(!1),selectionSet:j()};t&&(l.description=t),e.push(l);break;default:throw m("Document")}}}while(r<i.length);return e}function oe(e,t){return i=e.body?e.body:e,r=0,u(),t&&t.noLocation?{kind:"Document",definitions:B()}:{kind:"Document",definitions:B(),loc:{start:0,end:i.length,startToken:void 0,endToken:void 0,source:{body:i,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function g(e,t,n){for(var a="",c=0;c<e.length;c++)c&&(a+=t),a+=n(e[c]);return a}function se(e){return JSON.stringify(e)}function ce(e){return`"""
4
- `+e.replace(/"""/g,'\\"""')+`
5
- """`}var S=`
6
- `,d={OperationDefinition(e){var t="";e.description&&(t+=d.StringValue(e.description)+`
7
- `),t+=e.operation,e.name&&(t+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=" "),t+="("+g(e.variableDefinitions,", ",d.VariableDefinition)+")"),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive));var n=d.SelectionSet(e.selectionSet);return t!=="query"?t+" "+n:n},VariableDefinition(e){var t="";return e.description&&(t+=d.StringValue(e.description)+" "),t+=d.Variable(e.variable)+": "+C(e.type),e.defaultValue&&(t+=" = "+C(e.defaultValue)),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t},Field(e){var t=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var n=g(e.arguments,", ",d.Argument);t.length+n.length+2>80?t+="("+(S+=" ")+g(e.arguments,S,d.Argument)+(S=S.slice(0,-2))+")":t+="("+n+")"}return e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=" "+d.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?ce(e.value).replace(/\n/g,S):se(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+g(e.values,", ",C)+"]",ObjectValue:e=>"{"+g(e.fields,", ",d.ObjectField)+"}",ObjectField:e=>e.name.value+": "+C(e.value),Document(e){return!e.definitions||!e.definitions.length?"":g(e.definitions,`
8
-
9
- `,C)},SelectionSet:e=>"{"+(S+=" ")+g(e.selections,S,C)+(S=S.slice(0,-2))+"}",Argument:e=>e.name.value+": "+C(e.value),FragmentSpread(e){var t="..."+e.name.value;return e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t},InlineFragment(e){var t="...";return e.typeCondition&&(t+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t+=" "+d.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t="";return e.description&&(t+=d.StringValue(e.description)+`
10
- `),t+="fragment "+e.name.value,t+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=" "+g(e.directives," ",d.Directive)),t+" "+d.SelectionSet(e.selectionSet)},Directive(e){var t="@"+e.name.value;return e.arguments&&e.arguments.length&&(t+="("+g(e.arguments,", ",d.Argument)+")"),t},NamedType:e=>e.name.value,ListType:e=>"["+C(e.type)+"]",NonNullType:e=>C(e.type)+"!"},C=e=>d[e.kind](e);function ue(e){return S=`
11
- `,d[e.kind]?d[e.kind](e):""}var le=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new J(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new J(e);class de extends Error{constructor(t){var n=(t.graphQLErrors||[]).map(le),a=((c,l)=>{var s="";if(c)return`[Network] ${c.message}`;if(l)for(var f=0,p=l.length;f<p;f++)s&&(s+=`
12
- `),s+=`[GraphQL] ${l[f].message}`;return s})(t.networkError,n);super(a),this.name="CombinedError",this.message=a,this.graphQLErrors=n,this.networkError=t.networkError,this.response=t.response}toString(){return this.message}}var I=(e,t)=>{for(var n=0|(t||5381),a=0,c=0|e.length;a<c;a++)n=(n<<5)+n+e.charCodeAt(a);return n},F=new Set,P=new WeakMap,w=(e,t)=>{if(e===null||F.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return w(e.toJSON());if(Array.isArray(e)){for(var n="[",a=0,c=e.length;a<c;a++)n.length>1&&(n+=","),n+=w(e[a])||"null";return n+="]"}var l=Object.keys(e).sort();if(!l.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var s=P.get(e)||Math.random().toString(36).slice(2);return P.set(e,s),w({__key:s})}F.add(e);for(var f="{",p=0,v=l.length;p<v;p++){var h=w(e[l[p]]);h&&(f.length>1&&(f+=","),f+=w(l[p])+":"+h)}return F.delete(e),f+="}"},fe=(e,t)=>(F.clear(),w(e)),ve=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,he=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,pe=(e,t)=>t%2==0?e.replace(he,`
13
- `):e,z=e=>e.split(ve).map(pe).join("").trim(),U=new Map,T=new Map,K=e=>{var t;return typeof e=="string"?t=z(e):e.loc&&T.get(e.__key)===e?t=e.loc.source.body:(t=U.get(e)||z(ue(e)),U.set(e,t)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:"gql",locationOffset:{line:1,column:1}}}),t},H=e=>{var t;if(e.documentId)t=I(e.documentId);else if(t=I(K(e)),e.definitions){var n=ke(e);n&&(t=I(`
14
- # ${n}`,t))}return t},me=e=>{var t,n;return typeof e=="string"?(t=H(e),n=T.get(t)||oe(e,{noLocation:!0})):(t=e.__key||H(e),n=T.get(t)||e),n.loc||K(n),n.__key=t,T.set(t,n),n},ge=(e,t,n)=>{var a=t||{},c=me(e),l=fe(a),s=c.__key;return l!=="{}"&&(s=I(l,s)),{key:s,query:c,variables:a,extensions:n}},ke=e=>{for(var t=0,n=e.definitions.length;t<n;t++){var a=e.definitions[t];if(a.kind===Z.OPERATION_DEFINITION)return a.name?a.name.value:void 0}},Ae=(e,t,n)=>({operation:e,data:void 0,error:new de({networkError:t,response:n}),extensions:void 0,hasNext:!1,stale:!1});function X(e,t,n){return{...t,kind:e,context:t.context?{...t.context,...n}:n||t.context}}var $=(e,t)=>X(e.kind,e,{...e.context,authAttempt:t});function ye(e){return({client:t,forward:n})=>{var a=new Set,c=A.makeSubject(),l=A.makeSubject(),s=new Map;function f(){v=void 0;var O=s;s=new Map,O.forEach(c.next)}function p(O){v=void 0;var D=s;s=new Map,D.forEach((N=>{l.next(Ae(N,O))}))}var v,h=null;return O=>{function D(){v=Promise.resolve().then((()=>e({mutate(o,E,y){var q=t.createRequestOperation("mutation",ge(o,E),y);return A.toPromise(A.take(1)(A.filter((V=>V.operation.key===q.key&&q.context._instance===V.operation.context._instance))(A.onStart((()=>{var V=Q(q);a.add(V.context._instance),c.next(V)}))(G))))},appendHeaders(o,E){var y=typeof o.context.fetchOptions=="function"?o.context.fetchOptions():o.context.fetchOptions||{};return X(o.kind,o,{...o.context,fetchOptions:{...y,headers:{...y.headers,...E}}})}}))).then((o=>{o&&(h=o),f()})).catch((o=>{process.env.NODE_ENV!=="production"&&console.warn("authExchange()’s initialization function has failed, which is unexpected.\nIf your initialization function is expected to throw/reject, catch this error and handle it explicitly.\nUnless this error is handled it’ll be passed onto any `OperationResult` instantly and authExchange() will block further operations and retry.",o),p(o)}))}D();function N(o){s.set(o.key,$(o,!0)),h&&!v&&(v=h.refreshAuth().then(f).catch(p))}function Q(o){return h?h.addAuthToOperation(o):o}var Y=A.filter(Boolean)(A.map((o=>o.kind==="teardown"?(s.delete(o.key),o):o.context._instance&&a.has(o.context._instance)?o:o.context.authAttempt?Q(o):v||!h?(v||D(),s.has(o.key)||s.set(o.key,$(o,!1)),null):(function(y){return!y.context.authAttempt&&h&&h.willAuthError&&h.willAuthError(y)})(o)?(N(o),null):Q($(o,!1))))(A.merge([c.source,O]))),G=n(Y);return A.merge([l.source,A.filter((o=>!a.has(o.operation.context._instance)&&o.error&&(function(y){return h&&h.didAuthError&&h.didAuthError(y.error,y.operation)})(o)&&!o.operation.context.authAttempt?(N(o.operation),!1):(a.has(o.operation.context._instance)&&a.delete(o.operation.context._instance),!0)))(G)])}}}exports.authExchange=ye;