web-ggf 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # Welcome
2
+
3
+ UI, form, and graphql components for react. Hope you enjoy it. So many configurations that you may feel lost, but don't worry, just follow the steps below. One single mistake may cause you hours of debugging.
4
+
5
+ ## 📦 Usage
6
+
7
+ ```bash
8
+ npx web-ggf init
9
+ ```
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var init = process.argv[2];
4
+ if (init !== 'nextjs' || !init) {
5
+ console.error('Invalid init. Usage: npx web-ggf nextjs');
6
+ process.exit(1);
7
+ }
8
+ function main() {
9
+ Promise.resolve().then(function () { return require('../_chunks/index-YUr8zBwz.cjs'); });
10
+ Promise.resolve().then(function () { return require('../_chunks/index-CLUMH2P-.cjs'); });
11
+ Promise.resolve().then(function () { return require('../_chunks/index-QBVsw3Et.cjs'); });
12
+ Promise.resolve().then(function () { return require('../_chunks/index-DdjTuv1_.cjs'); });
13
+ Promise.resolve().then(function () { return require('../_chunks/index-BT6h0oBH.cjs'); });
14
+ }
15
+ main();
16
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("@apollo/client"),t=require("@apollo/client-integration-nextjs");const{getClient:r,query:o,PreloadQuery:l}=t.registerApolloClient(()=>new t.ApolloClient({cache:new t.InMemoryCache,link:new e.HttpLink({uri:"https://your-api.com/graphql",fetchOptions:{}})}));exports.PreloadQuery=l,exports.getClient=r,exports.query=o;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../src/src/client/apollo-nextjs/client.ts"],"sourcesContent":["import { HttpLink } from '@apollo/client';\nimport { ApolloClient, InMemoryCache, registerApolloClient } from '@apollo/client-integration-nextjs';\n\nexport const { getClient, query, PreloadQuery } = registerApolloClient(\n () =>\n new ApolloClient({\n cache: new InMemoryCache(),\n link: new HttpLink({\n // Use an absolute URL for SSR (relative URLs cannot be used in SSR)\n uri: 'https://your-api.com/graphql',\n fetchOptions: {\n // Optional: Next.js-specific fetch options for caching and revalidation\n // See: https://nextjs.org/docs/app/api-reference/functions/fetch\n },\n }),\n }),\n);\n"],"names":["getClient","query","PreloadQuery","registerApolloClient","ApolloClient","cache","InMemoryCache","link","HttpLink","uri","fetchOptions"],"mappings":"4FAGO,MAAMA,UAAEA,EAASC,MAAEA,EAAKC,aAAEA,GAAiBC,EAAAA,qBAChD,IACE,IAAIC,eAAa,CACfC,MAAO,IAAIC,EAAAA,cACXC,KAAM,IAAIC,EAAAA,SAAS,CAEjBC,IAAK,+BACLC,aAAc,CAGb"}
@@ -0,0 +1,2 @@
1
+ import{HttpLink as e}from"@apollo/client";import{registerApolloClient as o,ApolloClient as t,InMemoryCache as n}from"@apollo/client-integration-nextjs";const{getClient:r,query:i,PreloadQuery:l}=o(()=>new t({cache:new n,link:new e({uri:"https://your-api.com/graphql",fetchOptions:{}})}));export{l as PreloadQuery,r as getClient,i as query};
2
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../src/src/client/apollo-nextjs/client.ts"],"sourcesContent":["import { HttpLink } from '@apollo/client';\nimport { ApolloClient, InMemoryCache, registerApolloClient } from '@apollo/client-integration-nextjs';\n\nexport const { getClient, query, PreloadQuery } = registerApolloClient(\n () =>\n new ApolloClient({\n cache: new InMemoryCache(),\n link: new HttpLink({\n // Use an absolute URL for SSR (relative URLs cannot be used in SSR)\n uri: 'https://your-api.com/graphql',\n fetchOptions: {\n // Optional: Next.js-specific fetch options for caching and revalidation\n // See: https://nextjs.org/docs/app/api-reference/functions/fetch\n },\n }),\n }),\n);\n"],"names":["getClient","query","PreloadQuery","registerApolloClient","ApolloClient","cache","InMemoryCache","link","HttpLink","uri","fetchOptions"],"mappings":"wJAGO,MAAMA,UAAEA,EAASC,MAAEA,EAAKC,aAAEA,GAAiBC,EAChD,IACE,IAAIC,EAAa,CACfC,MAAO,IAAIC,EACXC,KAAM,IAAIC,EAAS,CAEjBC,IAAK,+BACLC,aAAc,CAGb"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react"),t=require("@apollo/client"),n=require("rxjs"),r=require("@apollo/client-integration-nextjs");function i(e,t){if(!Boolean(e))throw new Error(t)}const o={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},s=new Set(Object.keys(o));function a(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&s.has(t)}var c,u;function l(e){return 9===e||32===e}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(c||(c={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"}(u||(u={}));function p(e){return f(e,[])}function f(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:f(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let r=0;r<n;++r)i.push(f(e[r],t));1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`);return"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map(([e,n])=>e+": "+f(n,t));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}const d=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function h(e){return y[e.charCodeAt(0)]}const y=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],m=Object.freeze({});function v(e,t,n=o){const r=new Map;for(const e of Object.values(u))r.set(e,g(t,e));let s,c,l,f=Array.isArray(e),d=[e],h=-1,y=[],v=e;const b=[],E=[];do{h++;const e=h===d.length,o=e&&0!==y.length;if(e){if(c=0===E.length?void 0:b[b.length-1],v=l,l=E.pop(),o)if(f){v=v.slice();let e=0;for(const[t,n]of y){const r=t-e;null===n?(v.splice(r,1),e++):v[r]=n}}else{v={...v};for(const[e,t]of y)v[e]=t}h=s.index,d=s.keys,y=s.edits,f=s.inArray,s=s.prev}else if(l){if(c=f?h:d[h],v=l[c],null==v)continue;b.push(c)}let u;if(!Array.isArray(v)){var O,T;a(v)||i(!1,`Invalid AST Node: ${p(v)}.`);const n=e?null===(O=r.get(v.kind))||void 0===O?void 0:O.leave:null===(T=r.get(v.kind))||void 0===T?void 0:T.enter;if(u=null==n?void 0:n.call(t,v,c,l,b,E),u===m)break;if(!1===u){if(!e){b.pop();continue}}else if(void 0!==u&&(y.push([c,u]),!e)){if(!a(u)){b.pop();continue}v=u}}var N;if(void 0===u&&o&&y.push([c,v]),e)b.pop();else s={inArray:f,index:h,keys:d,edits:y,prev:s},f=Array.isArray(v),d=f?v:null!==(N=n[v.kind])&&void 0!==N?N:[],h=-1,y=[],l&&E.push(l),l=v}while(void 0!==s);return 0!==y.length?y[y.length-1][1]:e}function g(e,t){const n=e[t];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}const b={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>E(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=w(e.variableDefinitions)?T("(\n",E(e.variableDefinitions,"\n"),"\n)"):T("(",E(e.variableDefinitions,", "),")"),n=T("",e.description,"\n")+E([e.operation,E([e.name,t]),E(e.directives," ")]," ");return("query"===n?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>T("",i,"\n")+e+": "+t+T(" = ",n)+T(" ",E(r," "))},SelectionSet:{leave:({selections:e})=>O(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=T("",e,": ")+t;let s=o+T("(",E(n,", "),")");return s.length>80&&(s=o+T("(\n",N(E(n,"\n")),"\n)")),E([s,E(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+T(" ",E(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>E(["...",T("on ",e),E(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:o})=>T("",o,"\n")+`fragment ${e}${T("(",E(n,", "),")")} `+`on ${t} ${T("",E(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e){const t=e.replace(/"""/g,'\\"""'),n=t.split(/\r\n|[\n\r]/g),r=1===n.length,i=n.length>1&&n.slice(1).every(e=>0===e.length||l(e.charCodeAt(0))),o=t.endsWith('\\"""'),s=e.endsWith('"')&&!o,a=e.endsWith("\\"),c=s||a,u=!r||e.length>70||c||i||o;let p="";const f=r&&l(e.charCodeAt(0));return(u&&!f||i)&&(p+="\n"),p+=t,(u||c)&&(p+="\n"),'"""'+p+'"""'}(e):`"${e.replace(d,h)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+E(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+E(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+T("(",E(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>T("",e,"\n")+E(["schema",E(t," "),O(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>T("",e,"\n")+E(["scalar",t,E(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>T("",e,"\n")+E(["type",t,T("implements ",E(n," & ")),E(r," "),O(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>T("",e,"\n")+t+(w(n)?T("(\n",N(E(n,"\n")),"\n)"):T("(",E(n,", "),")"))+": "+r+T(" ",E(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>T("",e,"\n")+E([t+": "+n,T("= ",r),E(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>T("",e,"\n")+E(["interface",t,T("implements ",E(n," & ")),E(r," "),O(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>T("",e,"\n")+E(["union",t,E(n," "),T("= ",E(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>T("",e,"\n")+E(["enum",t,E(n," "),O(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>T("",e,"\n")+E([t,E(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>T("",e,"\n")+E(["input",t,E(n," "),O(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>T("",e,"\n")+"directive @"+t+(w(n)?T("(\n",N(E(n,"\n")),"\n)"):T("(",E(n,", "),")"))+(r?" repeatable":"")+" on "+E(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>E(["extend schema",E(e," "),O(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>E(["extend scalar",e,E(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>E(["extend type",e,T("implements ",E(t," & ")),E(n," "),O(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>E(["extend interface",e,T("implements ",E(t," & ")),E(n," "),O(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>E(["extend union",e,E(t," "),T("= ",E(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>E(["extend enum",e,E(t," "),O(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>E(["extend input",e,E(t," "),O(n)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>E([e,T(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>E([e,T(".",t),T("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>E(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>E(["@",e,T("(",t,":)")])}};function E(e,t=""){var n;return null!==(n=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==n?n:""}function O(e){return T("{\n",N(E(e,"\n")),"\n}")}function T(e,t,n=""){return null!=t&&""!==t?e+t+n:""}function N(e){return T(" ",e.replace(/\n/g,"\n "))}function w(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}function I(e){try{return e()}catch{}}var x=I(()=>globalThis)||I(()=>window)||I(()=>self)||I(()=>global)||I(function(){return I.constructor("return this")()});const S="4.1.6",D=new Map;function A(e,t=0){const n=function(e){const t=D.get(e)||1;return D.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}("stringifyForDisplay");return JSON.stringify(e,(e,t)=>void 0===t?n:t,t).split(JSON.stringify(n)).join("<undefined>")}const C="Invariant Violation";class _ extends Error{constructor(e=C){super(e),this.name=C,Object.setPrototypeOf(this,_.prototype)}}const j=["debug","log","warn","error","silent"];let F=j.indexOf("silent");function P(e,...t){if(!e)throw M(...t)}function k(e){return function(t,...n){if(j.indexOf(e)>=F){const r=console[e]||console.log;if("number"==typeof t){const e=t;(t=q(e))||(t=L(e,n),n=[])}r(t,...n)}}}function M(e,...t){return new _(q(e,t)||L(e,t))}P.debug=k("debug"),P.log=k("log"),P.warn=k("warn"),P.error=k("error");const V=Symbol.for("ApolloErrorMessageHandler_"+S);function R(e){if("string"==typeof e)return e;try{return A(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function q(e,t=[]){if(e)return x[V]&&x[V](e,t.map(R))}function L(e,t=[]){if(e)return"string"==typeof e?t.reduce((e,t)=>e.replace(/%[sdfo]/,R(t)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:S,message:e,args:t.map(R)}))}`}const U=Symbol.for("apollo.cacheSize"),z={...x[U]};function B(e,t){return e.definitions.find(e=>"OperationDefinition"===e.kind&&!!e.name)?.name.value??t}const Y=()=>Object.create(null),{forEach:$,slice:J}=Array.prototype,{hasOwnProperty:G}=Object.prototype;class W{constructor(e=!0,t=Y){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return $.call(e,e=>t=t.getChildTrie(e)),G.call(t,"data")?t.data:t.data=this.makeData(J.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n<r;++n){const r=t.mapFor(e[n],!1);t=r&&r.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],r=this.mapFor(n,!1),i=r&&r.get(n);i&&(t=i.removeArray(J.call(e,1)),i.data||i.weak||i.strong&&i.strong.size||r.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(e){const t=this.mapFor(e,!0);let n=t.get(e);return n||t.set(e,n=new W(this.weakness,this.makeData)),n}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}function H(){}const Q=H,X="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},K="undefined"!=typeof WeakMap?WeakMap:Map,Z="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:H,unregister:H}};class ee{constructor(e=1/0,t=Q){this.max=e,this.dispose=t,this.map=new K,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const n=t.key;delete t.key,t.keyRef=new X(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Z(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}const te=new WeakSet;const ne=function(e,t){const n=new ee(e,t);return n.set=function(e,t){const n=ee.prototype.set.call(this,e,t);return function(e){e.size<=(e.max||-1)||te.has(e)||(te.add(e),setTimeout(()=>{e.clean(),te.delete(e)},100))}(this),n},n};const re=function(e,{max:t,makeCacheKey:n=e=>e}){const r=new W(!0),i=new ne(t);return(...t)=>{const o=r.lookupArray(n(t)),s=i.get(o);if(s){if(s.error)throw s.error;return s.result}const a=i.set(o,{});try{return a.result=e(...t)}catch(e){throw a.error=e,e}}}((e,t)=>{P(e&&"Document"===e.kind,1);const n=e.definitions.filter(e=>"OperationDefinition"===e.kind);t&&P(1==n.length&&n[0].operation===t,4,t,t,n[0].operation),v(e,{Field(t,r,i,o){if(t.alias&&("__typename"===t.alias.value||t.alias.value.startsWith("__ac_"))&&t.alias.value!==t.name.value){let r=e,i=[];for(const e of o)r=r[e],r.kind===u.FIELD&&i.push(r.alias?.value||r.name.value);throw i.splice(-1,1,t.name.value),M(5,t.alias.value,i.join("."),n[0].operation,B(e,"(anonymous)"))}}})},{max:z.checkDocument||2e3});function ie(e){return null!==e&&"object"==typeof e}const{hasOwnProperty:oe}=Object.prototype,se=function(e,t,n){return this.merge(e[n],t[n])},ae=e=>isNaN(+e)?{}:[];class ce{options;reconciler;constructor(e={}){this.options=e,this.reconciler=e.reconciler||se}merge(e,t,n={}){const r=n.atPath;if(r?.length){const[i,...o]=r;void 0===e&&(e=ae(i));let s=e[i];void 0===s&&o.length&&(s=ae(o[0]));const a=this.merge(s,t,{...n,atPath:o});return s!==a&&((e=this.shallowCopyForMerge(e))[i]=a),e}return Array.isArray(e)&&Array.isArray(t)&&"truncate"===this.options.arrayMerge&&e.length>t.length&&(e=e.slice(0,t.length),this.pastCopies.add(e)),ie(t)&&ie(e)?(Object.keys(t).forEach(n=>{if(oe.call(e,n)){const r=e[n];if(t[n]!==r){const i=this.reconciler(e,t,n);i!==r&&((e=this.shallowCopyForMerge(e))[n]=i)}}else(e=this.shallowCopyForMerge(e))[n]=t[n]}),e):t}isObject=ie;pastCopies=new Set;shallowCopyForMerge(e){return ie(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):{__proto__:Object.getPrototypeOf(e),...e},this.pastCopies.add(e))),e}}function ue(...e){return function(e){let t=e[0]||{};const n=e.length;if(n>1){const r=new ce;for(let i=1;i<n;++i)t=r.merge(t,e[i])}return t}(e)}class le{static empty(){return new le(()=>n.EMPTY)}static from(e){if(0===e.length)return le.empty();const[t,...n]=e;return t.concat(...n)}static split(e,t,n=new le((e,t)=>t(e))){const r=new le((r,i)=>e(r)?t.request(r,i):n.request(r,i));return Object.assign(r,{left:t,right:n})}static execute(e,t,r){return e.request(function(e,{client:t}){const n={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:B(e.query),operationType:(r=e.query,re(r),r.definitions.filter(e=>"OperationDefinition"===e.kind)[0]).operation};var r;let i={...e.context};const o=()=>Object.freeze({...i});return Object.defineProperty(n,"setContext",{enumerable:!1,value:e=>{i="function"==typeof e?{...i,...e(o())}:{...i,...e}}}),Object.defineProperty(n,"getContext",{enumerable:!1,value:o}),Object.defineProperty(n,"client",{enumerable:!1,value:t}),n}(t,r),()=>n.EMPTY)}static concat(...e){return le.from(e)}constructor(e){e&&(this.request=e)}split(e,t,n){return this.concat(le.split(e,t,n))}concat(...e){return 0===e.length?this:e.reduce(this.combine.bind(this),this)}combine(e,t){const n=new le((n,r)=>e.request(n,e=>t.request(e,r)));return Object.assign(n,{left:e,right:t})}request(e,t){throw M(65)}left;right}class pe extends le{constructor(e){super((t,r)=>{const{...i}=t;return Object.defineProperty(i,"client",{enumerable:!1,value:t.client}),new n.Observable(n=>{let o=!1;return Promise.resolve(i).then(n=>e(t.getContext(),n)).then(t.setContext).then(()=>{o||r(t).subscribe(n)}).catch(n.error.bind(n)),()=>{o=!0}})})}}function fe(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function de(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,configurable:!1})}function he(e){return e.map(e=>e.message||"Error message not found.").join("\n")}class ye extends Error{static is(e){return fe(e,"CombinedProtocolErrors")}static formatMessage=he;errors;constructor(e){super(ye.formatMessage(e,{defaultFormatMessage:he})),this.name="CombinedProtocolErrors",this.errors=e,de(this),Object.setPrototypeOf(this,ye.prototype)}}class me extends Error{static is(e){return fe(e,"UnconventionalError")}constructor(e){super("An error of unexpected shape occurred.",{cause:e}),this.name="UnconventionalError",de(this),Object.setPrototypeOf(this,me.prototype)}}function ve(e){return e.filter(e=>e).map(e=>e.message||"Error message not found.").join("\n")}class ge extends Error{static is(e){return fe(e,"CombinedGraphQLErrors")}static formatMessage=ve;errors;data;extensions;constructor(e,t=e.errors||[]){super(ge.formatMessage(t,{result:e,defaultFormatMessage:ve})),this.errors=t,this.data=e.data,this.extensions=e.extensions,this.name="CombinedGraphQLErrors",de(this),Object.setPrototypeOf(this,ge.prototype)}}class be extends Error{static is(e){return fe(e,"ServerError")}response;statusCode;bodyText;constructor(e,t){super(e),this.name="ServerError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,de(this),Object.setPrototypeOf(this,be.prototype)}}class Ee extends Error{static is(e){return fe(e,"ServerParseError")}response;statusCode;bodyText;constructor(e,t){super(e instanceof Error?e.message:"Could not parse server response",{cause:e}),this.name="ServerParseError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,de(this),Object.setPrototypeOf(this,Ee.prototype)}}const Oe=Symbol();function Te(e){return function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name&&("string"==typeof e.stack||void 0===e.stack)}(e)?e:"string"==typeof e?new Error(e,{cause:e}):new me(e)}class Ne extends le{constructor(e){super((t,r)=>new n.Observable(n=>{let i,o,s;try{i=r(t).subscribe({next:i=>{const a=t.client.queryManager.incrementalHandler,c=a.isIncrementalResult(i)?a.extractErrors(i):i.errors;c?s=e({error:new ge(i,c),result:i,operation:t,forward:r}):function(e){return"extensions"in e&&ye.is(e.extensions[Oe])}(i)&&(s=e({error:i.extensions[Oe],result:i,operation:t,forward:r})),o=s?.subscribe(n),o||n.next(i)},error:i=>{s=e({operation:t,error:Te(i),forward:r}),o=s?.subscribe(n),o||n.error(i)},complete:()=>{s||n.complete()}})}catch(i){e({error:Te(i),operation:t,forward:r}),n.error(i)}return()=>{i&&i.unsubscribe(),o&&o.unsubscribe()}}))}}let we;const Ie=Object.assign(e=>{let t=we.get(e);return t||(t=function(e){return v(e,b)}(e),we.set(e,t)),t},{reset(){we=new ne(z.print||2e3)}});Ie.reset();var xe=function(e,t){return xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xe(e,t)};function Se(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function De(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.")}function Ae(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Ce(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function _e(e=!1){return{keyArgs:e,read(e,{canRead:t,readField:n}){if(!e)return e;const r=[];let i="",o="";e.edges.forEach(e=>{t(n("node",e))&&(r.push(e),e.cursor&&(i=i||e.cursor||"",o=e.cursor||o))}),r.length>1&&i===o&&(i="");const{startCursor:s,endCursor:a}=e.pageInfo||{};return{...je(e),edges:r,pageInfo:{...e.pageInfo,startCursor:s||i,endCursor:a||o}}},merge(e,t,{args:n,isReference:r,readField:i}){if(e||(e={edges:[],pageInfo:{hasPreviousPage:!1,hasNextPage:!0,startCursor:"",endCursor:""}}),!t)return e;const o=t.edges?t.edges.map(e=>(r(e={...e})&&(e.cursor=i("cursor",e)),e)):[];if(t.pageInfo){const{pageInfo:e}=t,{startCursor:n,endCursor:r}=e,i=o[0],s=o[o.length-1];i&&n&&(i.cursor=n),s&&r&&(s.cursor=r);const a=i&&i.cursor;a&&!n&&(t=ue(t,{pageInfo:{startCursor:a}}));const c=s&&s.cursor;c&&!r&&(t=ue(t,{pageInfo:{endCursor:c}}))}let s=e.edges,a=[];if(n&&n.after){const e=s.findIndex(e=>e.cursor===n.after);e>=0&&(s=s.slice(0,e+1))}else if(n&&n.before){const e=s.findIndex(e=>e.cursor===n.before);a=e<0?s:s.slice(e),s=[]}else t.edges&&(s=[]);const c=[...s,...o,...a],u={...t.pageInfo,...e.pageInfo};if(t.pageInfo){const{hasPreviousPage:e,hasNextPage:n,startCursor:r,endCursor:i,...o}=t.pageInfo;Object.assign(u,o),s.length||(void 0!==e&&(u.hasPreviousPage=e),void 0!==r&&(u.startCursor=r)),a.length||(void 0!==n&&(u.hasNextPage=n),void 0!==i&&(u.endCursor=i))}return{...je(e),...je(t),edges:c,pageInfo:u}}}}"function"==typeof SuppressedError&&SuppressedError;const je=e=>function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,Fe),Fe=["edges","pageInfo"];const{hasOwnProperty:Pe}=Object.prototype;function ke(e,t){const n=e.headers.get("content-type");return n?.includes("application/graphql-response+json")?function(e,t){try{return JSON.parse(t)}catch(n){throw new Ee(n,{response:e,bodyText:t})}}(e,t):function(e,t){if(e.status>=300)throw new be(`Response not successful: Received status code ${e.status}`,{response:e,bodyText:t});try{return JSON.parse(t)}catch(n){throw new Ee(n,{response:e,bodyText:t})}}(e,t)}const Me={http:{includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},headers:{accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},options:{method:"POST"}},Ve=(e,t)=>t(e);function Re(e,t,...n){let r={},i={};n.forEach(e=>{r={...r,...e.options,headers:{...r.headers,...e.headers}},e.credentials&&(r.credentials=e.credentials),r.headers.accept=(e.http?.accept||[]).concat(r.headers.accept).join(","),i={...i,...e.http}}),r.headers=function(e,t){if(!t){const t={};return Object.keys(Object(e)).forEach(n=>{t[n.toLowerCase()]=e[n]}),t}const n={};Object.keys(Object(e)).forEach(t=>{n[t.toLowerCase()]={originalName:t,value:e[t]}});const r={};return Object.keys(n).forEach(e=>{r[n[e].originalName]=n[e].value}),r}(r.headers,i.preserveHeaderCase);const{operationName:o,extensions:s,variables:a,query:c}=e,u={operationName:o,variables:a};return i.includeExtensions&&Object.keys(s||{}).length&&(u.extensions=s),i.includeQuery&&(u.query=t(c,Ie)),{options:r,body:u}}function qe(e,t,n=""){if(!arguments.length)throw new TypeError("Argument 1 `value` is required.");if("function"!=typeof t)throw new TypeError("Argument 2 `isExtractable` must be a function.");if("string"!=typeof n)throw new TypeError("Argument 3 `path` must be a string.");const r=new Map,i=new Map;return{clone:function e(n,o,s){if(t(n)){const e=i.get(n);return e?e.push(o):i.set(n,[o]),null}const a=Array.isArray(n)||"undefined"!=typeof FileList&&n instanceof FileList,c=function(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}(n);if(a||c){let t=r.get(n);const i=!t;if(i&&(t=a?[]:n instanceof Object?{}:Object.create(null),r.set(n,t)),!s.has(n)){const r=o?`${o}.`:"",c=new Set(s).add(n);if(a){let o=0;for(const s of n){const n=e(s,r+o++,c);i&&t.push(n)}}else for(const o in n){const s=e(n[o],r+o,c);i&&(t[o]=s)}}return t}return n}(e,n,new Set),files:i}}function Le(e){return"function"==typeof e}var Ue,ze=((Ue=function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}(function(e){Error.call(e),e.stack=(new Error).stack})).prototype=Object.create(Error.prototype),Ue.prototype.constructor=Ue,Ue);function Be(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Ye=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=De(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var c=this.initialTeardown;if(Le(c))try{c()}catch(e){i=e instanceof ze?e.errors:[e]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=De(u),p=l.next();!p.done;p=l.next()){var f=p.value;try{Je(f)}catch(e){i=null!=i?i:[],e instanceof ze?i=Ce(Ce([],Ae(i)),Ae(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new ze(i)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Je(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Be(t,e)},e.prototype.remove=function(t){var n=this._teardowns;n&&Be(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function $e(e){return e instanceof Ye||e&&"closed"in e&&Le(e.remove)&&Le(e.add)&&Le(e.unsubscribe)}function Je(e){Le(e)?e():e.unsubscribe()}Ye.EMPTY;var Ge={Promise:void 0},We=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return setTimeout.apply(void 0,Ce([],Ae(e)))};function He(){}var Qe=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,$e(t)&&t.add(n)):n.destination=et,n}return Se(t,e),t.create=function(e,t,n){return new Xe(e,t,n)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ye),Xe=function(e){function t(t,n,r){var i,o=e.call(this)||this;if(Le(t))i=t;else if(t){var s;i=t.next,n=t.error,r=t.complete,s=t,i=null==i?void 0:i.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return o.destination={next:i?Ke(i):He,error:Ke(null!=n?n:Ze),complete:r?Ke(r):He},o}return Se(t,e),t}(Qe);function Ke(e,t){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{e.apply(void 0,Ce([],Ae(t)))}catch(e){!function(e){We(function(){throw e})}(e)}}}function Ze(e){throw e}var et={closed:!0,next:He,error:Ze,complete:He},tt="function"==typeof Symbol&&Symbol.observable||"@@observable";function nt(e){return e}var rt=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,o=(r=e)&&r instanceof Qe||function(e){return e&&Le(e.next)&&Le(e.error)&&Le(e.complete)}(r)&&$e(r)?e:new Xe(e,t,n);return function(){var e=i,t=e.operator,n=e.source;o.add(t?t.call(o,n):n?i._subscribe(o):i._trySubscribe(o))}(),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=it(t))(function(t,r){var i;i=n.subscribe(function(t){try{e(t)}catch(e){r(e),null==i||i.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[tt]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(0===(e=t).length?nt:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=it(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function it(e){var t;return null!==(t=null!=e?e:Ge.Promise)&&void 0!==t?t:Promise}function ot(e,t,n){"name"in n?e.append(t,n,n.name):e.append(t,n)}function st(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob}class at extends le{constructor({uri:e="/graphql",useGETForQueries:t,isExtractableFile:n=st,FormData:r,formDataAppendFile:i=ot,print:o=Ve,fetch:s,fetchOptions:a,credentials:c,headers:u,includeExtensions:l,includeUnusedVariables:p=!1}={}){super(f=>new rt(d=>{const h=f.getContext(),{options:y,body:m}=Re(f,o,Me,{http:{includeExtensions:l},options:a,credentials:c,headers:u},{http:h.http,options:h.fetchOptions,credentials:h.credentials,headers:h.headers});m.variables&&!p&&(m.variables=function(e,t){const n={...e},r=new Set(Object.keys(e));return v(t,{Variable(e,t,n){n&&"VariableDefinition"!==n.kind&&r.delete(e.name.value)}}),r.forEach(e=>{delete n[e]}),n}(m.variables,f.query));const{clone:g,files:b}=qe(m,n,"");let E,O=((e,t)=>{const n=e.getContext().uri;return n||("function"==typeof t?t(e):t||"/graphql")})(f,e);if(b.size){y.headers&&delete y.headers["content-type"];const e=new(r||FormData);e.append("operations",JSON.stringify(g));const t={};let n=0;b.forEach(e=>{t[++n]=e}),e.append("map",JSON.stringify(t)),n=0,b.forEach((t,r)=>{i(e,String(++n),r)}),y.body=e}else if(t&&!f.query.definitions.some(e=>"OperationDefinition"===e.kind&&"mutation"===e.operation)&&(y.method="GET"),"GET"===y.method){const e=function(e,t){const n=[],r=(e,t)=>{n.push(`${e}=${encodeURIComponent(t)}`)};if("query"in t&&r("query",t.query),t.operationName&&r("operationName",t.operationName),t.variables){let e;try{e=JSON.stringify(t.variables)}catch(e){return{parseError:e}}r("variables",e)}if(t.extensions){let e;try{e=JSON.stringify(t.extensions)}catch(e){return{parseError:e}}r("extensions",e)}let i="",o=e;const s=e.indexOf("#");-1!==s&&(i=e.substr(s),o=e.substr(0,s));const a=-1===o.indexOf("?")?"?":"&";return{newURI:o+a+n.join("&")+i}}(O,m);if("parseError"in e)throw e.parseError;O=e.newURI}else y.body=JSON.stringify(g);"undefined"!=typeof AbortController&&(E=new AbortController,y.signal&&(y.signal.aborted?E.abort():y.signal.addEventListener("abort",()=>{E.abort()},{once:!0})),y.signal=E.signal);let T;var N;return(s||fetch)(O,y).then(e=>(f.setContext({response:e}),e)).then((N=f,e=>e.text().then(t=>{const n=ke(e,t);if(!Array.isArray(n)&&!Pe.call(n,"data")&&!Pe.call(n,"errors"))throw new be(`Server response was malformed for query '${Array.isArray(N)?N.map(e=>e.operationName):N.operationName}'.`,{response:e,bodyText:t});return n}))).then(e=>{d.next(e),d.complete()}).catch(e=>{T||d.error(e)}),()=>{T=!0,E&&E.abort()}}))}}class ct extends r.ApolloClient{constructor(e){const n=new pe(async t=>({credentials:"include",headers:{"Accept-Language":"mn",authorization:`Bearer ${e.getToken()}`,...t.headers}})),r=new Ne(({error:e})=>{t.ServerError.is(e)&&e.statusCode}),i=new t.HttpLink({uri:`${e.host}/graphql`,fetchOptions:{}}),o=new at({uri:`${e.host}/graphql`,headers:{"Apollo-Require-Preflight":"true"}});super({cache:e.cache||ut,link:t.ApolloLink.from([o,i,n,e.error||r])})}}const ut=new r.InMemoryCache({typePolicies:{Website:{fields:{orders:_e(["filter","sort","status"]),lineItems:_e(["filter","sort"])}},Query:{fields:{products:_e(["filter","sort"]),orders:_e(["filter","sort"])}}}});exports.ApolloWrapper=function({children:t,makeClient:n}){return e.createElement(r.ApolloNextAppProvider,{makeClient:n},e.createElement(e.Fragment,null,t))},exports.GenerateMakeClient=ct;
2
+ //# sourceMappingURL=index.cjs.js.map