@integrativedesigndevelopment/dashboard-core 0.0.2
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 +775 -0
- package/dist/actions/pluginActions.d.ts +48 -0
- package/dist/actions/pluginActions.d.ts.map +1 -0
- package/dist/actions/types.d.ts +17 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/components/ActivityProvider/index.d.ts +10 -0
- package/dist/components/ActivityProvider/index.d.ts.map +1 -0
- package/dist/components/CancelActionButton/index.d.ts +11 -0
- package/dist/components/CancelActionButton/index.d.ts.map +1 -0
- package/dist/components/ConfirmActionButton/index.d.ts +12 -0
- package/dist/components/ConfirmActionButton/index.d.ts.map +1 -0
- package/dist/components/ErrorBoundary/index.d.ts +18 -0
- package/dist/components/ErrorBoundary/index.d.ts.map +1 -0
- package/dist/components/IDDLink/index.d.ts +10 -0
- package/dist/components/IDDLink/index.d.ts.map +1 -0
- package/dist/components/IDDLinkInputItem/index.d.ts +18 -0
- package/dist/components/IDDLinkInputItem/index.d.ts.map +1 -0
- package/dist/components/Layout/SimpleLayout.d.ts +8 -0
- package/dist/components/Layout/SimpleLayout.d.ts.map +1 -0
- package/dist/components/Layout/index.d.ts +8 -0
- package/dist/components/Layout/index.d.ts.map +1 -0
- package/dist/components/Password/index.d.ts +15 -0
- package/dist/components/Password/index.d.ts.map +1 -0
- package/dist/components/SimpleButton/index.d.ts +10 -0
- package/dist/components/SimpleButton/index.d.ts.map +1 -0
- package/dist/components/TextInput/index.d.ts +16 -0
- package/dist/components/TextInput/index.d.ts.map +1 -0
- package/dist/components/helpers.d.ts +5 -0
- package/dist/components/helpers.d.ts.map +1 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/config/index.d.ts +23 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useAsyncOperation.d.ts +12 -0
- package/dist/hooks/useAsyncOperation.d.ts.map +1 -0
- package/dist/hooks/useUpdateUser.d.ts +32 -0
- package/dist/hooks/useUpdateUser.d.ts.map +1 -0
- package/dist/hooks/useUserManagement.d.ts +51 -0
- package/dist/hooks/useUserManagement.d.ts.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +14 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/metrics/clsMetrics.d.ts +3 -0
- package/dist/metrics/clsMetrics.d.ts.map +1 -0
- package/dist/metrics/fcpMetrics.d.ts +3 -0
- package/dist/metrics/fcpMetrics.d.ts.map +1 -0
- package/dist/metrics/fidMetrics.d.ts +3 -0
- package/dist/metrics/fidMetrics.d.ts.map +1 -0
- package/dist/metrics/index.d.ts +3 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/dist/metrics/lcpMetrics.d.ts +3 -0
- package/dist/metrics/lcpMetrics.d.ts.map +1 -0
- package/dist/metrics/ttfbMetrics.d.ts +3 -0
- package/dist/metrics/ttfbMetrics.d.ts.map +1 -0
- package/dist/plugin-system/DashboardProvider.d.ts +14 -0
- package/dist/plugin-system/DashboardProvider.d.ts.map +1 -0
- package/dist/plugin-system/PluginManager.d.ts +9 -0
- package/dist/plugin-system/PluginManager.d.ts.map +1 -0
- package/dist/plugin-system/core/Dashboard/Icon.d.ts +6 -0
- package/dist/plugin-system/core/Dashboard/Icon.d.ts.map +1 -0
- package/dist/plugin-system/core/Dashboard/index.d.ts +4 -0
- package/dist/plugin-system/core/Dashboard/index.d.ts.map +1 -0
- package/dist/plugin-system/core/Dashboard/tab0.d.ts +8 -0
- package/dist/plugin-system/core/Dashboard/tab0.d.ts.map +1 -0
- package/dist/plugin-system/core/Dashboard/views/DashboardView/index.d.ts +3 -0
- package/dist/plugin-system/core/Dashboard/views/DashboardView/index.d.ts.map +1 -0
- package/dist/plugin-system/index.d.ts +6 -0
- package/dist/plugin-system/index.d.ts.map +1 -0
- package/dist/plugin-system/plugin_manifest.d.ts +2 -0
- package/dist/plugin-system/plugin_manifest.d.ts.map +1 -0
- package/dist/plugin-system/types.d.ts +76 -0
- package/dist/plugin-system/types.d.ts.map +1 -0
- package/dist/services/errorServices.d.ts +37 -0
- package/dist/services/errorServices.d.ts.map +1 -0
- package/dist/types/index.d.ts +66 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/array-safety.d.ts +32 -0
- package/dist/utils/array-safety.d.ts.map +1 -0
- package/dist/utils/fromReq.d.ts +3 -0
- package/dist/utils/fromReq.d.ts.map +1 -0
- package/dist/utils/helpers.d.ts +27 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{IDDButton as n,useTailwindConfig as r,IDDInput as i}from"@integrativedesigndevelopment/idd-common";import s,{Component as o,useState as a,useEffect as c,Fragment as l,createContext as u,useContext as d,useRef as h,useCallback as p}from"react";import{IDDXIcon as f,IDDShowPasswordIcon as m,IDDHidePasswordIcon as E,IDDOutlineWarningIcon as g,IDDInfoIcon as y,IDDOutlineCheckmarkIcon as v}from"@integrativedesigndevelopment/idd-icons";const T={SET_PLUGINS:"set_plugins",SET_CURRENT_PLUGIN:"set_current_plugin",SET_CURRENT_TAB:"set_current_tab",SET_CURRENT_STATE:"set_current_state",SET_CURRENT_VIEW:"set_current_view",SET_CURRENT_ITEM:"set_current_item",COLLAPSED_TOGGLE:"toggle_collapsed",SET_COLOR_MODE:"set_color_mode",TOGGLE_NOTIFICATIONS:"toggle_notifications",SET_SETTING:"set_setting",SET_JWT:"SET_JWT",SET_USER:"SET_USER",RESET:"reset"},N=e=>({type:T.SET_PLUGINS,payload:e}),b=e=>({type:T.SET_CURRENT_PLUGIN,payload:e}),_=e=>({type:T.SET_CURRENT_TAB,payload:e}),I=e=>({type:T.SET_CURRENT_STATE,payload:e}),x=e=>({type:T.SET_CURRENT_VIEW,payload:e}),O=e=>({type:T.SET_CURRENT_ITEM,payload:e}),k=()=>({type:T.RESET}),A=(e,t)=>(n,r)=>{n(b(e)),n(_(0));const{session:i}=r(),s=[...i.currentState||[]],o=s.findIndex((t=>t.pluginID===e));-1!==o?s[o]={pluginID:e,tabID:t}:s.push({pluginID:e,tabID:t}),n(I(s))},C=(e,t)=>(n,r)=>{n(_(e));const{session:i}=r(),s=i.current.id,o=[...i.currentState||[]],a=o.findIndex((e=>e.pluginID===s));-1!==a?o[a]={pluginID:s,tabID:t}:o.push({pluginID:s,tabID:t}),n(I(o))},D=(e,t)=>({type:T.SET_SETTING,payload:{key:e,value:t}}),S=()=>({type:T.COLLAPSED_TOGGLE}),w=()=>({type:T.TOGGLE_NOTIFICATIONS}),R=({children:t,onPress:r=()=>{},disabled:i=!1,className:s="w-auto"})=>e(n,{type:"button",onPress:r,disabled:i,buttonClass:`font-idd-primary-font-medium text-idd-primary-font-size text-idd-active-color text-center py-2 px-5 bg-idd-tertiary-background hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white focus-visible:bg-idd-active-color focus-visible:text-idd-white focus:outline-none focus-visible:outline-none rounded-sm ${s}`,children:t}),L=({children:t,onPress:r=()=>{},disabled:i=!1,type:s="submit",className:o="w-full"})=>e(n,{type:s,buttonClass:`font-idd-primary-font-medium text-idd-primary-font-size text-idd-black text-center py-2 px-5 bg-idd-tertiary-background hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white focus-visible:bg-idd-active-color focus-visible:text-idd-white focus:outline-none focus-visible:outline-none rounded-sm ${o}`,onPress:r,disabled:i,children:t});class F extends o{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback||e("div",{className:"flex items-center justify-center h-full w-full p-4",children:t("div",{className:"text-center",children:[e("h2",{className:"text-xl font-semibold mb-2",children:"Something went wrong"}),e("p",{className:"text-gray-600 mb-4",children:"An error occurred while loading this component."}),e("button",{onClick:()=>this.setState({hasError:!1,error:void 0}),className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Try again"})]})}):this.props.children}}function P(e){return/^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/.test(e)}const M={title:"IDD Dashboard",pages:[],plugins:["Dashboard"],categories:[],sub_categories:{},style:{colors:{"idd-red":"#DD3150","idd-red-20":"#F6CBD3","idd-orange":"#D1823B","idd-orange-20":"#F3DFCE","idd-yellow":"#D9C982","idd-yellow-20":"#F4EFDA","idd-green":"#98BD83","idd-green-20":"#E5EEE0","idd-blue":"#00A89D","idd-blue-20":"#6F6F5","idd-purple":"#4040D8","idd-purple-20":"#CFCFF5","idd-brown":"#7A6C53","idd-brown-20":"#F2F0EE","idd-black":"#19191c","idd-black-20":"#C5C5C6","idd-grey":"#6D6E81","idd-grey-20":"#DCDCE1","idd-white":"#fff","idd-transparent":"transparent","idd-primary-color":"#292929","idd-secondary-color":"#5f696d","idd-tertiary-color":"#d8dfe7","idd-tertiary-color-20":"#ECECEC","idd-active-color":"#ad0000","idd-inactive-color":"#DCDCE1","idd-primary-background":"#ad0000","idd-secondary-background":"#f2f0ee","idd-tertiary-background":"#F6F6F9","idd-active-background":"#7a6c53","idd-inactive-background":"#7a6c531a","idd-shadow-color":"rgba(50,69,71,0.17)"},fontFamily:{"idd-primary-font":"Gotham-Book","idd-primary-font-light":"Gotham-Light","idd-primary-font-regular":"Gotham-Book","idd-primary-font-medium":"Gotham-Medium","idd-primary-font-bold":"Gotham-Bold","idd-secondary-font":"Rubik-Regular","idd-secondary-font-light":"Rubik-Light","idd-secondary-font-regular":"Rubik-Regular","idd-secondary-font-medium":"Rubik-Medium","idd-secondary-font-bold":"Rubik-Bold"},fontStyle:{"idd-font-style":"normal"},fontWeight:{"idd-light-font-weight":"300","idd-regular-font-weight":"normal","idd-medium-font-weight":"medium","idd-bold-font-weight":"bold"},fontSize:{"idd-primary-font-size":"1rem","idd-xtrasmall-font-size":"0.25rem","idd-small-font-size":"0.5rem","idd-medium-font-size":"1.125rem","idd-large-font-size":"1.25rem","idd-xtralarge-font-size":"1.5rem"},letterSpacing:{"idd-character-spacing":"0","idd-body-character-spacing":"0.05"},lineHeight:{"idd-primary-line-spacing":"1.5"},backgroundImage:{"gradient-radial":"radial-gradient(var(--tw-gradient-stops))","gradient-conic":"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))","signup-theme":"linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/signup-theme.png')"},borderRadius:{"idd-border-radius":"0.3125rem"}}};let U=M;const j=e=>{U=Object.assign(Object.assign({},M),e)},B=()=>U,V=()=>B(),G=({id:s,idsArray:o,onDelete:u=()=>{},onBlur:d=()=>{},link:h,className:p=""})=>{const m=V(),E=r(m.style),[g,y]=a(E.colors["idd-black"]),[v,T]=a({id:"",text:"",url:""});return c((()=>{h&&(h.path&&h.path.length>0?T({id:h.id,text:h.text,url:h.path}):T(h))}),[h]),t("div",{className:`flex justify-between items-center ${p}`,onBlur:e=>{e.stopPropagation(),d(v)},children:[e(i,{id:`link-${s}`,componentClass:"w-[45%]",type:"text",label:"Link Text",labelClass:"text-capitalize",showLabel:!!(v&&v.text&&v.text.length>0),placeholder:"Link Text",value:v.text,inputClass:"ps-3 active-primary-black",onChange:e=>{T(Object.assign(Object.assign({},v),{text:e.target.value}))}}),e(i,{id:`url-${s}`,componentClass:"w-45",type:"url",label:"URL",showLabel:!!(v&&v.url&&v.url.length>0),placeholder:"URL",value:v.url,inputClass:"ps-3 active-primary-black",onChange:e=>{T(Object.assign(Object.assign({},v),{url:e.target.value}))}}),e(n,{id:`removeLink-${s}`,onPress:()=>{if(o){let e=[...o];e=e.filter((e=>e!==s)),T({id:"",text:"",url:""}),u(e)}},onMouseEnter:()=>y("var(--idd-red)"),onFocus:()=>y("var(--idd-red)"),onMouseLeave:()=>y("var(--idd-primary-black)"),onBlur:()=>y("var(--idd-primary-black)"),isSecondary:!0,buttonClass:"flex items-center justify-center border-0 rounded-sm w-[1.5625rem] h-[1.5625rem] p-0",children:t(l,{children:[e("span",{className:"sr-only",children:"remove link"}),e(f,{wrapperClass:"flex justify-center items-center",color:g})]})})]})},z=({children:t,className:n="flex items-center justify-center min-h-screen w-full p-5"})=>e(F,{children:e("div",{className:`bg-signup-theme bg-cover bg-center bg-no-repeat ${n}`,children:t})}),$=({onChange:s=()=>{},label:o="Password",value:c,componentClass:u="",appendToInputClass:d="",error:h="",errorColor:p="",isErrorOnlyColor:f=!0})=>{const[g,y]=a(!1),[v,T]=a(!1),N=V(),b=r(N.style);return e(i,{label:o,value:c,type:g?"text":"password",componentClass:u,appendToInputClass:`me-4 ${d}`,activeTextColor:b.colors["idd-black"],inactiveTextColor:!c||"string"==typeof c&&0===c.length?b.colors["idd-grey"]:b.colors["idd-black"],activeColor:b.colors["idd-black"],inactiveColor:!c||"string"==typeof c&&0===c.length?b.colors["idd-grey"]:b.colors["idd-black"],activeLabelColor:b.colors["idd-black"],inactiveLabelColor:!c||"string"==typeof c&&0===c.length?b.colors["idd-grey"]:b.colors["idd-black"],errors:h,errorColor:f?!c||"string"==typeof c&&0===c.length?b.colors["idd-grey"]:b.colors["idd-black"]:p,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:f?{color:b.colors["idd-active-color"]}:{},onFocus:()=>T(!0),onBlur:()=>T(!1),appendToInput:e(n,{buttonClass:"p-1 rounded-sm focus:outline focus-visible:outline focus:outline-1 focus-visible:outline-1offset-1 focus:outline-idd-black focus-visible:outline-idd-black",onPress:()=>y(!g),children:t(l,{children:[e("span",{className:"sr-only",children:g?"password shown":"password hidden"}),e(g?m:E,{color:v?b.colors["idd-black"]:b.colors["idd-grey"]})]})}),onChange:e=>{s&&s(e)}})},K=({label:t,onChange:n=()=>{},value:s,placeholder:o,type:a="text",readOnly:c=!1,error:l="",errorColor:u="",isErrorOnlyColor:d=!0})=>{const h=V(),p=r(h.style);return e(i,{label:t,value:s,onChange:n,placeholder:o,type:a,readOnly:c,activeColor:c?p.colors["idd-grey"]:p.colors["idd-black"],inactiveColor:!s||"string"==typeof s&&0===s.length?p.colors["idd-grey"]:p.colors["idd-black"],activeLabelColor:c?p.colors["idd-grey"]:p.colors["idd-black"],inactiveLabelColor:!s||"string"==typeof s&&0===s.length?p.colors["idd-grey"]:p.colors["idd-black"],activeTextColor:c?p.colors["idd-grey"]:p.colors["idd-black"],inactiveTextColor:!s||"string"==typeof s&&0===s.length?p.colors["idd-grey"]:p.colors["idd-black"],inputWrapperClass:"w-full h-[3.125rem] rounded-sm",inputClass:c?"pointer-events-none":"",errors:l,errorColor:d?!s||"string"==typeof s&&0===s.length?p.colors["idd-grey"]:p.colors["idd-black"]:u,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:d?{color:p.colors["idd-active-color"]}:{}})},Y=({children:t,onClick:n,className:r="",disabled:i=!1})=>e("button",{onClick:n,disabled:i,className:`px-4 py-2 rounded bg-blue-500 text-white hover:bg-blue-600 disabled:opacity-50 ${r}`,children:t});var J=function(e,t){return J=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])},J(e,t)};function Q(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}J(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var q=function(){return q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},q.apply(this,arguments)};function W(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function X(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;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"==typeof SuppressedError&&SuppressedError;var H="Invariant Violation",Z=Object.setPrototypeOf,ee=void 0===Z?function(e,t){return e.__proto__=t,e}:Z,te=function(e){function t(n){void 0===n&&(n=H);var r=e.call(this,"number"==typeof n?H+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=H,ee(r,t.prototype),r}return Q(t,e),t}(Error);function ne(e,t){if(!e)throw new te(t)}var re=["debug","log","warn","error","silent"],ie=re.indexOf("log");function se(e){return function(){if(re.indexOf(e)>=ie)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=se("debug"),e.log=se("log"),e.warn=se("warn"),e.error=se("error")}(ne||(ne={}));var oe="3.13.8";function ae(e){try{return e()}catch(e){}}var ce=ae((function(){return globalThis}))||ae((function(){return window}))||ae((function(){return self}))||ae((function(){return global}))||ae((function(){return ae.constructor("return this")()})),le=new Map;function ue(e,t){var n,r,i=(n="stringifyForDisplay",r=le.get(n)||1,le.set(n,r+1),"".concat(n,":").concat(r,":").concat(Math.random().toString(36).slice(2)));return JSON.stringify(e,(function(e,t){return void 0===t?i:t}),t).split(JSON.stringify(i)).join("<undefined>")}function de(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if("number"==typeof t){var i=t;(t=me(i))||(t=Ee(i,n),n=[])}e.apply(void 0,[t].concat(n))}}var he=Object.assign((function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];e||ne(e,me(t,n)||Ee(t,n))}),{debug:de(ne.debug),log:de(ne.log),warn:de(ne.warn),error:de(ne.error)}),pe=Symbol.for("ApolloErrorMessageHandler_"+oe);function fe(e){if("string"==typeof e)return e;try{return ue(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function me(e,t){if(void 0===t&&(t=[]),e)return ce[pe]&&ce[pe](e,t.map(fe))}function Ee(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:oe,message:e,args:t.map(fe)})))}function ge(e,t){if(!Boolean(e))throw new Error(t)}function ye(e,t){if(!Boolean(e))throw new Error("Unexpected invariant triggered.")}const ve=/\r\n|[\n\r]/g;function Te(e,t){let n=0,r=1;for(const i of e.body.matchAll(ve)){if("number"==typeof i.index||ye(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ne(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=1===t.line?n:0,c=t.column+a,l=`${e.name}:${o}:${c}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(c/80),t=c%80,n=[];for(let e=0;e<d.length;e+=80)n.push(d.slice(e,e+80));return l+be([[`${o} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return l+be([[o-1+" |",u[i-1]],[`${o} |`,d],["|","^".padStart(c)],[`${o+1} |`,u[i+1]]])}function be(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class _e extends Error{constructor(e,...t){var n,r,i;const{nodes:s,source:o,positions:a,path:c,originalError:l,extensions:u}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=c?c:void 0,this.originalError=null!=l?l:void 0,this.nodes=Ie(Array.isArray(s)?s:s?[s]:void 0);const d=Ie(null===(n=this.nodes)||void 0===n?void 0:n.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=o?o:null==d||null===(r=d[0])||void 0===r?void 0:r.source,this.positions=null!=a?a:null==d?void 0:d.map((e=>e.start)),this.locations=a&&o?a.map((e=>Te(o,e))):null==d?void 0:d.map((e=>Te(e.source,e.start)));const h="object"==typeof(p=null==l?void 0:l.extensions)&&null!==p?null==l?void 0:l.extensions:void 0;var p;this.extensions=null!==(i=null!=u?u:h)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=l&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,_e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+="\n\n"+Ne((t=n.loc).source,Te(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Ne(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Ie(e){return void 0===e||0===e.length?void 0:e}function xe(e,t,n){return new _e(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Oe{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class ke{constructor(e,t,n,r,i,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}var Ae,Ce,De,Se;function we(e){return e>=48&&e<=57}function Re(e){return e>=97&&e<=122||e>=65&&e<=90}function Le(e){return Re(e)||95===e}function Fe(e){return Re(e)||we(e)||95===e}function Pe(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let t=0;t<e.length;++t){var s;const o=e[t],a=Me(o);a!==o.length&&(r=null!==(s=r)&&void 0!==s?s:t,i=t,0!==t&&a<n&&(n=a))}return e.map(((e,t)=>0===t?e:e.slice(n))).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function Me(e){let t=0;for(;t<e.length&&(9===(n=e.charCodeAt(t))||32===n);)++t;var n;return t}new Set(Object.keys({Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["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:["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"]})),function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Ae||(Ae={})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Ce||(Ce={})),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"}(De||(De={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(Se||(Se={}));class Ue{constructor(e){const t=new ke(Se.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Se.EOF)do{if(e.next)e=e.next;else{const t=Ke(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Se.COMMENT);return e}}function je(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Be(e,t){return Ve(e.charCodeAt(t))&&Ge(e.charCodeAt(t+1))}function Ve(e){return e>=55296&&e<=56319}function Ge(e){return e>=56320&&e<=57343}function ze(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return Se.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function $e(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new ke(t,n,r,s,o,i)}function Ke(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Ye(e,i);case 33:return $e(e,Se.BANG,i,i+1);case 36:return $e(e,Se.DOLLAR,i,i+1);case 38:return $e(e,Se.AMP,i,i+1);case 40:return $e(e,Se.PAREN_L,i,i+1);case 41:return $e(e,Se.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return $e(e,Se.SPREAD,i,i+3);break;case 58:return $e(e,Se.COLON,i,i+1);case 61:return $e(e,Se.EQUALS,i,i+1);case 64:return $e(e,Se.AT,i,i+1);case 91:return $e(e,Se.BRACKET_L,i,i+1);case 93:return $e(e,Se.BRACKET_R,i,i+1);case 123:return $e(e,Se.BRACE_L,i,i+1);case 124:return $e(e,Se.PIPE,i,i+1);case 125:return $e(e,Se.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?tt(e,i):qe(e,i)}if(we(t)||45===t)return Je(e,i,t);if(Le(t))return nt(e,i);throw xe(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":je(t)||Be(n,i)?`Unexpected character: ${ze(e,i)}.`:`Invalid character: ${ze(e,i)}.`)}return $e(e,Se.EOF,r,r)}function Ye(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(je(e))++i;else{if(!Be(n,i))break;i+=2}}return $e(e,Se.COMMENT,t,i,n.slice(t+1,i))}function Je(e,t,n){const r=e.source.body;let i=t,s=n,o=!1;if(45===s&&(s=r.charCodeAt(++i)),48===s){if(s=r.charCodeAt(++i),we(s))throw xe(e.source,i,`Invalid number, unexpected digit after 0: ${ze(e,i)}.`)}else i=Qe(e,i,s),s=r.charCodeAt(i);if(46===s&&(o=!0,s=r.charCodeAt(++i),i=Qe(e,i,s),s=r.charCodeAt(i)),69!==s&&101!==s||(o=!0,s=r.charCodeAt(++i),43!==s&&45!==s||(s=r.charCodeAt(++i)),i=Qe(e,i,s),s=r.charCodeAt(i)),46===s||Le(s))throw xe(e.source,i,`Invalid number, expected digit but got: ${ze(e,i)}.`);return $e(e,o?Se.FLOAT:Se.INT,t,i,r.slice(t,i))}function Qe(e,t,n){if(!we(n))throw xe(e.source,t,`Invalid number, expected digit but got: ${ze(e,t)}.`);const r=e.source.body;let i=t+1;for(;we(r.charCodeAt(i));)++i;return i}function qe(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,o="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return o+=n.slice(s,i),$e(e,Se.STRING,t,i+1,o);if(92!==r){if(10===r||13===r)break;if(je(r))++i;else{if(!Be(n,i))throw xe(e.source,i,`Invalid character within String: ${ze(e,i)}.`);i+=2}}else{o+=n.slice(s,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?We(e,i):Xe(e,i):et(e,i);o+=t.value,i+=t.size,s=i}}throw xe(e.source,i,"Unterminated string.")}function We(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!je(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Ze(e),r<0)break}throw xe(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Xe(e,t){const n=e.source.body,r=He(n,t+2);if(je(r))return{value:String.fromCodePoint(r),size:6};if(Ve(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=He(n,t+8);if(Ge(e))return{value:String.fromCodePoint(r,e),size:12}}throw xe(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function He(e,t){return Ze(e.charCodeAt(t))<<12|Ze(e.charCodeAt(t+1))<<8|Ze(e.charCodeAt(t+2))<<4|Ze(e.charCodeAt(t+3))}function Ze(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function et(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw xe(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function tt(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,o=s,a="";const c=[];for(;s<r;){const r=n.charCodeAt(s);if(34===r&&34===n.charCodeAt(s+1)&&34===n.charCodeAt(s+2)){a+=n.slice(o,s),c.push(a);const r=$e(e,Se.BLOCK_STRING,t,s+3,Pe(c).join("\n"));return e.line+=c.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(s+1)||34!==n.charCodeAt(s+2)||34!==n.charCodeAt(s+3))if(10!==r&&13!==r)if(je(r))++s;else{if(!Be(n,s))throw xe(e.source,s,`Invalid character within String: ${ze(e,s)}.`);s+=2}else a+=n.slice(o,s),c.push(a),13===r&&10===n.charCodeAt(s+1)?s+=2:++s,a="",o=s,i=s;else a+=n.slice(o,s),o=s+1,s+=4}throw xe(e.source,s,"Unterminated string.")}function nt(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){if(!Fe(n.charCodeAt(i)))break;++i}return $e(e,Se.NAME,t,i,n.slice(t,i))}function rt(e){return it(e,[])}function it(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:it(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(it(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+": "+it(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}const st=globalThis.process&&"production"===process.env.NODE_ENV?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;const r=t.prototype[Symbol.toStringTag];if(r===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name)){const t=rt(e);throw new Error(`Cannot use ${r} "${t}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1};class ot{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||ge(!1,`Body must be a string. Received: ${rt(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||ge(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ge(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class at{constructor(e,t={}){const n=function(e){return st(e,ot)}(e)?e:new ot(e);this._lexer=new Ue(n),this._options=t,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(Se.NAME);return this.node(e,{kind:De.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:De.DOCUMENT,definitions:this.many(Se.SOF,this.parseDefinition,Se.EOF)})}parseDefinition(){if(this.peek(Se.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Se.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw xe(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Se.BRACE_L))return this.node(e,{kind:De.OPERATION_DEFINITION,operation:Ae.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(Se.NAME)&&(n=this.parseName()),this.node(e,{kind:De.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Se.NAME);switch(e.value){case"query":return Ae.QUERY;case"mutation":return Ae.MUTATION;case"subscription":return Ae.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Se.PAREN_L,this.parseVariableDefinition,Se.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:De.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Se.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Se.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Se.DOLLAR),this.node(e,{kind:De.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:De.SELECTION_SET,selections:this.many(Se.BRACE_L,this.parseSelection,Se.BRACE_R)})}parseSelection(){return this.peek(Se.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(Se.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:De.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Se.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Se.PAREN_L,t,Se.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(Se.COLON),this.node(t,{kind:De.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Se.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Se.NAME)?this.node(e,{kind:De.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:De.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:De.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:De.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Se.BRACKET_L:return this.parseList(e);case Se.BRACE_L:return this.parseObject(e);case Se.INT:return this.advanceLexer(),this.node(t,{kind:De.INT,value:t.value});case Se.FLOAT:return this.advanceLexer(),this.node(t,{kind:De.FLOAT,value:t.value});case Se.STRING:case Se.BLOCK_STRING:return this.parseStringLiteral();case Se.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:De.BOOLEAN,value:!0});case"false":return this.node(t,{kind:De.BOOLEAN,value:!1});case"null":return this.node(t,{kind:De.NULL});default:return this.node(t,{kind:De.ENUM,value:t.value})}case Se.DOLLAR:if(e){if(this.expectToken(Se.DOLLAR),this._lexer.token.kind===Se.NAME){const e=this._lexer.token.value;throw xe(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:De.STRING,value:e.value,block:e.kind===Se.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:De.LIST,values:this.any(Se.BRACKET_L,(()=>this.parseValueLiteral(e)),Se.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:De.OBJECT,fields:this.any(Se.BRACE_L,(()=>this.parseObjectField(e)),Se.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(Se.COLON),this.node(t,{kind:De.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Se.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Se.AT),this.node(t,{kind:De.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Se.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Se.BRACKET_R),t=this.node(e,{kind:De.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(Se.BANG)?this.node(e,{kind:De.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:De.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Se.STRING)||this.peek(Se.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(Se.BRACE_L,this.parseOperationTypeDefinition,Se.BRACE_R);return this.node(e,{kind:De.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Se.COLON);const n=this.parseNamedType();return this.node(e,{kind:De.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:De.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:De.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Se.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Se.BRACE_L,this.parseFieldDefinition,Se.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Se.COLON);const i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:De.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(Se.PAREN_L,this.parseInputValueDef,Se.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Se.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(Se.EQUALS)&&(i=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(e,{kind:De.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:De.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:De.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(Se.EQUALS)?this.delimitedMany(Se.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:De.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(Se.BRACE_L,this.parseEnumValueDefinition,Se.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:De.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw xe(this._lexer.source,this._lexer.token.start,`${ct(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:De.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(Se.BRACE_L,this.parseInputValueDef,Se.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Se.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(Se.BRACE_L,this.parseOperationTypeDefinition,Se.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:De.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:De.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:De.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:De.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:De.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:De.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:De.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Se.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(e,{kind:De.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(Se.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Ce,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Oe(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw xe(this._lexer.source,t.start,`Expected ${lt(e)}, found ${ct(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Se.NAME||t.value!==e)throw xe(this._lexer.source,t.start,`Expected "${e}", found ${ct(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Se.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return xe(this._lexer.source,t.start,`Unexpected ${ct(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==Se.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw xe(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function ct(e){const t=e.value;return lt(e.kind)+(null!=t?` "${t}"`:"")}function lt(e){return function(e){return e===Se.BANG||e===Se.DOLLAR||e===Se.AMP||e===Se.PAREN_L||e===Se.PAREN_R||e===Se.SPREAD||e===Se.COLON||e===Se.EQUALS||e===Se.AT||e===Se.BRACKET_L||e===Se.BRACKET_R||e===Se.BRACE_L||e===Se.PIPE||e===Se.BRACE_R}(e)?`"${e}"`:e}ae((function(){return navigator.product}));var ut="function"==typeof Symbol&&"function"==typeof Symbol.for,dt="function"==typeof ae((function(){return window.document.createElement}));function ht(){}ae((function(){return navigator.userAgent.indexOf("jsdom")>=0}));const pt=ht,ft="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},mt="undefined"!=typeof WeakMap?WeakMap:Map,Et="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:ht,unregister:ht}};class gt{constructor(e=1/0,t=pt){this.max=e,this.dispose=t,this.map=new mt,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 ft(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Et(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))}}var yt=new WeakSet;var vt=function(e,t){var n=new gt(e,t);return n.set=function(e,t){var n=gt.prototype.set.call(this,e,t);return function(e){e.size<=(e.max||-1)||yt.has(e)||(yt.add(e),setTimeout((function(){e.clean(),yt.delete(e)}),100))}(this),n},n},Tt=Symbol.for("apollo.cacheSize"),Nt=q({},ce[Tt]);function bt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var _t=function(e){function t(n){var r,i,s=n.graphQLErrors,o=n.protocolErrors,a=n.clientErrors,c=n.networkError,l=n.errorMessage,u=n.extraInfo,d=e.call(this,l)||this;return d.name="ApolloError",d.graphQLErrors=s||[],d.protocolErrors=o||[],d.clientErrors=a||[],d.networkError=c||null,d.message=l||(i=X(X(X([],(r=d).graphQLErrors,!0),r.clientErrors,!0),r.protocolErrors,!0),r.networkError&&i.push(r.networkError),i.map((function(e){return null!==(t=e)&&"object"==typeof t&&e.message||"Error message not found.";var t})).join("\n")),d.extraInfo=u,d.cause=X(X(X([c],s||[],!0),o||[],!0),a||[],!0).find((function(e){return!!e}))||null,d.__proto__=t.prototype,d}return Q(t,e),t}(Error);const{toString:It,hasOwnProperty:xt}=Object.prototype,Ot=Function.prototype.toString,kt=new Map;function At(e,t){try{return Ct(e,t)}finally{kt.clear()}}function Ct(e,t){if(e===t)return!0;const n=It.call(e);if(n!==It.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Rt(e,t))return!0;const n=Dt(e),r=Dt(t),i=n.length;if(i!==r.length)return!1;for(let e=0;e<i;++e)if(!xt.call(t,n[e]))return!1;for(let r=0;r<i;++r){const i=n[r];if(!Ct(e[i],t[i]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Rt(e,t))return!0;const r=e.entries(),i="[object Map]"===n;for(;;){const e=r.next();if(e.done)break;const[n,s]=e.value;if(!t.has(n))return!1;if(i&&!Ct(s,t.get(n)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let n=e.byteLength;if(n===t.byteLength)for(;n--&&e[n]===t[n];);return-1===n}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const n=Ot.call(e);return n===Ot.call(t)&&!function(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(n,wt)}}return!1}function Dt(e){return Object.keys(e).filter(St,e)}function St(e){return void 0!==this[e]}const wt="{ [native code] }";function Rt(e,t){let n=kt.get(e);if(n){if(n.has(t))return!0}else kt.set(e,n=new Set);return n.add(t),!1}var Lt=new Map,Ft=new Map,Pt=!0,Mt=!1;function Ut(e){return e.replace(/[\s,]+/g," ").trim()}function jt(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=Ut((o=e.loc).source.body.substring(o.start,o.end)),s=Ft.get(r);s&&!s.has(i)?Pt&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):s||Ft.set(r,s=new Set),s.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var o})),q(q({},e),{definitions:n})}function Bt(e){var t=Ut(e);if(!Lt.has(t)){var n=function(e,t){const n=new at(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}(e,{experimentalFragmentVariables:Mt,allowLegacyFragmentVariables:Mt});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");Lt.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(jt(n)))}return Lt.get(t)}function Vt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),Bt(r)}var Gt,zt=Vt,$t=function(){Lt.clear(),Ft.clear()},Kt=function(){Pt=!1},Yt=function(){Mt=!0},Jt=function(){Mt=!1};(Gt=Vt||(Vt={})).gql=zt,Gt.resetCaches=$t,Gt.disableFragmentWarnings=Kt,Gt.enableExperimentalFragmentVariables=Yt,Gt.disableExperimentalFragmentVariables=Jt,Vt.default=Vt;var Qt,qt={exports:{}};var Wt,Xt,Ht,Zt=(Qt||(Qt=1,(Wt=qt).exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,Wt.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Wt.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(Wt.exports,s)),qt.exports),en=ut?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function tn(e){var t=Zt.useContext(function(){he(!0,54);var e=Zt.createContext[en];return e||(Object.defineProperty(Zt.createContext,en,{value:e=Zt.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}()).client;return he(!!t,58),t}function nn(e){var t;switch(e){case Xt.Query:t="Query";break;case Xt.Mutation:t="Mutation";break;case Xt.Subscription:t="Subscription"}return t}function rn(e){Ht||(Ht=new vt(Nt.parser||1e3));var t,n,r=Ht.get(e);if(r)return r;he(!!e&&!!e.kind,70,e);for(var i=[],s=[],o=[],a=[],c=0,l=e.definitions;c<l.length;c++){var u=l[c];if("FragmentDefinition"!==u.kind){if("OperationDefinition"===u.kind)switch(u.operation){case"query":s.push(u);break;case"mutation":o.push(u);break;case"subscription":a.push(u)}}else i.push(u)}he(!i.length||s.length||o.length||a.length,71),he(s.length+o.length+a.length<=1,72,e,s.length,a.length,o.length),n=s.length?Xt.Query:Xt.Mutation,s.length||o.length||(n=Xt.Subscription);var d=s.length?s:o.length?o:a;he(1===d.length,73,e,d.length);var h=d[0];t=h.variableDefinitions||[];var p={name:h.name&&"Name"===h.name.kind?h.name.value:"data",type:n,variables:t};return Ht.set(e,p),p}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(Xt||(Xt={})),rn.resetCache=function(){Ht=void 0};var sn=dt?Zt.useLayoutEffect:Zt.useEffect;function on(e,t){var n,r,i,s,o,a=tn();n=e,r=Xt.Mutation,i=rn(n),s=nn(r),o=nn(i.type),he(i.type===r,74,s,s,o);var c=Zt.useState({called:!1,loading:!1,client:a}),l=c[0],u=c[1],d=Zt.useRef({result:l,mutationId:0,isMounted:!0,client:a,mutation:e,options:t});sn((function(){Object.assign(d.current,{client:a,options:t,mutation:e})}));var h=Zt.useCallback((function(e){void 0===e&&(e={});var t=d.current,n=t.options,r=t.mutation,i=q(q({},n),{mutation:r}),s=e.client||d.current.client;d.current.result.loading||i.ignoreResults||!d.current.isMounted||u(d.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:s});var o=++d.current.mutationId,a=function(e,t){return bt(e,t,t.variables&&{variables:bt(q(q({},e&&e.variables),t.variables))})}(i,e);return s.mutate(a).then((function(t){var n,r,i=t.data,c=t.errors,l=c&&c.length>0?new _t({graphQLErrors:c}):void 0,h=e.onError||(null===(n=d.current.options)||void 0===n?void 0:n.onError);if(l&&h&&h(l,a),o===d.current.mutationId&&!a.ignoreResults){var p={called:!0,loading:!1,data:i,error:l,client:s};d.current.isMounted&&!At(d.current.result,p)&&u(d.current.result=p)}var f=e.onCompleted||(null===(r=d.current.options)||void 0===r?void 0:r.onCompleted);return l||null==f||f(t.data,a),t}),(function(t){var n;if(o===d.current.mutationId&&d.current.isMounted){var r={loading:!1,error:t,data:void 0,called:!0,client:s};At(d.current.result,r)||u(d.current.result=r)}var i=e.onError||(null===(n=d.current.options)||void 0===n?void 0:n.onError);if(i)return i(t,a),{data:void 0,errors:t};throw t}))}),[]),p=Zt.useCallback((function(){if(d.current.isMounted){var e={called:!1,loading:!1,client:d.current.client};Object.assign(d.current,{mutationId:0,result:e}),u(e)}}),[]);return Zt.useEffect((function(){var e=d.current;return e.isMounted=!0,function(){e.isMounted=!1}}),[]),[h,q({reset:p},l)]}const an=Vt`
|
|
2
|
+
mutation UpdateUser($input: Update_Auth_Input!) {
|
|
3
|
+
update_auth(input: $input) {
|
|
4
|
+
_id
|
|
5
|
+
firstName
|
|
6
|
+
lastName
|
|
7
|
+
email
|
|
8
|
+
role
|
|
9
|
+
dateAdded
|
|
10
|
+
projects
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`,cn=()=>{const[e,{loading:t,error:n}]=on(an);return{updateUser:t=>W(void 0,void 0,void 0,(function*(){try{const{data:n}=yield e({variables:{input:t}});return(null==n?void 0:n.update_auth)||null}catch(e){throw console.log("Error updating user:",e),e}})),loading:t,error:n}},ln=[],un=u(void 0),dn=({config:t,children:n})=>{const[r,i]=s.useState(t),o={config:r,updateConfig:e=>{i((t=>Object.assign(Object.assign({},t),e)))}};return e(un.Provider,{value:o,children:n})},hn=()=>{const e=d(un);if(!e)throw new Error("useDashboard must be used within a DashboardProvider");return e},pn=({plugins:n,children:r})=>{const[i,s]=a(n.length>0?n[0].id:null),[o,c]=a(0);return t("div",{className:"plugin-manager",children:[r,0===n.length?null:t("div",{className:"plugin-list mb-4",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Available Plugins:"}),e("div",{className:"space-x-2",children:n.map((t=>e("button",{onClick:()=>{s(t.id),c(0)},className:"px-3 py-1 rounded "+(i===t.id?"bg-blue-500 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"),children:t.name},t.id)))})]}),e("div",{className:"plugin-content",children:(()=>{if(!i||0===n.length)return null;const e=n.find((e=>e.id===i));if(!e||!e.tabs||0===e.tabs.length)return null;return(e.tabs[o]||e.tabs[0]).content})()})]})},fn=e=>ln.flatMap((e=>Array.isArray(e)?e:[e]));function mn(e){return Array.isArray(e)?e:[]}function En(e,t){return mn(e).filter(t)}function gn(e,t){return mn(e).map(t)}function yn(e,t){return mn(e).find(t)}function vn(e,t){return mn(e).some(t)}function Tn(e){return mn(e).length}function Nn(e){return Array.isArray(e)&&e.length>0}function bn(e){return/<[a-z][\s\S]*>/i.test(e)}function _n(e,t){for(let n=0;n<e.length;n++){let r=!1;if(r=bn(e[n]),r){const r={text:e[n],hasLinks:!0};t.push(r)}else{const r={text:e[n],hasLinks:!1};t.push(r)}}}const In=({type:t,style:n,text:r,items:i,orderedListStyle:s="",unorderedListStyle:o="",paragraphStyle:a=""})=>{if("list"===t){if("ordered"===n){const t=[];return i&&_n(i,t),e("ol",{className:s,children:t.map(((t,n)=>t.hasLinks?e("li",{dangerouslySetInnerHTML:{__html:t.text}},n):e("li",{children:t.text},n)))})}{const t=[];return i&&_n(i,t),e("ul",{className:o,children:t.map(((t,n)=>t.hasLinks?e("li",{dangerouslySetInnerHTML:{__html:t.text}},n):e("li",{children:t.text},n)))})}}{let t;return r?(t=bn(r),e("p",t?{className:a,dangerouslySetInnerHTML:{__html:r}}:{className:a,children:r})):e("p",{className:a,children:r})}},xn=(e,t)=>e&&e.length>t?e.slice(0,t)+"...":e,On=()=>{const[e,t]=a({width:0,height:0});return c((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e};function kn(e,t){const n=t||[];return(e||[]).filter((e=>!n.includes(e)))}function An(e){return(e||[]).reduce(((e,t)=>e.concat(Array.isArray(t)?An(t):t)),[])}const Cn=e=>{let t="";return e&&(t=e.address_1&&e.address_1.length>0?e.address_1+", ":"",e.address_2&&e.address_2.length>0?t+=e.address_2+", ":t+="",e.city&&e.city.length>0?t+=e.city+", ":t+="",e.state&&e.state.length>0?t+=e.state:t+="",e.zip&&e.zip.length>0&&(t+=" "+e.zip)),t},Dn=e=>"EVALUATOR"===e?"MODERATOR":e,Sn=u(null),wn=({children:t})=>{const[n,r]=a([]),i=h(new Map),s=p((e=>{const t=i.current.get(e);t&&(clearTimeout(t),i.current.delete(e)),r((t=>t.filter((t=>t.id!==e))))}),[]),o=p(((e,t="error",n=!0,o=1e4)=>{const a=`error_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,c={id:a,type:t,message:e,timestamp:Date.now(),autoHide:n,duration:o};if(r((n=>n.some((n=>n.message===e&&n.type===t))?n:[...n,c])),n&&o){const e=setTimeout((()=>{s(a)}),o);i.current.set(a,e)}return a}),[s]),l=p((()=>{i.current.forEach((e=>{clearTimeout(e)})),i.current.clear(),r([])}),[]),u=p(((e,t=!0)=>o(e,"error",t)),[o]),d=p(((e,t=!0)=>o(e,"success",t)),[o]),f=p(((e,t=!0)=>o(e,"warning",t)),[o]),m=p(((e,t=!0)=>o(e,"info",t)),[o]);c((()=>()=>{i.current.forEach((e=>{clearTimeout(e)})),i.current.clear()}),[]);const E={errors:n,addError:o,removeError:s,clearErrors:l,showError:u,showSuccess:d,showWarning:f,showInfo:m};return e(Sn.Provider,{value:E,children:t})},Rn=()=>{const e=d(Sn);if(!e)throw new Error("useError must be used within an ErrorProvider");return e},Ln=()=>{const{showError:e}=Rn();return{handleError:p(((t,n)=>{console.error("Error caught by boundary:",t,n),e("An unexpected error occurred. Please try again.")}),[e])}},Fn=({error:r,onClose:i})=>t("div",{className:`text-white p-4 rounded-lg shadow-lg ring-2 ${(()=>{switch(r.type){case"success":return"ring-idd-green";case"warning":return"ring-idd-yellow";case"info":return"ring-idd-purple";default:return"ring-idd-active-color"}})()} flex items-start gap-3 max-w-md`,children:[e("div",{className:"flex-shrink-0 mt-0.5",children:(()=>{switch(r.type){case"success":return e(v,{});case"warning":default:return e(g,{});case"info":return e(y,{})}})()}),e("div",{className:"flex-1 min-w-0",children:t("div",{className:"font-idd-primary-font-regular text-lg leading-relaxed",children:[e("span",{className:"font-idd-primary-font-bold text-lg",children:(()=>{switch(r.type){case"success":return"Success: ";case"warning":return"Warning: ";case"info":return"Info: ";default:return"Error: "}})()})," ",r.message]})}),e(n,{buttonClass:"border-0 bg-idd-transparent ms-auto",onPress:()=>i(r.id),"aria-label":"Close",children:e(f,{})})]}),Pn=()=>{const{errors:t,removeError:n}=Rn();return 0===t.length?null:e("div",{className:"fixed bottom-10 right-10 flex flex-col gap-3",style:{zIndex:1e3},children:t.map((t=>e("div",{className:"bg-idd-white mt-3",children:e(Fn,{error:t,onClose:n})},t.id)))})};export{T as ActionTypes,R as CancelActionButton,L as ConfirmActionButton,In as ContentItem,dn as DashboardProvider,F as ErrorBoundary,wn as ErrorProvider,Fn as ErrorToast,Pn as ErrorToastContainer,G as IDDLinkInputItem,z as Layout,$ as Password,pn as PluginManager,Y as SimpleButton,K as TextInput,M as defaultConfig,mn as ensureArray,An as flatten,kn as getArraysDiff,B as getConfig,Cn as getLocationString,fn as get_all_plugins,Nn as isNonEmptyArray,P as isURL,Dn as mapUserRole,k as resetReducer,En as safeFilter,yn as safeFind,Tn as safeLength,gn as safeMap,vn as safeSome,j as setConfig,O as setCurrentItem,b as setCurrentPlugin,A as setCurrentPluginAndTab,I as setCurrentState,_ as setCurrentTab,C as setCurrentTabAndState,x as setCurrentView,N as setPlugins,D as setSetting,S as toggleCollapsed,w as toggleNotifications,xn as truncate,V as useConfig,hn as useDashboard,Rn as useError,Ln as useErrorBoundary,cn as useUpdateUser,On as useWindowDimensions};
|
|
14
|
+
//# sourceMappingURL=index.esm.js.map
|